Skip to content

Commit 390b14b

Browse files
robherringkuba-moo
authored andcommitted
dt-bindings: net: Define properties at top-level
Convention is DT schemas should define all properties at the top-level and not inside of if/then schemas. That minimizes the if/then schemas and is more future proof. Signed-off-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Serge Semin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent caa93b7 commit 390b14b

File tree

2 files changed

+52
-43
lines changed

2 files changed

+52
-43
lines changed

Documentation/devicetree/bindings/net/mediatek,net.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ properties:
6868
Phandle to the syscon node that handles the path from GMAC to
6969
PHY variants.
7070

71+
mediatek,pcie-mirror:
72+
$ref: /schemas/types.yaml#/definitions/phandle
73+
description:
74+
Phandle to the mediatek pcie-mirror controller.
75+
76+
mediatek,pctl:
77+
$ref: /schemas/types.yaml#/definitions/phandle
78+
description:
79+
Phandle to the syscon node that handles the ports slew rate and
80+
driver current.
81+
7182
mediatek,sgmiisys:
7283
$ref: /schemas/types.yaml#/definitions/phandle-array
7384
minItems: 1
@@ -131,15 +142,12 @@ allOf:
131142

132143
mediatek,infracfg: false
133144

134-
mediatek,pctl:
135-
$ref: /schemas/types.yaml#/definitions/phandle
136-
description:
137-
Phandle to the syscon node that handles the ports slew rate and
138-
driver current.
139-
140145
mediatek,wed: false
141146

142147
mediatek,wed-pcie: false
148+
else:
149+
properties:
150+
mediatek,pctl: false
143151

144152
- if:
145153
properties:
@@ -201,12 +209,10 @@ allOf:
201209
minItems: 1
202210
maxItems: 1
203211

204-
mediatek,pcie-mirror:
205-
$ref: /schemas/types.yaml#/definitions/phandle
206-
description:
207-
Phandle to the mediatek pcie-mirror controller.
208-
209212
mediatek,wed-pcie: false
213+
else:
214+
properties:
215+
mediatek,pcie-mirror: false
210216

211217
- if:
212218
properties:

Documentation/devicetree/bindings/net/snps,dwmac.yaml

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,12 @@ properties:
512512
description:
513513
Frequency division factor for MDC clock.
514514

515+
snps,tso:
516+
$ref: /schemas/types.yaml#/definitions/flag
517+
description:
518+
Enables the TSO feature otherwise it will be managed by MAC HW capability
519+
register.
520+
515521
mdio:
516522
$ref: mdio.yaml#
517523
unevaluatedProperties: false
@@ -595,41 +601,38 @@ allOf:
595601
- if:
596602
properties:
597603
compatible:
598-
contains:
599-
enum:
600-
- allwinner,sun7i-a20-gmac
601-
- allwinner,sun8i-a83t-emac
602-
- allwinner,sun8i-h3-emac
603-
- allwinner,sun8i-r40-gmac
604-
- allwinner,sun8i-v3s-emac
605-
- allwinner,sun50i-a64-emac
606-
- loongson,ls2k-dwmac
607-
- loongson,ls7a-dwmac
608-
- ingenic,jz4775-mac
609-
- ingenic,x1000-mac
610-
- ingenic,x1600-mac
611-
- ingenic,x1830-mac
612-
- ingenic,x2000-mac
613-
- qcom,qcs404-ethqos
614-
- qcom,sa8775p-ethqos
615-
- qcom,sc8280xp-ethqos
616-
- qcom,sm8150-ethqos
617-
- snps,dwmac-4.00
618-
- snps,dwmac-4.10a
619-
- snps,dwmac-4.20a
620-
- snps,dwmac-5.10a
621-
- snps,dwmac-5.20
622-
- snps,dwxgmac
623-
- snps,dwxgmac-2.10
624-
- st,spear600-gmac
604+
not:
605+
contains:
606+
enum:
607+
- allwinner,sun7i-a20-gmac
608+
- allwinner,sun8i-a83t-emac
609+
- allwinner,sun8i-h3-emac
610+
- allwinner,sun8i-r40-gmac
611+
- allwinner,sun8i-v3s-emac
612+
- allwinner,sun50i-a64-emac
613+
- loongson,ls2k-dwmac
614+
- loongson,ls7a-dwmac
615+
- ingenic,jz4775-mac
616+
- ingenic,x1000-mac
617+
- ingenic,x1600-mac
618+
- ingenic,x1830-mac
619+
- ingenic,x2000-mac
620+
- qcom,qcs404-ethqos
621+
- qcom,sa8775p-ethqos
622+
- qcom,sc8280xp-ethqos
623+
- qcom,sm8150-ethqos
624+
- snps,dwmac-4.00
625+
- snps,dwmac-4.10a
626+
- snps,dwmac-4.20a
627+
- snps,dwmac-5.10a
628+
- snps,dwmac-5.20
629+
- snps,dwxgmac
630+
- snps,dwxgmac-2.10
631+
- st,spear600-gmac
625632

626633
then:
627634
properties:
628-
snps,tso:
629-
$ref: /schemas/types.yaml#/definitions/flag
630-
description:
631-
Enables the TSO feature otherwise it will be managed by
632-
MAC HW capability register.
635+
snps,tso: false
633636

634637
additionalProperties: true
635638

0 commit comments

Comments
 (0)