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