Benik3 Posted Wednesday at 03:39 PM Share Posted Wednesday at 03:39 PM (edited) Hello. I'm trying to get the PWM2 and 3 to work on RockPi E. I made a custom dts to enable PWM2, loaded using armbian-add-overlay: /dts-v1/; /plugin/; / { compatible = "rockchip,rk3328"; fragment@0 { target = <0xffffffff>; __overlay__ { status = "okay"; }; }; __fixups__ { pwm2 = "/fragment@0:target:0"; }; }; But the kernel doesn't boot: Quote Applying user provided DT overlay pwm2.dtbo 2825 bytes read in 8 ms (344.7 KiB/s) Applying kernel provided DT fixup script (rockchip-fixup.scr) ## Executing script at 09000000 Trying kaslrseed command... Info: Unknown command can be safely ignored since kaslrseed does not apply to all boards. Unknown command 'kaslrseed' - try 'help' Moving Image from 0x2080000 to 0x2200000, end=3f60000 ## Loading init Ramdisk from Legacy Image at 06000000 ... Image Name: uInitrd Image Type: AArch64 Linux RAMDisk Image (gzip compressed) Data Size: 13457599 Bytes = 12.8 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 01f00000 Booting using the fdt blob at 0x1f00000 Loading Ramdisk to 3d24b000, end 3df208bf ... OK Loading Device Tree to 000000003d1d3000, end 000000003d24afff ... OK Starting kernel ... Loading, please wait... Starting systemd-udevd version 255.4-1ubuntu8.4 Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done. done. Gave up waiting for root file system device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Missing modules (cat /proc/modules; ls /dev) ALERT! UUID=0dccabb9-348f-4764-a9d1-510c34a7c1ba does not exist. Dropping to a shell! BusyBox v1.36.1 (Ubuntu 1:1.36.1-6ubuntu3.1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) Any idea? I already tried to enable uart1 using custom dtbo and it works without problem. I'm testing on Ubuntu Noble Minimal/IoT v24.8.3 for Rockpi E running Armbian Linux 6.6.51-current-rockchip64 Thank you Edited Wednesday at 03:41 PM by Benik3 0 Quote Link to comment Share on other sites More sharing options...
Benik3 Posted 18 hours ago Author Share Posted 18 hours ago (edited) I enabled higher verbosity level to debug uart. It looks like there is some conflict with I2C, but it doesn't make sense, because PWM2 pin has only 2 functoins - GPIO and PWM. I2C is common with PWM0 and 1... From the log: Quote [ 1.040967] rockchip-pinctrl pinctrl: pin gpio2-6 already requested by ff1b0020.pwm; cannot claim for 1-0018 [ 1.041857] rockchip-pinctrl pinctrl: pin-70 (1-0018) status -22 [ 1.042396] rockchip-pinctrl pinctrl: could not request pin 70 (gpio2-6) from group pmic-int-l on device rockchip-pinctrl [ 1.043404] rk8xx-i2c 1-0018: Error applying setting, reverse things back I will dig more... EDIT: it looks like this pin is used by pmic (from decompiled dtb on running system). But I didn't find pmic in the source codes: https://github.com/armbian/linux-rockchip/blob/0c0949a270027b749ab2c818e7ff61fc542757cc/arch/arm64/boot/dts/rockchip/rk3328.dtsi I'm new in Device Tree, so it takes me some time to get oriented in it... pmic { pmic-int-l { rockchip,pins = <0x02 0x06 0x00 0x65>; phandle = <0x2a>; }; }; EDIT2: Ok, it's under https://github.com/armbian/linux-rockchip/blob/1725188c90e86921c54e72f8b306c2177097256d/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts#L334 But what I don't understand is, that I didn't find any reference to this pin control (nor in source code nor in decompiled dtb), so why it is a problem? EDIT3: ok, I found it. I searched for wrong name: &i2c1 { status = "okay"; rk805: pmic@18 { compatible = "rockchip,rk805"; reg = <0x18>; interrupt-parent = <&gpio2>; interrupts = <6 IRQ_TYPE_LEVEL_LOW>; #clock-cells = <1>; clock-output-names = "xin32k", "rk805-clkout2"; gpio-controller; #gpio-cells = <2>; pinctrl-names = "default"; pinctrl-0 = <&pmic_int_l>; But Radxa has this pin from RK805 (or I assume that it's this one) connected to GPIO0_A2 in their schematics (for Rev 1.2): Edited 17 hours ago by Benik3 0 Quote Link to comment Share on other sites More sharing options...
Solution Benik3 Posted 17 hours ago Author Solution Share Posted 17 hours ago So the conclusion is, that on PWM2 (GPIO2_A6) is connected Power Management IC (RK805-1) INT pin, so it's not available for PWM, genius... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.