conflict with "cape-bone-iio" overlay and simple pinmux overlay?

669 views
Skip to first unread message

cfa...@gmail.com

unread,
Feb 21, 2014, 2:47:39 PM2/21/14
to beagl...@googlegroups.com
Hello,

I am trying to use both the "cape-bone-iio" device tree overlay for analog input, and a simple pin-muxing overlay (see attached DTS file) to change the direction of various gpio pins.  Although they both work on their own, it seems that there is a problem when loaded together.  The first overlay always works, and the second *seems* to load just fine, but does not take effect..

Example 1 (first load cape-bone-iio, then DM-GPIO-Test)

root@beaglebone:~# echo cape-bone-iio > $SLOTS
[   70.330541] bone-capemgr bone_capemgr.8: part_number 'cape-bone-iio', version 'N/A'
[   70.341287] bone-capemgr bone_capemgr.8: slot #7: generic override
[   70.347943] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 7
[   70.355978] bone-capemgr bone_capemgr.8: slot #7: 'Override Board Name,00A0,Override Manuf,cape-bone-iio'
[   70.368667] bone-capemgr bone_capemgr.8: slot #7: Requesting part number/version based 'cape-bone-iio-00A0.dtbo
[   70.380219] bone-capemgr bone_capemgr.8: slot #7: Requesting firmware 'cape-bone-iio-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[   70.395034] bone-capemgr bone_capemgr.8: slot #7: dtbo 'cape-bone-iio-00A0.dtbo' loaded; converting to live tree
[   70.407309] bone-capemgr bone_capemgr.8: slot #7: #1 overlays
[   70.421631] bone-iio-helper helper.14: ready
[   70.433579] bone-capemgr bone_capemgr.8: slot #7: Applied #1 overlays.

root@beaglebone:~# ls /sys/devices/ocp.2/helper.14/
AIN0  AIN1  AIN2  AIN3    AIN4  AIN5  AIN6  AIN7    driver    modalias  power  subsystem  uevent
root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
buffer    in_voltage0_raw  in_voltage2_raw  in_voltage4_raw  in_voltage6_raw  name   scan_elements  trigger
dev    in_voltage1_raw  in_voltage3_raw  in_voltage5_raw  in_voltage7_raw  power  subsystem      uevent


root@beaglebone:~# echo DM-GPIO-Test > $SLOTS
[  286.033107] bone-capemgr bone_capemgr.8: part_number 'DM-GPIO-Test', version 'N/A'
[  286.043079] bone-capemgr bone_capemgr.8: slot #8: generic override
[  286.049605] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 8
[  286.057622] bone-capemgr bone_capemgr.8: slot #8: 'Override Board Name,00A0,Override Manuf,DM-GPIO-Test'
[  286.071044] bone-capemgr bone_capemgr.8: slot #8: Requesting part number/version based 'DM-GPIO-Test-00A0.dtbo
[  286.082390] bone-capemgr bone_capemgr.8: slot #8: Requesting firmware 'DM-GPIO-Test-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  286.103360] bone-capemgr bone_capemgr.8: slot #8: dtbo 'DM-GPIO-Test-00A0.dtbo' loaded; converting to live tree
[  286.115233] bone-capemgr bone_capemgr.8: slot #8: #2 overlays
[  286.122388] bone-capemgr bone_capemgr.8: slot #8: Applied #2 overlays.

root@beaglebone:~# cat $PINS | grep 998
pin 102 (44e10998) 00000027 pinctrl-single                  <-- unchanged

 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-iio
 8: ff:P-O-L Override Board Name,00A0,Override Manuf,DM-GPIO-Test

Example 2 (first load DM-GPIO-Test, then cape-bone-iio)

root@beaglebone:~# cat $PINS | grep 998     
pin 102 (44e10998) 00000027 pinctrl-single                      <-- default value

