17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 27ef62cebSEmmanuel Vadot%YAML 1.2 37ef62cebSEmmanuel Vadot--- 47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/mscc,ocelot.yaml# 57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 67ef62cebSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Ocelot Externally-Controlled Ethernet Switch 87ef62cebSEmmanuel Vadot 97ef62cebSEmmanuel Vadotmaintainers: 107ef62cebSEmmanuel Vadot - Colin Foster <colin.foster@in-advantage.com> 117ef62cebSEmmanuel Vadot 127ef62cebSEmmanuel Vadotdescription: | 137ef62cebSEmmanuel Vadot The Ocelot ethernet switch family contains chips that have an internal CPU 147ef62cebSEmmanuel Vadot (VSC7513, VSC7514) and chips that don't (VSC7511, VSC7512). All switches have 158bab661aSEmmanuel Vadot the option to be controlled externally via external interfaces like SPI or 168bab661aSEmmanuel Vadot PCIe. 177ef62cebSEmmanuel Vadot 187ef62cebSEmmanuel Vadot The switch family is a multi-port networking switch that supports many 197ef62cebSEmmanuel Vadot interfaces. Additionally, the device can perform pin control, MDIO buses, and 207ef62cebSEmmanuel Vadot external GPIO expanders. 217ef62cebSEmmanuel Vadot 227ef62cebSEmmanuel Vadotproperties: 237ef62cebSEmmanuel Vadot compatible: 247ef62cebSEmmanuel Vadot enum: 257ef62cebSEmmanuel Vadot - mscc,vsc7512 267ef62cebSEmmanuel Vadot 277ef62cebSEmmanuel Vadot reg: 287ef62cebSEmmanuel Vadot maxItems: 1 297ef62cebSEmmanuel Vadot 307ef62cebSEmmanuel Vadot "#address-cells": 317ef62cebSEmmanuel Vadot const: 1 327ef62cebSEmmanuel Vadot 337ef62cebSEmmanuel Vadot "#size-cells": 347ef62cebSEmmanuel Vadot const: 1 357ef62cebSEmmanuel Vadot 367ef62cebSEmmanuel Vadot spi-max-frequency: 377ef62cebSEmmanuel Vadot maxItems: 1 387ef62cebSEmmanuel Vadot 397ef62cebSEmmanuel VadotpatternProperties: 407ef62cebSEmmanuel Vadot "^pinctrl@[0-9a-f]+$": 417ef62cebSEmmanuel Vadot type: object 427ef62cebSEmmanuel Vadot $ref: /schemas/pinctrl/mscc,ocelot-pinctrl.yaml 437ef62cebSEmmanuel Vadot 447ef62cebSEmmanuel Vadot "^gpio@[0-9a-f]+$": 457ef62cebSEmmanuel Vadot type: object 467ef62cebSEmmanuel Vadot $ref: /schemas/pinctrl/microchip,sparx5-sgpio.yaml 477ef62cebSEmmanuel Vadot properties: 487ef62cebSEmmanuel Vadot compatible: 497ef62cebSEmmanuel Vadot enum: 507ef62cebSEmmanuel Vadot - mscc,ocelot-sgpio 517ef62cebSEmmanuel Vadot 527ef62cebSEmmanuel Vadot "^mdio@[0-9a-f]+$": 537ef62cebSEmmanuel Vadot type: object 547ef62cebSEmmanuel Vadot $ref: /schemas/net/mscc,miim.yaml 557ef62cebSEmmanuel Vadot properties: 567ef62cebSEmmanuel Vadot compatible: 577ef62cebSEmmanuel Vadot enum: 587ef62cebSEmmanuel Vadot - mscc,ocelot-miim 597ef62cebSEmmanuel Vadot 60*cb7aa33aSEmmanuel Vadot "^ethernet-switch@[0-9a-f]+$": 61*cb7aa33aSEmmanuel Vadot type: object 62*cb7aa33aSEmmanuel Vadot $ref: /schemas/net/mscc,vsc7514-switch.yaml 63*cb7aa33aSEmmanuel Vadot unevaluatedProperties: false 64*cb7aa33aSEmmanuel Vadot properties: 65*cb7aa33aSEmmanuel Vadot compatible: 66*cb7aa33aSEmmanuel Vadot enum: 67*cb7aa33aSEmmanuel Vadot - mscc,vsc7512-switch 68*cb7aa33aSEmmanuel Vadot 697ef62cebSEmmanuel Vadotrequired: 707ef62cebSEmmanuel Vadot - compatible 717ef62cebSEmmanuel Vadot - reg 727ef62cebSEmmanuel Vadot - '#address-cells' 737ef62cebSEmmanuel Vadot - '#size-cells' 747ef62cebSEmmanuel Vadot 757ef62cebSEmmanuel VadotadditionalProperties: false 767ef62cebSEmmanuel Vadot 777ef62cebSEmmanuel Vadotexamples: 787ef62cebSEmmanuel Vadot - | 797ef62cebSEmmanuel Vadot ocelot_clock: ocelot-clock { 807ef62cebSEmmanuel Vadot compatible = "fixed-clock"; 817ef62cebSEmmanuel Vadot #clock-cells = <0>; 827ef62cebSEmmanuel Vadot clock-frequency = <125000000>; 837ef62cebSEmmanuel Vadot }; 847ef62cebSEmmanuel Vadot 857ef62cebSEmmanuel Vadot spi { 867ef62cebSEmmanuel Vadot #address-cells = <1>; 877ef62cebSEmmanuel Vadot #size-cells = <0>; 887ef62cebSEmmanuel Vadot 897ef62cebSEmmanuel Vadot soc@0 { 907ef62cebSEmmanuel Vadot compatible = "mscc,vsc7512"; 917ef62cebSEmmanuel Vadot spi-max-frequency = <2500000>; 927ef62cebSEmmanuel Vadot reg = <0>; 937ef62cebSEmmanuel Vadot #address-cells = <1>; 947ef62cebSEmmanuel Vadot #size-cells = <1>; 957ef62cebSEmmanuel Vadot 967ef62cebSEmmanuel Vadot mdio@7107009c { 977ef62cebSEmmanuel Vadot compatible = "mscc,ocelot-miim"; 987ef62cebSEmmanuel Vadot #address-cells = <1>; 997ef62cebSEmmanuel Vadot #size-cells = <0>; 1007ef62cebSEmmanuel Vadot reg = <0x7107009c 0x24>; 1017ef62cebSEmmanuel Vadot 1027ef62cebSEmmanuel Vadot sw_phy0: ethernet-phy@0 { 1037ef62cebSEmmanuel Vadot reg = <0x0>; 1047ef62cebSEmmanuel Vadot }; 1057ef62cebSEmmanuel Vadot }; 1067ef62cebSEmmanuel Vadot 1077ef62cebSEmmanuel Vadot mdio@710700c0 { 1087ef62cebSEmmanuel Vadot compatible = "mscc,ocelot-miim"; 1097ef62cebSEmmanuel Vadot pinctrl-names = "default"; 1107ef62cebSEmmanuel Vadot pinctrl-0 = <&miim1_pins>; 1117ef62cebSEmmanuel Vadot #address-cells = <1>; 1127ef62cebSEmmanuel Vadot #size-cells = <0>; 1137ef62cebSEmmanuel Vadot reg = <0x710700c0 0x24>; 1147ef62cebSEmmanuel Vadot 1157ef62cebSEmmanuel Vadot sw_phy4: ethernet-phy@4 { 1167ef62cebSEmmanuel Vadot reg = <0x4>; 1177ef62cebSEmmanuel Vadot }; 1187ef62cebSEmmanuel Vadot }; 1197ef62cebSEmmanuel Vadot 1207ef62cebSEmmanuel Vadot gpio: pinctrl@71070034 { 1217ef62cebSEmmanuel Vadot compatible = "mscc,ocelot-pinctrl"; 1227ef62cebSEmmanuel Vadot gpio-controller; 1237ef62cebSEmmanuel Vadot #gpio-cells = <2>; 1247ef62cebSEmmanuel Vadot gpio-ranges = <&gpio 0 0 22>; 1257ef62cebSEmmanuel Vadot reg = <0x71070034 0x6c>; 1267ef62cebSEmmanuel Vadot 1277ef62cebSEmmanuel Vadot sgpio_pins: sgpio-pins { 1287ef62cebSEmmanuel Vadot pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3"; 1297ef62cebSEmmanuel Vadot function = "sg0"; 1307ef62cebSEmmanuel Vadot }; 1317ef62cebSEmmanuel Vadot 1327ef62cebSEmmanuel Vadot miim1_pins: miim1-pins { 1337ef62cebSEmmanuel Vadot pins = "GPIO_14", "GPIO_15"; 1347ef62cebSEmmanuel Vadot function = "miim"; 1357ef62cebSEmmanuel Vadot }; 1367ef62cebSEmmanuel Vadot }; 1377ef62cebSEmmanuel Vadot 1387ef62cebSEmmanuel Vadot gpio@710700f8 { 1397ef62cebSEmmanuel Vadot compatible = "mscc,ocelot-sgpio"; 1407ef62cebSEmmanuel Vadot #address-cells = <1>; 1417ef62cebSEmmanuel Vadot #size-cells = <0>; 1427ef62cebSEmmanuel Vadot bus-frequency = <12500000>; 1437ef62cebSEmmanuel Vadot clocks = <&ocelot_clock>; 1447ef62cebSEmmanuel Vadot microchip,sgpio-port-ranges = <0 15>; 1457ef62cebSEmmanuel Vadot pinctrl-names = "default"; 1467ef62cebSEmmanuel Vadot pinctrl-0 = <&sgpio_pins>; 1477ef62cebSEmmanuel Vadot reg = <0x710700f8 0x100>; 1487ef62cebSEmmanuel Vadot 1497ef62cebSEmmanuel Vadot sgpio_in0: gpio@0 { 1507ef62cebSEmmanuel Vadot compatible = "microchip,sparx5-sgpio-bank"; 1517ef62cebSEmmanuel Vadot reg = <0>; 1527ef62cebSEmmanuel Vadot gpio-controller; 1537ef62cebSEmmanuel Vadot #gpio-cells = <3>; 1547ef62cebSEmmanuel Vadot ngpios = <64>; 1557ef62cebSEmmanuel Vadot }; 1567ef62cebSEmmanuel Vadot 1577ef62cebSEmmanuel Vadot sgpio_out1: gpio@1 { 1587ef62cebSEmmanuel Vadot compatible = "microchip,sparx5-sgpio-bank"; 1597ef62cebSEmmanuel Vadot reg = <1>; 1607ef62cebSEmmanuel Vadot gpio-controller; 1617ef62cebSEmmanuel Vadot #gpio-cells = <3>; 1627ef62cebSEmmanuel Vadot ngpios = <64>; 1637ef62cebSEmmanuel Vadot }; 1647ef62cebSEmmanuel Vadot }; 1657ef62cebSEmmanuel Vadot }; 1667ef62cebSEmmanuel Vadot }; 1677ef62cebSEmmanuel Vadot 1687ef62cebSEmmanuel Vadot... 1697ef62cebSEmmanuel Vadot 170