17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR MIT) 27ef62cebSEmmanuel Vadot%YAML 1.2 37ef62cebSEmmanuel Vadot--- 47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/mscc,ocelot.yaml# 57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 67ef62cebSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Microchip Ocelot Switch Family 87ef62cebSEmmanuel Vadot 97ef62cebSEmmanuel Vadotmaintainers: 107ef62cebSEmmanuel Vadot - Vladimir Oltean <vladimir.oltean@nxp.com> 117ef62cebSEmmanuel Vadot - Claudiu Manoil <claudiu.manoil@nxp.com> 127ef62cebSEmmanuel Vadot - Alexandre Belloni <alexandre.belloni@bootlin.com> 137ef62cebSEmmanuel Vadot - UNGLinuxDriver@microchip.com 147ef62cebSEmmanuel Vadot 157ef62cebSEmmanuel Vadotdescription: | 167ef62cebSEmmanuel Vadot There are multiple switches which are either part of the Ocelot-1 family, or 177ef62cebSEmmanuel Vadot derivatives of this architecture. These switches can be found embedded in 187ef62cebSEmmanuel Vadot various SoCs and accessed using MMIO, or as discrete chips and accessed over 197ef62cebSEmmanuel Vadot SPI or PCIe. The present DSA binding shall be used when the host controlling 207ef62cebSEmmanuel Vadot them performs packet I/O primarily through an Ethernet port of the switch 217ef62cebSEmmanuel Vadot (which is attached to an Ethernet port of the host), rather than through 227ef62cebSEmmanuel Vadot Frame DMA or register-based I/O. 237ef62cebSEmmanuel Vadot 247ef62cebSEmmanuel Vadot VSC9953 (Seville): 257ef62cebSEmmanuel Vadot 267ef62cebSEmmanuel Vadot This is found in the NXP T1040, where it is a memory-mapped platform 277ef62cebSEmmanuel Vadot device. 287ef62cebSEmmanuel Vadot 297ef62cebSEmmanuel Vadot The following PHY interface types are supported: 307ef62cebSEmmanuel Vadot 317ef62cebSEmmanuel Vadot - phy-mode = "internal": on ports 8 and 9 327ef62cebSEmmanuel Vadot - phy-mode = "sgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7 337ef62cebSEmmanuel Vadot - phy-mode = "qsgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7 347ef62cebSEmmanuel Vadot - phy-mode = "1000base-x": on ports 0, 1, 2, 3, 4, 5, 6, 7 357ef62cebSEmmanuel Vadot 367ef62cebSEmmanuel Vadot VSC9959 (Felix): 377ef62cebSEmmanuel Vadot 387ef62cebSEmmanuel Vadot This is found in the NXP LS1028A. It is a PCI device, part of the larger 397ef62cebSEmmanuel Vadot enetc root complex. As a result, the ethernet-switch node is a sub-node of 407ef62cebSEmmanuel Vadot the PCIe root complex node and its "reg" property conforms to the parent 417ef62cebSEmmanuel Vadot node bindings, describing it as PF 5 of device 0, bus 0. 427ef62cebSEmmanuel Vadot 437ef62cebSEmmanuel Vadot If any external switch port is enabled, the enetc PF2 (enetc_port2) should 447ef62cebSEmmanuel Vadot be enabled as well. This is because the internal MDIO bus (exposed through 457ef62cebSEmmanuel Vadot EA BAR 0) used to access the MAC PCS registers truly belongs to the enetc 467ef62cebSEmmanuel Vadot port 2 and not to Felix. 477ef62cebSEmmanuel Vadot 487ef62cebSEmmanuel Vadot The following PHY interface types are supported: 497ef62cebSEmmanuel Vadot 507ef62cebSEmmanuel Vadot - phy-mode = "internal": on ports 4 and 5 517ef62cebSEmmanuel Vadot - phy-mode = "sgmii": on ports 0, 1, 2, 3 527ef62cebSEmmanuel Vadot - phy-mode = "qsgmii": on ports 0, 1, 2, 3 537ef62cebSEmmanuel Vadot - phy-mode = "usxgmii": on ports 0, 1, 2, 3 547ef62cebSEmmanuel Vadot - phy-mode = "1000base-x": on ports 0, 1, 2, 3 557ef62cebSEmmanuel Vadot - phy-mode = "2500base-x": on ports 0, 1, 2, 3 567ef62cebSEmmanuel Vadot 577ef62cebSEmmanuel Vadotproperties: 587ef62cebSEmmanuel Vadot compatible: 597ef62cebSEmmanuel Vadot enum: 607ef62cebSEmmanuel Vadot - mscc,vsc9953-switch 617ef62cebSEmmanuel Vadot - pci1957,eef0 627ef62cebSEmmanuel Vadot 637ef62cebSEmmanuel Vadot reg: 647ef62cebSEmmanuel Vadot maxItems: 1 657ef62cebSEmmanuel Vadot 667ef62cebSEmmanuel Vadot interrupts: 677ef62cebSEmmanuel Vadot maxItems: 1 687ef62cebSEmmanuel Vadot 697ef62cebSEmmanuel Vadot description: 707ef62cebSEmmanuel Vadot Used to signal availability of PTP TX timestamps, and state changes of 717ef62cebSEmmanuel Vadot the MAC merge layer of ports that support Frame Preemption. 727ef62cebSEmmanuel Vadot 737ef62cebSEmmanuel Vadot little-endian: true 747ef62cebSEmmanuel Vadot big-endian: true 757ef62cebSEmmanuel Vadot 767ef62cebSEmmanuel Vadotrequired: 777ef62cebSEmmanuel Vadot - compatible 787ef62cebSEmmanuel Vadot - reg 797ef62cebSEmmanuel Vadot 807ef62cebSEmmanuel VadotallOf: 81*cb7aa33aSEmmanuel Vadot - $ref: dsa.yaml#/$defs/ethernet-ports 827ef62cebSEmmanuel Vadot - if: 837ef62cebSEmmanuel Vadot properties: 847ef62cebSEmmanuel Vadot compatible: 857ef62cebSEmmanuel Vadot const: pci1957,eef0 867ef62cebSEmmanuel Vadot then: 877ef62cebSEmmanuel Vadot required: 887ef62cebSEmmanuel Vadot - interrupts 897ef62cebSEmmanuel Vadot 907ef62cebSEmmanuel VadotunevaluatedProperties: false 917ef62cebSEmmanuel Vadot 927ef62cebSEmmanuel Vadotexamples: 937ef62cebSEmmanuel Vadot # Felix VSC9959 (NXP LS1028A) 947ef62cebSEmmanuel Vadot - | 957ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 967ef62cebSEmmanuel Vadot 977ef62cebSEmmanuel Vadot pcie { /* Integrated Endpoint Root Complex */ 987ef62cebSEmmanuel Vadot #address-cells = <3>; 997ef62cebSEmmanuel Vadot #size-cells = <2>; 1007ef62cebSEmmanuel Vadot 1017ef62cebSEmmanuel Vadot ethernet-switch@0,5 { 1027ef62cebSEmmanuel Vadot compatible = "pci1957,eef0"; 1037ef62cebSEmmanuel Vadot reg = <0x000500 0 0 0 0>; 1047ef62cebSEmmanuel Vadot interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; 1057ef62cebSEmmanuel Vadot 1067ef62cebSEmmanuel Vadot ethernet-ports { 1077ef62cebSEmmanuel Vadot #address-cells = <1>; 1087ef62cebSEmmanuel Vadot #size-cells = <0>; 1097ef62cebSEmmanuel Vadot 1107ef62cebSEmmanuel Vadot port@0 { 1117ef62cebSEmmanuel Vadot reg = <0>; 1127ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1137ef62cebSEmmanuel Vadot phy-handle = <&phy0>; 1147ef62cebSEmmanuel Vadot managed = "in-band-status"; 1157ef62cebSEmmanuel Vadot }; 1167ef62cebSEmmanuel Vadot 1177ef62cebSEmmanuel Vadot port@1 { 1187ef62cebSEmmanuel Vadot reg = <1>; 1197ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1207ef62cebSEmmanuel Vadot phy-handle = <&phy1>; 1217ef62cebSEmmanuel Vadot managed = "in-band-status"; 1227ef62cebSEmmanuel Vadot }; 1237ef62cebSEmmanuel Vadot 1247ef62cebSEmmanuel Vadot port@2 { 1257ef62cebSEmmanuel Vadot reg = <2>; 1267ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1277ef62cebSEmmanuel Vadot phy-handle = <&phy2>; 1287ef62cebSEmmanuel Vadot managed = "in-band-status"; 1297ef62cebSEmmanuel Vadot }; 1307ef62cebSEmmanuel Vadot 1317ef62cebSEmmanuel Vadot port@3 { 1327ef62cebSEmmanuel Vadot reg = <3>; 1337ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1347ef62cebSEmmanuel Vadot phy-handle = <&phy3>; 1357ef62cebSEmmanuel Vadot managed = "in-band-status"; 1367ef62cebSEmmanuel Vadot }; 1377ef62cebSEmmanuel Vadot 1387ef62cebSEmmanuel Vadot port@4 { 1397ef62cebSEmmanuel Vadot reg = <4>; 1407ef62cebSEmmanuel Vadot ethernet = <&enetc_port2>; 1417ef62cebSEmmanuel Vadot phy-mode = "internal"; 1427ef62cebSEmmanuel Vadot 1437ef62cebSEmmanuel Vadot fixed-link { 1447ef62cebSEmmanuel Vadot speed = <2500>; 1457ef62cebSEmmanuel Vadot full-duplex; 1467ef62cebSEmmanuel Vadot pause; 1477ef62cebSEmmanuel Vadot }; 1487ef62cebSEmmanuel Vadot }; 1497ef62cebSEmmanuel Vadot 1507ef62cebSEmmanuel Vadot port@5 { 1517ef62cebSEmmanuel Vadot reg = <5>; 1527ef62cebSEmmanuel Vadot ethernet = <&enetc_port3>; 1537ef62cebSEmmanuel Vadot phy-mode = "internal"; 1547ef62cebSEmmanuel Vadot 1557ef62cebSEmmanuel Vadot fixed-link { 1567ef62cebSEmmanuel Vadot speed = <1000>; 1577ef62cebSEmmanuel Vadot full-duplex; 1587ef62cebSEmmanuel Vadot pause; 1597ef62cebSEmmanuel Vadot }; 1607ef62cebSEmmanuel Vadot }; 1617ef62cebSEmmanuel Vadot }; 1627ef62cebSEmmanuel Vadot }; 1637ef62cebSEmmanuel Vadot }; 1647ef62cebSEmmanuel Vadot # Seville VSC9953 (NXP T1040) 1657ef62cebSEmmanuel Vadot - | 1667ef62cebSEmmanuel Vadot soc { 1677ef62cebSEmmanuel Vadot #address-cells = <1>; 1687ef62cebSEmmanuel Vadot #size-cells = <1>; 1697ef62cebSEmmanuel Vadot 1707ef62cebSEmmanuel Vadot ethernet-switch@800000 { 1717ef62cebSEmmanuel Vadot compatible = "mscc,vsc9953-switch"; 1727ef62cebSEmmanuel Vadot reg = <0x800000 0x290000>; 1737ef62cebSEmmanuel Vadot little-endian; 1747ef62cebSEmmanuel Vadot 1757ef62cebSEmmanuel Vadot ethernet-ports { 1767ef62cebSEmmanuel Vadot #address-cells = <1>; 1777ef62cebSEmmanuel Vadot #size-cells = <0>; 1787ef62cebSEmmanuel Vadot 1797ef62cebSEmmanuel Vadot port@0 { 1807ef62cebSEmmanuel Vadot reg = <0>; 1817ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1827ef62cebSEmmanuel Vadot phy-handle = <&phy0>; 1837ef62cebSEmmanuel Vadot managed = "in-band-status"; 1847ef62cebSEmmanuel Vadot }; 1857ef62cebSEmmanuel Vadot 1867ef62cebSEmmanuel Vadot port@1 { 1877ef62cebSEmmanuel Vadot reg = <1>; 1887ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1897ef62cebSEmmanuel Vadot phy-handle = <&phy1>; 1907ef62cebSEmmanuel Vadot managed = "in-band-status"; 1917ef62cebSEmmanuel Vadot }; 1927ef62cebSEmmanuel Vadot 1937ef62cebSEmmanuel Vadot port@2 { 1947ef62cebSEmmanuel Vadot reg = <2>; 1957ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 1967ef62cebSEmmanuel Vadot phy-handle = <&phy2>; 1977ef62cebSEmmanuel Vadot managed = "in-band-status"; 1987ef62cebSEmmanuel Vadot }; 1997ef62cebSEmmanuel Vadot 2007ef62cebSEmmanuel Vadot port@3 { 2017ef62cebSEmmanuel Vadot reg = <3>; 2027ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 2037ef62cebSEmmanuel Vadot phy-handle = <&phy3>; 2047ef62cebSEmmanuel Vadot managed = "in-band-status"; 2057ef62cebSEmmanuel Vadot }; 2067ef62cebSEmmanuel Vadot 2077ef62cebSEmmanuel Vadot port@4 { 2087ef62cebSEmmanuel Vadot reg = <4>; 2097ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 2107ef62cebSEmmanuel Vadot phy-handle = <&phy4>; 2117ef62cebSEmmanuel Vadot managed = "in-band-status"; 2127ef62cebSEmmanuel Vadot }; 2137ef62cebSEmmanuel Vadot 2147ef62cebSEmmanuel Vadot port@5 { 2157ef62cebSEmmanuel Vadot reg = <5>; 2167ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 2177ef62cebSEmmanuel Vadot phy-handle = <&phy5>; 2187ef62cebSEmmanuel Vadot managed = "in-band-status"; 2197ef62cebSEmmanuel Vadot }; 2207ef62cebSEmmanuel Vadot 2217ef62cebSEmmanuel Vadot port@6 { 2227ef62cebSEmmanuel Vadot reg = <6>; 2237ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 2247ef62cebSEmmanuel Vadot phy-handle = <&phy6>; 2257ef62cebSEmmanuel Vadot managed = "in-band-status"; 2267ef62cebSEmmanuel Vadot }; 2277ef62cebSEmmanuel Vadot 2287ef62cebSEmmanuel Vadot port@7 { 2297ef62cebSEmmanuel Vadot reg = <7>; 2307ef62cebSEmmanuel Vadot phy-mode = "qsgmii"; 2317ef62cebSEmmanuel Vadot phy-handle = <&phy7>; 2327ef62cebSEmmanuel Vadot managed = "in-band-status"; 2337ef62cebSEmmanuel Vadot }; 2347ef62cebSEmmanuel Vadot 2357ef62cebSEmmanuel Vadot port@8 { 2367ef62cebSEmmanuel Vadot reg = <8>; 2377ef62cebSEmmanuel Vadot phy-mode = "internal"; 2387ef62cebSEmmanuel Vadot ethernet = <&enet0>; 2397ef62cebSEmmanuel Vadot 2407ef62cebSEmmanuel Vadot fixed-link { 2417ef62cebSEmmanuel Vadot speed = <2500>; 2427ef62cebSEmmanuel Vadot full-duplex; 2437ef62cebSEmmanuel Vadot pause; 2447ef62cebSEmmanuel Vadot }; 2457ef62cebSEmmanuel Vadot }; 2467ef62cebSEmmanuel Vadot 2477ef62cebSEmmanuel Vadot port@9 { 2487ef62cebSEmmanuel Vadot reg = <9>; 2497ef62cebSEmmanuel Vadot phy-mode = "internal"; 2507ef62cebSEmmanuel Vadot ethernet = <&enet1>; 2517ef62cebSEmmanuel Vadot 2527ef62cebSEmmanuel Vadot fixed-link { 2537ef62cebSEmmanuel Vadot speed = <2500>; 2547ef62cebSEmmanuel Vadot full-duplex; 2557ef62cebSEmmanuel Vadot pause; 2567ef62cebSEmmanuel Vadot }; 2577ef62cebSEmmanuel Vadot }; 2587ef62cebSEmmanuel Vadot }; 2597ef62cebSEmmanuel Vadot }; 2607ef62cebSEmmanuel Vadot }; 261