[PATCH 04/11] sunxi: a733: uart: setup serial console

Yixun Lan dlan at gentoo.org
Tue Nov 18 02:20:22 CET 2025


Hi Andre,

On 00:56 Tue 18 Nov     , Andre Przywara wrote:
> On Sun, 16 Nov 2025 14:43:55 +0000
> Yixun Lan <dlan at gentoo.org> wrote:
> 
> > Setup correct UART base address for A733 SoC.
> > 
> > According to Allwinner's board design, A733 SoC use the UART0 port
> > for serial console, so config PB9-10 pins to setup pinmux.
> > 
> > Signed-off-by: Yixun Lan <dlan at gentoo.org>
> > ---
> >  arch/arm/include/asm/arch-sunxi/serial.h | 2 +-
> >  arch/arm/mach-sunxi/board.c              | 3 ++-
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/include/asm/arch-sunxi/serial.h b/arch/arm/include/asm/arch-sunxi/serial.h
> > index 9386287b65e..57b62ac8c7e 100644
> > --- a/arch/arm/include/asm/arch-sunxi/serial.h
> > +++ b/arch/arm/include/asm/arch-sunxi/serial.h
> > @@ -17,7 +17,7 @@
> >  #elif defined(CONFIG_MACH_SUNIV)
> >  #define SUNXI_UART0_BASE		0x01c25000
> >  #define SUNXI_R_UART_BASE		0
> > -#elif defined(CONFIG_SUNXI_GEN_NCAT2)
> > +#elif defined(CONFIG_SUNXI_GEN_NCAT2) || defined(CONFIG_MACH_SUN60I_A733)
> 
> Just using this as an example: Have you checked how much it would take
> to declare the A733 as a GEN_NCAT2? My feeling is that a lot of the
> code that GEN_NCAT2 guards would be applicable to the A733 as well,
> since it's mostly about the updated basic design and memory map, which
> the A733 mostly inherited. I mean in this case this whole patch could
> go away.
> 
> If there are exceptions, you could handle them like:
> #elif defined(CONFIG_MACH_SUN60I_A733)
> .... A733 specific definitions ...
> #elif defined(CONFIG_SUNXI_GEN_NCAT2)
> .... existing NCAT2 definitions ....
> #endif
> 
Ok, I thought above this, but wasn't sure..

I will take your advice and update the patch accordingly next time:
 using CONFIG_MACH_SUN60I_A733 to override if there is exceptions

Thanks
-- 
Yixun Lan (dlan)


More information about the U-Boot mailing list