* [PATCH v2 0/2] serial: add Ambarella CV75 8250_dw quirks
@ 2026-12-01 4:54 ` Long Zhao via B4 Relay
0 siblings, 0 replies; 7+ messages in thread
From: Long Zhao @ 2026-12-01 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
Cc: Long Zhao, linux-kernel, Long Zhao, Krzysztof Kozlowski,
Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, Andy Shevchenko, Ilpo Järvinen
Split from the combined CV75 bring-up series. The 8250_dw driver does
not depend on ARCH_AMBARELLA.
The Ambarella vendor prefix is already in linux-next. The CV75 DT is
also upstream and uses ambarella,cv75-uart; this series documents that
compatible and adds the matching 8250_dw quirks so dtbs_check stays
clean.
Link: https://patch.msgid.link/20261009-cv75-uart-v1-0-38c098efaa99@ambarella.com
Changes in v2:
- Resend after the ambarella vendor prefix landed in linux-next. No
code change. (Rob)
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>
To: linux-serial@vger.kernel.org
Cc: Long Zhao <zl020895@163.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
Long Zhao (2):
dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart
serial: 8250_dw: add Ambarella CV75 quirks
.../bindings/serial/snps-dw-apb-uart.yaml | 1 +
drivers/tty/serial/8250/8250_dw.c | 32 ++++++++++++++++++++++
2 files changed, 33 insertions(+)
---
base-commit: 34cf6dafc47441dfb6b356a095b89c3585a93714
change-id: 20261007-cv75-uart-44a6029b6c31
Best regards,
--
Long Zhao <longzhao@ambarella.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 0/2] serial: add Ambarella CV75 8250_dw quirks
@ 2026-12-01 4:54 ` Long Zhao via B4 Relay
0 siblings, 0 replies; 7+ messages in thread
From: Long Zhao via B4 Relay @ 2026-12-01 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
Cc: Long Zhao, linux-kernel, Long Zhao, Krzysztof Kozlowski,
Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, Andy Shevchenko, Ilpo Järvinen
Split from the combined CV75 bring-up series. The 8250_dw driver does
not depend on ARCH_AMBARELLA.
The Ambarella vendor prefix is already in linux-next. The CV75 DT is
also upstream and uses ambarella,cv75-uart; this series documents that
compatible and adds the matching 8250_dw quirks so dtbs_check stays
clean.
Link: https://patch.msgid.link/20261009-cv75-uart-v1-0-38c098efaa99@ambarella.com
Changes in v2:
- Resend after the ambarella vendor prefix landed in linux-next. No
code change. (Rob)
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>
To: linux-serial@vger.kernel.org
Cc: Long Zhao <zl020895@163.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
Long Zhao (2):
dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart
serial: 8250_dw: add Ambarella CV75 quirks
.../bindings/serial/snps-dw-apb-uart.yaml | 1 +
drivers/tty/serial/8250/8250_dw.c | 32 ++++++++++++++++++++++
2 files changed, 33 insertions(+)
---
base-commit: 34cf6dafc47441dfb6b356a095b89c3585a93714
change-id: 20261007-cv75-uart-44a6029b6c31
Best regards,
--
Long Zhao <longzhao@ambarella.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart
2026-12-01 4:54 ` Long Zhao via B4 Relay
@ 2026-12-01 4:54 ` Long Zhao via B4 Relay
-1 siblings, 0 replies; 7+ messages in thread
From: Long Zhao @ 2026-12-01 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
Cc: Long Zhao, linux-kernel, Long Zhao, Krzysztof Kozlowski,
Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree
Add the Ambarella CV75 compatible string to the Synopsys DW APB UART
binding. The block is Ambarella IP with a DW-like register map, so it
is described as a DW APB UART variant.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
---
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 49f51b002879..cec5c679f1a9 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -51,6 +51,7 @@ properties:
- const: renesas,rzn1-uart
- items:
- enum:
+ - ambarella,cv75-uart
- anlogic,dr1v90-uart
- brcm,bcm11351-dw-apb-uart
- brcm,bcm21664-dw-apb-uart
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart
@ 2026-12-01 4:54 ` Long Zhao via B4 Relay
0 siblings, 0 replies; 7+ messages in thread
From: Long Zhao via B4 Relay @ 2026-12-01 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
Cc: Long Zhao, linux-kernel, Long Zhao, Krzysztof Kozlowski,
Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree
From: Long Zhao <longzhao@ambarella.com>
Add the Ambarella CV75 compatible string to the Synopsys DW APB UART
binding. The block is Ambarella IP with a DW-like register map, so it
is described as a DW APB UART variant.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
---
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 49f51b002879..cec5c679f1a9 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -51,6 +51,7 @@ properties:
- const: renesas,rzn1-uart
- items:
- enum:
+ - ambarella,cv75-uart
- anlogic,dr1v90-uart
- brcm,bcm11351-dw-apb-uart
- brcm,bcm21664-dw-apb-uart
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] serial: 8250_dw: add Ambarella CV75 quirks
2026-12-01 4:54 ` Long Zhao via B4 Relay
@ 2026-12-01 4:54 ` Long Zhao via B4 Relay
-1 siblings, 0 replies; 7+ messages in thread
From: Long Zhao @ 2026-12-01 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
Cc: Long Zhao, linux-kernel, Long Zhao, Linus Walleij,
Andy Shevchenko, Ilpo Järvinen
The Ambarella CV75 UART is Ambarella IP, not a Synopsys DesignWare
licensed block. At the register level it is close enough to DW APB UART
that a full custom UART driver is unnecessary: reuse 8250_dw with a
small platform quirk.
Quirks:
- keep IER ETOI (bit 5) set for RX timeout behaviour
- skip set_rate; baud clock is managed outside the UART block
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
drivers/tty/serial/8250/8250_dw.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 5fba913f3301..06f03e893346 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -43,6 +43,9 @@
#define RZN1_UART_xDMACR_8_WORD_BURST (2 << 1)
#define RZN1_UART_xDMACR_BLK_SZ(x) ((x) << 3)
+/* Ambarella IER: receive timeout interrupt enable */
+#define AMBARELLA_UART_IER_ETOI BIT(5)
+
/* Quirks */
#define DW_UART_QUIRK_OCTEON BIT(0)
#define DW_UART_QUIRK_ARMADA_38X BIT(1)
@@ -60,6 +63,7 @@
struct dw8250_platform_data {
u8 usr_reg;
+ u8 ier_mask;
u32 cpr_value;
unsigned int quirks;
};
@@ -572,6 +576,25 @@ static void dw8250_prepare_rx_dma(struct uart_8250_port *p)
dw8250_writel_ext(up, RZN1_UART_RDMACR, val);
}
+static int dw8250_ier_mask_startup(struct uart_port *p)
+{
+ struct dw8250_data *d = to_dw8250_data(p->private_data);
+ struct uart_8250_port *up = up_to_u8250p(p);
+ int ret;
+
+ ret = serial8250_do_startup(p);
+ if (ret)
+ return ret;
+
+ /*
+ * Ambarella keeps variant IER bits (e.g. ETOI) set for correct RX
+ * timeout behaviour.
+ */
+ up->ier |= d->pdata->ier_mask;
+
+ return 0;
+}
+
static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
{
unsigned int quirks = data->pdata->quirks;
@@ -606,6 +629,8 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
p->serial_in = dw8250_serial_in32;
data->uart_16550_compatible = true;
}
+ if (data->pdata->ier_mask)
+ p->startup = dw8250_ier_mask_startup;
}
static void dw8250_reset_control_assert(void *data)
@@ -879,6 +904,12 @@ static const struct dw8250_platform_data dw8250_intc10ee = {
.quirks = DW_UART_QUIRK_IER_KICK,
};
+static const struct dw8250_platform_data dw8250_ambarella_cv75_data = {
+ .usr_reg = DW_UART_USR,
+ .ier_mask = AMBARELLA_UART_IER_ETOI,
+ .quirks = DW_UART_QUIRK_SKIP_SET_RATE,
+};
+
static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
.usr_reg = DW_UART_USR,
.cpr_value = FIELD_PREP_CONST(DW_UART_CPR_ABP_DATA_WIDTH, 2) |
@@ -890,6 +921,7 @@ static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
+ { .compatible = "ambarella,cv75-uart", .data = &dw8250_ambarella_cv75_data },
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
{ .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] serial: 8250_dw: add Ambarella CV75 quirks
@ 2026-12-01 4:54 ` Long Zhao via B4 Relay
0 siblings, 0 replies; 7+ messages in thread
From: Long Zhao via B4 Relay @ 2026-12-01 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
Cc: Long Zhao, linux-kernel, Long Zhao, Linus Walleij,
Andy Shevchenko, Ilpo Järvinen
From: Long Zhao <longzhao@ambarella.com>
The Ambarella CV75 UART is Ambarella IP, not a Synopsys DesignWare
licensed block. At the register level it is close enough to DW APB UART
that a full custom UART driver is unnecessary: reuse 8250_dw with a
small platform quirk.
Quirks:
- keep IER ETOI (bit 5) set for RX timeout behaviour
- skip set_rate; baud clock is managed outside the UART block
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Long Zhao <longzhao@ambarella.com>
---
drivers/tty/serial/8250/8250_dw.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 5fba913f3301..06f03e893346 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -43,6 +43,9 @@
#define RZN1_UART_xDMACR_8_WORD_BURST (2 << 1)
#define RZN1_UART_xDMACR_BLK_SZ(x) ((x) << 3)
+/* Ambarella IER: receive timeout interrupt enable */
+#define AMBARELLA_UART_IER_ETOI BIT(5)
+
/* Quirks */
#define DW_UART_QUIRK_OCTEON BIT(0)
#define DW_UART_QUIRK_ARMADA_38X BIT(1)
@@ -60,6 +63,7 @@
struct dw8250_platform_data {
u8 usr_reg;
+ u8 ier_mask;
u32 cpr_value;
unsigned int quirks;
};
@@ -572,6 +576,25 @@ static void dw8250_prepare_rx_dma(struct uart_8250_port *p)
dw8250_writel_ext(up, RZN1_UART_RDMACR, val);
}
+static int dw8250_ier_mask_startup(struct uart_port *p)
+{
+ struct dw8250_data *d = to_dw8250_data(p->private_data);
+ struct uart_8250_port *up = up_to_u8250p(p);
+ int ret;
+
+ ret = serial8250_do_startup(p);
+ if (ret)
+ return ret;
+
+ /*
+ * Ambarella keeps variant IER bits (e.g. ETOI) set for correct RX
+ * timeout behaviour.
+ */
+ up->ier |= d->pdata->ier_mask;
+
+ return 0;
+}
+
static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
{
unsigned int quirks = data->pdata->quirks;
@@ -606,6 +629,8 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
p->serial_in = dw8250_serial_in32;
data->uart_16550_compatible = true;
}
+ if (data->pdata->ier_mask)
+ p->startup = dw8250_ier_mask_startup;
}
static void dw8250_reset_control_assert(void *data)
@@ -879,6 +904,12 @@ static const struct dw8250_platform_data dw8250_intc10ee = {
.quirks = DW_UART_QUIRK_IER_KICK,
};
+static const struct dw8250_platform_data dw8250_ambarella_cv75_data = {
+ .usr_reg = DW_UART_USR,
+ .ier_mask = AMBARELLA_UART_IER_ETOI,
+ .quirks = DW_UART_QUIRK_SKIP_SET_RATE,
+};
+
static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
.usr_reg = DW_UART_USR,
.cpr_value = FIELD_PREP_CONST(DW_UART_CPR_ABP_DATA_WIDTH, 2) |
@@ -890,6 +921,7 @@ static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
+ { .compatible = "ambarella,cv75-uart", .data = &dw8250_ambarella_cv75_data },
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
{ .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] serial: add Ambarella CV75 8250_dw quirks
2026-12-01 4:54 ` Long Zhao via B4 Relay
` (2 preceding siblings ...)
(?)
@ 2026-12-01 5:01 ` sashiko-bot
-1 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-12-01 5:01 UTC (permalink / raw)
To: Long Zhao, linux-serial
Sashiko has reviewed this 2-patch series and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-cv75-uart-v2-0-12a661f9555e@ambarella.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-12-01 5:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 4:54 [PATCH v2 0/2] serial: add Ambarella CV75 8250_dw quirks Long Zhao
2026-12-01 4:54 ` Long Zhao via B4 Relay
2026-12-01 4:54 ` [PATCH v2 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart Long Zhao
2026-12-01 4:54 ` Long Zhao via B4 Relay
2026-12-01 4:54 ` [PATCH v2 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao
2026-12-01 4:54 ` Long Zhao via B4 Relay
2026-12-01 5:01 ` [PATCH v2 0/2] serial: add Ambarella CV75 8250_dw quirks sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.