Jump to content

custom overlay for gpio-poweroff


mflorezm

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

image.thumb.png.a86e49633b4185a21430751c66af0b80.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines