Skip to content

Commit dd43f5e

Browse files
colin-foster-in-advantagekuba-moo
authored andcommitted
dt-bindings: net: mscc,vsc7514-switch: add dsa binding for the vsc7512
The VSC7511, VSC7512, VSC7513 and VSC7514 all have the ability to be controlled either internally by a memory-mapped CPU, or externally via interfaces like SPI and PCIe. The internal CPU of the VSC7511 and 7512 don't have the resources to run Linux, so must be controlled via these external interfaces in a DSA configuration. Add mscc,vsc7512-switch compatible string to indicate that the chips are being controlled externally in a DSA configuration. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent fde0b6c commit dd43f5e

File tree

1 file changed

+90
-23
lines changed

1 file changed

+90
-23
lines changed

Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml

Lines changed: 90 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,52 @@ description: |
1818
packets using CPU. Additionally, PTP is supported as well as FDMA for faster
1919
packet extraction/injection.
2020
21-
$ref: ethernet-switch.yaml#
21+
allOf:
22+
- if:
23+
properties:
24+
compatible:
25+
const: mscc,vsc7514-switch
26+
then:
27+
$ref: ethernet-switch.yaml#
28+
required:
29+
- interrupts
30+
- interrupt-names
31+
properties:
32+
reg:
33+
minItems: 21
34+
reg-names:
35+
minItems: 21
36+
ethernet-ports:
37+
patternProperties:
38+
"^port@[0-9a-f]+$":
39+
$ref: ethernet-switch-port.yaml#
40+
unevaluatedProperties: false
41+
42+
- if:
43+
properties:
44+
compatible:
45+
const: mscc,vsc7512-switch
46+
then:
47+
$ref: /schemas/net/dsa/dsa.yaml#
48+
properties:
49+
reg:
50+
maxItems: 20
51+
reg-names:
52+
maxItems: 20
53+
ethernet-ports:
54+
patternProperties:
55+
"^port@[0-9a-f]+$":
56+
$ref: /schemas/net/dsa/dsa-port.yaml#
57+
unevaluatedProperties: false
2258

2359
properties:
2460
compatible:
25-
const: mscc,vsc7514-switch
61+
enum:
62+
- mscc,vsc7512-switch
63+
- mscc,vsc7514-switch
2664

2765
reg:
66+
minItems: 20
2867
items:
2968
- description: system target
3069
- description: rewriter target
@@ -49,6 +88,7 @@ properties:
4988
- description: fdma target
5089

5190
reg-names:
91+
minItems: 20
5292
items:
5393
- const: sys
5494
- const: rew
@@ -86,35 +126,16 @@ properties:
86126
- const: xtr
87127
- const: fdma
88128

89-
ethernet-ports:
90-
type: object
91-
92-
properties:
93-
'#address-cells':
94-
const: 1
95-
'#size-cells':
96-
const: 0
97-
98-
additionalProperties: false
99-
100-
patternProperties:
101-
"^port@[0-9a-f]+$":
102-
103-
$ref: ethernet-switch-port.yaml#
104-
105-
unevaluatedProperties: false
106-
107129
required:
108130
- compatible
109131
- reg
110132
- reg-names
111-
- interrupts
112-
- interrupt-names
113133
- ethernet-ports
114134

115-
additionalProperties: false
135+
unevaluatedProperties: false
116136

117137
examples:
138+
# VSC7514 (Switchdev)
118139
- |
119140
switch@1010000 {
120141
compatible = "mscc,vsc7514-switch";
@@ -162,5 +183,51 @@ examples:
162183
};
163184
};
164185
};
186+
# VSC7512 (DSA)
187+
- |
188+
ethernet-switch@1{
189+
compatible = "mscc,vsc7512-switch";
190+
reg = <0x71010000 0x10000>,
191+
<0x71030000 0x10000>,
192+
<0x71080000 0x100>,
193+
<0x710e0000 0x10000>,
194+
<0x711e0000 0x100>,
195+
<0x711f0000 0x100>,
196+
<0x71200000 0x100>,
197+
<0x71210000 0x100>,
198+
<0x71220000 0x100>,
199+
<0x71230000 0x100>,
200+
<0x71240000 0x100>,
201+
<0x71250000 0x100>,
202+
<0x71260000 0x100>,
203+
<0x71270000 0x100>,
204+
<0x71280000 0x100>,
205+
<0x71800000 0x80000>,
206+
<0x71880000 0x10000>,
207+
<0x71040000 0x10000>,
208+
<0x71050000 0x10000>,
209+
<0x71060000 0x10000>;
210+
reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
211+
"port2", "port3", "port4", "port5", "port6",
212+
"port7", "port8", "port9", "port10", "qsys",
213+
"ana", "s0", "s1", "s2";
214+
215+
ethernet-ports {
216+
#address-cells = <1>;
217+
#size-cells = <0>;
218+
219+
port@0 {
220+
reg = <0>;
221+
ethernet = <&mac_sw>;
222+
phy-handle = <&phy0>;
223+
phy-mode = "internal";
224+
};
225+
port@1 {
226+
reg = <1>;
227+
phy-handle = <&phy1>;
228+
phy-mode = "internal";
229+
};
230+
};
231+
};
165232
166233
...

0 commit comments

Comments
 (0)