[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250728220002.599554-1-elder@riscstar.com>
Date: Mon, 28 Jul 2025 17:00:01 -0500
From: Alex Elder <elder@...cstar.com>
To: gregkh@...uxfoundation.org,
jirislaby@...nel.org,
robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
dlan@...too.org,
matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com,
lkundrak@...sk
Cc: devicetree@...r.kernel.org,
linux-serial@...r.kernel.org,
spacemit@...ts.linux.dev,
linux-mediatek@...ts.infradead.org,
linux-riscv@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: [PATCH] dt-bindings: serial: 8250: allow "main" and "uart" as clock names
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@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507160314.wrC51lXX-lkp@intel.com/
Signed-off-by: Alex Elder <elder@...cstar.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:
- properties:
- clock-names:
- items:
- - const: core
- - const: bus
+ if:
+ properties:
+ compatible:
+ contains:
+ const: spacemit,k1-uart
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: core
+ - const: bus
properties:
compatible:
@@ -162,6 +168,9 @@ properties:
minItems: 1
maxItems: 2
oneOf:
+ - enum:
+ - main
+ - uart
- items:
- const: core
- const: bus
base-commit: 0b90c3b6d76ea512dc3dac8fb30215e175b0019a
--
2.48.1
Powered by blists - more mailing lists