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 25*b2d2a78aSEmmanuel Vadot - microchip,ksz8864 # 4-port version of KSZ8895 family switch 262eb4d8dcSEmmanuel Vadot - microchip,ksz8873 27*b2d2a78aSEmmanuel Vadot - microchip,ksz8895 # 5-port version of KSZ8895 family switch 285def4c47SEmmanuel Vadot - microchip,ksz9477 295def4c47SEmmanuel Vadot - microchip,ksz9897 305def4c47SEmmanuel Vadot - microchip,ksz9896 315def4c47SEmmanuel Vadot - microchip,ksz9567 325def4c47SEmmanuel Vadot - microchip,ksz8565 335def4c47SEmmanuel Vadot - microchip,ksz9893 345def4c47SEmmanuel Vadot - microchip,ksz9563 355def4c47SEmmanuel Vadot - microchip,ksz8563 3601950c46SEmmanuel Vadot - microchip,ksz8567 375def4c47SEmmanuel Vadot 385def4c47SEmmanuel Vadot reset-gpios: 395def4c47SEmmanuel Vadot description: 405def4c47SEmmanuel Vadot Should be a gpio specifier for a reset line. 415def4c47SEmmanuel Vadot maxItems: 1 425def4c47SEmmanuel Vadot 4384943d6fSEmmanuel Vadot wakeup-source: true 4484943d6fSEmmanuel Vadot 455def4c47SEmmanuel Vadot microchip,synclko-125: 465def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 475def4c47SEmmanuel Vadot description: 485def4c47SEmmanuel Vadot Set if the output SYNCLKO frequency should be set to 125MHz instead of 25MHz. 495def4c47SEmmanuel Vadot 50c9ccf3a3SEmmanuel Vadot microchip,synclko-disable: 51c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 52c9ccf3a3SEmmanuel Vadot description: 53c9ccf3a3SEmmanuel Vadot Set if the output SYNCLKO clock should be disabled. Do not mix with 54c9ccf3a3SEmmanuel Vadot microchip,synclko-125. 55c9ccf3a3SEmmanuel Vadot 56*b2d2a78aSEmmanuel Vadot microchip,pme-active-high: 57*b2d2a78aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 58*b2d2a78aSEmmanuel Vadot description: 59*b2d2a78aSEmmanuel Vadot Indicates if the PME pin polarity is active-high. 60*b2d2a78aSEmmanuel Vadot 6184943d6fSEmmanuel Vadot microchip,io-drive-strength-microamp: 6284943d6fSEmmanuel Vadot description: 6384943d6fSEmmanuel Vadot IO Pad Drive Strength 6484943d6fSEmmanuel Vadot enum: [8000, 16000] 6584943d6fSEmmanuel Vadot default: 16000 6684943d6fSEmmanuel Vadot 6784943d6fSEmmanuel Vadot microchip,hi-drive-strength-microamp: 6884943d6fSEmmanuel Vadot description: 6984943d6fSEmmanuel Vadot High Speed Drive Strength. Controls drive strength of GMII / RGMII / 7084943d6fSEmmanuel Vadot MII / RMII (except TX_CLK/REFCLKI, COL and CRS) and CLKO_25_125 lines. 7184943d6fSEmmanuel Vadot enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000] 7284943d6fSEmmanuel Vadot default: 24000 7384943d6fSEmmanuel Vadot 7484943d6fSEmmanuel Vadot microchip,lo-drive-strength-microamp: 7584943d6fSEmmanuel Vadot description: 7684943d6fSEmmanuel Vadot Low Speed Drive Strength. Controls drive strength of TX_CLK / REFCLKI, 7784943d6fSEmmanuel Vadot COL, CRS, LEDs, PME_N, NTRP_N, SDO and SDI/SDA/MDIO lines. 7884943d6fSEmmanuel Vadot enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000] 7984943d6fSEmmanuel Vadot default: 8000 8084943d6fSEmmanuel Vadot 81aa1a8ff2SEmmanuel Vadot interrupts: 82aa1a8ff2SEmmanuel Vadot maxItems: 1 83aa1a8ff2SEmmanuel Vadot 845def4c47SEmmanuel Vadotrequired: 855def4c47SEmmanuel Vadot - compatible 865def4c47SEmmanuel Vadot - reg 875def4c47SEmmanuel Vadot 888d13bc63SEmmanuel Vadotif: 898d13bc63SEmmanuel Vadot not: 908d13bc63SEmmanuel Vadot properties: 918d13bc63SEmmanuel Vadot compatible: 928d13bc63SEmmanuel Vadot enum: 938d13bc63SEmmanuel Vadot - microchip,ksz8863 948d13bc63SEmmanuel Vadot - microchip,ksz8873 958d13bc63SEmmanuel Vadotthen: 968d13bc63SEmmanuel Vadot $ref: dsa.yaml#/$defs/ethernet-ports 978d13bc63SEmmanuel Vadotelse: 988d13bc63SEmmanuel Vadot patternProperties: 998d13bc63SEmmanuel Vadot "^(ethernet-)?ports$": 1008d13bc63SEmmanuel Vadot patternProperties: 1018d13bc63SEmmanuel Vadot "^(ethernet-)?port@[0-2]$": 1028d13bc63SEmmanuel Vadot $ref: dsa-port.yaml# 1038d13bc63SEmmanuel Vadot unevaluatedProperties: false 1048d13bc63SEmmanuel Vadot properties: 1058d13bc63SEmmanuel Vadot microchip,rmii-clk-internal: 1068d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1078d13bc63SEmmanuel Vadot description: 1088d13bc63SEmmanuel Vadot When ksz88x3 is acting as clock provier (via REFCLKO) it 1098d13bc63SEmmanuel Vadot can select between internal and external RMII reference 1108d13bc63SEmmanuel Vadot clock. Internal reference clock means that the clock for 1118d13bc63SEmmanuel Vadot the RMII of ksz88x3 is provided by the ksz88x3 internally 1128d13bc63SEmmanuel Vadot and the REFCLKI pin is unconnected. For the external 1138d13bc63SEmmanuel Vadot reference clock, the clock needs to be fed back to ksz88x3 1148d13bc63SEmmanuel Vadot via REFCLKI. 1158d13bc63SEmmanuel Vadot If microchip,rmii-clk-internal is set, ksz88x3 will provide 1168d13bc63SEmmanuel Vadot rmii reference clock internally, otherwise reference clock 1178d13bc63SEmmanuel Vadot should be provided externally. 1188d13bc63SEmmanuel Vadot dependencies: 1198d13bc63SEmmanuel Vadot microchip,rmii-clk-internal: [ethernet] 1208d13bc63SEmmanuel Vadot 1215def4c47SEmmanuel VadotunevaluatedProperties: false 1225def4c47SEmmanuel Vadot 1235def4c47SEmmanuel Vadotexamples: 1245def4c47SEmmanuel Vadot - | 1255def4c47SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1265def4c47SEmmanuel Vadot 1275def4c47SEmmanuel Vadot // Ethernet switch connected via SPI to the host, CPU port wired to eth0: 1285def4c47SEmmanuel Vadot eth0 { 1295def4c47SEmmanuel Vadot fixed-link { 1305def4c47SEmmanuel Vadot speed = <1000>; 1315def4c47SEmmanuel Vadot full-duplex; 1325def4c47SEmmanuel Vadot }; 1335def4c47SEmmanuel Vadot }; 1345def4c47SEmmanuel Vadot 135fac71e4eSEmmanuel Vadot spi { 1365def4c47SEmmanuel Vadot #address-cells = <1>; 1375def4c47SEmmanuel Vadot #size-cells = <0>; 1385def4c47SEmmanuel Vadot 1395def4c47SEmmanuel Vadot pinctrl-0 = <&pinctrl_spi_ksz>; 1405def4c47SEmmanuel Vadot cs-gpios = <&pioC 25 0>; 1415def4c47SEmmanuel Vadot id = <1>; 1425def4c47SEmmanuel Vadot 1435def4c47SEmmanuel Vadot ksz9477: switch@0 { 1445def4c47SEmmanuel Vadot compatible = "microchip,ksz9477"; 1455def4c47SEmmanuel Vadot reg = <0>; 1465def4c47SEmmanuel Vadot reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; 1475def4c47SEmmanuel Vadot 1485def4c47SEmmanuel Vadot spi-max-frequency = <44000000>; 1495def4c47SEmmanuel Vadot 1505def4c47SEmmanuel Vadot ethernet-ports { 1515def4c47SEmmanuel Vadot #address-cells = <1>; 1525def4c47SEmmanuel Vadot #size-cells = <0>; 1535def4c47SEmmanuel Vadot port@0 { 1545def4c47SEmmanuel Vadot reg = <0>; 1555def4c47SEmmanuel Vadot label = "lan1"; 1565def4c47SEmmanuel Vadot }; 1575def4c47SEmmanuel Vadot port@1 { 1585def4c47SEmmanuel Vadot reg = <1>; 1595def4c47SEmmanuel Vadot label = "lan2"; 1605def4c47SEmmanuel Vadot }; 1615def4c47SEmmanuel Vadot port@2 { 1625def4c47SEmmanuel Vadot reg = <2>; 1635def4c47SEmmanuel Vadot label = "lan3"; 1645def4c47SEmmanuel Vadot }; 1655def4c47SEmmanuel Vadot port@3 { 1665def4c47SEmmanuel Vadot reg = <3>; 1675def4c47SEmmanuel Vadot label = "lan4"; 1685def4c47SEmmanuel Vadot }; 1695def4c47SEmmanuel Vadot port@4 { 1705def4c47SEmmanuel Vadot reg = <4>; 1715def4c47SEmmanuel Vadot label = "lan5"; 1725def4c47SEmmanuel Vadot }; 1735def4c47SEmmanuel Vadot port@5 { 1745def4c47SEmmanuel Vadot reg = <5>; 1755def4c47SEmmanuel Vadot ethernet = <ð0>; 1767ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 1777ef62cebSEmmanuel Vadot 1785def4c47SEmmanuel Vadot fixed-link { 1795def4c47SEmmanuel Vadot speed = <1000>; 1805def4c47SEmmanuel Vadot full-duplex; 1815def4c47SEmmanuel Vadot }; 1825def4c47SEmmanuel Vadot }; 1835def4c47SEmmanuel Vadot }; 1845def4c47SEmmanuel Vadot }; 1855def4c47SEmmanuel Vadot 1865def4c47SEmmanuel Vadot ksz8565: switch@1 { 1875def4c47SEmmanuel Vadot compatible = "microchip,ksz8565"; 1885def4c47SEmmanuel Vadot reg = <1>; 1895def4c47SEmmanuel Vadot 1905def4c47SEmmanuel Vadot spi-max-frequency = <44000000>; 1915def4c47SEmmanuel Vadot 1925def4c47SEmmanuel Vadot ethernet-ports { 1935def4c47SEmmanuel Vadot #address-cells = <1>; 1945def4c47SEmmanuel Vadot #size-cells = <0>; 1955def4c47SEmmanuel Vadot port@0 { 1965def4c47SEmmanuel Vadot reg = <0>; 1975def4c47SEmmanuel Vadot label = "lan1"; 1985def4c47SEmmanuel Vadot }; 1995def4c47SEmmanuel Vadot port@1 { 2005def4c47SEmmanuel Vadot reg = <1>; 2015def4c47SEmmanuel Vadot label = "lan2"; 2025def4c47SEmmanuel Vadot }; 2035def4c47SEmmanuel Vadot port@2 { 2045def4c47SEmmanuel Vadot reg = <2>; 2055def4c47SEmmanuel Vadot label = "lan3"; 2065def4c47SEmmanuel Vadot }; 2075def4c47SEmmanuel Vadot port@3 { 2085def4c47SEmmanuel Vadot reg = <3>; 2095def4c47SEmmanuel Vadot label = "lan4"; 2105def4c47SEmmanuel Vadot }; 2115def4c47SEmmanuel Vadot port@6 { 2125def4c47SEmmanuel Vadot reg = <6>; 2135def4c47SEmmanuel Vadot ethernet = <ð0>; 2147ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 2157ef62cebSEmmanuel Vadot 2165def4c47SEmmanuel Vadot fixed-link { 2175def4c47SEmmanuel Vadot speed = <1000>; 2185def4c47SEmmanuel Vadot full-duplex; 2195def4c47SEmmanuel Vadot }; 2205def4c47SEmmanuel Vadot }; 2215def4c47SEmmanuel Vadot }; 2225def4c47SEmmanuel Vadot }; 2235def4c47SEmmanuel Vadot }; 2245def4c47SEmmanuel Vadot... 225