UART 1/2 Not Working

Hi,

Using the image:

 [ https://rcn-ee.com/rootfs/bb.org/testing/2016-02-21/lxqt-4gb/bone-debian-8.3-lxqt-4gb-armhf-2016-02-21-4gb.img.xz](https://rcn-ee.com/rootfs/bb.org/testing/2016-02-21/lxqt-4gb/bone-debian-8.3-lxqt-4gb-armhf-2016-02-21-4gb.img.xz)

running from microSD.  In /boot/uEnv.txt, I have uncommented the line:

  dtb=am335x-boneblack-emmc-overlay.dtb

to disable HDMI and added the line:

  cape_enable=bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4,BB-UART5

to enable all the UARTS.  UARTS 4 and 5 work fine, but UARTS 1 and 2 work alternately, or maybe randomly, on each boot e.g.

UART1 working, UART2 not working
reboot
UART2 working, UART1 not working

Here is the relevant (I hope) part from dmesg, with UART2 not working:

[    3.901727] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,EIA0,5115BBBK008D'
[    3.901758] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[    3.952793] bone_capemgr bone_capemgr: slot #0: No cape found
[    4.012760] bone_capemgr bone_capemgr: slot #1: No cape found
[    4.072757] bone_capemgr bone_capemgr: slot #2: No cape found
[    4.132756] bone_capemgr bone_capemgr: slot #3: No cape found
[    4.138576] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART1' VER 'N/A' PR '0'
[    4.138591] bone_capemgr bone_capemgr: slot #4: override
[    4.138607] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[    4.138623] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-UART1'
[    4.138746] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART2' VER 'N/A' PR '0'
[    4.138760] bone_capemgr bone_capemgr: slot #5: override
[    4.138773] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[    4.138788] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-UART2'
[    4.138920] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART4' VER 'N/A' PR '0'
[    4.138935] bone_capemgr bone_capemgr: slot #6: override
[    4.138947] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[    4.138962] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-UART4'
[    4.139062] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART5' VER 'N/A' PR '0'
[    4.139083] bone_capemgr bone_capemgr: slot #7: override
[    4.139096] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[    4.139111] bone_capemgr bone_capemgr: slot #7: 'Override Board Name,00A0,Override Manuf,BB-UART5'
[    4.139821] bone_capemgr bone_capemgr: initialized OK.
[    4.141489] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1325000]:-22
[    4.143287] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1325000]:-22
[    4.145704] omap_rtc 44e3e000.rtc: setting system clock to 2016-02-26 18:22:10 UTC (1456510930)
[    4.145737] of_cfs_init
[    4.145887] of_cfs_init: OK
[    4.153229] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 198, base_baud = 3000000) is a 8250
[    4.155116] pinctrl-single 44e10800.pinmux: pin 44e10984.0 already requested by 48024000.serial; cannot claim for 48022000.serial
[    4.165341] PM: Hibernation image not present or could not be loaded.
[    4.165509] ALSA device list:
[    4.165514]   No soundcards found.
[    4.170126] pinctrl-single 44e10800.pinmux: pin-97 (48022000.serial) status -22
[    4.178713] Freeing unused kernel memory: 560K (c0ac2000 - c0b4e000)
[    4.181307] pinctrl-single 44e10800.pinmux: could not request pin 97 (44e10984.0) from group pinmux_bb_uart1_pins  on device pinctrl-single
[    4.203622] omap8250 48022000.serial: Error applying setting, reverse things back
[    4.218941] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 199, base_baud = 3000000) is a 8250
[    4.221195] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 200, base_baud = 3000000) is a 8250
[    4.221816] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-UART2-00A0.dtbo' loaded; overlay id #0
[    4.223672] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 201, base_baud = 3000000) is a 8250
[    4.224260] bone_capemgr bone_capemgr: slot #7: dtbo 'BB-UART5-00A0.dtbo' loaded; overlay id #3
[    4.224414] bone_capemgr bone_capemgr: slot #6: dtbo 'BB-UART4-00A0.dtbo' loaded; overlay id #2
[    4.224514] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-UART1-00A0.dtbo' loaded; overlay id #1

The lines:

[    4.153229] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 198, base_baud = 3000000) is a 8250
[    4.155116] pinctrl-single 44e10800.pinmux: pin 44e10984.0 already requested by 48024000.serial; cannot claim for 48022000.serial

