From: Conor Dooley <conor@kernel.org>
To: Yixun Lan <dlan@gentoo.org>
Cc: Alex Elder <elder@riscstar.com>,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
lkundrak@v3.sk, devicetree@vger.kernel.org,
linux-serial@vger.kernel.org, spacemit@lists.linux.dev,
linux-mediatek@lists.infradead.org,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] dt-bindings: serial: 8250: allow "main" and "uart" as clock names
Date: Tue, 29 Jul 2025 18:54:07 +0100 [thread overview]
Message-ID: <20250729-reshuffle-contented-e6def76b540b@spud> (raw)
In-Reply-To: <20250728225319-GYA900803@gentoo>
[-- Attachment #1: Type: text/plain, Size: 2480 bytes --]
On Tue, Jul 29, 2025 at 06:53:19AM +0800, Yixun Lan wrote:
> Hi Alex,
>
> On 17:00 Mon 28 Jul , Alex Elder wrote:
> > There are two compatible strings defined in "8250.yaml" that require
> > two clocks to be specified, along with their names:
> > - "spacemit,k1-uart", used in "spacemit/k1.dtsi"
> > - "nxp,lpc1850-uart", used in "lpc/lpc18xx.dtsi"
> >
> > When only one clock is used, the name is not required. However there
> > are two places that do specify a name:
> > - In "mediatek/mt7623.dtsi", the clock for the "mediatek,mtk-btif"
> > compatible serial device is named "main"
> > - In "qca/ar9132.dtsi", the clock for the "ns8250" compatible
> > serial device is named "uart"
> >
> > In commit d2db0d7815444 ("dt-bindings: serial: 8250: allow clock 'uartclk'
> > and 'reg' for nxp,lpc1850-uart"), Frank Li added the restriction that two
> > named clocks be used for the NXP platform mentioned above. Extend that
> > so that the two named clocks used by the SpacemiT platform are similarly
> > restricted.
> >
> > Add "main" and "uart" as allowed names when a single clock is specified.
> >
> > Fixes: 2c0594f9f0629 ("dt-bindings: serial: 8250: support an optional second clock")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202507160314.wrC51lXX-lkp@intel.com/
> > Signed-off-by: Alex Elder <elder@riscstar.com>
> > ---
> > .../devicetree/bindings/serial/8250.yaml | 19 ++++++++++++++-----
> > 1 file changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
> > index e46bee8d25bf0..cef52ebd8f7da 100644
> > --- a/Documentation/devicetree/bindings/serial/8250.yaml
> > +++ b/Documentation/devicetree/bindings/serial/8250.yaml
> > @@ -61,11 +61,17 @@ allOf:
> > - const: uartclk
> > - const: reg
> ..
> > else:
> would it be better to drop this 'else', and moving following 'if' block
> to the same level with "nxp,lpc1850-uart"?
>
> the reason here would avoid too many indentions if add more constraint in
> the future if other SoC uart need different clock-names..
I agree, it's more typical to do it that way I think to boot.
Also, why is there a k1/lpc conditional bit that is not part of the
allOf in addition to the bits in the allOf? Can that get merged with the
allOf please?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <conor@kernel.org>
To: Yixun Lan <dlan@gentoo.org>
Cc: Alex Elder <elder@riscstar.com>,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
lkundrak@v3.sk, devicetree@vger.kernel.org,
linux-serial@vger.kernel.org, spacemit@lists.linux.dev,
linux-mediatek@lists.infradead.org,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] dt-bindings: serial: 8250: allow "main" and "uart" as clock names
Date: Tue, 29 Jul 2025 18:54:07 +0100 [thread overview]
Message-ID: <20250729-reshuffle-contented-e6def76b540b@spud> (raw)
In-Reply-To: <20250728225319-GYA900803@gentoo>
[-- Attachment #1.1: Type: text/plain, Size: 2480 bytes --]
On Tue, Jul 29, 2025 at 06:53:19AM +0800, Yixun Lan wrote:
> Hi Alex,
>
> On 17:00 Mon 28 Jul , Alex Elder wrote:
> > There are two compatible strings defined in "8250.yaml" that require
> > two clocks to be specified, along with their names:
> > - "spacemit,k1-uart", used in "spacemit/k1.dtsi"
> > - "nxp,lpc1850-uart", used in "lpc/lpc18xx.dtsi"
> >
> > When only one clock is used, the name is not required. However there
> > are two places that do specify a name:
> > - In "mediatek/mt7623.dtsi", the clock for the "mediatek,mtk-btif"
> > compatible serial device is named "main"
> > - In "qca/ar9132.dtsi", the clock for the "ns8250" compatible
> > serial device is named "uart"
> >
> > In commit d2db0d7815444 ("dt-bindings: serial: 8250: allow clock 'uartclk'
> > and 'reg' for nxp,lpc1850-uart"), Frank Li added the restriction that two
> > named clocks be used for the NXP platform mentioned above. Extend that
> > so that the two named clocks used by the SpacemiT platform are similarly
> > restricted.
> >
> > Add "main" and "uart" as allowed names when a single clock is specified.
> >
> > Fixes: 2c0594f9f0629 ("dt-bindings: serial: 8250: support an optional second clock")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202507160314.wrC51lXX-lkp@intel.com/
> > Signed-off-by: Alex Elder <elder@riscstar.com>
> > ---
> > .../devicetree/bindings/serial/8250.yaml | 19 ++++++++++++++-----
> > 1 file changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
> > index e46bee8d25bf0..cef52ebd8f7da 100644
> > --- a/Documentation/devicetree/bindings/serial/8250.yaml
> > +++ b/Documentation/devicetree/bindings/serial/8250.yaml
> > @@ -61,11 +61,17 @@ allOf:
> > - const: uartclk
> > - const: reg
> ..
> > else:
> would it be better to drop this 'else', and moving following 'if' block
> to the same level with "nxp,lpc1850-uart"?
>
> the reason here would avoid too many indentions if add more constraint in
> the future if other SoC uart need different clock-names..
I agree, it's more typical to do it that way I think to boot.
Also, why is there a k1/lpc conditional bit that is not part of the
allOf in addition to the bits in the allOf? Can that get merged with the
allOf please?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-07-29 17:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 22:00 [PATCH] dt-bindings: serial: 8250: allow "main" and "uart" as clock names Alex Elder
2025-07-28 22:00 ` Alex Elder
2025-07-28 22:53 ` Yixun Lan
2025-07-28 22:53 ` Yixun Lan
2025-07-29 17:54 ` Conor Dooley [this message]
2025-07-29 17:54 ` Conor Dooley
2025-07-29 21:04 ` Alex Elder
2025-07-29 21:04 ` Alex Elder
2025-07-29 21:08 ` Conor Dooley
2025-07-29 21:08 ` Conor Dooley
2025-07-29 21:35 ` Alex Elder
2025-07-29 21:35 ` Alex Elder
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=20250729-reshuffle-contented-e6def76b540b@spud \
--to=conor@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=elder@riscstar.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lkundrak@v3.sk \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
/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.