From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: chalianis1@gmail.com, s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] bcm283x: debug_ll: add RaspberryPi 4 PL011 UART support
Date: Mon, 24 Aug 2026 08:58:33 +0200 [thread overview]
Message-ID: <d5f7cae9-8551-4e30-beb2-4e1117ac9ccf@pengutronix.de> (raw)
In-Reply-To: <20260823221329.513717-1-chalianis1@gmail.com>
On 8/24/26 12:13 AM, chalianis1@gmail.com wrote:
> From: Chali Anis <chalianis1@gmail.com>
>
> 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.
>
> Assisted-by: Claude Sonnet 5
> Signed-off-by: Chali Anis <chalianis1@gmail.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/Kconfig.debug_ll | 10 ++++++++++
> include/mach/bcm283x/debug_ll.h | 10 ++++++++++
> include/mach/bcm283x/platform.h | 1 +
> 3 files changed, 21 insertions(+)
>
> diff --git a/common/Kconfig.debug_ll b/common/Kconfig.debug_ll
> index 8445b4be0872..5a28dc4a61e7 100644
> --- a/common/Kconfig.debug_ll
> +++ b/common/Kconfig.debug_ll
> @@ -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
> diff --git a/include/mach/bcm283x/debug_ll.h b/include/mach/bcm283x/debug_ll.h
> index a6a3b8f08856..3f2d5ddc9857 100644
> --- a/include/mach/bcm283x/debug_ll.h
> +++ b/include/mach/bcm283x/debug_ll.h
> @@ -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 defined CONFIG_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 defined CONFIG_DEBUG_RPI3_MINI_UART
>
> static inline uint8_t debug_ll_read_reg(void __iomem *base, int reg)
> diff --git a/include/mach/bcm283x/platform.h b/include/mach/bcm283x/platform.h
> index b957ac8de35e..54d8b38bd8ed 100644
> --- a/include/mach/bcm283x/platform.h
> +++ b/include/mach/bcm283x/platform.h
> @@ -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
>
--
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 |
next prev parent reply other threads:[~2026-08-24 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 22:13 chalianis1
2026-08-24 6:58 ` Ahmad Fatoum [this message]
2026-08-24 7:37 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5f7cae9-8551-4e30-beb2-4e1117ac9ccf@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=chalianis1@gmail.com \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox