From: Rob Herring <robh@kernel.org>
To: Binbin Zhou <zhoubinbin@loongson.cn>
Cc: sashiko-reviews@lists.linux.dev, devicetree@vger.kernel.org,
linux-serial@vger.kernel.org, conor+dt@kernel.org,
Binbin Zhou <zhoubb.aaron@gmail.com>
Subject: Re: [PATCH 2/3] dt-bindings: serial: 8250: Add dedicated Loongson-2K3000 UART compatible
Date: Tue, 24 Nov 2026 07:44:07 -0600 [thread overview]
Message-ID: <20261124134407.GC3404231-robh@kernel.org> (raw)
In-Reply-To: <0009e3c5-dfff-4254-a06f-13c8664a1543@loongson.cn>
On Tue, Nov 24, 2026 at 02:58:40PM +0800, Binbin Zhou wrote:
> Hi Rob:
>
> Sorry for the late reply.
>
> On 2026/11/20 05:45, Rob Herring wrote:
> > On Wed, Nov 04, 2026 at 07:52:04AM +0000, sashiko-bot@kernel.org wrote:
> > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > > - [Low] dt-bindings: serial: 8250: duplicate ns16550a fallback block for ls2k3000
> > > --
> > >
> > > commit 71974153fe22bc00d365059be9198364c9cfaa86
> > > Author: Binbin Zhou <zhoubinbin@loongson.cn>
> > >
> > > dt-bindings: serial: 8250: Add dedicated Loongson-2K3000 UART compatible
> > >
> > > This commit documents the loongson,ls2k3000-uart compatible string with
> > > ns16550a as a fallback so the driver can distinguish the Loongson-2K3000 UART
> > > from earlier Loongson UARTs that require MCR/MSR signal inversion.
> > >
> > > > diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
> > > > index 01abd39509a7a..33c13c48ed56e 100644
> > > > --- a/Documentation/devicetree/bindings/serial/8250.yaml
> > > > +++ b/Documentation/devicetree/bindings/serial/8250.yaml
> > > > @@ -196,6 +196,9 @@ properties:
> > > > - loongson,ls2k2000-uart
> > > > - const: loongson,ls2k1500-uart
> > > > - const: ns16550a
> > > > + - items:
> > > > + - const: loongson,ls2k3000-uart
> > > > + - const: ns16550a
> > >
> > > [Severity: Low]
> > > This isn't a bug, but properties:compatible in
> > > Documentation/devicetree/bindings/serial/8250.yaml already has a two-item
> > > block with const: ns16550a as the fallback that includes the other base
> > > Loongson UART compatibles:
> > >
> > > - items:
> > > - enum:
> > > ...
> > > - loongson,ls2k0500-uart
> > > - loongson,ls2k1500-uart
> > > - const: ns16550a
> > >
> > > Could loongson,ls2k3000-uart be added to that existing enum instead of adding
> > > a separate two-item block?
>
> Let me briefly explain why Loongson UART `compatible` is necessary at this
> time.
> First, as described in the driver, each `compatible` type defines different
> driver data:
> struct loongson_uart_ddata {
> bool has_frac;
> u8 mcr_invert;
> u8 msr_invert;
> };
> Since the Loongson-2k3000 has already fixed the hardware issues with
> mcr/msr, we need a new `compatible` to correspond to the updated
> `driver_data`.
>
> static const struct loongson_uart_ddata ls2k3000_uart_data = {
> .has_frac = true,
> .mcr_invert = 0,
> .msr_invert = 0,
> };
>
> As for why a fallback to `ns16550a` is required in all cases, the DTS files
> for the Loongson-2K1000 and similar devices were merged into the repository
> before `8250_loongson.c`, and this approach was used at the time to maintain
> compatibility[1].
No one is questioning what the compatibles are, just where you add the
new schema entry. Use the existing one with the ns16550a fallback
instead of a new oneOf entry:
- items:
- enum:
- altr,16550-FIFO32
- altr,16550-FIFO64
- altr,16550-FIFO128
- fsl,16550-FIFO64
- andestech,uart16550
- nxp,lpc1850-uart
- opencores,uart16550-rtlsvn105
- ti,da830-uart
- loongson,ls2k0500-uart
- loongson,ls2k1500-uart
- const: ns16550a
Rob
next prev parent reply other threads:[~2026-11-24 13:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 7:45 [PATCH 0/3] serial: 8250: Add Loongson-2K0300 and Loongson-2K3000 UART support Binbin Zhou
2026-11-04 7:45 ` [PATCH 1/3] dt-bindings: serial: 8250: Document Loongson-2K0300 UART compatible Binbin Zhou
2026-11-04 7:49 ` sashiko-bot
2026-11-19 21:43 ` Rob Herring (Arm)
2026-11-04 7:45 ` [PATCH 2/3] dt-bindings: serial: 8250: Add dedicated Loongson-2K3000 " Binbin Zhou
2026-11-04 7:52 ` sashiko-bot
2026-11-19 21:45 ` Rob Herring
2026-11-24 6:58 ` Binbin Zhou
2026-11-24 13:44 ` Rob Herring [this message]
2026-11-25 6:39 ` Binbin Zhou
2026-11-04 7:45 ` [PATCH 3/3] serial: 8250_loongson: Add Loongson-2K3000 UART support Binbin Zhou
2026-11-04 7:50 ` sashiko-bot
2026-11-04 7:58 ` [PATCH 0/3] serial: 8250: Add Loongson-2K0300 and " Huacai Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124134407.GC3404231-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.