Trying to Enable UART5 on BB Black

Hello, I am trying to get the UART5 enabled on the BB Black. I have tried using the

cape_enable=capemgr.enable_partno=BB-UART5, and
cape_enable=bone_capemgr.enable_partno=BB-UART5

command in the /boot/uEnv.txt file, but I can’t seem to get the pins (P8_37 and P8_38) to be configured. I am trying to set up a Bluetooth module (HC05) with the UART communication. I have also tried to disable the HDMI using the following command.

bone_capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

Also is there any command I can use to check if UART5 is up and running? I have been using

bone$ dmsg | grep tty05

Any help would be appreciated :slight_smile:

Hello @rhit-saucedm ,

in /boot/uEnv.txt, I usually set up uarts or I can do so from the command line w/ config-pin.

For instance, the beagleboard.org people made this utility for muxing pins on the command line.

Try:

config-pin p8.37 uart && config-pin p8.38 uart

That should mux your pins for uart on those specific pins.

Seth

P.S. If that does not do the trick, please provide your image output via the commands listed below:

uname -a 
cat /etc/dogtag

Hello, @silver2row

I tried doing that, and the tty05 doesn’t appear in my /dev/ directory.

/dev/ttyS5

Regards,

2 Likes

Hello @rhit-saucedm ,

Yeppers, like @RobertCNelson said, the symlinks are either /dev/bone/uart/ or /dev/ttyS5 or others…

What does ls -l /dev/ttyS5 show?

Seth

P.S. W/ current images, there are a Compatibility Layer under /dev/bone/ and these files usually work.

Hello @silver2row
@RobertCNelson helped me in finding the solution. A lot of the old BB UART forums say that UART5 is under /dev/tty05 but in recent versions of Linux, it has changed to /dev/ttyS5.

1 Like

Hi,

if anyone needs it, I created scripts to get UART5 working on Debian13, kernel 6.x.

BB-UART5-00A0.dtso:

/dts-v1/;
/plugin/;

#include <dt-bindings/pinctrl/am33xx.h>

/*
 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
 */
&{/chosen} {
	overlays {
		BB-UART5-00A0.kernel = __TIMESTAMP__;
	};
};

/*
 * Free up the pins used by the cape from the pinmux helpers.
 */
&ocp {
	P8_37_pinmux { status = "disabled"; };	/* P8_37: uart5_txd */
	P8_38_pinmux { status = "disabled"; };	/* P8_38: uart5_rxd */
};

&am33xx_pinmux {
	bb_uart5_pins: pinmux_bb_uart5_pins {
		pinctrl-single,pins = <
		    AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE4)	/* P8_37 lcd_data8.uart5_txd */
		    AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_INPUT, MUX_MODE4)	/* P8_38 lcd_data9.uart5_rxd */
		>;
	};
};

&uart5 {
	/* sudo agetty 115200 ttyS5 */
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&bb_uart5_pins>;
};

BB-UART5-00A0-RTS-CTS:

/dts-v1/;
/plugin/;

#include <dt-bindings/pinctrl/am33xx.h>

/*
 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
 */
&{/chosen} {
	overlays {
		BB-UART5-00A0-RTS-CTS.kernel = __TIMESTAMP__;
	};
};

/*
 * Free up the pins used by the cape from the pinmux helpers.
 */
&ocp {
	P8_37_pinmux { status = "disabled"; };	/* P8_37: uart5_txd */
	P8_38_pinmux { status = "disabled"; };	/* P8_38: uart5_rxd */
	P8_31_pinmux { status = "disabled"; };	/* P8_31: uart5_cts */
	P8_32_pinmux { status = "disabled"; };	/* P8_32: uart5_rts */
};

&am33xx_pinmux {
	bb_uart5_pins: pinmux_bb_uart5_pins {
		pinctrl-single,pins = <
		    AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE4)	/* P8_37 lcd_data8.uart5_txd */
		    AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_INPUT, MUX_MODE4)	/* P8_38 lcd_data9.uart5_rxd */
		    AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE6)	/* P8_32 lcd_data15.uart5_rts */
		    AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_INPUT, MUX_MODE6)	/* P8_31 lcd_data14.uart5_cts */
		>;
	};
};

&uart5 {
	/* sudo agetty 115200 ttyS5 */
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&bb_uart5_pins>;
};

BB-UART5-00A0-RTS-CTS.dtbo (1.1 KB)

BB-UART5-00A0.dtbo (1.0 KB)

1 Like

Hallo!

I am also trying to enable UART5, but I fail.

In /boot/dtbs/6.18.4-bone14, I copied the source to BB-UART5-00A0.dtso
Then, I tried to compile it:
dtc -@ -O dtb -o BB-UART5-00A0.dtbo BB-UART5-00A0.dtso

But it fails:
Error: BB-UART5-00A0.dtso:4.1-9 syntax error
FATAL ERROR: Unable to parse input tree

Next, I downloaded the compiled dtbo file an put it into /boot/dtbs/6.18.4-bone14/

ls -la /boot/dtbs/6.18.4-bone14/BB-UART*

-rw-r–r-- 1 root root 1025 Jan 8 18:01 /boot/dtbs/6.18.4-bone14/BB-UART1-00A0.dtbo
-rw-r–r-- 1 root root 1025 Jan 8 18:01 /boot/dtbs/6.18.4-bone14/BB-UART2-00A0.dtbo
-rw-r–r-- 1 root root 1025 Jan 8 18:01 /boot/dtbs/6.18.4-bone14/BB-UART4-00A0.dtbo
-rw-r–r-- 1 root root 1025 Jan 12 21:23 /boot/dtbs/6.18.4-bone14/BB-UART5-00A0.dtbo

But during boot it tells me:

uboot_overlays: unable to find [mmc 0:3 BB-UART5-00A0.dtbo]…

My uEnv.txt looks like this:
#Docs: Making sure you're not a bot!

uname_r=6.18.4-bone14
uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo
enable_uboot_overlays=1
uboot_overlay_addr0=BB-UART5-00A0.dtbo
uboot_overlay_addr1=BB-UART1-00A0.dtbo
uboot_overlay_addr2=BB-UART2-00A0.dtbo
uboot_overlay_addr3=BB-UART4-00A0.dtbo
#uboot_overlay_addr3=BB-UART5-00A0.dtbo
uboot_overlay_addr4=BB-ADC-00A0.dtbo

console=ttyS0,115200n8
cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100

All other UARTS are installed.

Any idea?

Kind regards
Markus

Okay merged the old overlay into our v6.18.x tree and cleaned it up:

cd /opt/source/dtb-6.18.x/
git pull
./build_n_install.sh

Regards,

1 Like