15def4c47SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: Microchip KSZ Series Ethernet switches 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Marek Vasut <marex@denx.de> 115def4c47SEmmanuel Vadot - Woojung Huh <Woojung.Huh@microchip.com> 125def4c47SEmmanuel Vadot 135def4c47SEmmanuel VadotallOf: 14d5b0e70fSEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 155def4c47SEmmanuel Vadot 165def4c47SEmmanuel Vadotproperties: 175def4c47SEmmanuel Vadot # See Documentation/devicetree/bindings/net/dsa/dsa.yaml for a list of additional 185def4c47SEmmanuel Vadot # required and optional properties. 195def4c47SEmmanuel Vadot compatible: 205def4c47SEmmanuel Vadot enum: 215def4c47SEmmanuel Vadot - microchip,ksz8765 225def4c47SEmmanuel Vadot - microchip,ksz8794 235def4c47SEmmanuel Vadot - microchip,ksz8795 242eb4d8dcSEmmanuel Vadot - microchip,ksz8863 252eb4d8dcSEmmanuel Vadot - microchip,ksz8873 265def4c47SEmmanuel Vadot - microchip,ksz9477 275def4c47SEmmanuel Vadot - microchip,ksz9897 285def4c47SEmmanuel Vadot - microchip,ksz9896 295def4c47SEmmanuel Vadot - microchip,ksz9567 305def4c47SEmmanuel Vadot - microchip,ksz8565 315def4c47SEmmanuel Vadot - microchip,ksz9893 325def4c47SEmmanuel Vadot - microchip,ksz9563 335def4c47SEmmanuel Vadot - microchip,ksz8563 34*01950c46SEmmanuel Vadot - microchip,ksz8567 355def4c47SEmmanuel Vadot 365def4c47SEmmanuel Vadot reset-gpios: 375def4c47SEmmanuel Vadot description: 385def4c47SEmmanuel Vadot Should be a gpio specifier for a reset line. 395def4c47SEmmanuel Vadot maxItems: 1 405def4c47SEmmanuel Vadot 4184943d6fSEmmanuel Vadot wakeup-source: true 4284943d6fSEmmanuel Vadot 435def4c47SEmmanuel Vadot microchip,synclko-125: 445def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 455def4c47SEmmanuel Vadot description: 465def4c47SEmmanuel Vadot Set if the output SYNCLKO frequency should be set to 125MHz instead of 25MHz. 475def4c47SEmmanuel Vadot 48c9ccf3a3SEmmanuel Vadot microchip,synclko-disable: 49c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 50c9ccf3a3SEmmanuel Vadot description: 51c9ccf3a3SEmmanuel Vadot Set if the output SYNCLKO clock should be disabled. Do not mix with 52c9ccf3a3SEmmanuel Vadot microchip,synclko-125. 53c9ccf3a3SEmmanuel Vadot 5484943d6fSEmmanuel Vadot microchip,io-drive-strength-microamp: 5584943d6fSEmmanuel Vadot description: 5684943d6fSEmmanuel Vadot IO Pad Drive Strength 5784943d6fSEmmanuel Vadot enum: [8000, 16000] 5884943d6fSEmmanuel Vadot default: 16000 5984943d6fSEmmanuel Vadot 6084943d6fSEmmanuel Vadot microchip,hi-drive-strength-microamp: 6184943d6fSEmmanuel Vadot description: 6284943d6fSEmmanuel Vadot High Speed Drive Strength. Controls drive strength of GMII / RGMII / 6384943d6fSEmmanuel Vadot MII / RMII (except TX_CLK/REFCLKI, COL and CRS) and CLKO_25_125 lines. 6484943d6fSEmmanuel Vadot enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000] 6584943d6fSEmmanuel Vadot default: 24000 6684943d6fSEmmanuel Vadot 6784943d6fSEmmanuel Vadot microchip,lo-drive-strength-microamp: 6884943d6fSEmmanuel Vadot description: 6984943d6fSEmmanuel Vadot Low Speed Drive Strength. Controls drive strength of TX_CLK / REFCLKI, 7084943d6fSEmmanuel Vadot COL, CRS, LEDs, PME_N, NTRP_N, SDO and SDI/SDA/MDIO lines. 7184943d6fSEmmanuel Vadot enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000] 7284943d6fSEmmanuel Vadot default: 8000 7384943d6fSEmmanuel Vadot 74aa1a8ff2SEmmanuel Vadot interrupts: 75aa1a8ff2SEmmanuel Vadot maxItems: 1 76aa1a8ff2SEmmanuel Vadot 775def4c47SEmmanuel Vadotrequired: 785def4c47SEmmanuel Vadot - compatible 795def4c47SEmmanuel Vadot - reg 805def4c47SEmmanuel Vadot 818d13bc63SEmmanuel Vadotif: 828d13bc63SEmmanuel Vadot not: 838d13bc63SEmmanuel Vadot properties: 848d13bc63SEmmanuel Vadot compatible: 858d13bc63SEmmanuel Vadot enum: 868d13bc63SEmmanuel Vadot - microchip,ksz8863 878d13bc63SEmmanuel Vadot - microchip,ksz8873 888d13bc63SEmmanuel Vadotthen: 898d13bc63SEmmanuel Vadot $ref: dsa.yaml#/$defs/ethernet-ports 908d13bc63SEmmanuel Vadotelse: 918d13bc63SEmmanuel Vadot patternProperties: 928d13bc63SEmmanuel Vadot "^(ethernet-)?ports$": 938d13bc63SEmmanuel Vadot patternProperties: 948d13bc63SEmmanuel Vadot "^(ethernet-)?port@[0-2]$": 958d13bc63SEmmanuel Vadot $ref: dsa-port.yaml# 968d13bc63SEmmanuel Vadot unevaluatedProperties: false 978d13bc63SEmmanuel Vadot properties: 988d13bc63SEmmanuel Vadot microchip,rmii-clk-internal: 998d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1008d13bc63SEmmanuel Vadot description: 1018d13bc63SEmmanuel Vadot When ksz88x3 is acting as clock provier (via REFCLKO) it 1028d13bc63SEmmanuel Vadot can select between internal and external RMII reference 1038d13bc63SEmmanuel Vadot clock. Internal reference clock means that the clock for 1048d13bc63SEmmanuel Vadot the RMII of ksz88x3 is provided by the ksz88x3 internally 1058d13bc63SEmmanuel Vadot and the REFCLKI pin is unconnected. For the external 1068d13bc63SEmmanuel Vadot reference clock, the clock needs to be fed back to ksz88x3 1078d13bc63SEmmanuel Vadot via REFCLKI. 1088d13bc63SEmmanuel Vadot If microchip,rmii-clk-internal is set, ksz88x3 will provide 1098d13bc63SEmmanuel Vadot rmii reference clock internally, otherwise reference clock 1108d13bc63SEmmanuel Vadot should be provided externally. 1118d13bc63SEmmanuel Vadot dependencies: 1128d13bc63SEmmanuel Vadot microchip,rmii-clk-internal: [ethernet] 1138d13bc63SEmmanuel Vadot 1145def4c47SEmmanuel VadotunevaluatedProperties: false 1155def4c47SEmmanuel Vadot 1165def4c47SEmmanuel Vadotexamples: 1175def4c47SEmmanuel Vadot - | 1185def4c47SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1195def4c47SEmmanuel Vadot 1205def4c47SEmmanuel Vadot // Ethernet switch connected via SPI to the host, CPU port wired to eth0: 1215def4c47SEmmanuel Vadot eth0 { 1225def4c47SEmmanuel Vadot fixed-link { 1235def4c47SEmmanuel Vadot speed = <1000>; 1245def4c47SEmmanuel Vadot full-duplex; 1255def4c47SEmmanuel Vadot }; 1265def4c47SEmmanuel Vadot }; 1275def4c47SEmmanuel Vadot 128fac71e4eSEmmanuel Vadot spi { 1295def4c47SEmmanuel Vadot #address-cells = <1>; 1305def4c47SEmmanuel Vadot #size-cells = <0>; 1315def4c47SEmmanuel Vadot 1325def4c47SEmmanuel Vadot pinctrl-0 = <&pinctrl_spi_ksz>; 1335def4c47SEmmanuel Vadot cs-gpios = <&pioC 25 0>; 1345def4c47SEmmanuel Vadot id = <1>; 1355def4c47SEmmanuel Vadot 1365def4c47SEmmanuel Vadot ksz9477: switch@0 { 1375def4c47SEmmanuel Vadot compatible = "microchip,ksz9477"; 1385def4c47SEmmanuel Vadot reg = <0>; 1395def4c47SEmmanuel Vadot reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; 1405def4c47SEmmanuel Vadot 1415def4c47SEmmanuel Vadot spi-max-frequency = <44000000>; 1425def4c47SEmmanuel Vadot 1435def4c47SEmmanuel Vadot ethernet-ports { 1445def4c47SEmmanuel Vadot #address-cells = <1>; 1455def4c47SEmmanuel Vadot #size-cells = <0>; 1465def4c47SEmmanuel Vadot port@0 { 1475def4c47SEmmanuel Vadot reg = <0>; 1485def4c47SEmmanuel Vadot label = "lan1"; 1495def4c47SEmmanuel Vadot }; 1505def4c47SEmmanuel Vadot port@1 { 1515def4c47SEmmanuel Vadot reg = <1>; 1525def4c47SEmmanuel Vadot label = "lan2"; 1535def4c47SEmmanuel Vadot }; 1545def4c47SEmmanuel Vadot port@2 { 1555def4c47SEmmanuel Vadot reg = <2>; 1565def4c47SEmmanuel Vadot label = "lan3"; 1575def4c47SEmmanuel Vadot }; 1585def4c47SEmmanuel Vadot port@3 { 1595def4c47SEmmanuel Vadot reg = <3>; 1605def4c47SEmmanuel Vadot label = "lan4"; 1615def4c47SEmmanuel Vadot }; 1625def4c47SEmmanuel Vadot port@4 { 1635def4c47SEmmanuel Vadot reg = <4>; 1645def4c47SEmmanuel Vadot label = "lan5"; 1655def4c47SEmmanuel Vadot }; 1665def4c47SEmmanuel Vadot port@5 { 1675def4c47SEmmanuel Vadot reg = <5>; 1685def4c47SEmmanuel Vadot ethernet = <ð0>; 1697ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 1707ef62cebSEmmanuel Vadot 1715def4c47SEmmanuel Vadot fixed-link { 1725def4c47SEmmanuel Vadot speed = <1000>; 1735def4c47SEmmanuel Vadot full-duplex; 1745def4c47SEmmanuel Vadot }; 1755def4c47SEmmanuel Vadot }; 1765def4c47SEmmanuel Vadot }; 1775def4c47SEmmanuel Vadot }; 1785def4c47SEmmanuel Vadot 1795def4c47SEmmanuel Vadot ksz8565: switch@1 { 1805def4c47SEmmanuel Vadot compatible = "microchip,ksz8565"; 1815def4c47SEmmanuel Vadot reg = <1>; 1825def4c47SEmmanuel Vadot 1835def4c47SEmmanuel Vadot spi-max-frequency = <44000000>; 1845def4c47SEmmanuel Vadot 1855def4c47SEmmanuel Vadot ethernet-ports { 1865def4c47SEmmanuel Vadot #address-cells = <1>; 1875def4c47SEmmanuel Vadot #size-cells = <0>; 1885def4c47SEmmanuel Vadot port@0 { 1895def4c47SEmmanuel Vadot reg = <0>; 1905def4c47SEmmanuel Vadot label = "lan1"; 1915def4c47SEmmanuel Vadot }; 1925def4c47SEmmanuel Vadot port@1 { 1935def4c47SEmmanuel Vadot reg = <1>; 1945def4c47SEmmanuel Vadot label = "lan2"; 1955def4c47SEmmanuel Vadot }; 1965def4c47SEmmanuel Vadot port@2 { 1975def4c47SEmmanuel Vadot reg = <2>; 1985def4c47SEmmanuel Vadot label = "lan3"; 1995def4c47SEmmanuel Vadot }; 2005def4c47SEmmanuel Vadot port@3 { 2015def4c47SEmmanuel Vadot reg = <3>; 2025def4c47SEmmanuel Vadot label = "lan4"; 2035def4c47SEmmanuel Vadot }; 2045def4c47SEmmanuel Vadot port@6 { 2055def4c47SEmmanuel Vadot reg = <6>; 2065def4c47SEmmanuel Vadot ethernet = <ð0>; 2077ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 2087ef62cebSEmmanuel Vadot 2095def4c47SEmmanuel Vadot fixed-link { 2105def4c47SEmmanuel Vadot speed = <1000>; 2115def4c47SEmmanuel Vadot full-duplex; 2125def4c47SEmmanuel Vadot }; 2135def4c47SEmmanuel Vadot }; 2145def4c47SEmmanuel Vadot }; 2155def4c47SEmmanuel Vadot }; 2165def4c47SEmmanuel Vadot }; 2175def4c47SEmmanuel Vadot... 218