Overlay -- set GPIO initial value

40 views
Skip to first unread message

Paul Beam

unread,
Mar 18, 2021, 11:06:43 AM3/18/21
to BeagleBoard
I'm creating my first device tree overlay for the PocketBeagle intending to setup the I/O pins the way I need them without having to run an additional script to set things up.  I'm using this as a template:https://github.com/jadonk/validation-scripts/blob/master/test-capemgr/pinctrl-test-0.dts

Is it possible in the device tree overlay to not only set the mux setting, but also set the pin initial value?  For example, if I set a GPIO as an output, can I also set that output hi?

TJF

unread,
Mar 19, 2021, 11:16:15 AM3/19/21
to BeagleBoard
Hi!

rpau...@gmail.com schrieb am Donnerstag, 18. März 2021 um 16:06:43 UTC+1:
Is it possible in the device tree overlay to not only set the mux setting, but also set the pin initial value?  For example, if I set a GPIO as an output, can I also set that output hi?

No, that's not possible in device tree overlays. Only libpruio provides that feature.

Robert Nelson

unread,
Mar 19, 2021, 11:26:15 AM3/19/21
to Beagle Board
On Thu, Mar 18, 2021 at 10:06 AM Paul Beam <rpau...@gmail.com> wrote:
>
> I'm creating my first device tree overlay for the PocketBeagle intending to setup the I/O pins the way I need them without having to run an additional script to set things up. I'm using this as a template:https://github.com/jadonk/validation-scripts/blob/master/test-capemgr/pinctrl-test-0.dts
>
> Is it possible in the device tree overlay to not only set the mux setting, but also set the pin initial value? For example, if I set a GPIO as an output, can I also set that output hi?

model it as a gpio-led, which has a default state..

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-RELAY-4PORT-00A0.dts#L89-L92

Regards,

--
Robert Nelson
https://rcn-ee.com/

rpau...@gmail.com

unread,
Mar 19, 2021, 11:40:53 AM3/19/21
to beagl...@googlegroups.com
That’s interesting! I can't say that I perfectly understand all this. It seems that mastery (or at least competence) with the device tree takes a lot of time. I'm going to play with that example and see how it works. Thanks!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/E2CQGMesMdk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYgA-%2BicfqONfqm3a5q%3D_MAoaSKX7mZth6jKfeKybhF5Pg%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages