Beagley-ai UART1 Port Issues

Hello,

I am attempting to test the BeagleY-AI UART1 (Connecting pins 8 & 10 of expansion connector) using minicom echo test.
I am also running the Wifi-Hotspot image provided here:
https://rcn-ee.net/rootfs/debian-arm64-12-bookworm-xfce-v6.1-ti/2024-06-22/

Enter minicom echotest:
terminal entry: sudo minicom -b 9600 -o -D /dev/ttyS*
ctrl + a
Z
E

I am not sure which ttyS* port to use, and I have tried all of ttyS0 through ttyS7 and non of them are passing this test.

Any ideas to what I am doing wrong?

I am just guessing here, might need to load the uart overlay.

$sudo dmesg | grep tty*
$gpiodetect
$gpioinfo <gpiochip#>

You should see it listed when it bounces back the info, pretty sure one is turned on with the default setup. Look over the gpioinfo and find the pins for uart(s) that are shown as active. This would be a start.

Here is the info. Not exactly sure what to do with it, but would you say it means the Uart1 overlay needs to be addded?

[    0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.003459] cblist_init_generic: Setting adjustable number of callback queues.
[    0.003471] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.003550] cblist_init_generic: Setting adjustable number of callback queues.
[    0.003554] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.003627] cblist_init_generic: Setting adjustable number of callback queues.
[    0.003631] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.164311] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.310450] evm: Initialising EVM extended attributes:
[    1.310477] evm: HMAC attrs: 0x1
[    1.433880] input: tps65219-pwrbutton as /devices/platform/bus@f0000/bus@f0000:bus@b00000/2b200000.i2c/i2c-2/2-0030/tps65219-pwrbutton.2.auto/input/input0
[    1.470575] printk: console [ttyS2] disabled
[    1.470644] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 327, base_baud = 3000000) is a 8250
[    1.477665] printk: console [ttyS2] enabled
[    1.478782] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 328, base_baud = 3000000) is a 8250
[    1.479980] 2860000.serial: ttyS6 at MMIO 0x2860000 (irq = 329, base_baud = 3000000) is a 8250
[    1.480113] serial serial0: tty port ttyS6 registered
[    8.057370] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[    8.064124] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[   27.420678] btti serial0-0: Host wakeup NOT enabled
[   27.420768] btti serial0-0: SM: Got EVENT_PROBE_DONE, moving from STATE_PROBING to STATE_HW_OFF
[   27.650044] remoteproc remoteproc3: attaching to 78000000.r5f
[   27.651211] remoteproc remoteproc3: remote processor 78000000.r5f is now attached
[   28.138802] btti serial0-0: SM: Got EVENT_REGULATOR_ENABLE, moving from STATE_HW_OFF to STATE_HW_ON
[   28.360272] btti serial0-0: SM: Got EVENT_REGULATOR_DISABLE, moving from STATE_HW_ON to STATE_HW_OFF
[   28.361696] btti serial0-0: SM: Got EVENT_REGULATOR_ENABLE, moving from STATE_HW_OFF to STATE_HW_ON
[   28.464619] btti serial0-0: SM: Got EVENT_REGULATOR_DISABLE, moving from STATE_HW_ON to STATE_HW_OFF
[   35.929239] btti serial0-0: SM: Got EVENT_REGULATOR_ENABLE, moving from STATE_HW_OFF to STATE_HW_ON
[   35.987871] btti serial0-0: SM: Got EVENT_REGULATOR_DISABLE, moving from STATE_HW_ON to STATE_HW_OFF
[   36.044996] btti serial0-0: SM: Got EVENT_REGULATOR_ENABLE, moving from STATE_HW_OFF to STATE_HW_ON
[   38.044130] Modules linked in: algif_aead cc33xx mac80211 rpmsg_ctrl rpmsg_char libarc4 virtio_rpmsg_bus joydev rpmsg_ns cfg80211 crct10dif_ce snd_soc_simple_card snd_soc_simple_card_utils cc33xx_sdio pvrsrvkm(O) e5010_jpeg_enc at24 rti_wdt snd_soc_davinci_mcasp wave5 snd_soc_ti_udma videobuf2_dma_contig snd_soc_ti_edma snd_soc_ti_sdma snd_soc_hdmi_codec v4l2_mem2mem videobuf2_memops snd_soc_core ti_k3_r5_remoteproc snd_pcm_dmaengine videobuf2_v4l2 videobuf2_common btti_uart snd_pcm bluetooth videodev ti_k3_dsp_remoteproc ti_k3_common snd_timer mc snd pwm_fan cpufreq_dt uio_pdrv_genirq uio loop dm_mod efi_pstore
[   38.045739] Modules linked in: algif_aead cc33xx mac80211 rpmsg_ctrl rpmsg_char libarc4 virtio_rpmsg_bus joydev rpmsg_ns cfg80211 crct10dif_ce snd_soc_simple_card snd_soc_simple_card_utils cc33xx_sdio pvrsrvkm(O) e5010_jpeg_enc at24 rti_wdt snd_soc_davinci_mcasp wave5 snd_soc_ti_udma videobuf2_dma_contig snd_soc_ti_edma snd_soc_ti_sdma snd_soc_hdmi_codec v4l2_mem2mem videobuf2_memops snd_soc_core ti_k3_r5_remoteproc snd_pcm_dmaengine videobuf2_v4l2 videobuf2_common btti_uart snd_pcm bluetooth videodev ti_k3_dsp_remoteproc ti_k3_common snd_timer mc snd pwm_fan cpufreq_dt uio_pdrv_genirq uio loop dm_mod efi_pstore
gpiochip0 [4201000.gpio] (24 lines)
gpiochip1 [600000.gpio] (87 lines)
gpiochip2 [601000.gpio] (73 lines)

 gpioinfo gpiochip0
