Re: [beagleboard] conflict with "cape-bone-iio" overlay and simple pinmux overlay?

2016-09-14 Thread bretwallach
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!!!

On Friday, February 21, 2014 at 5:21:36 PM UTC-8, Jason Kridner wrote:
>
>
>
>
> On Fri, Feb 21, 2014 at 3:53 PM,  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.
>  
>
>>
>> On Friday, February 21, 2014 2:17:36 PM UTC-6, Jason Kridner wrote:
>>>
>>>
>>>
>>>
>>> On Fri, Feb 21, 2014 at 2:47 PM,  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?
>>>  
>>>
 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  AIN3AIN4  AIN5  AIN6  AIN7driver
 modalias  power  subsystem  uevent
 root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
 bufferin_voltage0_raw  in_voltage2_raw  in_voltage4_raw  
 in_voltage6_raw  name   scan_elements  trigger
 devin_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) 0027 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: 

[beagleboard] conflict with cape-bone-iio overlay and simple pinmux overlay?

2014-02-21 Thread cfalk3
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  AIN3AIN4  AIN5  AIN6  AIN7drivermodalias  
power  subsystem  uevent
root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
bufferin_voltage0_raw  in_voltage2_raw  in_voltage4_raw  
in_voltage6_raw  name   scan_elements  trigger
devin_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) 0027 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) 0027 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) 0037 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

Re: [beagleboard] conflict with cape-bone-iio overlay and simple pinmux overlay?

2014-02-21 Thread Jason Kridner
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?


 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  AIN3AIN4  AIN5  AIN6  AIN7drivermodalias
 power  subsystem  uevent
 root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
 bufferin_voltage0_raw  in_voltage2_raw  in_voltage4_raw
 in_voltage6_raw  name   scan_elements  trigger
 devin_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) 0027 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) 0027 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) 0037 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] 

Re: [beagleboard] conflict with cape-bone-iio overlay and simple pinmux overlay?

2014-02-21 Thread cfalk3
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.

On Friday, February 21, 2014 2:17:36 PM UTC-6, Jason Kridner wrote:




 On Fri, Feb 21, 2014 at 2:47 PM, cfa...@gmail.com javascript: 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?
  

 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  AIN3AIN4  AIN5  AIN6  AIN7drivermodalias  
 power  subsystem  uevent
 root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
 bufferin_voltage0_raw  in_voltage2_raw  in_voltage4_raw  
 in_voltage6_raw  name   scan_elements  trigger
 devin_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) 0027 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) 0027 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'
 [   

Re: [beagleboard] conflict with cape-bone-iio overlay and simple pinmux overlay?

2014-02-21 Thread Jason Kridner
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.



 On Friday, February 21, 2014 2:17:36 PM UTC-6, Jason Kridner wrote:




 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?


 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  AIN3AIN4  AIN5  AIN6  AIN7drivermodalias
 power  subsystem  uevent
 root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
 bufferin_voltage0_raw  in_voltage2_raw  in_voltage4_raw
 in_voltage6_raw  name   scan_elements  trigger
 devin_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) 0027 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) 0027 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] 

Re: [beagleboard] conflict with cape-bone-iio overlay and simple pinmux overlay?

2014-02-21 Thread Chris Falk
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!

On Friday, February 21, 2014 7:21:36 PM UTC-6, Jason Kridner wrote:




 On Fri, Feb 21, 2014 at 3:53 PM, cfa...@gmail.com javascript: 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.
  


 On Friday, February 21, 2014 2:17:36 PM UTC-6, Jason Kridner wrote:




 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?
  

 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  AIN3AIN4  AIN5  AIN6  AIN7driver
 modalias  power  subsystem  uevent
 root@beaglebone:~# ls /sys/bus/iio/devices/iio\:device0
 bufferin_voltage0_raw  in_voltage2_raw  in_voltage4_raw  
 in_voltage6_raw  name   scan_elements  trigger
 devin_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) 0027 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) 0027 pinctrl-single  *-- 
 default