bcm283x: debug_ll: add RaspberryPi 4 PL011 UART support
Subsystems (2)
PATCH 1/1 bcm283x: debug_ll: add RaspberryPi 4 PL011 UART support
From: Chali Anis <[email protected]>
Add a DEBUG_RPI4_UART choice for low-level debugging on RaspberryPi 4 and CM4 boards via the PL011 UART (uart0), for setups where the disable-bt overlay routes it onto the GPIO header pins instead of the mini UART. Mirrors the existing RPi1/RPi2-3 PL011 debug_ll support:
firmware configures the UART, so debug_ll_init() is a no-op.
--- common/Kconfig.debug_ll | 10 ++++++++++ include/mach/bcm283x/debug_ll.h | 10 ++++++++++ include/mach/bcm283x/platform.h | 1 + 3 files changed, 21 insertions(+)
common/Kconfig.debug_ll +10 -0
@@ -275,6 +275,16 @@ config DEBUG_RPI2_3_UART Say Y here if you want low-level debugging support on RaspberryPi 2 and 3 boards. +config DEBUG_RPI4_UART + bool "RaspberryPi 4 PL011 UART" + depends on ARCH_BCM283X + select DEBUG_BCM283X_UART + help + Say Y here if you want low-level debugging support on + RaspberryPi 4 / CM4 boards using the PL011 UART (uart0), + e.g. when the disable-bt overlay routes it onto the GPIO + header pins instead of the mini UART. + config DEBUG_RPI3_MINI_UART bool "RaspberryPi 3 mini UART" depends on ARCH_BCM283X
include/mach/bcm283x/debug_ll.h +10 -0
@@ -40,6 +40,16 @@ static inline void debug_ll_init(void)#define DEBUG_LL_UART_ADDR BCM2836_PL011_BASE#include <debug_ll/pl011.h> +#elif definedCONFIG_DEBUG_RPI4_UART + +static inline void debug_ll_init (void ) +{ +/* Configured by ROM */ +} + +#define DEBUG_LL_UART_ADDR BCM2711_PL011_BASE +#include <debug_ll/pl011.h> +#elif definedCONFIG_DEBUG_RPI3_MINI_UART static inline uint8_t debug_ll_read_reg (void __iomem *base,int reg)
include/mach/bcm283x/platform.h +1 -0
@@ -32,6 +32,7 @@#define BCM2835_PL011_BASE 0x20201000#define BCM2836_PL011_BASE 0x3f201000UL +#define BCM2711_PL011_BASE 0xfe201000UL#define BCM2835_MINIUART_BASE 0x20215040#define BCM2836_MINIUART_BASE 0x3f215040UL#define BCM2711_MINIUART_BASE 0xfe215040UL
Quoted 10 lines · On 8/24/26 12:13 AM, [email protected] wrote:
From: Chali Anis <[email protected]>
Add a
DEBUG_RPI4_UARTchoice for low-level debugging on RaspberryPi 4 and CM4 boards via the PL011 UART (uart0), for setups where the disable-bt overlay routes it onto the GPIO header pins instead of the mini UART. Mirrors the existing RPi1/RPi2-3 PL011debug_llsupport:
firmware configures the UART, sodebug_ll_init()is a no-op.Assisted-by Claude Sonnet 5Signed-off-by Chali Anis <[email protected]>
Quoted 61 lines
--- common/Kconfig.debug_ll | 10 ++++++++++ include/mach/bcm283x/debug_ll.h | 10 ++++++++++ include/mach/bcm283x/platform.h | 1 + 3 files changed, 21 insertions(+)common/Kconfig.debug_ll +10
-0@@ -275,6 +275,16 @@ config DEBUG_RPI2_3_UART Say Y here if you want low-level debugging support on RaspberryPi 2 and 3 boards. +config DEBUG_RPI4_UART + bool "RaspberryPi 4 PL011 UART" + depends on ARCH_BCM283X + select DEBUG_BCM283X_UART + help + Say Y here if you want low-level debugging support on + RaspberryPi 4 / CM4 boards using the PL011 UART (uart0), + e.g. when the disable-bt overlay routes it onto the GPIO + header pins instead of the mini UART. + config DEBUG_RPI3_MINI_UART bool "RaspberryPi 3 mini UART" depends on ARCH_BCM283Xinclude/mach/bcm283x/debug_ll.h +10
-0@@ -40,6 +40,16 @@ static inline void debug_ll_init(void)#define DEBUG_LL_UART_ADDR BCM2836_PL011_BASE#include <debug_ll/pl011.h> +#elif definedCONFIG_DEBUG_RPI4_UART + +static inline void debug_ll_init (void ) +{ +/* Configured by ROM */ +} + +#define DEBUG_LL_UART_ADDR BCM2711_PL011_BASE +#include <debug_ll/pl011.h> +#elif definedCONFIG_DEBUG_RPI3_MINI_UART static inline uint8_t debug_ll_read_reg (void __iomem *base,int reg)include/mach/bcm283x/platform.h +1
-0@@ -32,6 +32,7 @@#define BCM2835_PL011_BASE 0x20201000#define BCM2836_PL011_BASE 0x3f201000UL +#define BCM2711_PL011_BASE 0xfe201000UL#define BCM2835_MINIUART_BASE 0x20215040#define BCM2836_MINIUART_BASE 0x3f215040UL#define BCM2711_MINIUART_BASE 0xfe215040UL
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Sascha Hauer
AppliedQuoted 8 lines · On Mon, 24 Aug 2026 00:13:29 +0200, [email protected] wrote:
Add a
DEBUG_RPI4_UARTchoice for low-level debugging on RaspberryPi 4 and CM4 boards via the PL011 UART (uart0), for setups where the disable-bt overlay routes it onto the GPIO header pins instead of the mini UART. Mirrors the existing RPi1/RPi2-3 PL011debug_llsupport:
firmware configures the UART, sodebug_ll_init()is a no-op.[...]
Applied, thanks!
[1/1] bcm283x: debug_ll: add RaspberryPi 4 PL011 UART support
https://git.pengutronix.de/cgit/barebox/commit/?id=4836941756bb (link may not be stable)
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>