Cannot enable any UART other then default

System information

  • DietPi version |
    G_LIVE_PATCH_STATUS[0]='not applicable'

  • Distro version | bookworm 0

  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture | arm64

  • SBC model | RPi 4 Model B (aarch64)

  • SD card used | Verbatim microSD 64GB

Steps taken:

In my /boot/config.txt i have put:

# enable serial interface

After saving this change, i have rebooted my device using sudo reboot. After roboot when i run ls -al /dev/ttyAMA* i get output:

crw-rw---- 1 root dialout 204, 64 Jul  6 12:33 /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 65 Jul  6 12:33 /dev/ttyAMA1

As you can see AMA4 aka uart5 is not enabled, i need this specific UART due to the pins it uses 33 & 32.

So why is the UART not enabled even tho the dtoverlay is in the config.txt?

I gathered some info from this post

  • Enable serial console with dietpi-config should already do all steps for you, but to be sure:
  • Verify that /DietPi/config.txt contains the line enable_uart=1.
    Verify that /DietPi/dietpi.txt contains the line CONFIG_SERIAL_CONSOLE_ENABLE=1.
  • NEVER do systemctl disable getty@tty1.service as TTY1 is always needed as fallback

Important when using UART devices for something else then a serial login console, is that you disable serial console usage. On DietPi do:
dietpi-config > Advanced Options > Serial/UART

Hey, the regular ttyS0 works fine. The console usage is disabled via dietpi-config.

Verify that /DietPi/config.txt contains the line enable_uart=1.
Verify that /DietPi/dietpi.txt contains the line CONFIG_SERIAL_CONSOLE_ENABLE=1.

Directory DietPi does not exist anymore, this is now placed in boot directory. As mentioned enable_uart=1 is present in config.txt. CONFIG_SERIAL_CONSOLE_ENABLE=1 is also present in dietpi.txt.

Still the UART5 (AMA4) isn’t enabled. While the default ttySO works fine to connect with.

probably something @MichaIng could help with.

Enabling this on RPi 4 should actually work:

There is no other ttyS* device node which may represent UART5, is it? As we use the original RPi kernel and firmware, if the device tree overlay does not work, I is most likely a bug in the RPi kernel.

Should be reported here: Issues · raspberrypi/linux · GitHub
But first test on RPi OS once, to rule out that it somehow is a bug our end.

The kernel log does not show related errors, does it?

dmesg -l 0,1,2,3

Sorry for replying this late, the only error the command shows you gave is:

root@DietPi:~# dmesg -l 0,1,2,3
[    0.617813] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.

I will run RPi OS to determine if it has same issue or not.

After running on RPI Os:
Result from command dmesg -l 0,1,2,3 is nothing. So no errors.
/boot/config.txt contains dtoverlay=uart5 below enable_uart=1.

Also when running dtoverlay -l in command prompt after reboot shows no active overlays loaded… (same as in dietpi).
Even when running sudo dtoverlay uart5 It will have it in the dtoverlay list(dtoverlay -l) until reboot is preformed it will say no active overlays found.

Serial connection ttyS0 works perfectly fine, same as dietpi.
Can a problem be the fact that multiple pins are connected, that one of these connections is the issue?
Or should i report this under RPI OS issues?

When running ls /dev/tty* a lot of different tty0, tty24, tty11, … only ttyAMA0 & ttyAMA1, no AMA4.

this might be best