seem to indicate something is going wrong with /dev/ttyS2.

Board is Rev C.

Any suggestions as to what I am doing wrong?

Thanks.

That is weird...

cape_enable=bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4

root@beaglebone:~# dmesg | grep serial
[ 3.493566] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158,
base_baud = 3000000) is a 8250
[ 4.093442] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 197,
base_baud = 3000000) is a 8250
[ 4.096877] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 198,
base_baud = 3000000) is a 8250
[ 4.098865] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 199,
base_baud = 3000000) is a 8250

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

root@beaglebone:~# dmesg | grep serial
[ 3.493566] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158,
base_baud = 3000000) is a 8250
[ 4.093442] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 197,
base_baud = 3000000) is a 8250
[ 4.096877] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 198,
base_baud = 3000000) is a 8250
[ 4.098865] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 199,
base_baud = 3000000) is a 8250
[ 159.353752] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 200,
base_baud = 3000000) is a 8250

root@beaglebone:~# dmesg | grep bone
[ 0.000000] Kernel command line: console=ttyO0,115200n8
bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4
root=UUID=eb1945f3-f04e-4e7f-b356-ef6e4a713535 ro rootfstype=ext4
rootwait coherent_pool=1M quiet cape_universal=enable
[ 3.837697] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT, ,BBG115096703'
[ 3.837729] bone_capemgr bone_capemgr:
compatible-baseboard=ti,beaglebone-black - #slots=4
[ 3.892817] bone_capemgr bone_capemgr: slot #0: No cape found
[ 3.952794] bone_capemgr bone_capemgr: slot #1: No cape found
[ 4.012791] bone_capemgr bone_capemgr: slot #2: No cape found
[ 4.072791] bone_capemgr bone_capemgr: slot #3: No cape found
[ 4.078588] bone_capemgr bone_capemgr: enabled_partno PARTNO
'BB-UART1' VER 'N/A' PR '0'
[ 4.078603] bone_capemgr bone_capemgr: slot #4: override
[ 4.078619] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 4.078635] bone_capemgr bone_capemgr: slot #4: 'Override Board
Name,00A0,Override Manuf,BB-UART1'
[ 4.078762] bone_capemgr bone_capemgr: enabled_partno PARTNO
'BB-UART2' VER 'N/A' PR '0'
[ 4.078776] bone_capemgr bone_capemgr: slot #5: override
[ 4.078789] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 4.078804] bone_capemgr bone_capemgr: slot #5: 'Override Board
Name,00A0,Override Manuf,BB-UART2'
[ 4.078908] bone_capemgr bone_capemgr: enabled_partno PARTNO
'BB-UART4' VER 'N/A' PR '0'
[ 4.078922] bone_capemgr bone_capemgr: slot #6: override
[ 4.078934] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[ 4.078949] bone_capemgr bone_capemgr: slot #6: 'Override Board
Name,00A0,Override Manuf,BB-UART4'
[ 4.079596] bone_capemgr bone_capemgr: initialized OK.
[ 4.095097] bone_capemgr bone_capemgr: slot #4: dtbo
'BB-UART1-00A0.dtbo' loaded; overlay id #0
[ 4.099474] bone_capemgr bone_capemgr: slot #5: dtbo
'BB-UART2-00A0.dtbo' loaded; overlay id #1
[ 4.099631] bone_capemgr bone_capemgr: slot #6: dtbo
'BB-UART4-00A0.dtbo' loaded; overlay id #2
[ 16.255809] LUN: removable file:
/var/cache/doc-beaglebone-getting-started/beaglebone-getting-started-2015-12-04.img
[ 159.324123] bone_capemgr bone_capemgr: part_number 'BB-UART5', version 'N/A'
[ 159.324219] bone_capemgr bone_capemgr: slot #7: override
[ 159.324269] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[ 159.324323] bone_capemgr bone_capemgr: slot #7: 'Override Board
Name,00A0,Override Manuf,BB-UART5'
[ 159.359911] bone_capemgr bone_capemgr: slot #7: dtbo
'BB-UART5-00A0.dtbo' loaded; overlay id #3
root@beaglebone:~#

Must be a race at startup...

Regards,