Re: Setting up GPIO pins from a overlay
Jason Thorpe <[email protected]>
| Newsgroups | gmane.os.netbsd.current |
|---|---|
| Message-ID | <[email protected]> |
> On Oct 20, 2025, at 4:05 PM, Brad Spencer <[email protected]> wrote: > > > Setting up the nature of a GPIO pin from an overlay appears to be > possible with Linux. Since overlay incantations for Linux really do not > seem to work with NetBSD, I was wondering if anyone has done this with a > NetBSD overlay?? I do this on the daily with non-RPI: net-helper:thorpej 21$ pwd /stand/evbarm/dtb net-helper:thorpej 22$ ls -l total 8 8 -rw-r--r-- 1 root wheel 393 Apr 20 2019 sunxi-h3-h5-orangepi-zero-nas.dtbo net-helper:thorpej 23$ dtc -s sunxi-h3-h5-orangepi-zero-nas.dtbo <stdout>: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property <stdout>: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property /dts-v1/; / { compatible = "xunlong,orangepi-zero-plus"; __fixups__ { ehci2 = "/fragment@0:target:0"; ohci2 = "/fragment@1:target:0"; }; fragment@0 { target = <0xffffffff>; __overlay__ { status = "okay"; }; }; fragment@1 { target = <0xffffffff>; __overlay__ { status = "okay"; }; }; }; net-helper:thorpej 24$ This machine is old enough (1156 day uptime currently, and previous reboot was “UPS ran out of battery during power failure”) that it uses an old discovery mechanism for the overloads… I think you use a directive in the efiboot boot.cfg now. But that doesn’t help with RPI. I’ve definitely done this with RPI, but not recently. I’ll dig out my ancient armv6 RPI which has what remains of my prototype nixie clock display attached to it … pretty sure the TF card in that board has the right magic incantation, since I was definitely using DT overlays on that board. What syntax are you using that’s not working for you? -- thorpej