Skip to content

Commit a575357

Browse files
Alexander Steinbroonie
authored andcommitted
spi: dt-bindings: amlogic, meson-gx-spicc: Fix schema for meson-g12a
spi@13000: clock-names: Additional items are not allowed ('pclk' was unexpected) spi@13000: clock-names: ['core', 'pclk'] is too long spi@13000: clocks: [[2, 23], [2, 258]] is too long spi@15000: clock-names: Additional items are not allowed ('pclk' was unexpected) spi@15000: clock-names: ['core', 'pclk'] is too long spi@15000: clocks: [[2, 29], [2, 261]] is too long Conditional schema properties don't overwrite others. Instead of restrictions have to be validated. So general clock amount is 1-2 and depending on the actual device type limit the mount to 1 or 2. Signed-off-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e0fe700 commit a575357

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ properties:
3434
maxItems: 1
3535

3636
clocks:
37-
maxItems: 1
37+
minItems: 1
38+
maxItems: 2
39+
items:
40+
- description: controller register bus clock
41+
- description: baud rate generator and delay control clock
3842

3943
clock-names:
40-
description: input clock for the baud rate generator
41-
items:
42-
- const: core
44+
minItems: 1
45+
maxItems: 2
4346

4447
if:
4548
properties:
@@ -51,17 +54,22 @@ if:
5154
then:
5255
properties:
5356
clocks:
54-
contains:
55-
items:
56-
- description: controller register bus clock
57-
- description: baud rate generator and delay control clock
57+
minItems: 2
5858

5959
clock-names:
60-
minItems: 2
6160
items:
6261
- const: core
6362
- const: pclk
6463

64+
else:
65+
properties:
66+
clocks:
67+
maxItems: 1
68+
69+
clock-names:
70+
items:
71+
- const: core
72+
6573
required:
6674
- compatible
6775
- reg

0 commit comments

Comments
 (0)