summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/net/dsa/mscc,ocelot.yaml
blob: 8d93ed9c172cb7a81b26afa069be080ec13845c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# SPDX-License-Identifier: (GPL-2.0 OR MIT)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/dsa/mscc,ocelot.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip Ocelot Switch Family Device Tree Bindings

maintainers:
  - Vladimir Oltean <vladimir.oltean@nxp.com>
  - Claudiu Manoil <claudiu.manoil@nxp.com>
  - Alexandre Belloni <alexandre.belloni@bootlin.com>
  - UNGLinuxDriver@microchip.com

description: |
  There are multiple switches which are either part of the Ocelot-1 family, or
  derivatives of this architecture. These switches can be found embedded in
  various SoCs and accessed using MMIO, or as discrete chips and accessed over
  SPI or PCIe. The present DSA binding shall be used when the host controlling
  them performs packet I/O primarily through an Ethernet port of the switch
  (which is attached to an Ethernet port of the host), rather than through
  Frame DMA or register-based I/O.

  VSC9953 (Seville):

    This is found in the NXP T1040, where it is a memory-mapped platform
    device.

    The following PHY interface types are supported:

      - phy-mode = "internal": on ports 8 and 9
      - phy-mode = "sgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7
      - phy-mode = "qsgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7
      - phy-mode = "1000base-x": on ports 0, 1, 2, 3, 4, 5, 6, 7

  VSC9959 (Felix):

    This is found in the NXP LS1028A. It is a PCI device, part of the larger
    enetc root complex. As a result, the ethernet-switch node is a sub-node of
    the PCIe root complex node and its "reg" property conforms to the parent
    node bindings, describing it as PF 5 of device 0, bus 0.

    If any external switch port is enabled, the enetc PF2 (enetc_port2) should
    be enabled as well. This is because the internal MDIO bus (exposed through
    EA BAR 0) used to access the MAC PCS registers truly belongs to the enetc
    port 2 and not to Felix.

    The following PHY interface types are supported:

      - phy-mode = "internal": on ports 4 and 5
      - phy-mode = "sgmii": on ports 0, 1, 2, 3
      - phy-mode = "qsgmii": on ports 0, 1, 2, 3
      - phy-mode = "usxgmii": on ports 0, 1, 2, 3
      - phy-mode = "1000base-x": on ports 0, 1, 2, 3
      - phy-mode = "2500base-x": on ports 0, 1, 2, 3

properties:
  compatible:
    enum:
      - mscc,vsc9953-switch
      - pci1957,eef0

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

    description:
      Used to signal availability of PTP TX timestamps, and state changes of
      the MAC merge layer of ports that support Frame Preemption.

  little-endian: true
  big-endian: true

required:
  - compatible
  - reg

allOf:
  - $ref: dsa.yaml#
  - if:
      properties:
        compatible:
          const: pci1957,eef0
    then:
      required:
        - interrupts

unevaluatedProperties: false

examples:
  # Felix VSC9959 (NXP LS1028A)
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    pcie { /* Integrated Endpoint Root Complex */
        #address-cells = <3>;
        #size-cells = <2>;

        ethernet-switch@0,5 {
            compatible = "pci1957,eef0";
            reg = <0x000500 0 0 0 0>;
            interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;

            ethernet-ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy0>;
                    managed = "in-band-status";
                };

                port@1 {
                    reg = <1>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy1>;
                    managed = "in-band-status";
                };

                port@2 {
                    reg = <2>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy2>;
                    managed = "in-band-status";
                };

                port@3 {
                    reg = <3>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy3>;
                    managed = "in-band-status";
                };

                port@4 {
                    reg = <4>;
                    ethernet = <&enetc_port2>;
                    phy-mode = "internal";

                    fixed-link {
                        speed = <2500>;
                        full-duplex;
                        pause;
                    };
                };

                port@5 {
                    reg = <5>;
                    ethernet = <&enetc_port3>;
                    phy-mode = "internal";

                    fixed-link {
                        speed = <1000>;
                        full-duplex;
                        pause;
                    };
                };
            };
        };
    };
  # Seville VSC9953 (NXP T1040)
  - |
    soc {
        #address-cells = <1>;
        #size-cells = <1>;

        ethernet-switch@800000 {
            compatible = "mscc,vsc9953-switch";
            reg = <0x800000 0x290000>;
            little-endian;

            ethernet-ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy0>;
                    managed = "in-band-status";
                };

                port@1 {
                    reg = <1>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy1>;
                    managed = "in-band-status";
                };

                port@2 {
                    reg = <2>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy2>;
                    managed = "in-band-status";
                };

                port@3 {
                    reg = <3>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy3>;
                    managed = "in-band-status";
                };

                port@4 {
                    reg = <4>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy4>;
                    managed = "in-band-status";
                };

                port@5 {
                    reg = <5>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy5>;
                    managed = "in-band-status";
                };

                port@6 {
                    reg = <6>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy6>;
                    managed = "in-band-status";
                };

                port@7 {
                    reg = <7>;
                    phy-mode = "qsgmii";
                    phy-handle = <&phy7>;
                    managed = "in-band-status";
                };

                port@8 {
                    reg = <8>;
                    phy-mode = "internal";
                    ethernet = <&enet0>;

                    fixed-link {
                        speed = <2500>;
                        full-duplex;
                        pause;
                    };
                };

                port@9 {
                    reg = <9>;
                    phy-mode = "internal";
                    ethernet = <&enet1>;

                    fixed-link {
                        speed = <2500>;
                        full-duplex;
                        pause;
                    };
                };
            };
        };
    };