GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / net / mscc,vsc7514-switch.yaml
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/net/mscc,vsc7514-switch.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Microchip VSC7514 Ethernet switch controller
8
9 maintainers:
10   - Vladimir Oltean <vladimir.oltean@nxp.com>
11   - Claudiu Manoil <claudiu.manoil@nxp.com>
12   - Alexandre Belloni <alexandre.belloni@bootlin.com>
13
14 description: |
15   Bindings for the Microchip VSC7514 switch driver
16
17   The VSC7514 switch driver handles up to 11 ports and can inject/extract
18   packets using CPU. Additionally, PTP is supported as well as FDMA for faster
19   packet extraction/injection.
20
21 properties:
22   $nodename:
23     pattern: "^switch@[0-9a-f]+$"
24
25   compatible:
26     const: mscc,vsc7514-switch
27
28   reg:
29     items:
30       - description: system target
31       - description: rewriter target
32       - description: qs target
33       - description: PTP target
34       - description: Port0 target
35       - description: Port1 target
36       - description: Port2 target
37       - description: Port3 target
38       - description: Port4 target
39       - description: Port5 target
40       - description: Port6 target
41       - description: Port7 target
42       - description: Port8 target
43       - description: Port9 target
44       - description: Port10 target
45       - description: QSystem target
46       - description: Analyzer target
47       - description: S0 target
48       - description: S1 target
49       - description: S2 target
50       - description: fdma target
51
52   reg-names:
53     items:
54       - const: sys
55       - const: rew
56       - const: qs
57       - const: ptp
58       - const: port0
59       - const: port1
60       - const: port2
61       - const: port3
62       - const: port4
63       - const: port5
64       - const: port6
65       - const: port7
66       - const: port8
67       - const: port9
68       - const: port10
69       - const: qsys
70       - const: ana
71       - const: s0
72       - const: s1
73       - const: s2
74       - const: fdma
75
76   interrupts:
77     minItems: 1
78     items:
79       - description: PTP ready
80       - description: register based extraction
81       - description: frame dma based extraction
82
83   interrupt-names:
84     minItems: 1
85     items:
86       - const: ptp_rdy
87       - const: xtr
88       - const: fdma
89
90   ethernet-ports:
91     type: object
92
93     properties:
94       '#address-cells':
95         const: 1
96       '#size-cells':
97         const: 0
98
99     additionalProperties: false
100
101     patternProperties:
102       "^port@[0-9a-f]+$":
103         type: object
104         description: Ethernet ports handled by the switch
105
106         $ref: ethernet-controller.yaml#
107
108         unevaluatedProperties: false
109
110         properties:
111           reg:
112             description: Switch port number
113
114           phy-handle: true
115
116           phy-mode: true
117
118           fixed-link: true
119
120           mac-address: true
121
122         required:
123           - reg
124           - phy-mode
125
126         oneOf:
127           - required:
128               - phy-handle
129           - required:
130               - fixed-link
131
132 required:
133   - compatible
134   - reg
135   - reg-names
136   - interrupts
137   - interrupt-names
138   - ethernet-ports
139
140 additionalProperties: false
141
142 examples:
143   - |
144     switch@1010000 {
145       compatible = "mscc,vsc7514-switch";
146       reg = <0x1010000 0x10000>,
147             <0x1030000 0x10000>,
148             <0x1080000 0x100>,
149             <0x10e0000 0x10000>,
150             <0x11e0000 0x100>,
151             <0x11f0000 0x100>,
152             <0x1200000 0x100>,
153             <0x1210000 0x100>,
154             <0x1220000 0x100>,
155             <0x1230000 0x100>,
156             <0x1240000 0x100>,
157             <0x1250000 0x100>,
158             <0x1260000 0x100>,
159             <0x1270000 0x100>,
160             <0x1280000 0x100>,
161             <0x1800000 0x80000>,
162             <0x1880000 0x10000>,
163             <0x1040000 0x10000>,
164             <0x1050000 0x10000>,
165             <0x1060000 0x10000>,
166             <0x1a0 0x1c4>;
167       reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
168             "port2", "port3", "port4", "port5", "port6",
169             "port7", "port8", "port9", "port10", "qsys",
170             "ana", "s0", "s1", "s2", "fdma";
171       interrupts = <18 21 16>;
172       interrupt-names = "ptp_rdy", "xtr", "fdma";
173
174       ethernet-ports {
175         #address-cells = <1>;
176         #size-cells = <0>;
177
178         port0: port@0 {
179           reg = <0>;
180           phy-handle = <&phy0>;
181           phy-mode = "internal";
182         };
183         port1: port@1 {
184           reg = <1>;
185           phy-handle = <&phy1>;
186           phy-mode = "internal";
187         };
188       };
189     };
190
191 ...