mflorezm Posted January 8, 2018 Posted January 8, 2018 Hi Guys: I have been trying to write a custom overlay to use gpio-poweroff. I'm using ARMBIAN 5.37.180106 nightly Ubuntu 16.04.3 LTS 4.14.11-sunxi. Attached is the gpio-poweroff.dts file that i wrote and even as it compiles with sudo armbian-add-overlay gpio-poweroff.dts and it is added to the last line on armbianEnv.txt like user_overlays=gpio-poweroff, it doesn't work. On boot, it shows: Applying user provided DT overlay gpio-poweroff.dtbo failed on fdt_overlay_apply() FDT_ERR_NOTFOUND Error applying DT overlays, restoring original DT All the other other overlays ilke i2c0, uart3 works perfeclty. Any help wil be appreciated. Thanks. MFM
zador.blood.stained Posted January 8, 2018 Posted January 8, 2018 There is no "gpio" label in H3 device trees, pinctrl label is "pio". Also you need 3 values for the gpios property (port bank, pin number in the bank, flags), not 2 - please check other PIO references in different H3 device trees and examples here.
mflorezm Posted January 9, 2018 Author Posted January 9, 2018 Thank you very much for your answer zador.blood.stained!!! Attached is the new file using pio and gpios = <&pio 0 13 1>. It compiles and this times it works perfectly. The user overlay was applied on boot and now works like expected. Pin PA13 (physical pin8) is forced low on halt. Regards, MFM gpio-poweroff.dts
mflorezm Posted February 13, 2018 Author Posted February 13, 2018 Hello everybody: I'm having problems becuase the custom overlay (gpio-poweroff) that i builded and was working on ARMBIAN 5.37.180106 nightly Ubuntu 16.04.3 LTS 4.14.11-sunxi.; Now that i moved to ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.18-sunxi stopped working. To compile gpio-poweroff.dts on this new version i had to install linux-headers-next-sunxi on newest version (5.41), so, i'm not sure if that is the problem (5.41 vs 5.38). It is the same board ORANGE PI PLUS 2E, just moved from desktop (ubuntu) image to headless server image (debian). All help will be welcome. Thanks. Mauricio F.
patap Posted February 16, 2018 Posted February 16, 2018 On 13.2.2018 at 8:51 PM, mflorezm said: Hello everybody: I'm having problems becuase the custom overlay (gpio-poweroff) that i builded and was working on ARMBIAN 5.37.180106 nightly Ubuntu 16.04.3 LTS 4.14.11-sunxi.; Now that i moved to ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.18-sunxi stopped working. To compile gpio-poweroff.dts on this new version i had to install linux-headers-next-sunxi on newest version (5.41), so, i'm not sure if that is the problem (5.41 vs 5.38). It is the same board ORANGE PI PLUS 2E, just moved from desktop (ubuntu) image to headless server image (debian). All help will be welcome. Thanks. Mauricio F. I think you need to have CONFIG_POWER_RESET_GPIO enabled in kernel config, it's not at the moment.
mflorezm Posted March 9, 2018 Author Posted March 9, 2018 Hi patap, I found that the custom overlay (gpio-poweroff) stops working every time that the linux kernel next headers are updated with apt-upgrade. And i can find the way to install the headers to compile without being on next version, i can not find the header for stable version. Thanks, Mauricio F.
Recommended Posts