Device Tree

From Stu2
Revision as of 10:37, 11 August 2013 by Stu2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


http://hipstercircuits.com/category/beaglebone/page/2/ - link with pin info. Get the same thing from the Beaglebone manual.

http://hipstercircuits.com/dallas-one-wire-temperature-reading-on-beaglebone-black-with-dto/ - Dallas one wire for the tempurate sensor. Have to load overload after boot. There is a bug in 3.8.13 kernel.

http://beagleboard-gsoc13.blogspot.com/2013/07/sampling-analogue-signals-using-adc-on.html - using the ADC.

ADC stuff is here. (After loading BB-ADC from /lib/firmware)

/sys/bus/iio/devices/iio:device0

Use the patched version of dtc (device-tree-compiler). http://eewiki.net/display/linuxonarm/BeagleBone Here is how you compile and load the one-wire overlay.

/usr/local/bin/dtc -O dtb -o BB-W1-00A0.dtbo -b 0 [email protected] BB-W1-0
cp BB-W1-00A0.dtbo /lib/firmware
echo BB-W1:00A0 > /sys/devices/bone_capemgr.*/slots
cat /sys/devices/bone_capemgr.7/slots

This is the BB-W1-00A0.dts file. I still get dmesg lines regarding: can't parse gpios. The gpios line should be bank+1, pin and 0.

/dts-v1/;
/plugin/;

/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";

        part-number = "BB-W1";
        version = "00A0";

        /* state the resources this cape uses */
        /* SLM here - changed pin numbers */
        exclusive-use =
                /* the pin header uses */
                "P8.6",
                /* the hardware IP uses - matches the pin*/
                "gpio1_3";

        [email protected] {
               target = <&am33xx_pinmux>;
               __overlay__ {
                        dallas_w1_pins: pinmux_dallas_w1_pins {
                        /* used the offset in the book, left the reg alone */
                        pinctrl-single,pins = < 0x0c 0x37 >;
                        };
               };
        };

        [email protected] {
               target = <&ocp>;
               __overlay__ {
                       [email protected] {
                               compatible      = "w1-gpio";
                               pinctrl-names   = "default";
                               pinctrl-0       = <&dallas_w1_pins>;
                               status          = "okay";

                               gpios = <&gpio2 3 0>;
                       };
         };
        };
};

Noticed there may be a graceful power off method. Power both the miniUSB port and the 5V barrel. Switching the power OFF on the 5V barrel causes a graceful shutdown. This is nice, because I can get rid of my power down button.

Slow booting of BB - check udev. Remove any unused entries.