Hi,

I have several questions and hope someone can help. I'm trying to figure 
out how to configure ports on a beaglebone, generically. I haven't found a 
good site which describes any of this thanks to the relatively recent 
changes in how device tree overlays are handled. I'd like to be able to 
configure ports differently from how they ship, so I'm looking to develop 
generic understanding as well as to figure out my specific problem on how 
to configure a port differently:

I'm trying to configure 1-wire on a Beaglebone Blue using the latest iot 
build on beaglebone.org. The BB Blue has 6 free GPIOs which are pinned to 
connectors. Of the 6, looking at the dtb-rebuilder repo it seems that 
GPIO1_25 has the fewest number of hits there so perhaps this one is least 
likely to be used elsewhere. I've modified a dts file from bb-overlays.org 
repository, and guessed my way to the correct offset value for what I think 
should be PIN57 and produced and compiled the following dts:

/dts-v1/;
/plugin/;

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

        /* identification */
        part-number = "BB-W1-P1.25";
        version = "00A0";

        /* state the resources this cape uses */
        exclusive-use =
                /* the pin header uses */
                "P1.25";

        /*
         * Free up the pins used by the cape from the pinmux helpers.
         */
        fragment@0 {
                target = <&ocp>;
                __overlay__ {
                        P1_25_pinmux { status = "disabled"; };
                };
        };

        fragment@1 {
                target = <&am33xx_pinmux>;
                __overlay__ {

                        dallas_w1_pins: pinmux_dallas_w1_pins {
                                pinctrl-single,pins = <
                                        0x0e4 0x37
                                >;
                        };
                };
        };

        fragment@2 {
                target-path="/";
                __overlay__ {

                        onewire {
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&dallas_w1_pins>;

                                compatible = "w1-gpio";
                                gpios = <&gpio1 25 0>;
                        };
                };
        };
};


In compiling this I get the following warnings, which don't mean much to me 
yet:
dtc -O dtb -o BB-W1-P1.25-00A0.dtb BB-W1-P1.25-00A0.dts -@
BB-W1-P1.25-00A0.dtb: Warning (unit_address_vs_reg): Node /fragment@0 has a 
unit name, but no reg property
BB-W1-P1.25-00A0.dtb: Warning (unit_address_vs_reg): Node /fragment@1 has a 
unit name, but no reg property
BB-W1-P1.25-00A0.dtb: Warning (unit_address_vs_reg): Node /fragment@2 has a 
unit name, but no reg property

In my /boot/uEnv.txt I have made the following changes, on the suspicion 
that there may be some sharing of the pin with video features:
uboot_overlay_addr0=/home/debian/BB-W1-P1.25-00A0.dtb
disable_uboot_overlay_video=1

Finally:
root@beaglebone:/opt/scripts/tools# ./version.sh
git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
eeprom:[A335BNLTBLA21722EL002623]
model:[TI_AM335x_BeagleBone_Blue]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 
2018.09-00002-g0b54a51eee]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
2017.05-rc1-00002-g35aecb]:[location: dd MBR]
kernel:[4.14.71-ti-r80]
nodejs:[v6.15.0]
device-tree-override:[uboot_overlay_addr0=/home/debian/BB-W1-P1.25-00A0.dtb]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/home/debian/BB-W1-P1.25-00A0.dtb]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade 
<pkg>]
pkg:[bb-cape-overlays]:[4.4.20181120.0-0rcnee0~stretch+20181120]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.4-git20181123.0-0rcnee0~stretch+20181124]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video 
plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep 
admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[    1.089162] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 
568
[   30.947099] pinctrl-single 44e10800.pinmux: pin PIN57 already requested 
by ocp:helper; cannot claim for onewire
[   31.202623] pinctrl-single 44e10800.pinmux: pin-57 (onewire) status -22
[   31.454403] pinctrl-single 44e10800.pinmux: could not request pin 57 
(PIN57) from group pinmux_dallas_w1_pins  on device pinctrl-single
dmesg | grep gpio-of-helper


I'm still new with the Beaglebone/linux configuration, sorry if any of 
these things demonstrate my stupidity. Thanks in advance for any help.

Best,

Jim

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ac33b437-7361-4a06-9e27-5fca39aaa1ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to