Thread (35 messages) flat view 35 messages, 6 authors, 23d ago

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2026-08-18 14:17:43
Also in: linux-arm-kernel, linux-clk, linux-gpio, linux-serial, lkml

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help