Enabling Uart2 on BB White with new os version Angstrom Distribution (BeagleBone) 2013-06-06

I have posted but it seems to have vanished, I am trying to enable UART2 as ttyO2,. I am trying to follow the instructions at
http://blog.pignology.net/2013/05/getting-uart2-devttyo1-working-on.html but this refers to BBB and the file that download are also for BBB.
I have managed to brick my BBW I will reload the OS unless someone can tell me how to clean things up.
The main thing is to figure out how to enable UART2 onto ttyO2, do I really have to compile a new dtd and then compile a new uart2pinmux-00A0.dtbo?
If I do where do I get the .dts file for this release and BBW?

No, in /lib/firmware you will notice there are dts and dto files ready for you:

root@beaglebone:/lib/firmware# ls -l BB-UART*
-rw-r–r-- 1 root root 861 Jun 18 2013 BB-UART1-00A0.dtbo
-rw-r–r-- 1 root root 1048 Jun 18 2013 BB-UART1-00A0.dts
-rw-r–r-- 1 root root 861 Jun 18 2013 BB-UART2-00A0.dtbo
-rw-r–r-- 1 root root 1033 Jun 18 2013 BB-UART2-00A0.dts
-rw-r–r-- 1 root root 861 Jun 18 2013 BB-UART4-00A0.dtbo
-rw-r–r-- 1 root root 1035 Jun 18 2013 BB-UART4-00A0.dts
-rw-r–r-- 1 root root 861 Jun 18 2013 BB-UART5-00A0.dtbo
-rw-r–r-- 1 root root 1060 Jun 18 2013 BB-UART5-00A0.dts

just add you BB-UART2 to /media/BEAGLEBONE/uEnv.txt, with the key capemgr.enable_partno.

This is my current uEnv.txt:

root@beaglebone:/lib/firmware# cat /media/BEAGLEBONE/uEnv.txt
optargs=quiet video=HDMI-A-1:1280x1024@60e capemgr.enable_partno=BB-SPI0DEV,BB-UART4,BB-CANBUS1

As you can see, I have the BB-UART4 enabled. This gives me /dev/ttyO4. (And I have SPIO and CAN enabled, but that is a different story).

Great, I knew it could not be that complicated.

Thanks

I tried the above, and created a file uEnv.txt

root@beaglebone:~# cat /media/BEAGLE_BONE/uEnv.txt
capemgr.enable_partno=BB-UART2
root@beaglebone:~#

At bot time I saw the reading of the uEnv.txt at boot time

reading uEnv.txt
33 bytes read in 3 ms (10.7 KiB/s)
Loaded environment from uEnv.txt

then I see that no capes have been detected (which is true, I have no capes) Not sure about the segmentation fault

Uncompressing Linux… done, booting the kernel.
[ 0.193685] omap2_mbox_probe: platform not supported
[ 0.204577] tps65217-bl tps65217-bl: no platform data provided
[ 0.280638] bone-capemgr bone_capemgr.7: slot #0: No cape found
[ 0.317745] bone-capemgr bone_capemgr.7: slot #1: No cape found
[ 0.354852] bone-capemgr bone_capemgr.7: slot #2: No cape found
[ 0.391961] bone-capemgr bone_capemgr.7: slot #3: No cape found
[ 0.415909] omap_hsmmc mmc.3: of_parse_phandle_with_args of ‘reset’ failed
[ 0.455017] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.6
[ 0.466773] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.6) status -22
[ 0.474084] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
[ 7.344959] systemd-udevd[82]: worker [101] terminated by signal 11 (Segmentation fault)
[ 7.391332] systemd-udevd[82]: worker [101] failed while handling ‘/devices/ocp.2/47400000.usb/musb-hdrc.0.auto/gadget/net/usb0’

When I look for the device ttyO2 I see the following

root@beaglebone:~# ls /dev/tty*
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyGS0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyO0
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyS0
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59 /dev/ttyS1
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6 /dev/ttyS2
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60 /dev/ttyS3
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61
root@beaglebone:~#

Use
optargs=capemgr.enable_partno=BB-UART2

That should do it.

