Re: [PATCH v5 10/12] serial: 8250: add Ambarella UART driver

Andy Shevchenko <[email protected]>
Newsgroups dev.linux.lists.soc,dev.linux.lists.mfd,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel,org.kernel.vger.linux-serial
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
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)


...

> +	of_property_read_u32(dev->of_node, "reg-shift", &reg_shift);
> +	of_property_read_u32(dev->of_node, "reg-io-width", &reg_io_width);
> +	uart.port.regshift = reg_shift;

> +	switch (reg_io_width) {
> +	case 4:
> +		uart.port.iotype = UPIO_MEM32;
> +		uart.port.serial_in = ambarella_serial_in;
> +		uart.port.serial_out = ambarella_serial_out;
> +		break;
> +	default:
> +		return dev_err_probe(dev, -EINVAL,
> +				     "unsupported reg-io-width %u\n",
> +				     reg_io_width);
> +	}

This is handled by uart_read_port_properties().

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.