1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR MIT) 2*7ef62cebSEmmanuel Vadot%YAML 1.2 3*7ef62cebSEmmanuel Vadot--- 4*7ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/mscc,ocelot.yaml# 5*7ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*7ef62cebSEmmanuel Vadot 7*7ef62cebSEmmanuel Vadottitle: Microchip Ocelot Switch Family Device Tree Bindings 8*7ef62cebSEmmanuel Vadot 9*7ef62cebSEmmanuel Vadotmaintainers: 10*7ef62cebSEmmanuel Vadot - Vladimir Oltean <vladimir.oltean@nxp.com> 11*7ef62cebSEmmanuel Vadot - Claudiu Manoil <claudiu.manoil@nxp.com> 12*7ef62cebSEmmanuel Vadot - Alexandre Belloni <alexandre.belloni@bootlin.com> 13*7ef62cebSEmmanuel Vadot - UNGLinuxDriver@microchip.com 14*7ef62cebSEmmanuel Vadot 15*7ef62cebSEmmanuel Vadotdescription: | 16*7ef62cebSEmmanuel Vadot There are multiple switches which are either part of the Ocelot-1 family, or 17*7ef62cebSEmmanuel Vadot derivatives of this architecture. These switches can be found embedded in 18*7ef62cebSEmmanuel Vadot various SoCs and accessed using MMIO, or as discrete chips and accessed over 19*7ef62cebSEmmanuel Vadot SPI or PCIe. The present DSA binding shall be used when the host controlling 20*7ef62cebSEmmanuel Vadot them performs packet I/O primarily through an Ethernet port of the switch 21*7ef62cebSEmmanuel Vadot (which is attached to an Ethernet port of the host), rather than through 22*7ef62cebSEmmanuel Vadot Frame DMA or register-based I/O. 23*7ef62cebSEmmanuel Vadot 24*7ef62cebSEmmanuel Vadot VSC9953 (Seville): 25*7ef62cebSEmmanuel Vadot 26*7ef62cebSEmmanuel Vadot This is found in the NXP T1040, where it is a memory-mapped platform 27*7ef62cebSEmmanuel Vadot device. 28*7ef62cebSEmmanuel Vadot 29*7ef62cebSEmmanuel Vadot The following PHY interface types are supported: 30*7ef62cebSEmmanuel Vadot 31*7ef62cebSEmmanuel Vadot - phy-mode = "internal": on ports 8 and 9 32*7ef62cebSEmmanuel Vadot - phy-mode = "sgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7 33*7ef62cebSEmmanuel Vadot - phy-mode = "qsgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7 34*7ef62cebSEmmanuel Vadot - phy-mode = "1000base-x": on ports 0, 1, 2, 3, 4, 5, 6, 7 35*7ef62cebSEmmanuel Vadot 36*7ef62cebSEmmanuel Vadot VSC9959 (Felix): 37*7ef62cebSEmmanuel Vadot 38*7ef62cebSEmmanuel Vadot This is found in the NXP LS1028A. It is a PCI device, part of the larger 39*7ef62cebSEmmanuel Vadot enetc root complex. As a result, the ethernet-switch node is a sub-node of 40*7ef62cebSEmmanuel Vadot the PCIe root complex node and its "reg" property conforms to the parent 41*7ef62cebSEmmanuel Vadot node bindings, describing it as PF 5 of device 0, bus 0. 42*7ef62cebSEmmanuel Vadot 43*7ef62cebSEmmanuel Vadot If any external switch port is enabled, the enetc PF2 (enetc_port2) should 44*7ef62cebSEmmanuel Vadot be enabled as well. This is because the internal MDIO bus (exposed through 45*7ef62cebSEmmanuel Vadot EA BAR 0) used to access the MAC PCS registers truly belongs to the enetc 46*7ef62cebSEmmanuel Vadot port 2 and not to Felix. 47*7ef62cebSEmmanuel Vadot 48*7ef62cebSEmmanuel Vadot The following PHY interface types are supported: 49*7ef62cebSEmmanuel Vadot 50*7ef62cebSEmmanuel Vadot - phy-mode = "internal": on ports 4 and 5 51*7ef62cebSEmmanuel Vadot - phy-mode = "sgmii": on ports 0, 1, 2, 3 52*7ef62cebSEmmanuel Vadot - phy-mode = "qsgmii": on ports 0, 1, 2, 3 53*7ef62cebSEmmanuel Vadot - phy-mode = "usxgmii": on ports 0, 1, 2, 3 54*7ef62cebSEmmanuel Vadot - phy-mode = "1000base-x": on ports 0, 1, 2, 3 55*7ef62cebSEmmanuel Vadot - phy-mode = "2500base-x": on ports 0, 1, 2, 3 56*7ef62cebSEmmanuel Vadot 57*7ef62cebSEmmanuel Vadotproperties: 58*7ef62cebSEmmanuel Vadot compatible: 59*7ef62cebSEmmanuel Vadot enum: 60*7ef62cebSEmmanuel Vadot - mscc,vsc9953-switch 61*7ef62cebSEmmanuel Vadot - pci1957,eef0 62*7ef62cebSEmmanuel Vadot 63*7ef62cebSEmmanuel Vadot reg: 64*7ef62cebSEmmanuel Vadot maxItems: 1 65*7ef62cebSEmmanuel Vadot 66*7ef62cebSEmmanuel Vadot interrupts: 67*7ef62cebSEmmanuel Vadot maxItems: 1 68*7ef62cebSEmmanuel Vadot 69*7ef62cebSEmmanuel Vadot description: 70*7ef62cebSEmmanuel Vadot Used to signal availability of PTP TX timestamps, and state changes of 71*7ef62cebSEmmanuel Vadot the MAC merge layer of ports that support Frame Preemption. 72*7ef62cebSEmmanuel Vadot 73*7ef62cebSEmmanuel Vadot little-endian: true 74*7ef62cebSEmmanuel Vadot big-endian: true 75*7ef62cebSEmmanuel Vadot 76*7ef62cebSEmmanuel Vadotrequired: 77*7ef62cebSEmmanuel Vadot - compatible 78*7ef62cebSEmmanuel Vadot - reg 79*7ef62cebSEmmanuel Vadot 80*7ef62cebSEmmanuel VadotallOf: 81*7ef62cebSEmmanuel Vadot - $ref: dsa.yaml# 82*7ef62cebSEmmanuel Vadot - if: 83*7ef62cebSEmmanuel Vadot properties: 84*7ef62cebSEmmanuel Vadot compatible: 85*7ef62cebSEmmanuel Vadot const: pci1957,eef0 86*7ef62cebSEmmanuel Vadot then: 87*7ef62cebSEmmanuel Vadot required: 88*7ef62cebSEmmanuel Vadot - interrupts 89*7ef62cebSEmmanuel Vadot 90*7ef62cebSEmmanuel VadotunevaluatedProperties: false 91*7ef62cebSEmmanuel Vadot 92*7ef62cebSEmmanuel Vadotexamples: 93*7ef62cebSEmmanuel Vadot # Felix VSC9959 (NXP LS1028A) 94*7ef62cebSEmmanuel Vadot - | 95*7ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 96*7ef62cebSEmmanuel Vadot 97*7ef62cebSEmmanuel Vadot pcie { /* Integrated Endpoint Root Complex */ 98*7ef62cebSEmmanuel Vadot #address-cells = <3>; 99*7ef62cebSEmmanuel Vadot #size-cells = <2>; 100*7ef62cebSEmmanuel Vadot 101*7ef62cebSEmmanuel Vadot ethernet-switch@0,5 { 102*7ef62cebSEmmanuel Vadot compatible = "pci1957,eef0"; 103*7ef62cebSEmmanuel Vadot reg = <0x000500 0 0 0 0>; 104*7ef62cebSEmmanuel Vadot interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; 105*7ef62cebSEmmanuel Vadot 106*7ef62cebSEmmanuel Vadot ethernet-ports { 107*7ef62cebSEmmanuel Vadot #address-cells = <1>; 108*7ef62cebSEmmanuel Vadot #size-cells = <0>; 109*7ef62cebSEmmanuel Vadot 110*7ef62cebSEmmanuel Vadot port@0 { 111*7ef62cebSEmmanuel Vadot reg = <0>; 112*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 113*7ef62cebSEmmanuel Vadot phy-handle = <&phy0>; 114*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 115*7ef62cebSEmmanuel Vadot }; 116*7ef62cebSEmmanuel Vadot 117*7ef62cebSEmmanuel Vadot port@1 { 118*7ef62cebSEmmanuel Vadot reg = <1>; 119*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 120*7ef62cebSEmmanuel Vadot phy-handle = <&phy1>; 121*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 122*7ef62cebSEmmanuel Vadot }; 123*7ef62cebSEmmanuel Vadot 124*7ef62cebSEmmanuel Vadot port@2 { 125*7ef62cebSEmmanuel Vadot reg = <2>; 126*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 127*7ef62cebSEmmanuel Vadot phy-handle = <&phy2>; 128*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 129*7ef62cebSEmmanuel Vadot }; 130*7ef62cebSEmmanuel Vadot 131*7ef62cebSEmmanuel Vadot port@3 { 132*7ef62cebSEmmanuel Vadot reg = <3>; 133*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 134*7ef62cebSEmmanuel Vadot phy-handle = <&phy3>; 135*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 136*7ef62cebSEmmanuel Vadot }; 137*7ef62cebSEmmanuel Vadot 138*7ef62cebSEmmanuel Vadot port@4 { 139*7ef62cebSEmmanuel Vadot reg = <4>; 140*7ef62cebSEmmanuel Vadot ethernet = <&enetc_port2>; 141*7ef62cebSEmmanuel Vadot phy-mode = "internal"; 142*7ef62cebSEmmanuel Vadot 143*7ef62cebSEmmanuel Vadot fixed-link { 144*7ef62cebSEmmanuel Vadot speed = <2500>; 145*7ef62cebSEmmanuel Vadot full-duplex; 146*7ef62cebSEmmanuel Vadot pause; 147*7ef62cebSEmmanuel Vadot }; 148*7ef62cebSEmmanuel Vadot }; 149*7ef62cebSEmmanuel Vadot 150*7ef62cebSEmmanuel Vadot port@5 { 151*7ef62cebSEmmanuel Vadot reg = <5>; 152*7ef62cebSEmmanuel Vadot ethernet = <&enetc_port3>; 153*7ef62cebSEmmanuel Vadot phy-mode = "internal"; 154*7ef62cebSEmmanuel Vadot 155*7ef62cebSEmmanuel Vadot fixed-link { 156*7ef62cebSEmmanuel Vadot speed = <1000>; 157*7ef62cebSEmmanuel Vadot full-duplex; 158*7ef62cebSEmmanuel Vadot pause; 159*7ef62cebSEmmanuel Vadot }; 160*7ef62cebSEmmanuel Vadot }; 161*7ef62cebSEmmanuel Vadot }; 162*7ef62cebSEmmanuel Vadot }; 163*7ef62cebSEmmanuel Vadot }; 164*7ef62cebSEmmanuel Vadot # Seville VSC9953 (NXP T1040) 165*7ef62cebSEmmanuel Vadot - | 166*7ef62cebSEmmanuel Vadot soc { 167*7ef62cebSEmmanuel Vadot #address-cells = <1>; 168*7ef62cebSEmmanuel Vadot #size-cells = <1>; 169*7ef62cebSEmmanuel Vadot 170*7ef62cebSEmmanuel Vadot ethernet-switch@800000 { 171*7ef62cebSEmmanuel Vadot compatible = "mscc,vsc9953-switch"; 172*7ef62cebSEmmanuel Vadot reg = <0x800000 0x290000>; 173*7ef62cebSEmmanuel Vadot little-endian; 174*7ef62cebSEmmanuel Vadot 175*7ef62cebSEmmanuel Vadot ethernet-ports { 176*7ef62cebSEmmanuel Vadot #address-cells = <1>; 177*7ef62cebSEmmanuel Vadot #size-cells = <0>; 178*7ef62cebSEmmanuel Vadot 179*7ef62cebSEmmanuel Vadot port@0 { 180*7ef62cebSEmmanuel Vadot reg = <0>; 181*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 182*7ef62cebSEmmanuel Vadot phy-handle = <&phy0>; 183*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 184*7ef62cebSEmmanuel Vadot }; 185*7ef62cebSEmmanuel Vadot 186*7ef62cebSEmmanuel Vadot port@1 { 187*7ef62cebSEmmanuel Vadot reg = <1>; 188*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 189*7ef62cebSEmmanuel Vadot phy-handle = <&phy1>; 190*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 191*7ef62cebSEmmanuel Vadot }; 192*7ef62cebSEmmanuel Vadot 193*7ef62cebSEmmanuel Vadot port@2 { 194*7ef62cebSEmmanuel Vadot reg = <2>; 195*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 196*7ef62cebSEmmanuel Vadot phy-handle = <&phy2>; 197*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 198*7ef62cebSEmmanuel Vadot }; 199*7ef62cebSEmmanuel Vadot 200*7ef62cebSEmmanuel Vadot port@3 { 201*7ef62cebSEmmanuel Vadot reg = <3>; 202*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 203*7ef62cebSEmmanuel Vadot phy-handle = <&phy3>; 204*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 205*7ef62cebSEmmanuel Vadot }; 206*7ef62cebSEmmanuel Vadot 207*7ef62cebSEmmanuel Vadot port@4 { 208*7ef62cebSEmmanuel Vadot reg = <4>; 209*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 210*7ef62cebSEmmanuel Vadot phy-handle = <&phy4>; 211*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 212*7ef62cebSEmmanuel Vadot }; 213*7ef62cebSEmmanuel Vadot 214*7ef62cebSEmmanuel Vadot port@5 { 215*7ef62cebSEmmanuel Vadot reg = <5>; 216*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 217*7ef62cebSEmmanuel Vadot phy-handle = <&phy5>; 218*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 219*7ef62cebSEmmanuel Vadot }; 220*7ef62cebSEmmanuel Vadot 221*7ef62cebSEmmanuel Vadot port@6 { 222*7ef62cebSEmmanuel Vadot reg = <6>; 223*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 224*7ef62cebSEmmanuel Vadot phy-handle = <&phy6>; 225*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 226*7ef62cebSEmmanuel Vadot }; 227*7ef62cebSEmmanuel Vadot 228*7ef62cebSEmmanuel Vadot port@7 { 229*7ef62cebSEmmanuel Vadot reg = <7>; 230*7ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 231*7ef62cebSEmmanuel Vadot phy-handle = <&phy7>; 232*7ef62cebSEmmanuel Vadot managed = "in-band-status"; 233*7ef62cebSEmmanuel Vadot }; 234*7ef62cebSEmmanuel Vadot 235*7ef62cebSEmmanuel Vadot port@8 { 236*7ef62cebSEmmanuel Vadot reg = <8>; 237*7ef62cebSEmmanuel Vadot phy-mode = "internal"; 238*7ef62cebSEmmanuel Vadot ethernet = <&enet0>; 239*7ef62cebSEmmanuel Vadot 240*7ef62cebSEmmanuel Vadot fixed-link { 241*7ef62cebSEmmanuel Vadot speed = <2500>; 242*7ef62cebSEmmanuel Vadot full-duplex; 243*7ef62cebSEmmanuel Vadot pause; 244*7ef62cebSEmmanuel Vadot }; 245*7ef62cebSEmmanuel Vadot }; 246*7ef62cebSEmmanuel Vadot 247*7ef62cebSEmmanuel Vadot port@9 { 248*7ef62cebSEmmanuel Vadot reg = <9>; 249*7ef62cebSEmmanuel Vadot phy-mode = "internal"; 250*7ef62cebSEmmanuel Vadot ethernet = <&enet1>; 251*7ef62cebSEmmanuel Vadot 252*7ef62cebSEmmanuel Vadot fixed-link { 253*7ef62cebSEmmanuel Vadot speed = <2500>; 254*7ef62cebSEmmanuel Vadot full-duplex; 255*7ef62cebSEmmanuel Vadot pause; 256*7ef62cebSEmmanuel Vadot }; 257*7ef62cebSEmmanuel Vadot }; 258*7ef62cebSEmmanuel Vadot }; 259*7ef62cebSEmmanuel Vadot }; 260*7ef62cebSEmmanuel Vadot }; 261