xref: /linux/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1f8c63088SSteen Hegelund# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2f8c63088SSteen Hegelund%YAML 1.2
3f8c63088SSteen Hegelund---
4f8c63088SSteen Hegelund$id: http://devicetree.org/schemas/net/microchip,sparx5-switch.yaml#
5f8c63088SSteen Hegelund$schema: http://devicetree.org/meta-schemas/core.yaml#
6f8c63088SSteen Hegelund
7f8c63088SSteen Hegelundtitle: Microchip Sparx5 Ethernet switch controller
8f8c63088SSteen Hegelund
9f8c63088SSteen Hegelundmaintainers:
10f8c63088SSteen Hegelund  - Steen Hegelund <steen.hegelund@microchip.com>
11f8c63088SSteen Hegelund  - Lars Povlsen <lars.povlsen@microchip.com>
12f8c63088SSteen Hegelund
13f8c63088SSteen Hegelunddescription: |
14f8c63088SSteen Hegelund  The SparX-5 Enterprise Ethernet switch family provides a rich set of
15f8c63088SSteen Hegelund  Enterprise switching features such as advanced TCAM-based VLAN and
16f8c63088SSteen Hegelund  QoS processing enabling delivery of differentiated services, and
17f8c63088SSteen Hegelund  security through TCAM-based frame processing using versatile content
18f8c63088SSteen Hegelund  aware processor (VCAP).
19f8c63088SSteen Hegelund
20f8c63088SSteen Hegelund  IPv4/IPv6 Layer 3 (L3) unicast and multicast routing is supported
21f8c63088SSteen Hegelund  with up to 18K IPv4/9K IPv6 unicast LPM entries and up to 9K IPv4/3K
22f8c63088SSteen Hegelund  IPv6 (S,G) multicast groups.
23f8c63088SSteen Hegelund
24f8c63088SSteen Hegelund  L3 security features include source guard and reverse path
25f8c63088SSteen Hegelund  forwarding (uRPF) tasks. Additional L3 features include VRF-Lite and
26f8c63088SSteen Hegelund  IP tunnels (IP over GRE/IP).
27f8c63088SSteen Hegelund
28f8c63088SSteen Hegelund  The SparX-5 switch family targets managed Layer 2 and Layer 3
29f8c63088SSteen Hegelund  equipment in SMB, SME, and Enterprise where high port count
30f8c63088SSteen Hegelund  1G/2.5G/5G/10G switching with 10G/25G aggregation links is required.
31f8c63088SSteen Hegelund
32f8c63088SSteen Hegelundproperties:
33f8c63088SSteen Hegelund  $nodename:
34f8c63088SSteen Hegelund    pattern: "^switch@[0-9a-f]+$"
35f8c63088SSteen Hegelund
36f8c63088SSteen Hegelund  compatible:
37f8c63088SSteen Hegelund    const: microchip,sparx5-switch
38f8c63088SSteen Hegelund
39f8c63088SSteen Hegelund  reg:
40f8c63088SSteen Hegelund    items:
41f8c63088SSteen Hegelund      - description: cpu target
42f8c63088SSteen Hegelund      - description: devices target
43f8c63088SSteen Hegelund      - description: general control block target
44f8c63088SSteen Hegelund
45f8c63088SSteen Hegelund  reg-names:
46f8c63088SSteen Hegelund    items:
47f8c63088SSteen Hegelund      - const: cpu
48f8c63088SSteen Hegelund      - const: devices
49f8c63088SSteen Hegelund      - const: gcb
50f8c63088SSteen Hegelund
51f8c63088SSteen Hegelund  interrupts:
52f8c63088SSteen Hegelund    minItems: 1
53f8c63088SSteen Hegelund    items:
54f8c63088SSteen Hegelund      - description: register based extraction
55f8c63088SSteen Hegelund      - description: frame dma based extraction
56b066ad26SHoratiu Vultur      - description: ptp interrupt
57f8c63088SSteen Hegelund
58f8c63088SSteen Hegelund  interrupt-names:
59f8c63088SSteen Hegelund    minItems: 1
60f8c63088SSteen Hegelund    items:
61f8c63088SSteen Hegelund      - const: xtr
62f8c63088SSteen Hegelund      - const: fdma
63b066ad26SHoratiu Vultur      - const: ptp
64f8c63088SSteen Hegelund
65f8c63088SSteen Hegelund  resets:
66f8c63088SSteen Hegelund    items:
67f8c63088SSteen Hegelund      - description: Reset controller used for switch core reset (soft reset)
68f8c63088SSteen Hegelund
69f8c63088SSteen Hegelund  reset-names:
70f8c63088SSteen Hegelund    items:
71f8c63088SSteen Hegelund      - const: switch
72f8c63088SSteen Hegelund
73f8c63088SSteen Hegelund  mac-address: true
74f8c63088SSteen Hegelund
75f8c63088SSteen Hegelund  ethernet-ports:
76f8c63088SSteen Hegelund    type: object
77057062adSRob Herring    additionalProperties: false
78f8c63088SSteen Hegelund
79f8c63088SSteen Hegelund    properties:
80f8c63088SSteen Hegelund      '#address-cells':
81f8c63088SSteen Hegelund        const: 1
82f8c63088SSteen Hegelund      '#size-cells':
83f8c63088SSteen Hegelund        const: 0
84f8c63088SSteen Hegelund
85057062adSRob Herring    patternProperties:
86057062adSRob Herring      "^port@[0-9a-f]+$":
87057062adSRob Herring        $ref: /schemas/net/ethernet-controller.yaml#
88057062adSRob Herring        unevaluatedProperties: false
89057062adSRob Herring
90057062adSRob Herring        properties:
91f8c63088SSteen Hegelund          reg:
92f8c63088SSteen Hegelund            description: Switch port number
93f8c63088SSteen Hegelund
94f8c63088SSteen Hegelund          phys:
95f8c63088SSteen Hegelund            maxItems: 1
96f8c63088SSteen Hegelund            description:
97f8c63088SSteen Hegelund              phandle of a Ethernet SerDes PHY.  This defines which SerDes
98f8c63088SSteen Hegelund              instance will handle the Ethernet traffic.
99f8c63088SSteen Hegelund
100f8c63088SSteen Hegelund          microchip,bandwidth:
101f8c63088SSteen Hegelund            description: Specifies bandwidth in Mbit/s allocated to the port.
102*3079bfdbSRob Herring            $ref: /schemas/types.yaml#/definitions/uint32
103f8c63088SSteen Hegelund            maximum: 25000
104f8c63088SSteen Hegelund
105f8c63088SSteen Hegelund          microchip,sd-sgpio:
106f8c63088SSteen Hegelund            description:
107f8c63088SSteen Hegelund              Index of the ports Signal Detect SGPIO in the set of 384 SGPIOs
108f8c63088SSteen Hegelund              This is optional, and only needed if the default used index is
109f8c63088SSteen Hegelund              is not correct.
110*3079bfdbSRob Herring            $ref: /schemas/types.yaml#/definitions/uint32
111f8c63088SSteen Hegelund            minimum: 0
112f8c63088SSteen Hegelund            maximum: 383
113f8c63088SSteen Hegelund
114f8c63088SSteen Hegelund        required:
115f8c63088SSteen Hegelund          - reg
116f8c63088SSteen Hegelund          - phys
117f8c63088SSteen Hegelund          - phy-mode
118f8c63088SSteen Hegelund          - microchip,bandwidth
119f8c63088SSteen Hegelund
120f8c63088SSteen Hegelund        oneOf:
121f8c63088SSteen Hegelund          - required:
122f8c63088SSteen Hegelund              - phy-handle
123f8c63088SSteen Hegelund          - required:
124f8c63088SSteen Hegelund              - sfp
125f8c63088SSteen Hegelund              - managed
126f8c63088SSteen Hegelund
127f8c63088SSteen Hegelundrequired:
128f8c63088SSteen Hegelund  - compatible
129f8c63088SSteen Hegelund  - reg
130f8c63088SSteen Hegelund  - reg-names
131f8c63088SSteen Hegelund  - interrupts
132f8c63088SSteen Hegelund  - interrupt-names
133f8c63088SSteen Hegelund  - ethernet-ports
134f8c63088SSteen Hegelund
135f8c63088SSteen HegelundadditionalProperties: false
136f8c63088SSteen Hegelund
137f8c63088SSteen Hegelundexamples:
138f8c63088SSteen Hegelund  - |
139f8c63088SSteen Hegelund    #include <dt-bindings/interrupt-controller/arm-gic.h>
140f8c63088SSteen Hegelund    switch: switch@600000000 {
141f8c63088SSteen Hegelund      compatible = "microchip,sparx5-switch";
142f8c63088SSteen Hegelund      reg =  <0 0x401000>,
143f8c63088SSteen Hegelund             <0x10004000 0x7fc000>,
144f8c63088SSteen Hegelund             <0x11010000 0xaf0000>;
145f8c63088SSteen Hegelund      reg-names = "cpu", "devices", "gcb";
146f8c63088SSteen Hegelund      interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
147f8c63088SSteen Hegelund      interrupt-names = "xtr";
148f8c63088SSteen Hegelund      resets = <&reset 0>;
149f8c63088SSteen Hegelund      reset-names = "switch";
150f8c63088SSteen Hegelund      ethernet-ports {
151f8c63088SSteen Hegelund        #address-cells = <1>;
152f8c63088SSteen Hegelund        #size-cells = <0>;
153f8c63088SSteen Hegelund
154f8c63088SSteen Hegelund        port0: port@0 {
155f8c63088SSteen Hegelund          reg = <0>;
156f8c63088SSteen Hegelund          microchip,bandwidth = <1000>;
157f8c63088SSteen Hegelund          phys = <&serdes 13>;
158f8c63088SSteen Hegelund          phy-handle = <&phy0>;
159f8c63088SSteen Hegelund          phy-mode = "qsgmii";
160f8c63088SSteen Hegelund        };
161f8c63088SSteen Hegelund        /* ... */
162f8c63088SSteen Hegelund        /* Then the 25G interfaces */
163f8c63088SSteen Hegelund        port60: port@60 {
164f8c63088SSteen Hegelund          reg = <60>;
165f8c63088SSteen Hegelund          microchip,bandwidth = <25000>;
166f8c63088SSteen Hegelund          phys = <&serdes 29>;
167f8c63088SSteen Hegelund          phy-mode = "10gbase-r";
168f8c63088SSteen Hegelund          sfp = <&sfp_eth60>;
169f8c63088SSteen Hegelund          managed = "in-band-status";
170f8c63088SSteen Hegelund          microchip,sd-sgpio = <365>;
171f8c63088SSteen Hegelund        };
172f8c63088SSteen Hegelund        port61: port@61 {
173f8c63088SSteen Hegelund          reg = <61>;
174f8c63088SSteen Hegelund          microchip,bandwidth = <25000>;
175f8c63088SSteen Hegelund          phys = <&serdes 30>;
176f8c63088SSteen Hegelund          phy-mode = "10gbase-r";
177f8c63088SSteen Hegelund          sfp = <&sfp_eth61>;
178f8c63088SSteen Hegelund          managed = "in-band-status";
179f8c63088SSteen Hegelund          microchip,sd-sgpio = <369>;
180f8c63088SSteen Hegelund        };
181f8c63088SSteen Hegelund        port62: port@62 {
182f8c63088SSteen Hegelund          reg = <62>;
183f8c63088SSteen Hegelund          microchip,bandwidth = <25000>;
184f8c63088SSteen Hegelund          phys = <&serdes 31>;
185f8c63088SSteen Hegelund          phy-mode = "10gbase-r";
186f8c63088SSteen Hegelund          sfp = <&sfp_eth62>;
187f8c63088SSteen Hegelund          managed = "in-band-status";
188f8c63088SSteen Hegelund          microchip,sd-sgpio = <373>;
189f8c63088SSteen Hegelund        };
190f8c63088SSteen Hegelund        port63: port@63 {
191f8c63088SSteen Hegelund          reg = <63>;
192f8c63088SSteen Hegelund          microchip,bandwidth = <25000>;
193f8c63088SSteen Hegelund          phys = <&serdes 32>;
194f8c63088SSteen Hegelund          phy-mode = "10gbase-r";
195f8c63088SSteen Hegelund          sfp = <&sfp_eth63>;
196f8c63088SSteen Hegelund          managed = "in-band-status";
197f8c63088SSteen Hegelund          microchip,sd-sgpio = <377>;
198f8c63088SSteen Hegelund        };
199f8c63088SSteen Hegelund        /* Finally the Management interface */
200f8c63088SSteen Hegelund        port64: port@64 {
201f8c63088SSteen Hegelund          reg = <64>;
202f8c63088SSteen Hegelund          microchip,bandwidth = <1000>;
203f8c63088SSteen Hegelund          phys = <&serdes 0>;
204f8c63088SSteen Hegelund          phy-handle = <&phy64>;
205f8c63088SSteen Hegelund          phy-mode = "sgmii";
206f8c63088SSteen Hegelund          mac-address = [ 00 00 00 01 02 03 ];
207f8c63088SSteen Hegelund        };
208f8c63088SSteen Hegelund      };
209f8c63088SSteen Hegelund    };
210f8c63088SSteen Hegelund
211f8c63088SSteen Hegelund...
212f8c63088SSteen Hegelund#  vim: set ts=2 sw=2 sts=2 tw=80 et cc=80 ft=yaml :
213