Repository navigation
Closed
Description
Describe the bug
After switching our linux kernel to the 6.1 branch (currently on 6.1.46) we noticed that the ttyAMA numbering changed and now corresponds to the hardware uart number. I.e. uart3 -> ttyAMA3, uart5 -> ttyAMA5. (see https://forums.raspberrypi.com/viewtopic.php?t=347868 and #5436)
So far so good, but recently we noticed that uart5 gets enumerated as ttyAMA1 now, without any further software change.
Here's the dmesg excerpt:
dmesg | grep ttyAMA
[...]
[ 0.181829] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 33, base_baud = 0) is a PL011 rev2
[ 0.421900] printk: console [ttyAMA0] enabled
[ 0.593863] fe201400.serial: ttyAMA2 at MMIO 0xfe201400 (irq = 33, base_baud = 0) is a PL011 rev2
[ 0.602932] fe201600.serial: ttyAMA3 at MMIO 0xfe201600 (irq = 33, base_baud = 0) is a PL011 rev2
[ 0.817135] fe201a00.serial: ttyAMA1 at MMIO 0xfe201a00 (irq = 33, base_baud = 0) is a PL011 rev2
0xfe201a00 is defnitely uart5 in the device tree:
$ dtc -I fs /sys/firmware/devicetree/base | grep serial@
serial@7e201a00 {
serial@7e201800 {
serial@7e201400 {
serial@7e215040 {
serial@7e201000 {
serial@7e201600 {
serial5 = "/soc/serial@7e215040";
uart4 = "/soc/serial@7e201800";
serial3 = "/soc/serial@7e201600";
uart2 = "/soc/serial@7e201400";
serial1 = "/soc/serial@7e215040";
uart0 = "/soc/serial@7e201000";
bluetooth = "/soc/serial@7e201000/bluetooth";
uart5 = "/soc/serial@7e201a00";
serial4 = "/soc/serial@7e201800";
uart3 = "/soc/serial@7e201600";
serial2 = "/soc/serial@7e201400";
uart1 = "/soc/serial@7e215040";
serial0 = "/soc/serial@7e201000";
bt = "/soc/serial@7e201000/bluetooth";
uart4 = "/soc/serial@7e201800";
minibt = "/soc/serial@7e215040/bluetooth";
uart2 = "/soc/serial@7e201400";
uart0 = "/soc/serial@7e201000";
uart5 = "/soc/serial@7e201a00";
uart3 = "/soc/serial@7e201600";
uart1 = "/soc/serial@7e215040";
Any idea what could be going wrong here?
Steps to reproduce the behaviour
Unclear so far.
Device (s)
Raspberry Pi CM4
System
Custom OS built with buildroot.
firmware: raspberrypi/firmware@74ad049
kernel: 9ed4f05
Logs
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels
Activity
pelwell commentedon Sep 6, 2023
I've not figured out the how yet, but the what is fairly clear:
Notice that the
serial5alias is pointing to the same asuart1, notuart5as it should.And that's not the case in the base dts file:
pelwell commentedon Sep 6, 2023
It would have to be an overlay then...
pelwell commentedon Sep 7, 2023
...unless it's a stupid firmware bug. Which it is.
Grab the trial firmware from this link: https://drive.google.com/file/d/1xDBZfgwveKbmunzUzcLeVCmGIyqUjj_O/view?usp=sharing
It just contains
start4cd.elfandfixup4cd.dat. Copy them into /boot and reboot - theserial5alias should be correct.pelwell commentedon Sep 7, 2023
Cool - the fix has been merged, and will be in future firmware releases. For now you can continue to use that trial version.
pelwell commentedon Sep 7, 2023
All releases appear here (https://github.com/raspberrypi/rpi-firmware/commits/master), with stable releases here (https://github.com/raspberrypi/rpi-firmware/commits/stable) - significant changes are listed in the commit messages (click on the ...s).
pelwell commentedon Oct 5, 2023
If it contains the hat_map feature (which it does) then yes, it will have the fix mentioned about.