gpiochip0 - 24 lines:
        line   0:      "GPIO8"       unused   input  active-high 
        line   1:      unnamed       unused   input  active-high 
        line   2:     "GPIO11"       unused   input  active-high 
        line   3:     "GPIO10"       unused   input  active-high 
        line   4:      "GPIO9"       unused   input  active-high 
        line   5:      unnamed       unused   input  active-high 
        line   6:      unnamed      "reset"  output  active-high [used]
        line   7:     "GPIO23"       unused   input  active-high 
        line   8:      unnamed     "enable"  output  active-high [used]
        line   9:      "GPIO7"       unused   input  active-high 
        line  10:     "GPIO24"       unused   input  active-high 
        line  11:      unnamed       unused   input  active-high 
        line  12:      unnamed       unused   input  active-high 
        line  13:  "HDMI_RSTn"       unused   input  active-high 
        line  14:  "HDMI_INTn"       unused   input  active-high 
        line  15:      unnamed       unused   input  active-high 
        line  16:      unnamed       unused   input  active-high 
        line  17:      "GPIO3"       unused   input  active-high 
        line  18:      "GPIO2"       unused   input  active-high 
        line  19:      unnamed       unused   input  active-high 
        line  20:      unnamed       unused   input  active-high 
        line  21:      unnamed       unused   input  active-high 
        line  22:      unnamed       unused   input  active-high 
        line  23:      unnamed       unused   input  active-high

 line   0:      unnamed       unused   input  active-high 
        line   1:      unnamed "MIPI_SWITCH_OE" output active-high [used]
        line   2:      unnamed "MIPI_SWITCH_SEL" output active-high [used]
        line   3:      unnamed       unused   input  active-high 
        line   4:      unnamed "regulator-3" output active-high [used]
        line   5:      unnamed       unused   input  active-high 
        line   6:      unnamed       unused   input  active-high 
        line   7:      unnamed       unused   input  active-high 
        line   8:      unnamed       unused   input  active-high 
        line   9:      unnamed       unused   input  active-high 
        line  10:      unnamed       unused   input  active-high 
        line  11:      unnamed        "PWR"  output   active-low [used]
        line  12:      unnamed        "ACT"  output  active-high [used]
        line  13:      unnamed       unused   input  active-high 
        line  14:      unnamed       unused   input  active-high 
        line  15:      unnamed       unused   input  active-high 
        line  16:      unnamed       unused   input  active-high 
        line  17:      unnamed       unused   input  active-high 
        line  18:      unnamed       unused   input  active-high 
        line  19:      unnamed       unused   input  active-high 
        line  20:      unnamed       unused   input  active-high 
        line  21:      unnamed       unused   input  active-high 
        line  22:      unnamed       unused   input  active-high 
        line  23:      unnamed       unused   input  active-high 
        line  24:      unnamed       unused   input  active-high 
        line  25:      unnamed       unused   input  active-high 
        line  26:      unnamed       unused   input  active-high 
        line  27:      unnamed       unused   input  active-high 
        line  28:      unnamed       unused   input  active-high 
        line  29:      unnamed       unused   input  active-high 
        line  30:      unnamed       unused   input  active-high 
        line  31:      unnamed       unused   input  active-high 
        line  32:    "USB_RST"      "reset"  output   active-low [used]
        line  33:     "GPIO27"       unused   input  active-high 
        line  34:      unnamed       unused   input  active-high 
        line  35:      unnamed       unused   input  active-high 
        line  36:     "GPIO26"       unused   input  active-high 
        line  37:      unnamed       unused   input  active-high 
        line  38:      "GPIO4"       unused   input  active-high 
        line  39:      unnamed       unused   input  active-high 
        line  40:      unnamed       unused   input  active-high 
        line  41:     "GPIO22"       unused   input  active-high 
        line  42:     "GPIO25"       unused   input  active-high 
        line  43:      unnamed       unused   input  active-high 
        line  44:      unnamed       unused   input  active-high 
        line  45:      unnamed       unused   input  active-high 
        line  46:      unnamed       unused   input  active-high 
        line  47:      unnamed       unused   input  active-high 
        line  48:      unnamed       unused   input  active-high 
        line  49:      unnamed       unused   input  active-high 
        line  50:      unnamed       unused   input  active-high 
        line  51:      unnamed       unused   input  active-high 
        line  52:      unnamed       unused   input  active-high 
        line  53:      unnamed       unused   input  active-high 
        line  54:      unnamed       unused   input  active-high 
        line  55:      unnamed       unused   input  active-high 
        line  56:      unnamed       unused   input  active-high 
        line  57:      unnamed       unused   input  active-high 
        line  58:      unnamed       unused   input  active-high 
        line  59:      unnamed       unused   input  active-high 
        line  60:      unnamed       unused   input  active-high 
        line  61:      unnamed       unused   input  active-high 
        line  62:      unnamed       unused   input  active-high 
        line  63:      unnamed       unused   input  active-high 
        line  64:      unnamed       unused   input  active-high 
        line  65:      unnamed       unused   input  active-high 
        line  66:      unnamed       unused   input  active-high 
        line  67:      unnamed       unused   input  active-high 
        line  68:      unnamed       unused   input  active-high 
        line  69:      unnamed       unused   input  active-high 
        line  70:      unnamed       unused   input  active-high 
        line  71:      unnamed       unused   input  active-high 
        line  72:      unnamed       unused   input  active-high 
        line  73:      unnamed       unused   input  active-high 
        line  74:      unnamed       unused   input  active-high 
        line  75:      unnamed       unused   input  active-high 
        line  76:      unnamed       unused   input  active-high 
        line  77:      unnamed       unused   input  active-high 
        line  78:      unnamed       unused   input  active-high 
        line  79:      unnamed       unused   input  active-high 
        line  80:      unnamed       unused   input  active-high 
        line  81:      unnamed       unused   input  active-high 
        line  82:      unnamed       unused   input  active-high 
        line  83:      unnamed       unused   input  active-high 
        line  84:      unnamed       unused   input  active-high 
        line  85:      unnamed       unused   input  active-high 
        line  86:      unnamed       unused   input  active-high

