Skip to content

Commit a1b5153

Browse files
alexeldergregkh
authored andcommitted
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 d2db0d7 ("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: 2c0594f ("dt-bindings: serial: 8250: support an optional second clock") Cc: stable <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Alex Elder <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 387d000 commit a1b5153

File tree

1 file changed

+9
-1
lines changed
  • Documentation/devicetree/bindings/serial

1 file changed

+9
-1
lines changed

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ allOf:
5959
items:
6060
- const: uartclk
6161
- const: reg
62-
else:
62+
- if:
63+
properties:
64+
compatible:
65+
contains:
66+
const: spacemit,k1-uart
67+
then:
6368
properties:
6469
clock-names:
6570
items:
@@ -183,6 +188,9 @@ properties:
183188
minItems: 1
184189
maxItems: 2
185190
oneOf:
191+
- enum:
192+
- main
193+
- uart
186194
- items:
187195
- const: core
188196
- const: bus

0 commit comments

Comments
 (0)