1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/microchip,lan937x.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: LAN937x Ethernet Switch Series 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - UNGLinuxDriver@microchip.com 11b97ee269SEmmanuel Vadot 12b97ee269SEmmanuel VadotallOf: 13cb7aa33aSEmmanuel Vadot - $ref: dsa.yaml#/$defs/ethernet-ports 14b97ee269SEmmanuel Vadot 15b97ee269SEmmanuel Vadotproperties: 16b97ee269SEmmanuel Vadot compatible: 17b97ee269SEmmanuel Vadot enum: 18b97ee269SEmmanuel Vadot - microchip,lan9370 19b97ee269SEmmanuel Vadot - microchip,lan9371 20b97ee269SEmmanuel Vadot - microchip,lan9372 21b97ee269SEmmanuel Vadot - microchip,lan9373 22b97ee269SEmmanuel Vadot - microchip,lan9374 23b97ee269SEmmanuel Vadot 24b97ee269SEmmanuel Vadot reg: 25b97ee269SEmmanuel Vadot maxItems: 1 26b97ee269SEmmanuel Vadot 27b97ee269SEmmanuel Vadot spi-max-frequency: 28b97ee269SEmmanuel Vadot maximum: 50000000 29b97ee269SEmmanuel Vadot 30b97ee269SEmmanuel Vadot reset-gpios: 31b97ee269SEmmanuel Vadot description: Optional gpio specifier for a reset line 32b97ee269SEmmanuel Vadot maxItems: 1 33b97ee269SEmmanuel Vadot 34b97ee269SEmmanuel Vadot mdio: 35b97ee269SEmmanuel Vadot $ref: /schemas/net/mdio.yaml# 36b97ee269SEmmanuel Vadot unevaluatedProperties: false 37b97ee269SEmmanuel Vadot 38b97ee269SEmmanuel VadotpatternProperties: 39b97ee269SEmmanuel Vadot "^(ethernet-)?ports$": 40*84943d6fSEmmanuel Vadot additionalProperties: true 41b97ee269SEmmanuel Vadot patternProperties: 42*84943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-7]$": 43b97ee269SEmmanuel Vadot allOf: 44b97ee269SEmmanuel Vadot - if: 45b97ee269SEmmanuel Vadot properties: 46b97ee269SEmmanuel Vadot phy-mode: 47b97ee269SEmmanuel Vadot contains: 48b97ee269SEmmanuel Vadot enum: 49b97ee269SEmmanuel Vadot - rgmii 50b97ee269SEmmanuel Vadot - rgmii-id 51b97ee269SEmmanuel Vadot - rgmii-txid 52b97ee269SEmmanuel Vadot - rgmii-rxid 53b97ee269SEmmanuel Vadot then: 54b97ee269SEmmanuel Vadot properties: 55b97ee269SEmmanuel Vadot rx-internal-delay-ps: 56b97ee269SEmmanuel Vadot enum: [0, 2000] 57b97ee269SEmmanuel Vadot default: 0 58b97ee269SEmmanuel Vadot tx-internal-delay-ps: 59b97ee269SEmmanuel Vadot enum: [0, 2000] 60b97ee269SEmmanuel Vadot default: 0 61b97ee269SEmmanuel Vadot 62b97ee269SEmmanuel Vadotrequired: 63b97ee269SEmmanuel Vadot - compatible 64b97ee269SEmmanuel Vadot - reg 65b97ee269SEmmanuel Vadot 66b97ee269SEmmanuel VadotunevaluatedProperties: false 67b97ee269SEmmanuel Vadot 68b97ee269SEmmanuel Vadotexamples: 69b97ee269SEmmanuel Vadot - | 70b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 71b97ee269SEmmanuel Vadot 72b97ee269SEmmanuel Vadot macb0 { 73b97ee269SEmmanuel Vadot #address-cells = <1>; 74b97ee269SEmmanuel Vadot #size-cells = <0>; 75b97ee269SEmmanuel Vadot 76b97ee269SEmmanuel Vadot fixed-link { 77b97ee269SEmmanuel Vadot speed = <1000>; 78b97ee269SEmmanuel Vadot full-duplex; 79b97ee269SEmmanuel Vadot }; 80b97ee269SEmmanuel Vadot }; 81b97ee269SEmmanuel Vadot 82b97ee269SEmmanuel Vadot spi { 83b97ee269SEmmanuel Vadot #address-cells = <1>; 84b97ee269SEmmanuel Vadot #size-cells = <0>; 85b97ee269SEmmanuel Vadot 86b97ee269SEmmanuel Vadot lan9374: switch@0 { 87b97ee269SEmmanuel Vadot compatible = "microchip,lan9374"; 88b97ee269SEmmanuel Vadot reg = <0>; 89b97ee269SEmmanuel Vadot spi-max-frequency = <44000000>; 90b97ee269SEmmanuel Vadot 91b97ee269SEmmanuel Vadot ethernet-ports { 92b97ee269SEmmanuel Vadot #address-cells = <1>; 93b97ee269SEmmanuel Vadot #size-cells = <0>; 94b97ee269SEmmanuel Vadot 95b97ee269SEmmanuel Vadot port@0 { 96b97ee269SEmmanuel Vadot reg = <0>; 97b97ee269SEmmanuel Vadot label = "lan1"; 98b97ee269SEmmanuel Vadot phy-mode = "internal"; 99b97ee269SEmmanuel Vadot phy-handle = <&t1phy0>; 100b97ee269SEmmanuel Vadot }; 101b97ee269SEmmanuel Vadot 102b97ee269SEmmanuel Vadot port@1 { 103b97ee269SEmmanuel Vadot reg = <1>; 104b97ee269SEmmanuel Vadot label = "lan2"; 105b97ee269SEmmanuel Vadot phy-mode = "internal"; 106b97ee269SEmmanuel Vadot phy-handle = <&t1phy1>; 107b97ee269SEmmanuel Vadot }; 108b97ee269SEmmanuel Vadot 109b97ee269SEmmanuel Vadot port@2 { 110b97ee269SEmmanuel Vadot reg = <2>; 111b97ee269SEmmanuel Vadot label = "lan4"; 112b97ee269SEmmanuel Vadot phy-mode = "internal"; 113b97ee269SEmmanuel Vadot phy-handle = <&t1phy2>; 114b97ee269SEmmanuel Vadot }; 115b97ee269SEmmanuel Vadot 116b97ee269SEmmanuel Vadot port@3 { 117b97ee269SEmmanuel Vadot reg = <3>; 118b97ee269SEmmanuel Vadot label = "lan6"; 119b97ee269SEmmanuel Vadot phy-mode = "internal"; 120b97ee269SEmmanuel Vadot phy-handle = <&t1phy3>; 121b97ee269SEmmanuel Vadot }; 122b97ee269SEmmanuel Vadot 123b97ee269SEmmanuel Vadot port@4 { 124b97ee269SEmmanuel Vadot reg = <4>; 125b97ee269SEmmanuel Vadot phy-mode = "rgmii"; 126b97ee269SEmmanuel Vadot tx-internal-delay-ps = <2000>; 127b97ee269SEmmanuel Vadot rx-internal-delay-ps = <2000>; 128b97ee269SEmmanuel Vadot ethernet = <&macb0>; 129b97ee269SEmmanuel Vadot 130b97ee269SEmmanuel Vadot fixed-link { 131b97ee269SEmmanuel Vadot speed = <1000>; 132b97ee269SEmmanuel Vadot full-duplex; 133b97ee269SEmmanuel Vadot }; 134b97ee269SEmmanuel Vadot }; 135b97ee269SEmmanuel Vadot 136b97ee269SEmmanuel Vadot port@5 { 137b97ee269SEmmanuel Vadot reg = <5>; 138b97ee269SEmmanuel Vadot label = "lan7"; 139b97ee269SEmmanuel Vadot phy-mode = "rgmii"; 140b97ee269SEmmanuel Vadot tx-internal-delay-ps = <2000>; 141b97ee269SEmmanuel Vadot rx-internal-delay-ps = <2000>; 142b97ee269SEmmanuel Vadot 143b97ee269SEmmanuel Vadot fixed-link { 144b97ee269SEmmanuel Vadot speed = <1000>; 145b97ee269SEmmanuel Vadot full-duplex; 146b97ee269SEmmanuel Vadot }; 147b97ee269SEmmanuel Vadot }; 148b97ee269SEmmanuel Vadot 149b97ee269SEmmanuel Vadot port@6 { 150b97ee269SEmmanuel Vadot reg = <6>; 151b97ee269SEmmanuel Vadot label = "lan5"; 152b97ee269SEmmanuel Vadot phy-mode = "internal"; 153b97ee269SEmmanuel Vadot phy-handle = <&t1phy6>; 154b97ee269SEmmanuel Vadot }; 155b97ee269SEmmanuel Vadot 156b97ee269SEmmanuel Vadot port@7 { 157b97ee269SEmmanuel Vadot reg = <7>; 158b97ee269SEmmanuel Vadot label = "lan3"; 159b97ee269SEmmanuel Vadot phy-mode = "internal"; 160b97ee269SEmmanuel Vadot phy-handle = <&t1phy7>; 161b97ee269SEmmanuel Vadot }; 162b97ee269SEmmanuel Vadot }; 163b97ee269SEmmanuel Vadot 164b97ee269SEmmanuel Vadot mdio { 165b97ee269SEmmanuel Vadot #address-cells = <1>; 166b97ee269SEmmanuel Vadot #size-cells = <0>; 167b97ee269SEmmanuel Vadot 168b97ee269SEmmanuel Vadot t1phy0: ethernet-phy@0{ 169b97ee269SEmmanuel Vadot reg = <0x0>; 170b97ee269SEmmanuel Vadot }; 171b97ee269SEmmanuel Vadot 172b97ee269SEmmanuel Vadot t1phy1: ethernet-phy@1{ 173b97ee269SEmmanuel Vadot reg = <0x1>; 174b97ee269SEmmanuel Vadot }; 175b97ee269SEmmanuel Vadot 176b97ee269SEmmanuel Vadot t1phy2: ethernet-phy@2{ 177b97ee269SEmmanuel Vadot reg = <0x2>; 178b97ee269SEmmanuel Vadot }; 179b97ee269SEmmanuel Vadot 180b97ee269SEmmanuel Vadot t1phy3: ethernet-phy@3{ 181b97ee269SEmmanuel Vadot reg = <0x3>; 182b97ee269SEmmanuel Vadot }; 183b97ee269SEmmanuel Vadot 184b97ee269SEmmanuel Vadot t1phy6: ethernet-phy@6{ 185b97ee269SEmmanuel Vadot reg = <0x6>; 186b97ee269SEmmanuel Vadot }; 187b97ee269SEmmanuel Vadot 188b97ee269SEmmanuel Vadot t1phy7: ethernet-phy@7{ 189b97ee269SEmmanuel Vadot reg = <0x7>; 190b97ee269SEmmanuel Vadot }; 191b97ee269SEmmanuel Vadot }; 192b97ee269SEmmanuel Vadot }; 193b97ee269SEmmanuel Vadot }; 194