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