Maybe I do not understand, I have tried it a multiple time. I found another uEnv.txt under /boot and tried it there nothing seems to change.

On your system when you do this you see a /dev/ttyO4 in the dev dir ?

is there any breadcrumbs showing that the file is getting read from the boot screen ?

/boot/uEnv.txt is not the right one, it’s a copy of the one in /media/BEAGLEBONE/uEnv.txt.

send a cat /media/BEAGLEBONE/uEnvt.txt, just to check if the syntax is OK.

Sorry for the delay, I was away

root@beaglebone:~# cat /media/BEAGLE_BONE/uEnv.txt
optargs=capemgr.enable_partno=BB-UART2

root@beaglebone:~#

That should do, unless something else is on UART2 pins already active. Do you get any error messages in the log?

journalctl -bx
shows you the log of the latest boot.

You can also attach the UART2 via:

echo BB-UART2 > /sys/devices/bone_capemgr.???/slots

I have a BeagleBone Black, so the bone_capemgr number might be something different.

In the BeagleBone Black SRM the info is in Chapter 7.0, Connectors. Check if the UART2 pins are somehow in use by something else:
cd /sys/kernel/debug/pinctrl
cat 44e10800.pinmux/pinmux-pins
is what I do on a BBB.

there is not a mention of ttyO2 or uEnv.txt in the log

the only pins claimed are the following

pin 94 (44e10978): 4819c000.i2c (GPIO UNCLAIMED) function pinmux_i2c2_pins group pinmux_i2c2_pins
pin 95 (44e1097c): 4819c000.i2c (GPIO UNCLAIMED) function pinmux_i2c2_pins group pinmux_i2c2_pins
pin 96 (44e10980): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 97 (44e10984): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 98 (44e10988): 44e0b000.i2c (GPIO UNCLAIMED) function pinmux_i2c0_pins group pinmux_i2c0_pins
pin 99 (44e1098c): 44e0b000.i2c (GPIO UNCLAIMED) function pinmux_i2c0_pins group pinmux_i2c0_pins
pin 100 (44e10990): (MUX UNCLAIMED) (GPIO UNCLAIMED)

It seems that pin 19 and 20 are used for I2C2, which is used for Cape support. Can you try to do the echo command?

echo BB-UART2 > /sys/devices/bone_capemgr.???/slots

with the correct number for the bone_capemgr.

Other option: download the latest version. There is a 2013-6-20 version. That might solve your problems…

the echo command seems to have worked, I now see the ttyO2. I guess there is no need to reboot. If I do reboot will I have to do the command each time ?

If you type in bone_capemgr.*, it goes to that directory without needing the number. The * encompasses all characters/numbers.

Unfortunately, yes.

It seems something is broken in the capemgr.enable_partno setup:
I also have trouble getting my CANBUS to load, unless I do the echo routine.
It should work, but I have to find out why it does not work for now. If the echo command works, then the uEnv.txt route should also work…

Hi Johan,

This is good for now, thanks for all your help and good advice

Hi there.

I’m trying to follow these instructions to enable UARTS 1, 2, 4, and 5. I think I have the right software version as /lib/firmware contains all of the correct files, but there is no uEnv.txt in /media/BEAGLEBONE/. If I add one with the line “capemgr.enable_partno=BB-UART4” and reboot it doesn’t seem to do anything. I just reflashed the EMMC with an image I found on this page http://circuitco.com/support/index.php?title=Updating_The_Software, I am using Production Image 2013.09.04.

I can enable the UARTs by echoing to the slots file, but I’m lost when it comes to doing this at boot without the uEnv method working. The problem is that by the time the board has booted, I can’t enable UART 5 with the echo method as HDMI has already taken over .

Does anyone have any pointers as to why there wouldn’t be a uEnv.txt file in /media/BEAGLEBONE/?

Thanks

If you don’t have any files in /media/BEAGLE_BONE (note the underscore), see if it is mounted:

mount | grep 'BEAGLE'

if you don’t get any output from the command above you can force the mount:

mount /dev/mmcblk0p1 /media/BEAGLE_BONE

Louis

Thanks, that did the trick.