Skip to content

Commit d2db0d7

Browse files
nxpfrankligregkh
authored andcommitted
dt-bindings: serial: 8250: allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart
Allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart to align existed driver and dts. It is really old platform. Keep the same restriction for others. Allow dmas and dma-names property, which allow maxItems 4 because very old platform (arch/arm/boot/dts/nxp/lpc/lpc18xx.dtsi) use duplicate "tx", "rx", "tx", "rx" as dma-names. Fix below CHECK_DTB warnings: arch/arm/boot/dts/nxp/lpc/lpc4337-ciaa.dtb: serial@40081000 (nxp,lpc1850-uart): clock-names: ['uartclk', 'reg'] is too long Signed-off-by: Frank Li <[email protected]> Acked-by: "Rob Herring (Arm)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6241b49 commit d2db0d7

File tree

1 file changed

+37
-4
lines changed
  • Documentation/devicetree/bindings/serial

1 file changed

+37
-4
lines changed

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@ allOf:
4949
- required: [ clock-frequency ]
5050
- required: [ clocks ]
5151

52+
- if:
53+
properties:
54+
compatible:
55+
contains:
56+
const: nxp,lpc1850-uart
57+
then:
58+
properties:
59+
clock-names:
60+
items:
61+
- const: uartclk
62+
- const: reg
63+
else:
64+
properties:
65+
clock-names:
66+
items:
67+
- const: core
68+
- const: bus
69+
5270
properties:
5371
compatible:
5472
oneOf:
@@ -142,9 +160,22 @@ properties:
142160

143161
clock-names:
144162
minItems: 1
145-
items:
146-
- const: core
147-
- const: bus
163+
maxItems: 2
164+
oneOf:
165+
- items:
166+
- const: core
167+
- const: bus
168+
- items:
169+
- const: uartclk
170+
- const: reg
171+
172+
dmas:
173+
minItems: 1
174+
maxItems: 4
175+
176+
dma-names:
177+
minItems: 1
178+
maxItems: 4
148179

149180
resets:
150181
maxItems: 1
@@ -237,7 +268,9 @@ if:
237268
properties:
238269
compatible:
239270
contains:
240-
const: spacemit,k1-uart
271+
enum:
272+
- spacemit,k1-uart
273+
- nxp,lpc1850-uart
241274
then:
242275
required: [clock-names]
243276
properties:

0 commit comments

Comments
 (0)