Skip to content

Commit 2c0594f

Browse files
alexeldergregkh
authored andcommitted
dt-bindings: serial: 8250: support an optional second clock
The SpacemiT UART driver requires a bus clock to be enabled in addition to the primary function clock. Add the option to specify two clocks for an 8250-compatible UART, named "core" and "bus". If both are needed, require them to be named. Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0ed2282 commit 2c0594f

File tree

1 file changed

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

1 file changed

+29
-1
lines changed

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,16 @@ properties:
135135
clock-frequency: true
136136

137137
clocks:
138-
maxItems: 1
138+
minItems: 1
139+
items:
140+
- description: The core function clock
141+
- description: An optional bus clock
142+
143+
clock-names:
144+
minItems: 1
145+
items:
146+
- const: core
147+
- const: bus
139148

140149
resets:
141150
maxItems: 1
@@ -224,6 +233,25 @@ required:
224233
- reg
225234
- interrupts
226235

236+
if:
237+
properties:
238+
compatible:
239+
contains:
240+
const: spacemit,k1-uart
241+
then:
242+
required: [clock-names]
243+
properties:
244+
clocks:
245+
minItems: 2
246+
clock-names:
247+
minItems: 2
248+
else:
249+
properties:
250+
clocks:
251+
maxItems: 1
252+
clock-names:
253+
maxItems: 1
254+
227255
unevaluatedProperties: false
228256

229257
examples:

0 commit comments

Comments
 (0)