* [PATCH v2] dt-bindings: serial: 8250: allow "main" and "uart" as clock names
@ 2025-08-13 3:13 Alex Elder
2025-08-13 16:51 ` Conor Dooley
0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2025-08-13 3:13 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, gregkh, jirislaby
Cc: dlan, matthias.bgg, angelogioacchino.delregno, lkundrak,
devicetree, linux-serial, spacemit, linux-mediatek, linux-riscv,
linux-arm-kernel, linux-kernel, kernel test robot
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.
Change that logic, so that an additional condition for (only) the
SpacemiT platform similarly restricts the two clocks to have the
names "core" and "bus".
Finally, 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>
---
Documentation/devicetree/bindings/serial/8250.yaml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
index e46bee8d25bf0..0a05a1647b5cc 100644
--- a/Documentation/devicetree/bindings/serial/8250.yaml
+++ b/Documentation/devicetree/bindings/serial/8250.yaml
@@ -60,7 +60,12 @@ allOf:
items:
- const: uartclk
- const: reg
- else:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: spacemit,k1-uart
+ then:
properties:
clock-names:
items:
@@ -162,6 +167,9 @@ properties:
minItems: 1
maxItems: 2
oneOf:
+ - enum:
+ - main
+ - uart
- items:
- const: core
- const: bus
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
--
2.48.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] dt-bindings: serial: 8250: allow "main" and "uart" as clock names
2025-08-13 3:13 [PATCH v2] dt-bindings: serial: 8250: allow "main" and "uart" as clock names Alex Elder
@ 2025-08-13 16:51 ` Conor Dooley
0 siblings, 0 replies; 2+ messages in thread
From: Conor Dooley @ 2025-08-13 16:51 UTC (permalink / raw)
To: Alex Elder
Cc: robh, krzk+dt, conor+dt, gregkh, jirislaby, dlan, matthias.bgg,
angelogioacchino.delregno, lkundrak, devicetree, linux-serial,
spacemit, linux-mediatek, linux-riscv, linux-arm-kernel,
linux-kernel, kernel test robot
[-- Attachment #1.1: Type: text/plain, Size: 1456 bytes --]
On Tue, Aug 12, 2025 at 10:13:35PM -0500, 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.
>
> Change that logic, so that an additional condition for (only) the
> SpacemiT platform similarly restricts the two clocks to have the
> names "core" and "bus".
>
> Finally, 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>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-13 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13 3:13 [PATCH v2] dt-bindings: serial: 8250: allow "main" and "uart" as clock names Alex Elder
2025-08-13 16:51 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).