Can't get PWM and UART5 to work at the same time in Debian 8.2 on BeagleBone Black

My kernel version:
uname -r4.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?

uart 5 is on the hdmi interface..

So either boot with:

dtb=am335x-boneblack-emmc-overlay.dtb

or:

dtb=am335x-boneblack-overlay.dtb

Depending on if you are using the eMMC..

Regards,

I just set dtb=am335x-boneblack-emmc-overlay.dtb in the /boot/uEnv.txt file and everything worked

That worked! Thank you very much. You just saved me several hours

Regards,
Matthew Mummert