root@beaglebone:~# echo DM-GPIO-Test > $SLOTS
[   90.459668] bone-capemgr bone_capemgr.8: part_number 'DM-GPIO-Test', version 'N/A'
[   90.469663] bone-capemgr bone_capemgr.8: slot #7: generic override
[   90.476312] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 7
[   90.484332] bone-capemgr bone_capemgr.8: slot #7: 'Override Board Name,00A0,Override Manuf,DM-GPIO-Test'
[   90.496939] bone-capemgr bone_capemgr.8: slot #7: Requesting part number/version based 'DM-GPIO-Test-00A0.dtbo
[   90.508493] bone-capemgr bone_capemgr.8: slot #7: Requesting firmware 'DM-GPIO-Test-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[   90.530293] bone-capemgr bone_capemgr.8: slot #7: dtbo 'DM-GPIO-Test-00A0.dtbo' loaded; converting to live tree
[   90.542078] bone-capemgr bone_capemgr.8: slot #7: #2 overlays
[   90.554967] bone-capemgr bone_capemgr.8: slot #7: Applied #2 overlays.

root@beaglebone:~# cat $PINS | grep 998
pin 102 (44e10998) 00000037 pinctrl-single                       <-- expected value from what was in the overlay

root@beaglebone:~# echo cape-bone-iio > $SLOTS
[  224.500468] bone-capemgr bone_capemgr.8: part_number 'cape-bone-iio', version 'N/A'
[  224.510629] bone-capemgr bone_capemgr.8: slot #8: generic override
[  224.517183] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 8
[  224.525207] bone-capemgr bone_capemgr.8: slot #8: 'Override Board Name,00A0,Override Manuf,cape-bone-iio'
[  224.538451] bone-capemgr bone_capemgr.8: slot #8: Requesting part number/version based 'cape-bone-iio-00A0.dtbo
[  224.550076] bone-capemgr bone_capemgr.8: slot #8: Requesting firmware 'cape-bone-iio-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  224.564897] bone-capemgr bone_capemgr.8: slot #8: dtbo 'cape-bone-iio-00A0.dtbo' loaded; converting to live tree
[  224.576965] bone-capemgr bone_capemgr.8: slot #8: #1 overlays
[  224.591865] bone-capemgr bone_capemgr.8: slot #8: Applied #1 overlays.

root@beaglebone:~# ls /sys/devices/ocp.2/helper.14/
driver    modalias  power  state    subsystem  uevent        <-- missing AIN* files here, but the files in /sys/bus/iio/.. seem to get populated as expected
root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
buffer    in_voltage0_raw  in_voltage2_raw  in_voltage4_raw  in_voltage6_raw  name   scan_elements  trigger
dev    in_voltage1_raw  in_voltage3_raw  in_voltage5_raw  in_voltage7_raw  power  subsystem      uevent

 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,DM-GPIO-Test
 8: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-iio

If anyone can provide some insight on this, it would be greatly appreciated.  I'm not sure if this is an issue with the cape manager, or maybe the bone-iio-helper or bone-pinmux-helper driver?  I have also tried the "BB-SPI0-01" overlay with my others and they seem to get along just fine.  FYI I am running Linux beaglebone 3.8.13 #1 SMP Wed Sep 4  and  Cloud9 GNOME Image 2013.09.04.  Thanks so much for any help!!

- Chris

cfa...@gmail.com

unread,
Feb 21, 2014, 3:09:16 PM2/21/14
to beagl...@googlegroups.com, cfa...@gmail.com
I am not sure how to attach a file, so here is my DTS file...

/dts-v1/;
/plugin/;

/{
       compatible = "ti,beaglebone", "ti,beaglebone-black";
       part-number = "DM-GPIO-Test";
       version = "00A0";

       fragment@0 {
             target = <&am33xx_pinmux>;
           
             __overlay__ {
                  pinctrl_test: DM_GPIO_Test_Pins {
                        pinctrl-single,pins = <

                                0x078 0x07  /* P9_12 60 OUTPUT MODE7 */
                                0x074 0x07  /* P9_13 31 OUTPUT MODE7 */

                               /* OUTPUT  GPIO(mode7) 0x07 pulldown, 0x17 pullup, 0x?f no pullup/down */
                               /* INPUT   GPIO(mode7) 0x27 pulldown, 0x37 pullup, 0x?f no pullup/down */

                        >;
                  };
             };
       };

       fragment@1 {
                target = <&ocp>;
                __overlay__ {
                        test_helper: helper {
                                compatible = "bone-pinmux-helper";
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_test>;
                                status = "okay";
                        };
                };
        };
};

