My kernel version:
uname -r
4.1.12-ti-r29

I'm having trouble getting PWM and UART5 to work at the same time with 
kernel 4.1.x. I have a freshly flashed Debian 8.2 image on my BeagleBone 
Black.

I followed this procedure to get the device tree overlays:
https://github.com/beagleboard/bb.org-overlays

As soon as I install the device tree overlays, this is what I have in the 
cape manager:

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,cape-universaln


I understand that cape-universaln is supposed to let you use the config-pin 
tool to enable any peripheral on the board. So I do this procedure to 
enable PWM on the ports I need

#!/bin/bash
config-pin P8.13 pwm
config-pin P9.16 pwm

#Returning proper PWM chips
P8_13chip="$(ls 
/sys/devices/platform/ocp/subsystem/devices/48304200.ehrpwm/pwm)"
P9_16chip="$(ls 
/sys/devices/platform/ocp/subsystem/devices/48302200.ehrpwm/pwm)"

#Enabling PWM signals
echo 1 > /sys/class/pwm/$P8_13chip/export
echo 1 > /sys/class/pwm/$P9_16chip/export

echo 1 > /sys/class/pwm/$P8_13chip/pwm1/enable
echo 1 > /sys/class/pwm/$P9_16chip/pwm1/enable

chmod 0777 /sys/class/pwm/$P8_13chip/pwm1/period
chmod 0777 /sys/class/pwm/$P8_13chip/pwm1/duty_cycle
chmod 0777 /sys/class/pwm/$P9_16chip/pwm1/period
chmod 0777 /sys/class/pwm/$P9_16chip/pwm1/duty_cycle

Then I use this procedure to enable UART on UART1, UART2, UART4, and UART5
#!/bin/bash

config-pin P9.26 uart   #UART1 RX
config-pin P9.24 uart   #UART1 TX

config-pin P9.22 uart   #UART2 RX
config-pin P9.21 uart   #UART2 TX

config-pin P9.11 uart   #UART4 RX
config-pin P9.13 uart   #UART4 TX

config-pin P8.38 uart   #UART5 RX
config-pin P8.37 uart   #UART5 TX

This procedure mostly works, except that I get this error when the script 
tries to enable UART5:

P8_38 pinmux file not found!
cape-universala overlay not found
run "config-pin overlay cape-universala" to load the cape
P8_37 pinmux file not found!
cape-universala overlay not found
run "config-pin overlay cape-universala" to load the cape

So I do what the error message recommends and then I get this error:

root@beaglebone:~# config-pin overlay cape-universala
Loading cape-universala overlay
bash: line 0: echo: write error: No such file or directory
Error loading device tree overlay file: cape-universala

So I add UART5 to the cape manager the old fashioned way:


root@beaglebone:~# sudo sh -c "echo 'BB-UART5' > 
/sys/devices/platform/bone_capemgr/slots"
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,cape-universaln
 7: P-O-L-   1 Override Board Name,00A0,Override Manuf,BB-UART5

Now, at this point, I can successfully use UART 1, 2, and 4 with 
/dev/ttyO1, /dev/ttyO2, and /dev/ttyO4 respectively. But I still cannot do 
anything with UART5 on /dev/ttyO5.

root@beaglebone:~# ls -l /dev/ttyO*
lrwxrwxrwx 1 root root 5 Feb  3 19:51 /dev/ttyO0 -> ttyS0
lrwxrwxrwx 1 root root 5 Feb  3 19:51 /dev/ttyO1 -> ttyS1
lrwxrwxrwx 1 root root 5 Feb  3 19:51 /dev/ttyO2 -> ttyS2
lrwxrwxrwx 1 root root 5 Feb  3 19:51 /dev/ttyO4 -> ttyS4
lrwxrwxrwx 1 root root 5 Feb  3 19:57 /dev/ttyO5 -> ttyS5

Sorry about the long post, but what am I doing wrong here?

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

Reply via email to