gpioinfo gpiochip2
gpiochip2 - 73 lines:
        line   0:      unnamed       unused   input  active-high 
        line   1:      unnamed       unused   input  active-high 
        line   2:      unnamed       unused   input  active-high 
        line   3:      unnamed       unused   input  active-high 
        line   4:      unnamed       unused   input  active-high 
        line   5:      unnamed       unused   input  active-high 
        line   6:      unnamed       unused   input  active-high 
        line   7:     "GPIO16"       unused   input  active-high 
        line   8:     "GPIO17"       unused   input  active-high 
        line   9:     "GPIO21"       unused   input  active-high 
        line  10:     "GPIO20"       unused   input  active-high 
        line  11:     "GPIO18"       unused   input  active-high 
        line  12:     "GPIO19"       unused   input  active-high 
        line  13:     "GPIO15"       unused   input  active-high 
        line  14:     "GPIO14"       unused   input  active-high 
        line  15:      "GPIO5"       unused   input  active-high 
        line  16:     "GPIO12"       unused   input  active-high 
        line  17:      "GPIO6"       unused   input  active-high 
        line  18:     "GPIO13"       unused   input  active-high 
        line  19:      unnamed       unused   input  active-high 
        line  20:      unnamed       unused   input  active-high 
        line  21:      unnamed       unused   input  active-high 
        line  22:      unnamed       unused   input  active-high 
        line  23:      unnamed       unused   input  active-high 
        line  24:      unnamed       unused   input  active-high 
        line  25:      unnamed       unused   input  active-high 
        line  26:      unnamed       unused   input  active-high 
        line  27:      unnamed       unused   input  active-high 
        line  28:      unnamed       unused   input  active-high 
        line  29:      unnamed       unused   input  active-high 
        line  30:      unnamed       unused   input  active-high 
        line  31:      unnamed       unused   input  active-high 
        line  32:      unnamed       unused   input  active-high 
        line  33:      unnamed       unused   input  active-high 
        line  34:      unnamed       unused   input  active-high 
        line  35:      unnamed       unused   input  active-high 
        line  36:      unnamed       unused   input  active-high 
        line  37:      unnamed       unused   input  active-high 
        line  38:      unnamed       unused   input  active-high 
        line  39:      unnamed       unused   input  active-high 
        line  40:      unnamed       unused   input  active-high 
        line  41:      unnamed       unused   input  active-high 
        line  42:      unnamed       unused   input  active-high 
        line  43:      unnamed       unused   input  active-high 
        line  44:      unnamed       unused   input  active-high 
        line  45:      unnamed       unused   input  active-high 
        line  46:      unnamed       unused   input  active-high 
        line  47:      unnamed       unused   input  active-high 
        line  48:      unnamed         "cd"   input   active-low [used]
        line  49:      unnamed   "tlv71033"  output  active-high [used]
        line  50:      unnamed "regulator-mmc1" output active-high [used]
        line  51:      unnamed       unused   input  active-high 
        line  52:      unnamed       unused   input  active-high 
        line  53:      unnamed       unused   input  active-high 
        line  54:      unnamed       unused   input  active-high 
        line  55:      unnamed       unused   input  active-high 
        line  56:      unnamed       unused   input  active-high 
        line  57:      unnamed       unused   input  active-high 
        line  58:      unnamed       unused   input  active-high 
        line  59:      unnamed       unused   input  active-high 
        line  60:      unnamed       unused   input  active-high 
        line  61:      unnamed       unused   input  active-high 
        line  62:      unnamed       unused   input  active-high 
        line  63:      unnamed       unused   input  active-high 
        line  64:      unnamed       unused   input  active-high 
        line  65:      unnamed       unused   input  active-high 
        line  66:      unnamed       unused   input  active-high 
        line  67:      unnamed       unused   input  active-high 
        line  68:      unnamed       unused   input  active-high 
        line  69:      unnamed       unused   input  active-high 
        line  70:      unnamed       unused   input  active-high 
        line  71:      unnamed       unused   input  active-high 
        line  72:      unnamed       unused   input  active-high

