Re: Re: Re: [PATCH v5 10/12] serial: 8250: add Ambarella UART driver
From: Andy Shevchenko
Date: Wed Aug 19 2026 - 03:37:00 EST
On Wed, Aug 19, 2026 at 03:00:49PM +0800, zl020895 wrote:
>
> The register layout is 16550-compatible with reg-shift = 2, and it has a
> USR-style busy bit at a similar offset to DW APB UART. That is why it looks
> Synopsys-like and why we first tried 8250_dw.
I see.
> It is still Ambarella IP, not a Synopsys DesignWare license. Besides the
> common 8250 map it has Ambarella-specific pieces (e.g. IER ETOI, and DMA via
> DMAE/DMAF rather than the DW DMA path). DMA support is out of scope for this
> minimal bring-up series; the current driver is PIO / console only.
Okay, put the summary and the details of this discussion in the commit message
of the next version to make sure we have a justification for a new driver and
some pieces that looks like Synopsys DesignWare.
Also try to make the driver really bare minimum without any blindly copied
pieces or "features" that are not related to your HW or will be implemented
differently in the future.
> Sorry, I do not have a public datasheet URL I can post.
If you can share register layout with small descriptions (even privately) it
would be helpful (some pages from your datasheet, for example).
> ---- Replied Message ----
> | From | Andy Shevchenko<andriy.shevchenko@xxxxxxxxxxxxxxx> |
> | Date | 08/19/2026 14:50 |
> On Wed, Aug 19, 2026 at 02:31:59PM +0800, zl020895 wrote:
>
> > This is Ambarella 8250-compatible IP, not Synopsys DesignWare. We
> > first tried 8250_dw after Linus asked us to move to the 8250 library;
> > you then told us not to touch 8250_dw and to use 8250_ambarella
> > instead. That is what this patch is.
> > Background:
> > https://lore.kernel.org/r/CAD++jLm6HzEU1TM-c=Vtjv3FJEBecVP7TyxSgq_Q0zF-YwT6NA@xxxxxxxxxxxxxx/
> > https://lore.kernel.org/linux-serial/an8KvvHWX0naH3Xw@ashevche-desk.local/
> > https://lore.kernel.org/linux-serial/7E774305-3920-4BB7-BA46-E0772D6BED84@xxxxxxxxxxxxx/
> > I will also switch to uart_read_port_properties() and trim the
> > 8250_dw-derived boilerplate.
>
> But it has layout like Synopsys? Do you have a link to the datasheet?
>
> > ---- Replied Message ----
> > | From | Andy Shevchenko<andriy.shevchenko@xxxxxxxxxxxxxxx> |
> > | Date | 08/18/2026 22:17 |
> > On Tue, Aug 18, 2026 at 06:31:24PM +0800, Long Zhao via B4 Relay wrote:
> >
> > > Add an 8250 platform driver for Ambarella CV75 instead of claiming
> > > snps,dw-apb-uart compatibility.
> >
> > This is a record from a changelog. There is nothing in the commit message.
...
> > The code seems like an almost blind copy of 8250_dw.c.
> >
> > > +#define AMBARELLA_UART_USR 0x1f
> > > +#define AMBARELLA_UART_USR_BUSY BIT(0)
> >
> > So, is it Synopsys IP-based design? How this gets into this platform? This
> > whole story completely made me lost.
> >
> > > +#define AMBARELLA_UART_IIR_IID GENMASK(3, 0)
> > > +#define AMBARELLA_UART_IIR_STATUS GENMASK(5, 0)
--
With Best Regards,
Andy Shevchenko