Jason Kridner

unread,
Feb 21, 2014, 3:17:36 PM2/21/14
to beagl...@googlegroups.com
On Fri, Feb 21, 2014 at 2:47 PM, <cfa...@gmail.com> wrote:
Hello,

I am trying to use both the "cape-bone-iio" device tree overlay for analog input, and a simple pin-muxing overlay (see attached DTS file)

I don't see an attachment. Googling for the name I found https://github.com/derekmolloy/boneDeviceTree/blob/master/overlay/DM-GPIO-Test.dts. Is this the same file or did you edit it?
Do you have the output from 'dmesg' available?
 
I have also tried the "BB-SPI0-01" overlay with my others and they seem to get along just fine.  FYI I am running Linux beaglebone 3.8.13 #1 SMP Wed Sep 4  and  Cloud9 GNOME Image 2013.09.04.  Thanks so much for any help!!

- Chris

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Guy Grotke

unread,
Feb 21, 2014, 3:29:12 PM2/21/14
to beagl...@googlegroups.com
They probably have a collision on one or more pins.  Have you looked at their respective .dts files to see if there is a conflict?  Try assigning pins to one or the other.
My (very limited) experience with the cape manager leads me to believe it is not very good about giving you informative messages when there is a conflict or defective .dtbo file.

cfa...@gmail.com

unread,
Feb 21, 2014, 3:53:49 PM2/21/14
to beagl...@googlegroups.com, jason....@hangerhead.com
Hi Jason,

Yes, I was using Derek Molloy's DTS file as a template.  The only difference is that I edited it for the following

                                0x198 0x37  /* P9_30 102 OUTPUT MODE7 */

I posted the relevant dmesg output in my first post.  I wasn't sure how to attach a file to this thread...

Guy:
  I did look at both DTS files and as far as I could tell there is not a conflict with pins.  I also tried assigning other GPIO pins values, and those did not take effect either.

Jason Kridner

unread,
Feb 21, 2014, 8:21:36 PM2/21/14
to cfa...@gmail.com, beagl...@googlegroups.com
On Fri, Feb 21, 2014 at 3:53 PM, <cfa...@gmail.com> wrote:
Hi Jason,

Yes, I was using Derek Molloy's DTS file as a template.  The only difference is that I edited it for the following

                                0x198 0x37  /* P9_30 102 OUTPUT MODE7 */

I posted the relevant dmesg output in my first post.  I wasn't sure how to attach a file to this thread...

Guy:
  I did look at both DTS files and as far as I could tell there is not a conflict with pins.  I also tried assigning other GPIO pins values, and those did not take effect either.

My first guess is it is the name 'helper' that is in conflict with names in the other part of the device tree. Try renaming 'helper' to 'my_pin_helper' or something fun like that. Just a shot in the dark, but I've run into a similar sort of problem before.

Chris Falk

unread,
Feb 22, 2014, 12:27:52 AM2/22/14
to beagl...@googlegroups.com, cfa...@gmail.com, jason....@hangerhead.com
Wow, that was totally it!!  Changed the helper name and now both overlays are working together.  Ugh, this one had me tearing my hair out for a while..  Wish there was a debug/error print or something in dmesg to make it more obvious..  Hey thanks so much for your help Jason!

bretw...@gmail.com

unread,
Sep 14, 2016, 6:44:40 AM9/14/16
to BeagleBoard, cfa...@gmail.com, jason....@hangerhead.com
Jason Kridner,

You totally saved me! I had no idea what was going on until I stumbled on your guess. Keep on guessing is all I can say!

Thanks!!!!!!!
Reply all
Reply to author
Forward
0 new messages