* [PATCH v3 0/2] Ambarella CV75: 8250_dw UART
@ 2026-08-13 10:35 Long Zhao via B4 Relay
2026-08-13 10:35 ` [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart Long Zhao via B4 Relay
2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay
0 siblings, 2 replies; 14+ messages in thread
From: Long Zhao via B4 Relay @ 2026-08-13 10:35 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Ilpo Järvinen, Andy Shevchenko
Cc: linux-kernel, linux-serial, devicetree, Long Zhao
This is part C of a 3-part CV75 v3 split:
A: bindings + RCT/CCU clocks + SoC/EVK DT + MAINTAINERS
B: pinctrl + PL061 GPIO variant
C: 8250_dw UART quirks (this series)
Depends on series A:
https://lore.kernel.org/r/20260813-cv75-v3-a-v3-0-cfdd20b1b4dd@ambarella.com
Depends on series B:
https://lore.kernel.org/r/20260813-cv75-v3-b-v3-0-1d82e18da09b@ambarella.com
Link to v2:
https://lore.kernel.org/r/20260806-longzhao-upstream-cv75-v2-v2-0-6b09707c5fe9@ambarella.com
Summary:
- document ambarella,cv75-uart on snps,dw-apb-uart
- Ambarella quirks in 8250_dw
Changes since v2 (C scope):
- drop custom Ambarella UART driver; reuse 8250_dw (Linus)
Verified on CV75 with A+B+C.
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 | 30 ++++++++++++++++++++++
2 files changed, 31 insertions(+)
---
base-commit: 378c935cabe003ef440c1c79302a1f8ed7913778
change-id: 20260813-cv75-v3-c-d98a97d0f9f1
Best regards,
--
Long Zhao <longzhao@ambarella.com>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart 2026-08-13 10:35 [PATCH v3 0/2] Ambarella CV75: 8250_dw UART Long Zhao via B4 Relay @ 2026-08-13 10:35 ` Long Zhao via B4 Relay 2026-08-14 6:58 ` Linus Walleij 2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay 1 sibling, 1 reply; 14+ messages in thread From: Long Zhao via B4 Relay @ 2026-08-13 10:35 UTC (permalink / raw) To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, Andy Shevchenko Cc: linux-kernel, linux-serial, devicetree, Long Zhao From: Long Zhao <longzhao@ambarella.com> Add the Ambarella CV75 compatible string to the Synopsys DW APB UART binding. Signed-off-by: Long Zhao <longzhao@ambarella.com> --- 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] 14+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart 2026-08-13 10:35 ` [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart Long Zhao via B4 Relay @ 2026-08-14 6:58 ` Linus Walleij 0 siblings, 0 replies; 14+ messages in thread From: Linus Walleij @ 2026-08-14 6:58 UTC (permalink / raw) To: longzhao Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ilpo Järvinen, Andy Shevchenko, linux-kernel, linux-serial, devicetree On Thu, Aug 13, 2026 at 12:35 PM Long Zhao via B4 Relay <devnull+longzhao.ambarella.com@kernel.org> wrote: > From: Long Zhao <longzhao@ambarella.com> > > Add the Ambarella CV75 compatible string to the Synopsys DW APB UART > binding. > > Signed-off-by: Long Zhao <longzhao@ambarella.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-13 10:35 [PATCH v3 0/2] Ambarella CV75: 8250_dw UART Long Zhao via B4 Relay 2026-08-13 10:35 ` [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart Long Zhao via B4 Relay @ 2026-08-13 10:35 ` Long Zhao via B4 Relay 2026-08-14 6:59 ` Linus Walleij ` (2 more replies) 1 sibling, 3 replies; 14+ messages in thread From: Long Zhao via B4 Relay @ 2026-08-13 10:35 UTC (permalink / raw) To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, Andy Shevchenko Cc: linux-kernel, linux-serial, devicetree, Long Zhao From: Long Zhao <longzhao@ambarella.com> Add CV75 platform data with an ETOI IER mask and skip-set-rate so the DesignWare 8250 driver can drive the Ambarella UART for console use. Signed-off-by: Long Zhao <longzhao@ambarella.com> --- drivers/tty/serial/8250/8250_dw.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 5fba913f3301..e8aa592924d4 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 specific register fields */ +#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,23 @@ 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; + + /* Keep variant-specific bits in the shadow across subsequent updates. */ + up->ier |= d->pdata->ier_mask; + serial_port_out(p, UART_IER, up->ier); + + return 0; +} + static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) { unsigned int quirks = data->pdata->quirks; @@ -606,6 +627,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 +902,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) | @@ -889,6 +918,7 @@ static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = { }; static const struct of_device_id dw8250_of_match[] = { + { .compatible = "ambarella,cv75-uart", .data = &dw8250_ambarella_cv75_data }, { .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb }, { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, -- 2.34.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay @ 2026-08-14 6:59 ` Linus Walleij 2026-08-14 7:10 ` Long Zhao 2026-08-14 8:53 ` Andy Shevchenko 2026-08-14 8:56 ` Andy Shevchenko 2 siblings, 1 reply; 14+ messages in thread From: Linus Walleij @ 2026-08-14 6:59 UTC (permalink / raw) To: longzhao Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ilpo Järvinen, Andy Shevchenko, linux-kernel, linux-serial, devicetree On Thu, Aug 13, 2026 at 12:35 PM Long Zhao via B4 Relay <devnull+longzhao.ambarella.com@kernel.org> wrote: > From: Long Zhao <longzhao@ambarella.com> > > Add CV75 platform data with an ETOI IER mask and skip-set-rate so the > DesignWare 8250 driver can drive the Ambarella UART for console use. > > Signed-off-by: Long Zhao <longzhao@ambarella.com> I see this approach was successful! :) Look into the Sashiko comment abour lockless write to UART_IER but from my PoV this is fine: Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 6:59 ` Linus Walleij @ 2026-08-14 7:10 ` Long Zhao 0 siblings, 0 replies; 14+ messages in thread From: Long Zhao @ 2026-08-14 7:10 UTC (permalink / raw) To: Linus Walleij Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ilpo Järvinen, Andy Shevchenko, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Hi Linus, Thanks for the review and for steering us to 8250_dw. I'll also look into the Sashiko comment on the lockless UART_IER write. Best regards! Long Zhao Ambarella Shanghai Co., Ltd -----Original Message----- From: Linus Walleij <linusw@kernel.org> Sent: Friday, August 14, 2026 15:00 To: Long Zhao <longzhao@ambarella.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby <jirislaby@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>; Andy Shevchenko <andriy.shevchenko@linux.intel.com>; linux-kernel@vger.kernel.org; linux-serial@vger.kernel.org; devicetree@vger.kernel.org Subject: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks On Thu, Aug 13, 2026 at 12:35 PM Long Zhao via B4 Relay <devnull+longzhao.ambarella.com@kernel.org> wrote: > From: Long Zhao <longzhao@ambarella.com> > > Add CV75 platform data with an ETOI IER mask and skip-set-rate so the > DesignWare 8250 driver can drive the Ambarella UART for console use. > > Signed-off-by: Long Zhao <longzhao@ambarella.com> I see this approach was successful! :) Look into the Sashiko comment abour lockless write to UART_IER but from my PoV this is fine: Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ###################################################################### This EXTERNAL email has been scanned by Proofpoint Email Protect service. ********************************************************************** This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay 2026-08-14 6:59 ` Linus Walleij @ 2026-08-14 8:53 ` Andy Shevchenko 2026-08-14 8:56 ` Andy Shevchenko 2 siblings, 0 replies; 14+ messages in thread From: Andy Shevchenko @ 2026-08-14 8:53 UTC (permalink / raw) To: longzhao Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel, linux-serial, devicetree On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: > Add CV75 platform data with an ETOI IER mask and skip-set-rate so the > DesignWare 8250 driver can drive the Ambarella UART for console use. This is way too cryptic commit message, we need much more details. What's wrong with HW implementation? Is it integration HW bug or some specific case of the IP synthesis? What is happening when this patch is *not* applied? Et cetera, et cetera... -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay 2026-08-14 6:59 ` Linus Walleij 2026-08-14 8:53 ` Andy Shevchenko @ 2026-08-14 8:56 ` Andy Shevchenko 2026-08-14 9:33 ` [EXT] " Long Zhao 2 siblings, 1 reply; 14+ messages in thread From: Andy Shevchenko @ 2026-08-14 8:56 UTC (permalink / raw) To: longzhao Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel, linux-serial, devicetree On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: > Add CV75 platform data with an ETOI IER mask and skip-set-rate so the > DesignWare 8250 driver can drive the Ambarella UART for console use. ... > + /* Keep variant-specific bits in the shadow across subsequent updates. */ This says what code is doing. Instead it must say "why?" the code is doing this. > + up->ier |= d->pdata->ier_mask; > + serial_port_out(p, UART_IER, up->ier); ... In case there is an HW bug, where can we get the errata, please? (For a bare minimum add a reference to the Errata document you give to the customers.) -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 8:56 ` Andy Shevchenko @ 2026-08-14 9:33 ` Long Zhao 2026-08-14 11:52 ` Andy Shevchenko 0 siblings, 1 reply; 14+ messages in thread From: Long Zhao @ 2026-08-14 9:33 UTC (permalink / raw) To: Andy Shevchenko Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Hi Andy, Thanks for the review. Agreed the commit message was too brief. This is not a silicon erratum. The Ambarella UART is not Synopsys DesignWare IP; it is an Ambarella 8250-compatible UART. We still use the snps-dw-apb-uart binding / 8250_dw because the programming model matches closely enough, with two quirks (ETOI IER bit and SKIP_SET_RATE). I will expand the commit message and rewrite the comment to explain why in the next revision. Best regards! Long Zhao Ambarella Shanghai Co., Ltd -----Original Message----- From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Sent: Friday, August 14, 2026 16:56 To: Long Zhao <longzhao@ambarella.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby <jirislaby@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Linus Walleij <linusw@kernel.org>; Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>; linux-kernel@vger.kernel.org; linux-serial@vger.kernel.org; devicetree@vger.kernel.org Subject: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: > Add CV75 platform data with an ETOI IER mask and skip-set-rate so the > DesignWare 8250 driver can drive the Ambarella UART for console use. ... > + /* Keep variant-specific bits in the shadow across subsequent > +updates. */ This says what code is doing. Instead it must say "why?" the code is doing this. > + up->ier |= d->pdata->ier_mask; > + serial_port_out(p, UART_IER, up->ier); ... In case there is an HW bug, where can we get the errata, please? (For a bare minimum add a reference to the Errata document you give to the customers.) -- With Best Regards, Andy Shevchenko ###################################################################### This EXTERNAL email has been scanned by Proofpoint Email Protect service. ********************************************************************** This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 9:33 ` [EXT] " Long Zhao @ 2026-08-14 11:52 ` Andy Shevchenko 2026-08-14 12:10 ` Long Zhao 0 siblings, 1 reply; 14+ messages in thread From: Andy Shevchenko @ 2026-08-14 11:52 UTC (permalink / raw) To: Long Zhao Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org On Fri, Aug 14, 2026 at 09:33:45AM +0000, Long Zhao wrote: > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Sent: Friday, August 14, 2026 16:56 > On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: > > > Add CV75 platform data with an ETOI IER mask and skip-set-rate so the > > DesignWare 8250 driver can drive the Ambarella UART for console use. > Thanks for the review. Agreed the commit message was too brief. ... > > + /* Keep variant-specific bits in the shadow across subsequent > > +updates. */ > > This says what code is doing. Instead it must say "why?" the code is doing this. > > > + up->ier |= d->pdata->ier_mask; > > + serial_port_out(p, UART_IER, up->ier); ... > In case there is an HW bug, where can we get the errata, please? (For a bare > minimum add a reference to the Errata document you give to the customers.) > This is not a silicon erratum. The Ambarella UART is not Synopsys > DesignWare IP; it is an Ambarella 8250-compatible UART. We still use > the snps-dw-apb-uart binding / 8250_dw because the programming model > matches closely enough, with two quirks (ETOI IER bit and > SKIP_SET_RATE). I will expand the commit message and rewrite the > comment to explain why in the next revision. Okay, what does it make to think that 8250_dw is a suitable choice? What are the features that are repetitive would be if you use a custom 8250-based driver (using the generic 8250 code)? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 11:52 ` Andy Shevchenko @ 2026-08-14 12:10 ` Long Zhao 2026-08-14 12:16 ` Greg Kroah-Hartman 2026-08-14 12:31 ` Andy Shevchenko 0 siblings, 2 replies; 14+ messages in thread From: Long Zhao @ 2026-08-14 12:10 UTC (permalink / raw) To: Andy Shevchenko Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Hi Andy, Originally we submitted a dedicated Ambarella UART driver. During review, Linus pointed out that the register layout is basically 8250-compatible and suggested reusing the existing 8250 code instead of maintaining a separate driver. That is how we ended up with the current approach of binding through 8250_dw plus a small set of Ambarella quirks. [1] https://lore.kernel.org/r/CAD++jLm6HzEU1TM-c=Vtjv3FJEBecVP7TyxSgq_Q0zF-YwT6NA@mail.gmail.com/ Best regards! Long Zhao Ambarella Shanghai Co., Ltd -----Original Message----- From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Sent: Friday, August 14, 2026 19:53 To: Long Zhao <longzhao@ambarella.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby <jirislaby@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Linus Walleij <linusw@kernel.org>; Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>; linux-kernel@vger.kernel.org; linux-serial@vger.kernel.org; devicetree@vger.kernel.org Subject: Re: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks On Fri, Aug 14, 2026 at 09:33:45AM +0000, Long Zhao wrote: > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Sent: Friday, August 14, 2026 16:56 > On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: > > > Add CV75 platform data with an ETOI IER mask and skip-set-rate so > > the DesignWare 8250 driver can drive the Ambarella UART for console use. > Thanks for the review. Agreed the commit message was too brief. ... > > + /* Keep variant-specific bits in the shadow across subsequent > > +updates. */ > > This says what code is doing. Instead it must say "why?" the code is doing this. > > > + up->ier |= d->pdata->ier_mask; > > + serial_port_out(p, UART_IER, up->ier); ... > In case there is an HW bug, where can we get the errata, please? (For > a bare minimum add a reference to the Errata document you give to the > customers.) > This is not a silicon erratum. The Ambarella UART is not Synopsys > DesignWare IP; it is an Ambarella 8250-compatible UART. We still use > the snps-dw-apb-uart binding / 8250_dw because the programming model > matches closely enough, with two quirks (ETOI IER bit and > SKIP_SET_RATE). I will expand the commit message and rewrite the > comment to explain why in the next revision. Okay, what does it make to think that 8250_dw is a suitable choice? What are the features that are repetitive would be if you use a custom 8250-based driver (using the generic 8250 code)? -- With Best Regards, Andy Shevchenko ********************************************************************** This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 12:10 ` Long Zhao @ 2026-08-14 12:16 ` Greg Kroah-Hartman 2026-08-14 12:31 ` Andy Shevchenko 1 sibling, 0 replies; 14+ messages in thread From: Greg Kroah-Hartman @ 2026-08-14 12:16 UTC (permalink / raw) To: Long Zhao Cc: Andy Shevchenko, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org On Fri, Aug 14, 2026 at 12:10:34PM +0000, Long Zhao wrote: > ********************************************************************** > This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you. > Now deleted. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 12:10 ` Long Zhao 2026-08-14 12:16 ` Greg Kroah-Hartman @ 2026-08-14 12:31 ` Andy Shevchenko 2026-08-14 12:39 ` Long Zhao 1 sibling, 1 reply; 14+ messages in thread From: Andy Shevchenko @ 2026-08-14 12:31 UTC (permalink / raw) To: Long Zhao Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org On Fri, Aug 14, 2026 at 12:10:34PM +0000, Long Zhao wrote: > Originally we submitted a dedicated Ambarella UART driver. During review, > Linus pointed out that the register layout is basically 8250-compatible > and suggested reusing the existing 8250 code instead of maintaining a > separate driver. That is how we ended up with the current approach of > binding through 8250_dw plus a small set of Ambarella quirks. Right, please re-read carefully what he wrote "This needs to be rewritten using the 8250 library in the kernel under drivers/tty/serial/8250/8250_ambarella.c or similar." You already confirmed that your IP has nothing to do with the Synopsys. Why is the 8250_dw touched?! > [1] https://lore.kernel.org/r/CAD++jLm6HzEU1TM-c=Vtjv3FJEBecVP7TyxSgq_Q0zF-YwT6NA@mail.gmail.com/ > -----Original Message----- > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Sent: Friday, August 14, 2026 19:53 > On Fri, Aug 14, 2026 at 09:33:45AM +0000, Long Zhao wrote: > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Sent: Friday, August 14, 2026 16:56 > > On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: > > > > > Add CV75 platform data with an ETOI IER mask and skip-set-rate so > > > the DesignWare 8250 driver can drive the Ambarella UART for console use. > > > Thanks for the review. Agreed the commit message was too brief. ... > > > + /* Keep variant-specific bits in the shadow across subsequent > > > +updates. */ > > > > This says what code is doing. Instead it must say "why?" the code is doing this. > > > > > + up->ier |= d->pdata->ier_mask; > > > + serial_port_out(p, UART_IER, up->ier); > > ... > > > In case there is an HW bug, where can we get the errata, please? (For > > a bare minimum add a reference to the Errata document you give to the > > customers.) > > > This is not a silicon erratum. The Ambarella UART is not Synopsys > > DesignWare IP; it is an Ambarella 8250-compatible UART. We still use > > the snps-dw-apb-uart binding / 8250_dw because the programming model > > matches closely enough, with two quirks (ETOI IER bit and > > SKIP_SET_RATE). I will expand the commit message and rewrite the > > comment to explain why in the next revision. > > Okay, what does it make to think that 8250_dw is a suitable choice? > What are the features that are repetitive would be if you use a custom 8250-based driver (using the generic 8250 code)? ... > ********************************************************************** > This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you. You have to get rid of this trailer. This is last time I reply on messages with it. (Replying to it might lead to some legal consequences for me and others...) -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks 2026-08-14 12:31 ` Andy Shevchenko @ 2026-08-14 12:39 ` Long Zhao 0 siblings, 0 replies; 14+ messages in thread From: Long Zhao @ 2026-08-14 12:39 UTC (permalink / raw) To: Andy Shevchenko Cc: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij, Ilpo Järvinen, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org OK, Andy. We will switch to 8250_ambarella.c instead in V4. Thanks. Long Zhao 在 2026年8月14日,20:34,Andy Shevchenko <andriy.shevchenko@linux.intel.com> 写道: On Fri, Aug 14, 2026 at 12:10:34PM +0000, Long Zhao wrote: > Originally we submitted a dedicated Ambarella UART driver. During review, > Linus pointed out that the register layout is basically 8250-compatible > and suggested reusing the existing 8250 code instead of maintaining a > separate driver. That is how we ended up with the current approach of > binding through 8250_dw plus a small set of Ambarella quirks. Right, please re-read carefully what he wrote "This needs to be rewritten using the 8250 library in the kernel under drivers/tty/serial/8250/8250_ambarella.c or similar." You already confirmed that your IP has nothing to do with the Synopsys. Why is the 8250_dw touched?! > [1] https://urldefense.com/v3/__https://lore.kernel.org/r/CAD**AjLm6HzEU1TM-c=Vtjv3FJEBecVP7TyxSgq_Q0zF-YwT6NA@mail.gmail.com/__;Kys!!PeEy7nZLVv0!j8LqPRT2bzim1iC2xrU0AW4QUYvJ4oc4JqHIP3DMrOJVI-SdMHNYj2KIirs8ySAtvDwx1-Glz56DsGX6v1vzzCpWOGOb9LYXjg$ > -----Original Message----- > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Sent: Friday, August 14, 2026 19:53 > On Fri, Aug 14, 2026 at 09:33:45AM +0000, Long Zhao wrote: >> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >> Sent: Friday, August 14, 2026 16:56 >> On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote: >> >>> Add CV75 platform data with an ETOI IER mask and skip-set-rate so >>> the DesignWare 8250 driver can drive the Ambarella UART for console use. > >> Thanks for the review. Agreed the commit message was too brief. ... >>> + /* Keep variant-specific bits in the shadow across subsequent >>> +updates. */ >> >> This says what code is doing. Instead it must say "why?" the code is doing this. >> >>> + up->ier |= d->pdata->ier_mask; >>> + serial_port_out(p, UART_IER, up->ier); > > ... > >> In case there is an HW bug, where can we get the errata, please? (For >> a bare minimum add a reference to the Errata document you give to the >> customers.) > >> This is not a silicon erratum. The Ambarella UART is not Synopsys >> DesignWare IP; it is an Ambarella 8250-compatible UART. We still use >> the snps-dw-apb-uart binding / 8250_dw because the programming model >> matches closely enough, with two quirks (ETOI IER bit and >> SKIP_SET_RATE). I will expand the commit message and rewrite the >> comment to explain why in the next revision. > > Okay, what does it make to think that 8250_dw is a suitable choice? > What are the features that are repetitive would be if you use a custom 8250-based driver (using the generic 8250 code)? ... > ********************************************************************** > This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you. You have to get rid of this trailer. This is last time I reply on messages with it. (Replying to it might lead to some legal consequences for me and others...) -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-08-14 12:39 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-08-13 10:35 [PATCH v3 0/2] Ambarella CV75: 8250_dw UART Long Zhao via B4 Relay 2026-08-13 10:35 ` [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart Long Zhao via B4 Relay 2026-08-14 6:58 ` Linus Walleij 2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay 2026-08-14 6:59 ` Linus Walleij 2026-08-14 7:10 ` Long Zhao 2026-08-14 8:53 ` Andy Shevchenko 2026-08-14 8:56 ` Andy Shevchenko 2026-08-14 9:33 ` [EXT] " Long Zhao 2026-08-14 11:52 ` Andy Shevchenko 2026-08-14 12:10 ` Long Zhao 2026-08-14 12:16 ` Greg Kroah-Hartman 2026-08-14 12:31 ` Andy Shevchenko 2026-08-14 12:39 ` Long Zhao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox