Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My device tree overlay is bricking the NanoPi NEO

Featured Replies

I'm trying to add the optional input-debounce to the GPIO G ports of my NanoPi NEO (AllWinner H3) with a device tree overlay, but my overlay merely manages to brick the device.  Here is my overlay, of which I've tried several tweaked versions:

/dts-v1/;
/plugin/;

/ {
    fragment@0 {
        target = <&pio>;
        __overlay__ {
            input-debounce = <1 1>;
        };
    };
};

 

I create the file on the running device and I use 'sudo armbian-add-overlay <file.dts>' and reboot to test my changes.  I'm using <&pio> as the target because I see in the device tree that &pio is a symbol to "/soc/pinctrl@1c20800".  As for the actual input-debounce values, I'm not 100% sure what should go in there, or how many arguments I need.  I've experimented with two or three values inside the <> (always a 1), and those tweaks always brick the device.  It's as if the device tree compiler is treating it as a complete device tree subsection rather than an overlay.  Does anyone have suggestions of what I might be doing wrong?  Thanks!

  • Author
12 hours ago, tparys said:

 

Check the AllWinner device tree bindings in the kernel documentation?

 

https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/allwinner%2Csunxi-pinctrl.txt

 

It says "one period per irq bank found in the controller".  My interpretation of that is I would need three values - one each for GPIO A, G, and L, e.g. input-debounce <1 1 1>.  However, other posts imply only two values are required.  But unfortunately my biggest problem is that any attempt to change the main pio (pinctrl@1c20800) section bricks the device.  I can make changes to sub-sections inside pinctrl@1c20800, so I *almost* know what I'm doing.  But the optional input-debounce is a property of the main pinctrl@1c20800 itself.  I believe that once I get that resolved, I'll be able to troubleshoot my way to learning the proper debounce values.

  • Author

@tparys yes that's how I'm doing it.  I boot a working image, and try to add the overly using armbian-add-overlay, which throws no errors, and I get the message that a reboot is required to make it live.  It never recovers from the reboot (at least it never recovers far enough to ping it, I don't have HDMI connected).

So, armbian-add-overlay adds the overlay to /boot/overlay-user, which are processed in the bootloader before the kernel starts.

 

The process I pointed uses sysfs to actually tells the kernel to add the overlay *after* the system starts, and doesn't affect future boots.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.