So we need an overlay…

The correct port thou is:

&main_uart1 {
	symlink = "ttyAMA0";
	//pinctrl-names = "default";
	//pinctrl-0 = <&main_uart1_pins_default>;
	status = "okay";
	bootph-all;
};

by using the symlink = "ttyAMA0"; this would allow to use /dev/ttyAMA0 in your software:

voodoo@BeagleY-AI:~$ ls -lha /dev/ttyAMA0 
lrwxrwxrwx 1 root root 5 Jul  3 10:22 /dev/ttyAMA0 -> ttyS3

Okay, let’s enable the overlay…

Added: beagley-ai: add k3-am67a-beagley-ai-uart-ttyama0 overlay (ff4a9085) · Commits · BeagleBoard.org / BeagleBoard-DeviceTrees · GitLab

To test, on the BeagleY-AI:

cd /opt/source/dtb-6.1-Beagle/
git pull
./build_n_install.sh

k3-am67a-beagley-ai-uart-ttyama0.dtbo

Open: /boot/firmware/extlinux/extlinux.conf

Change the last option, from:

    fdt /ti/k3-am67a-beagley-ai.dtb
    #fdtoverlays /overlays/<file>.dtbo
    #initrd /initrd.img

to:

    fdt /ti/k3-am67a-beagley-ai.dtb
    fdtoverlays /overlays/k3-am67a-beagley-ai-uart-ttyama0.dtbo
    #initrd /initrd.img

(commenting out # initrd is recent change, the fdtoverlays address in u-boot is corrupting initrd placement on bootup…)

and reboot

Over the RPI debug port:

Retrieving file: /ti/k3-am67a-beagley-ai.dtb
Retrieving file: /overlays/k3-am67a-beagley-ai-uart-ttyama0.dtbo
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
   Loading Device Tree to 000000008ffe0000, end 000000008fffffff ... OK
Working FDT set to 8ffe0000

Starting kernel ...

Once booted, you can check with:

voodoo@BeagleY-AI:~$ sudo beagle-version | grep UBOOT
UBOOT: Booted Device-Tree:[k3-am67a-beagley-ai.dts]
UBOOT: Loaded Overlay:[k3-am67a-beagley-ai-uart-ttyama0.kernel]

and i don’t have a second usb-uart adapter at work…, but tio /dev/ttyAMA0 should work…

Regards,

Awesome this solved it. Thank you