Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Setting up GPIO pins from a overlay



Jason Thorpe <thorpej%me.com@localhost> writes:

>> On Oct 20, 2025, at 4:05 PM, Brad Spencer <brad%anduin.eldar.org@localhost> 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:
>

[snip]

> 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.

Getting the overlay to activate isn't a real problem, just put it in
/boot/overlays and add or adjust dtoverlay in config.txt.  I don't use
UEFI on these RPIs.

The problem is nearly every time I go to use an overlay provided by
somewhere on the Net, it simply doesn't work for one reason or the
other.  Disabling bluetooth was the last one I attempted, I think...
but that was a while ago.  Maybe they work better now.

> What syntax are you using that’s not working for you?

I have not actually tried any of the examples I found.  There appears to
be two types of DTBs in play, one for the RPI firmware (start.elf) and
one used by the OSs.  At least this from a while ago  ->

https://forums.raspberrypi.com/viewtopic.php?t=167734

implies that, assuming I read it correctly..  this one ->

https://raspberrypi.stackexchange.com/questions/43825/how-do-i-make-a-device-tree-overlay-for-just-a-single-gpio

has an example that may work, but I don't know what a lot of the hex
means, and can only hope that it works are written.  Mostly just hoping
someone had done this before.

> -- thorpej




-- 
Brad Spencer - brad%anduin.eldar.org@localhost


Home | Main Index | Thread Index | Old Index