You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dynamic loading of UART overlays does not create /dev/ttyAMA #7019
If I set dtoverlay=uart3 in /boot/config.txt on a Raspberry Pi 4 and reboot, /dev/ttyAMA3 exists. If I don't set dtoverlay=uart3 in /boot/config.txt and instead run dtoverlay uart3, no /dev/ttyAMA3 appears.
This is different from how other overlays work. For example, running dtoverlay spi0-1cs causes /dev/spidev0.0 to appear immediately, similar to how it exists after a reboot when instead setting dtoverlay=spi0-1cs in /boot/config.txt.
Dynamic changes to Device Tree are not universally supported in Linux. They often rely on a parent node or bus registering to be notified of changes, and that doesn't happen for all devices. The GPIO, SPI and I2C subsystems do register for notifications, as does the "platform" bus type.
The Device Trees for Raspberry Pis (along with almost all other devices), declare the UART as an AMBA bus device ("arm,pl011") because that's what the driver expects. (There is a platform bus variant, but with tweaks for one specific manufacturer). Well, that's what the upstream driver expects - for Pi 5 support we added an AXI variant (compatible string "arm,pl011-axi") in the downstream kernel tree that registers as a normal platform bus device.
Q. What happens if we change the compatible string for all the Pi PL011 UARTs to "arm,pl011-axi"?
A. When we load the overlay for, say, UART3, the notifier for the platform bus picks up the change, identifies the UART as a platform device, creates the device, and /dev/ttyAMA3 appears.
I've created a PR (#7023) that changes to downstream DT files to use "arm,pl011-axi". If you wait for the autobuilds to complete (usually about 40 minutes) you should be able to install a trial kernel using sudo rpi-update pulls/7023. Note that this might cause problems if you are relying on an initramfs file for e.g. a non-standard root filing system. It might be wise to do a trial boot with autoinitramfs=0 in config.txt to confirm that it still boots OK, before applying the update.
Thanks for your help (and sorry it took so long to respond), this works as expected for me :) Using the code from #7023, when I run dtoverlay uart3 the corresponding /dev/ttyAMA3 appears automatically.
Activity
ARM: dts: Select the PL011 platform driver
pelwell commentedon Aug 29, 2025
Dynamic changes to Device Tree are not universally supported in Linux. They often rely on a parent node or bus registering to be notified of changes, and that doesn't happen for all devices. The GPIO, SPI and I2C subsystems do register for notifications, as does the "platform" bus type.
The Device Trees for Raspberry Pis (along with almost all other devices), declare the UART as an AMBA bus device (
"arm,pl011") because that's what the driver expects. (There is a platform bus variant, but with tweaks for one specific manufacturer). Well, that's what the upstream driver expects - for Pi 5 support we added an AXI variant (compatible string"arm,pl011-axi") in the downstream kernel tree that registers as a normal platform bus device.Q. What happens if we change the compatible string for all the Pi PL011 UARTs to
"arm,pl011-axi"?A. When we load the overlay for, say, UART3, the notifier for the platform bus picks up the change, identifies the UART as a platform device, creates the device, and
/dev/ttyAMA3appears.I've created a PR (#7023) that changes to downstream DT files to use
"arm,pl011-axi". If you wait for the autobuilds to complete (usually about 40 minutes) you should be able to install a trial kernel usingsudo rpi-update pulls/7023. Note that this might cause problems if you are relying on an initramfs file for e.g. a non-standard root filing system. It might be wise to do a trial boot withautoinitramfs=0in config.txt to confirm that it still boots OK, before applying the update.mfd: rp1: Fix device links when modules disabled
ARM: dts: Select the PL011 platform driver
webmeister commentedon Sep 25, 2025
Thanks for your help (and sorry it took so long to respond), this works as expected for me :) Using the code from #7023, when I run
dtoverlay uart3the corresponding/dev/ttyAMA3appears automatically.ARM: dts: Select the PL011 platform driver
pelwell commentedon Sep 25, 2025
#7023 has been merged, so this issue will be fixed in future releases.
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver
ARM: dts: Select the PL011 platform driver