dtb/dts file configuration

164 views
Skip to first unread message

El Smiedro

unread,
Aug 30, 2016, 10:24:01 AM8/30/16
to BeagleBoard

Hello everyone,

currently I am using a BBB with debian 3.8.13 and I would like to change the dtb file to get some GPIO-pins with pulldown by default. I searched many sites, but I think many information are not up to date (read something about the device tree is not used anymore?!). Is somewhere a good and current documentation/tutorial for this topic? Thank you very much for your help.

Best regards
   eric

evilwulfie

unread,
Aug 30, 2016, 10:45:47 AM8/30/16
to beagl...@googlegroups.com
to test what you want use a device overlay first.
then you can adapt the overlay to be loaded at boot time
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/2f1505e9-2308-46e2-b00d-d46e58345ecd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


El Smiedro

unread,
Aug 30, 2016, 1:45:57 PM8/30/16
to BeagleBoard
And do you know how to adapt it to the boot time?

Jane

unread,
Sep 8, 2016, 7:40:19 AM9/8/16
to BeagleBoard

Hi, 
For beagle bone black or beagleboard you can follow this link to build the kernel and the device tree.

to modify the device tree for beagleboneblack you have to edit KERNEL/arch/arm/boot/dts/am335x-boneblack.dts and run the tools/rebuild.sh , this will not only compiles the kernel but also the modules and the dtbs.

in order to change the default gpio you cab do this like this : 

mycustom-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
or 
mycustom-gpio = <&gpio1 17 0>;
0 = GPIO_ACTIVE_HIGH while 1 = GPIO_ACTIVE_LOW


above code will set the 17 pin of gpio bank 1 as active low , this is basically 32*1+17 = 49th Gpio that is 23rd pin on the P9 header.

you can google begaleboneblack P9 header or P8 header : http://www.siue.edu/~gengel/bbbWebStuff/BeagleboneBlackP9HeaderTable.pdf

Hope it helps !
Thanks and Regards,
Saurabh

Jane

unread,
Sep 9, 2016, 7:34:20 AM9/9/16
to BeagleBoard
Reply all
Reply to author
Forward
0 new messages