Hello,

I was working a DT Overlay for my touchscreen and ran to issues trying to 
load it.

It can successfully load it via 
cape_enable=bone_capemgr.enable_partno=BB-ADS7846 (so I know the overlays 
works)  but I don't get the same results (not working) via the command 
line.  Investigating this further I noticed similar points with the SPI0 
(BB-SPIDEV0-00A0.dts) and discovered it not setting the pin mux via the 
command line as I would expect.  (SPIDEV0 also works via capemgr in 
uEnv.txt)


I'm using the bog-standard BB-SPIDEV0-00A0.dts overlay from 
bb.org-overlays/src/arm. Everything else looks like it is working properly 
in dmesg.


I can move forward using bone_capemgr.enable in uEnv.txt so this is not a 
critical issue but more a point of understanding what is going on (or not, 
as the case may be) and efficiency. I've googled around but could not find 
anything related to the newer 4.x kernels.


Thanks in advance for any clues or assistance.


*Environment:*

root@beaglebone:~# uname -r; cat /etc/dogtag; dtc --version; cat 
/proc/cmdline 

4.4.1-bone5 

BeagleBoard.org Debian Image 2016-01-31 

Version: DTC 1.4.1-g1e75ebc9 

console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p1 rootfstype=ext4 
rootwait coherent_pool=1M quiet 


.../boot/uEnv.txt

##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled: 

dtb=am335x-boneblack-overlay.dtb 


results do not vary if I use cape_universal=enable or not ..... I also 
tried the 4.1.16-ti-rt-r44 kernel

…..noob-ish


*Test*

Following the instructions on William's website for loading an overlay 
UART1 (working as expected)

http://www.embeddedhobbyist.com/2015/09/beaglebone-black-updating-device-tree-files/


*before*

root@beaglebone:~# cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins | grep 'pin 96\|pin 
97' 

pin 96 (44e10980.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 97 (44e10984.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 


root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | 
grep 'pin 96\|pin 97' 

pin 96 (44e10980.0) *00000037 *pinctrl-single 

pin 97 (44e10984.0) *00000037* pinctrl-single 


*load overlay*

root@beaglebone:~# sudo sh -c "echo 'BB-UART1' > 
/sys/devices/platform/bone_capemgr/slots" 

*(ignore the sudo part with root – just a copy & paste point !!!)*


*after*

root@beaglebone:~# cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins | grep 'pin 96\|pin 
97' 

pin 96 (44e10980.0): 48022000.serial (GPIO UNCLAIMED) *function 
pinmux_bb_uart1_pins group pinmux_bb_uart1_pins *

pin 97 (44e10984.0): 48022000.serial (GPIO UNCLAIMED) *function 
pinmux_bb_uart1_pins group pinmux_bb_uart1_pins *


root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | 
grep 'pin 96\|pin

pin 96 (44e10980.0) *00000028* pinctrl-single 

pin 97 (44e10984.0) *00000008* pinctrl-single


root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots 

0: PF---- -1 

1: PF---- -1 

2: PF---- -1 

3: PF---- -1 

4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-UART1 97' 


*unload*

sudo sh -c "echo '-4' > /sys/devices/platform/bone_capemgr/slots" 


*same procedure for SPI0*

*before*

root@beaglebone:~# cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins | grep 'pin 84\|pin 
85\|pin 86\|pin 87' 

pin 84 (44e10950.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 85 (44e10954.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 86 (44e10958.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 87 (44e1095c.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 


root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | 
grep 'pin 84\|pin 85\|pin 86\|pin 87' 

pin 84 (44e10950.0) *00000037* pinctrl-single 

pin 85 (44e10954.0) *00000037* pinctrl-single 

pin 86 (44e10958.0) *00000037* pinctrl-single 

pin 87 (44e1095c.0) *00000037* pinctrl-single 


*load overlay*

sudo sh -c "echo 'BB-SPIDEV0' > /sys/devices/platform/bone_capemgr/slots"


*after*

root@beaglebone:~# dmesg

[ 3283.995279] bone_capemgr bone_capemgr: part_number 'BB-SPIDEV0', version 
'N/A' 

[ 3283.995309] bone_capemgr bone_capemgr: slot #5: override 

[ 3283.995324] bone_capemgr bone_capemgr: Using override eeprom data at 
slot 5 

[ 3283.995339] bone_capemgr bone_capemgr: slot #5: 'Override Board 
Name,00A0,Override Manuf,BB-SPIDEV0' 

[ 3284.006848] bone_capemgr bone_capemgr: slot #5: dtbo 
'BB-SPIDEV0-00A0.dtbo' loaded; overlay id #0 


root@beaglebone:~# ls /dev/spi*

/dev/spidev1.0 /dev/spidev1.1


root@beaglebone:~# cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins | grep 'pin 84\|pin 
85\|pin 86\|pin 87' 

pin 84 (44e10950.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 85 (44e10954.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 86 (44e10958.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 

pin 87 (44e1095c.0): (MUX UNCLAIMED) (GPIO UNCLAIMED) 


root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | 
grep 'pin 84\|pin 85\|pin 86\|pin 87' 

pin 84 (44e10950.0) *00000037* pinctrl-single 

pin 85 (44e10954.0) *00000037* pinctrl-single 

pin 86 (44e10958.0) *00000037* pinctrl-single 

pin 87 (44e1095c.0) *00000037* pinctrl-single 


*Note above: no change to pin mux => I think the should be 30; 30; 10; 10*


*Relevant part of BB-SPIDEV0-00A0.dts*

bb_spi0_pins: pinmux_bb_spi0_pins { 

pinctrl-single,pins = < 

0x150 0x30 /* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */ 

0x154 0x30 /* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */ 

0x158 0x10 /* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */ 

0x15c 0x10 /* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */


/eof


-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to