Skip to content

Commit 057062a

Browse files
robherringkuba-moo
authored andcommitted
dt-bindings: net: Add missing (unevaluated|additional)Properties on child nodes
In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically). Add missing properties/$refs as exposed by this addition. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220825192609.1538463-1-robh@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 880b0dd commit 057062a

File tree

6 files changed

+19
-24
lines changed

6 files changed

+19
-24
lines changed

Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ properties:
3737
patternProperties:
3838
"^ethernet-port@[0-9]+$":
3939
type: object
40+
unevaluatedProperties: false
4041
description: contains the resources for ethernet port
4142
allOf:
4243
- $ref: ethernet-controller.yaml#

Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,20 @@ properties:
7474

7575
ethernet-ports:
7676
type: object
77+
additionalProperties: false
78+
79+
properties:
80+
'#address-cells':
81+
const: 1
82+
'#size-cells':
83+
const: 0
84+
7785
patternProperties:
7886
"^port@[0-9a-f]+$":
79-
type: object
87+
$ref: /schemas/net/ethernet-controller.yaml#
88+
unevaluatedProperties: false
8089

8190
properties:
82-
'#address-cells':
83-
const: 1
84-
'#size-cells':
85-
const: 0
86-
8791
reg:
8892
description: Switch port number
8993

@@ -93,29 +97,11 @@ properties:
9397
phandle of a Ethernet SerDes PHY. This defines which SerDes
9498
instance will handle the Ethernet traffic.
9599

96-
phy-mode:
97-
description:
98-
This specifies the interface used by the Ethernet SerDes towards
99-
the PHY or SFP.
100-
101100
microchip,bandwidth:
102101
description: Specifies bandwidth in Mbit/s allocated to the port.
103102
$ref: "/schemas/types.yaml#/definitions/uint32"
104103
maximum: 25000
105104

106-
phy-handle:
107-
description:
108-
phandle of a Ethernet PHY. This is optional and if provided it
109-
points to the cuPHY used by the Ethernet SerDes.
110-
111-
sfp:
112-
description:
113-
phandle of an SFP. This is optional and used when not specifying
114-
a cuPHY. It points to the SFP node that describes the SFP used by
115-
the Ethernet SerDes.
116-
117-
managed: true
118-
119105
microchip,sd-sgpio:
120106
description:
121107
Index of the ports Signal Detect SGPIO in the set of 384 SGPIOs

Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ properties:
3232

3333
ethernet-ports:
3434
type: object
35+
additionalProperties: false
3536
description: Ethernet ports to PHY
3637

3738
properties:
@@ -44,6 +45,7 @@ properties:
4445
patternProperties:
4546
"^port@[0-1]$":
4647
type: object
48+
additionalProperties: false
4749
description: Port to PHY
4850

4951
properties:

Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ properties:
7777

7878
ethernet-ports:
7979
type: object
80+
additionalProperties: false
81+
8082
properties:
8183
'#address-cells':
8284
const: 1
@@ -89,6 +91,7 @@ properties:
8991
description: CPSW external ports
9092

9193
$ref: ethernet-controller.yaml#
94+
unevaluatedProperties: false
9295

9396
properties:
9497
reg:
@@ -117,6 +120,7 @@ properties:
117120

118121
cpts:
119122
type: object
123+
unevaluatedProperties: false
120124
description:
121125
The Common Platform Time Sync (CPTS) module
122126

Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ properties:
116116
description: CPSWxG NUSS external ports
117117

118118
$ref: ethernet-controller.yaml#
119+
unevaluatedProperties: false
119120

120121
properties:
121122
reg:

Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ properties:
9595

9696
refclk-mux:
9797
type: object
98+
additionalProperties: false
9899
description: CPTS reference clock multiplexer clock
99100
properties:
100101
'#clock-cells':

0 commit comments

Comments
 (0)