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
7title: Microchip VSC7514 Ethernet switch controller
8
9maintainers:
10  - Vladimir Oltean <vladimir.oltean@nxp.com>
11  - Claudiu Manoil <claudiu.manoil@nxp.com>
12  - Alexandre Belloni <alexandre.belloni@bootlin.com>
13
14description: |
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$ref: ethernet-switch.yaml#
22
23properties:
24  compatible:
25    const: mscc,vsc7514-switch
26
27  reg:
28    items:
29      - description: system target
30      - description: rewriter target
31      - description: qs target
32      - description: PTP target
33      - description: Port0 target
34      - description: Port1 target
35      - description: Port2 target
36      - description: Port3 target
37      - description: Port4 target
38      - description: Port5 target
39      - description: Port6 target
40      - description: Port7 target
41      - description: Port8 target
42      - description: Port9 target
43      - description: Port10 target
44      - description: QSystem target
45      - description: Analyzer target
46      - description: S0 target
47      - description: S1 target
48      - description: S2 target
49      - description: fdma target
50
51  reg-names:
52    items:
53      - const: sys
54      - const: rew
55      - const: qs
56      - const: ptp
57      - const: port0
58      - const: port1
59      - const: port2
60      - const: port3
61      - const: port4
62      - const: port5
63      - const: port6
64      - const: port7
65      - const: port8
66      - const: port9
67      - const: port10
68      - const: qsys
69      - const: ana
70      - const: s0
71      - const: s1
72      - const: s2
73      - const: fdma
74
75  interrupts:
76    minItems: 1
77    items:
78      - description: PTP ready
79      - description: register based extraction
80      - description: frame dma based extraction
81
82  interrupt-names:
83    minItems: 1
84    items:
85      - const: ptp_rdy
86      - const: xtr
87      - const: fdma
88
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
107required:
108  - compatible
109  - reg
110  - reg-names
111  - interrupts
112  - interrupt-names
113  - ethernet-ports
114
115additionalProperties: false
116
117examples:
118  - |
119    switch@1010000 {
120      compatible = "mscc,vsc7514-switch";
121      reg = <0x1010000 0x10000>,
122            <0x1030000 0x10000>,
123            <0x1080000 0x100>,
124            <0x10e0000 0x10000>,
125            <0x11e0000 0x100>,
126            <0x11f0000 0x100>,
127            <0x1200000 0x100>,
128            <0x1210000 0x100>,
129            <0x1220000 0x100>,
130            <0x1230000 0x100>,
131            <0x1240000 0x100>,
132            <0x1250000 0x100>,
133            <0x1260000 0x100>,
134            <0x1270000 0x100>,
135            <0x1280000 0x100>,
136            <0x1800000 0x80000>,
137            <0x1880000 0x10000>,
138            <0x1040000 0x10000>,
139            <0x1050000 0x10000>,
140            <0x1060000 0x10000>,
141            <0x1a0 0x1c4>;
142      reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
143            "port2", "port3", "port4", "port5", "port6",
144            "port7", "port8", "port9", "port10", "qsys",
145            "ana", "s0", "s1", "s2", "fdma";
146      interrupts = <18 21 16>;
147      interrupt-names = "ptp_rdy", "xtr", "fdma";
148
149      ethernet-ports {
150        #address-cells = <1>;
151        #size-cells = <0>;
152
153        port0: port@0 {
154          reg = <0>;
155          phy-handle = <&phy0>;
156          phy-mode = "internal";
157        };
158        port1: port@1 {
159          reg = <1>;
160          phy-handle = <&phy1>;
161          phy-mode = "internal";
162        };
163      };
164    };
165
166...
167