Skip to content

Commit b2d2864

Browse files
committed
dt-bindings: net: Cleanup MDIO node schemas
The schemas for MDIO bus nodes range from missing to duplicating everything in mdio.yaml. The MDIO bus node schemas only need to reference mdio.yaml, define any binding specific properties, and define 'unevaluatedProperties: false'. This ensures that MDIO nodes only contain defined properties. With this, any duplicated properties can be removed. Cc: "David S. Miller" <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Vivien Didelot <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Vladimir Oltean <[email protected]> Cc: Joakim Zhang <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Russell King <[email protected]> Cc: Kunihiko Hayashi <[email protected]> Cc: Nobuhiro Iwamatsu <[email protected]> Cc: Cristian Ciocaltea <[email protected]> Cc: "Fernández Rojas" <[email protected]> Cc: John Crispin <[email protected]> Cc: "G. Jaya Kumaran" <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Joel Stanley <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Cc: Oleksij Rempel <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: Giuseppe Cavallaro <[email protected]> Cc: Jose Abreu <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8650381 commit b2d2864

15 files changed

+38
-89
lines changed

Documentation/devicetree/bindings/net/actions,owl-emac.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ properties:
5151
description:
5252
Phandle to the device containing custom config.
5353

54+
mdio:
55+
$ref: mdio.yaml#
56+
unevaluatedProperties: false
57+
5458
required:
5559
- compatible
5660
- reg

Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ allOf:
122122

123123
mdio-mux:
124124
type: object
125+
unevaluatedProperties: false
125126

126127
properties:
127128
compatible:
@@ -132,17 +133,18 @@ allOf:
132133
description:
133134
Phandle to EMAC MDIO.
134135

136+
"#address-cells":
137+
const: 1
138+
139+
"#size-cells":
140+
const: 0
141+
135142
mdio@1:
136-
type: object
143+
$ref: mdio.yaml#
144+
unevaluatedProperties: false
137145
description: Internal MDIO Bus
138146

139147
properties:
140-
"#address-cells":
141-
const: 1
142-
143-
"#size-cells":
144-
const: 0
145-
146148
compatible:
147149
const: allwinner,sun8i-h3-mdio-internal
148150

@@ -168,16 +170,11 @@ allOf:
168170

169171

170172
mdio@2:
171-
type: object
173+
$ref: mdio.yaml#
174+
unevaluatedProperties: false
172175
description: External MDIO Bus (H3 only)
173176

174177
properties:
175-
"#address-cells":
176-
const: 1
177-
178-
"#size-cells":
179-
const: 0
180-
181178
reg:
182179
const: 2
183180

Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,19 @@ description:
1515
properties as well to generate desired MDIO transaction on appropriate bus.
1616

1717
allOf:
18-
- $ref: "mdio.yaml#"
18+
- $ref: mdio-mux.yaml#
1919

2020
properties:
2121
compatible:
2222
const: brcm,bcm6368-mdio-mux
2323

24-
"#address-cells":
25-
const: 1
26-
27-
"#size-cells":
28-
const: 0
29-
3024
reg:
3125
maxItems: 1
3226

3327
required:
3428
- compatible
3529
- reg
3630

37-
patternProperties:
38-
'^mdio@[0-1]$':
39-
type: object
40-
properties:
41-
reg:
42-
maxItems: 1
43-
44-
"#address-cells":
45-
const: 1
46-
47-
"#size-cells":
48-
const: 0
49-
50-
required:
51-
- reg
52-
- "#address-cells"
53-
- "#size-cells"
54-
5531
unevaluatedProperties: false
5632

5733
examples:

Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ properties:
5252

5353
patternProperties:
5454
"^mdio@[0-1]$":
55-
type: object
56-
57-
allOf:
58-
- $ref: "http://devicetree.org/schemas/net/mdio.yaml#"
55+
$ref: /schemas/net/mdio.yaml#
56+
unevaluatedProperties: false
5957

6058
properties:
6159
compatible:

Documentation/devicetree/bindings/net/dsa/qca8k.yaml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,14 @@ properties:
5858
B68 on the QCA832x and B49 on the QCA833x.
5959

6060
mdio:
61-
type: object
61+
$ref: /schemas/net/mdio.yaml#
62+
unevaluatedProperties: false
6263
description: Qca8k switch have an internal mdio to access switch port.
6364
If this is not present, the legacy mapping is used and the
6465
internal mdio access is used.
6566
With the legacy mapping the reg corresponding to the internal
6667
mdio is the switch reg with an offset of -1.
6768

68-
properties:
69-
'#address-cells':
70-
const: 1
71-
'#size-cells':
72-
const: 0
73-
74-
patternProperties:
75-
"^(ethernet-)?phy@[0-4]$":
76-
type: object
77-
78-
allOf:
79-
- $ref: "http://devicetree.org/schemas/net/mdio.yaml#"
80-
81-
properties:
82-
reg:
83-
maxItems: 1
84-
85-
required:
86-
- reg
87-
8869
patternProperties:
8970
"^(ethernet-)?ports$":
9071
type: object

Documentation/devicetree/bindings/net/fsl,fec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ properties:
165165
req_bit is the gpr bit offset for ENET stop request.
166166

167167
mdio:
168-
type: object
168+
$ref: mdio.yaml#
169+
unevaluatedProperties: false
169170
description:
170171
Specifies the mdio bus in the FEC, used as a container for phy nodes.
171172

Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ examples:
117117
snps,mtl-tx-config = <&mtl_tx_setup>;
118118
snps,tso;
119119
120-
mdio0 {
120+
mdio {
121121
#address-cells = <1>;
122122
#size-cells = <0>;
123123
compatible = "snps,dwmac-mdio";

Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ properties:
4848
and the instance to use in the second cell
4949

5050
mdio:
51-
type: object
52-
$ref: "mdio.yaml#"
51+
$ref: mdio.yaml#
52+
unevaluatedProperties: false
5353
description: optional node for embedded MDIO controller
5454

5555
required:

Documentation/devicetree/bindings/net/litex,liteeth.yaml

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

6363
mdio:
6464
$ref: mdio.yaml#
65+
unevaluatedProperties: false
6566

6667
required:
6768
- compatible

Documentation/devicetree/bindings/net/mdio-mux.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ description: |+
1515
bus multiplexer/switch will have one child node for each child bus.
1616
1717
properties:
18-
$nodename:
19-
pattern: '^mdio-mux[\-@]?'
20-
2118
mdio-parent-bus:
2219
$ref: /schemas/types.yaml#/definitions/phandle
2320
description:
@@ -32,12 +29,12 @@ properties:
3229

3330
patternProperties:
3431
'^mdio@[0-9a-f]+$':
35-
type: object
32+
$ref: mdio.yaml#
33+
unevaluatedProperties: false
3634

3735
properties:
3836
reg:
3937
maxItems: 1
40-
description: The sub-bus number.
4138

4239
additionalProperties: true
4340

0 commit comments

Comments
 (0)