Commit 986536b9 authored by Rob Herring's avatar Rob Herring

dt-bindings: Fix array schemas encoded as matrices

The YAML DT encoding has leaked into some array properties. Properties
which are defined as an array should have a schema that's just an array.
That means there should only be a single level of 'minItems',
'maxItems', and/or 'items'.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220119015627.2443334-1-robh@kernel.org
parent 58dfff3e
...@@ -81,14 +81,12 @@ properties: ...@@ -81,14 +81,12 @@ properties:
data-lanes: data-lanes:
description: description:
Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines. Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines.
minItems: 1
items: items:
minItems: 1 - const: 1
maxItems: 4 - const: 2
items: - const: 3
- const: 1 - const: 4
- const: 2
- const: 3
- const: 4
required: required:
- data-lanes - data-lanes
......
...@@ -87,14 +87,12 @@ properties: ...@@ -87,14 +87,12 @@ properties:
properties: properties:
data-lanes: data-lanes:
minItems: 1
items: items:
minItems: 1 - const: 1
maxItems: 4 - const: 2
items: - const: 3
- const: 1 - const: 4
- const: 2
- const: 3
- const: 4
required: required:
- data-lanes - data-lanes
......
...@@ -76,33 +76,31 @@ properties: ...@@ -76,33 +76,31 @@ properties:
M_CAN user manual for details. M_CAN user manual for details.
$ref: /schemas/types.yaml#/definitions/int32-array $ref: /schemas/types.yaml#/definitions/int32-array
items: items:
items: - description: The 'offset' is an address offset of the Message RAM where
- description: The 'offset' is an address offset of the Message RAM where the following elements start from. This is usually set to 0x0 if
the following elements start from. This is usually set to 0x0 if you're using a private Message RAM.
you're using a private Message RAM. default: 0
default: 0 - description: 11-bit Filter 0-128 elements / 0-128 words
- description: 11-bit Filter 0-128 elements / 0-128 words minimum: 0
minimum: 0 maximum: 128
maximum: 128 - description: 29-bit Filter 0-64 elements / 0-128 words
- description: 29-bit Filter 0-64 elements / 0-128 words minimum: 0
minimum: 0 maximum: 64
maximum: 64 - description: Rx FIFO 0 0-64 elements / 0-1152 words
- description: Rx FIFO 0 0-64 elements / 0-1152 words minimum: 0
minimum: 0 maximum: 64
maximum: 64 - description: Rx FIFO 1 0-64 elements / 0-1152 words
- description: Rx FIFO 1 0-64 elements / 0-1152 words minimum: 0
minimum: 0 maximum: 64
maximum: 64 - description: Rx Buffers 0-64 elements / 0-1152 words
- description: Rx Buffers 0-64 elements / 0-1152 words minimum: 0
minimum: 0 maximum: 64
maximum: 64 - description: Tx Event FIFO 0-32 elements / 0-64 words
- description: Tx Event FIFO 0-32 elements / 0-64 words minimum: 0
minimum: 0 maximum: 32
maximum: 32 - description: Tx Buffers 0-32 elements / 0-576 words
- description: Tx Buffers 0-32 elements / 0-576 words minimum: 0
minimum: 0 maximum: 32
maximum: 32
maxItems: 1
power-domains: power-domains:
description: description:
......
...@@ -17,9 +17,8 @@ properties: ...@@ -17,9 +17,8 @@ properties:
description: description:
Specifies the MAC address that was assigned to the network device. Specifies the MAC address that was assigned to the network device.
$ref: /schemas/types.yaml#/definitions/uint8-array $ref: /schemas/types.yaml#/definitions/uint8-array
items: minItems: 6
- minItems: 6 maxItems: 6
maxItems: 6
mac-address: mac-address:
description: description:
...@@ -28,9 +27,8 @@ properties: ...@@ -28,9 +27,8 @@ properties:
to the device by the boot program is different from the to the device by the boot program is different from the
local-mac-address property. local-mac-address property.
$ref: /schemas/types.yaml#/definitions/uint8-array $ref: /schemas/types.yaml#/definitions/uint8-array
items: minItems: 6
- minItems: 6 maxItems: 6
maxItems: 6
max-frame-size: max-frame-size:
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
...@@ -164,33 +162,30 @@ properties: ...@@ -164,33 +162,30 @@ properties:
type: array type: array
then: then:
deprecated: true deprecated: true
minItems: 1
maxItems: 1
items: items:
items: - minimum: 0
- minimum: 0 maximum: 31
maximum: 31 description:
description: Emulated PHY ID, choose any but unique to the all
Emulated PHY ID, choose any but unique to the all specified fixed-links
specified fixed-links
- enum: [0, 1]
- enum: [0, 1] description:
description: Duplex configuration. 0 for half duplex or 1 for
Duplex configuration. 0 for half duplex or 1 for full duplex
full duplex
- enum: [10, 100, 1000, 2500, 10000]
- enum: [10, 100, 1000, 2500, 10000] description:
description: Link speed in Mbits/sec.
Link speed in Mbits/sec.
- enum: [0, 1]
- enum: [0, 1] description:
description: Pause configuration. 0 for no pause, 1 for pause
Pause configuration. 0 for no pause, 1 for pause
- enum: [0, 1]
- enum: [0, 1] description:
description: Asymmetric pause configuration. 0 for no asymmetric
Asymmetric pause configuration. 0 for no asymmetric pause, 1 for asymmetric pause
pause, 1 for asymmetric pause
- if: - if:
......
...@@ -50,16 +50,15 @@ patternProperties: ...@@ -50,16 +50,15 @@ patternProperties:
Offset and size in bytes within the storage device. Offset and size in bytes within the storage device.
bits: bits:
maxItems: 1 $ref: /schemas/types.yaml#/definitions/uint32-array
items: items:
items: - minimum: 0
- minimum: 0 maximum: 7
maximum: 7 description:
description: Offset in bit within the address range specified by reg.
Offset in bit within the address range specified by reg. - minimum: 1
- minimum: 1 description:
description: Size in bit within the address range specified by reg.
Size in bit within the address range specified by reg.
required: required:
- reg - reg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment