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/mediatek,mt7530.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Mediatek MT7530 and MT7531 Ethernet Switches 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 107ef62cebSEmmanuel Vadot - Arınç ÜNAL <arinc.unal@arinc9.com> 11b97ee269SEmmanuel Vadot - Landen Chao <Landen.Chao@mediatek.com> 12b97ee269SEmmanuel Vadot - DENG Qingfang <dqfext@gmail.com> 137ef62cebSEmmanuel Vadot - Sean Wang <sean.wang@mediatek.com> 14fac71e4eSEmmanuel Vadot - Daniel Golle <daniel@makrotopia.org> 15b97ee269SEmmanuel Vadot 16b97ee269SEmmanuel Vadotdescription: | 17fac71e4eSEmmanuel Vadot There are three versions of MT7530, standalone, in a multi-chip module and 18fac71e4eSEmmanuel Vadot built-into a SoC. 19b97ee269SEmmanuel Vadot 207ef62cebSEmmanuel Vadot MT7530 is a part of the multi-chip module in MT7620AN, MT7620DA, MT7620DAN, 217ef62cebSEmmanuel Vadot MT7620NN, MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs. 22b97ee269SEmmanuel Vadot 23fac71e4eSEmmanuel Vadot The MT7988 SoC comes with a built-in switch similar to MT7531 as well as four 24fac71e4eSEmmanuel Vadot Gigabit Ethernet PHYs. The switch registers are directly mapped into the SoC's 25*0e8011faSEmmanuel Vadot memory map rather than using MDIO. The switch has an internally connected 10G 26fac71e4eSEmmanuel Vadot CPU port and 4 user ports connected to the built-in Gigabit Ethernet PHYs. 27fac71e4eSEmmanuel Vadot 28*0e8011faSEmmanuel Vadot The MT7530 in MT7620AN, MT7620DA, MT7620DAN and MT7620NN SoCs has 10/100 PHYs 297ef62cebSEmmanuel Vadot and the switch registers are directly mapped into SoC's memory map rather than 30fac71e4eSEmmanuel Vadot using MDIO. The DSA driver currently doesn't support MT7620 variants. 31b97ee269SEmmanuel Vadot 327ef62cebSEmmanuel Vadot There is only the standalone version of MT7531. 33b97ee269SEmmanuel Vadot 34*0e8011faSEmmanuel Vadot Port 5 on MT7530 supports various configurations: 35b97ee269SEmmanuel Vadot 367ef62cebSEmmanuel Vadot - Port 5 can be used as a CPU port. 377ef62cebSEmmanuel Vadot 38cb7aa33aSEmmanuel Vadot - PHY 0 or 4 of the switch can be muxed to gmac5 of the switch. Therefore, 39cb7aa33aSEmmanuel Vadot the gmac of the SoC which is wired to port 5 can connect to the PHY. 40cb7aa33aSEmmanuel Vadot This is usually used for connecting the wan port directly to the CPU to 41cb7aa33aSEmmanuel Vadot achieve 2 Gbps routing in total. 427ef62cebSEmmanuel Vadot 43cb7aa33aSEmmanuel Vadot The driver looks up the reg on the ethernet-phy node, which the phy-handle 44cb7aa33aSEmmanuel Vadot property on the gmac node refers to, to mux the specified phy. 457ef62cebSEmmanuel Vadot 467ef62cebSEmmanuel Vadot The driver requires the gmac of the SoC to have "mediatek,eth-mac" as the 47cb7aa33aSEmmanuel Vadot compatible string and the reg must be 1. So, for now, only gmac1 of a 487ef62cebSEmmanuel Vadot MediaTek SoC can benefit this. Banana Pi BPI-R2 suits this. 497ef62cebSEmmanuel Vadot 507ef62cebSEmmanuel Vadot For the MT7621 SoCs, rgmii2 group must be claimed with rgmii2 function. 51cb7aa33aSEmmanuel Vadot 527ef62cebSEmmanuel Vadot Check out example 5. 537ef62cebSEmmanuel Vadot 54cb7aa33aSEmmanuel Vadot - For the multi-chip module MT7530, in case of an external phy wired to 55cb7aa33aSEmmanuel Vadot gmac1 of the SoC, port 5 must not be enabled. 567ef62cebSEmmanuel Vadot 577ef62cebSEmmanuel Vadot In case of muxing PHY 0 or 4, the external phy must not be enabled. 587ef62cebSEmmanuel Vadot 597ef62cebSEmmanuel Vadot For the MT7621 SoCs, rgmii2 group must be claimed with rgmii2 function. 60cb7aa33aSEmmanuel Vadot 617ef62cebSEmmanuel Vadot Check out example 6. 627ef62cebSEmmanuel Vadot 6384943d6fSEmmanuel Vadot - Port 5 can be wired to an external phy. Port 5 becomes a DSA user port. 647ef62cebSEmmanuel Vadot 65cb7aa33aSEmmanuel Vadot For the multi-chip module MT7530, the external phy must be wired TX to TX 66cb7aa33aSEmmanuel Vadot to gmac1 of the SoC for this to work. Ubiquiti EdgeRouter X SFP is wired 67cb7aa33aSEmmanuel Vadot this way. 68cb7aa33aSEmmanuel Vadot 69cb7aa33aSEmmanuel Vadot For the multi-chip module MT7530, muxing PHY 0 or 4 won't work when the 70cb7aa33aSEmmanuel Vadot external phy is connected TX to TX. 717ef62cebSEmmanuel Vadot 727ef62cebSEmmanuel Vadot For the MT7621 SoCs, rgmii2 group must be claimed with gpio function. 73cb7aa33aSEmmanuel Vadot 747ef62cebSEmmanuel Vadot Check out example 7. 75b97ee269SEmmanuel Vadot 76b97ee269SEmmanuel Vadotproperties: 77b97ee269SEmmanuel Vadot compatible: 787ef62cebSEmmanuel Vadot oneOf: 797ef62cebSEmmanuel Vadot - description: 807ef62cebSEmmanuel Vadot Standalone MT7530 and multi-chip module MT7530 in MT7623AI SoC 817ef62cebSEmmanuel Vadot const: mediatek,mt7530 827ef62cebSEmmanuel Vadot 837ef62cebSEmmanuel Vadot - description: 847ef62cebSEmmanuel Vadot Standalone MT7531 857ef62cebSEmmanuel Vadot const: mediatek,mt7531 867ef62cebSEmmanuel Vadot 877ef62cebSEmmanuel Vadot - description: 887ef62cebSEmmanuel Vadot Multi-chip module MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs 897ef62cebSEmmanuel Vadot const: mediatek,mt7621 90b97ee269SEmmanuel Vadot 91fac71e4eSEmmanuel Vadot - description: 92fac71e4eSEmmanuel Vadot Built-in switch of the MT7988 SoC 93fac71e4eSEmmanuel Vadot const: mediatek,mt7988-switch 94fac71e4eSEmmanuel Vadot 95b97ee269SEmmanuel Vadot reg: 96b97ee269SEmmanuel Vadot maxItems: 1 97b97ee269SEmmanuel Vadot 98b97ee269SEmmanuel Vadot core-supply: 99b97ee269SEmmanuel Vadot description: 100b97ee269SEmmanuel Vadot Phandle to the regulator node necessary for the core power. 101b97ee269SEmmanuel Vadot 102b97ee269SEmmanuel Vadot "#gpio-cells": 103b97ee269SEmmanuel Vadot const: 2 104b97ee269SEmmanuel Vadot 105b97ee269SEmmanuel Vadot gpio-controller: 106b97ee269SEmmanuel Vadot type: boolean 107fac71e4eSEmmanuel Vadot description: | 1087ef62cebSEmmanuel Vadot If defined, LED controller of the MT7530 switch will run on GPIO mode. 1097ef62cebSEmmanuel Vadot 1107ef62cebSEmmanuel Vadot There are 15 controllable pins. 1117ef62cebSEmmanuel Vadot port 0 LED 0..2 as GPIO 0..2 1127ef62cebSEmmanuel Vadot port 1 LED 0..2 as GPIO 3..5 1137ef62cebSEmmanuel Vadot port 2 LED 0..2 as GPIO 6..8 1147ef62cebSEmmanuel Vadot port 3 LED 0..2 as GPIO 9..11 1157ef62cebSEmmanuel Vadot port 4 LED 0..2 as GPIO 12..14 116b97ee269SEmmanuel Vadot 117b97ee269SEmmanuel Vadot "#interrupt-cells": 118b97ee269SEmmanuel Vadot const: 1 119b97ee269SEmmanuel Vadot 120b97ee269SEmmanuel Vadot interrupt-controller: true 121b97ee269SEmmanuel Vadot 122b97ee269SEmmanuel Vadot interrupts: 123b97ee269SEmmanuel Vadot maxItems: 1 124b97ee269SEmmanuel Vadot 125b97ee269SEmmanuel Vadot io-supply: 126fac71e4eSEmmanuel Vadot description: | 127b97ee269SEmmanuel Vadot Phandle to the regulator node necessary for the I/O power. 1287ef62cebSEmmanuel Vadot See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt for 1297ef62cebSEmmanuel Vadot details for the regulator setup on these boards. 130b97ee269SEmmanuel Vadot 131b97ee269SEmmanuel Vadot mediatek,mcm: 132b97ee269SEmmanuel Vadot type: boolean 133b97ee269SEmmanuel Vadot description: 1347ef62cebSEmmanuel Vadot Used for MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs which the MT7530 1357ef62cebSEmmanuel Vadot switch is a part of the multi-chip module. 136b97ee269SEmmanuel Vadot 137b97ee269SEmmanuel Vadot reset-gpios: 138fac71e4eSEmmanuel Vadot description: | 1397ef62cebSEmmanuel Vadot GPIO to reset the switch. Use this if mediatek,mcm is not used. 1407ef62cebSEmmanuel Vadot This property is optional because some boards share the reset line with 1417ef62cebSEmmanuel Vadot other components which makes it impossible to probe the switch if the 1427ef62cebSEmmanuel Vadot reset line is used. 143b97ee269SEmmanuel Vadot maxItems: 1 144b97ee269SEmmanuel Vadot 145b97ee269SEmmanuel Vadot reset-names: 146b97ee269SEmmanuel Vadot const: mcm 147b97ee269SEmmanuel Vadot 148b97ee269SEmmanuel Vadot resets: 149b97ee269SEmmanuel Vadot description: 1507ef62cebSEmmanuel Vadot Phandle pointing to the system reset controller with line index for the 1517ef62cebSEmmanuel Vadot ethsys. 152b97ee269SEmmanuel Vadot maxItems: 1 153b97ee269SEmmanuel Vadot 154b97ee269SEmmanuel VadotpatternProperties: 155b97ee269SEmmanuel Vadot "^(ethernet-)?ports$": 156b97ee269SEmmanuel Vadot type: object 15784943d6fSEmmanuel Vadot additionalProperties: true 158b97ee269SEmmanuel Vadot 159b97ee269SEmmanuel Vadot patternProperties: 16084943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-6]$": 161b97ee269SEmmanuel Vadot type: object 16284943d6fSEmmanuel Vadot additionalProperties: true 163b97ee269SEmmanuel Vadot 164b97ee269SEmmanuel Vadot properties: 165b97ee269SEmmanuel Vadot reg: 166b97ee269SEmmanuel Vadot description: 1677ef62cebSEmmanuel Vadot Port address described must be 5 or 6 for CPU port and from 0 to 5 1687ef62cebSEmmanuel Vadot for user ports. 169b97ee269SEmmanuel Vadot 170b97ee269SEmmanuel Vadot allOf: 171b97ee269SEmmanuel Vadot - if: 1727ef62cebSEmmanuel Vadot required: [ ethernet ] 173b97ee269SEmmanuel Vadot then: 1747ef62cebSEmmanuel Vadot properties: 1757ef62cebSEmmanuel Vadot reg: 1767ef62cebSEmmanuel Vadot enum: 1777ef62cebSEmmanuel Vadot - 5 1787ef62cebSEmmanuel Vadot - 6 179b97ee269SEmmanuel Vadot 180b97ee269SEmmanuel Vadotrequired: 181b97ee269SEmmanuel Vadot - compatible 182b97ee269SEmmanuel Vadot - reg 183b97ee269SEmmanuel Vadot 1847ef62cebSEmmanuel Vadot$defs: 1857ef62cebSEmmanuel Vadot mt7530-dsa-port: 1867ef62cebSEmmanuel Vadot patternProperties: 1877ef62cebSEmmanuel Vadot "^(ethernet-)?ports$": 1887ef62cebSEmmanuel Vadot patternProperties: 18984943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-6]$": 1907ef62cebSEmmanuel Vadot if: 1917ef62cebSEmmanuel Vadot required: [ ethernet ] 1927ef62cebSEmmanuel Vadot then: 1937ef62cebSEmmanuel Vadot if: 1947ef62cebSEmmanuel Vadot properties: 1957ef62cebSEmmanuel Vadot reg: 1967ef62cebSEmmanuel Vadot const: 5 1977ef62cebSEmmanuel Vadot then: 1987ef62cebSEmmanuel Vadot properties: 1997ef62cebSEmmanuel Vadot phy-mode: 2007ef62cebSEmmanuel Vadot enum: 2017ef62cebSEmmanuel Vadot - gmii 2027ef62cebSEmmanuel Vadot - mii 2037ef62cebSEmmanuel Vadot - rgmii 2047ef62cebSEmmanuel Vadot else: 2057ef62cebSEmmanuel Vadot properties: 2067ef62cebSEmmanuel Vadot phy-mode: 2077ef62cebSEmmanuel Vadot enum: 2087ef62cebSEmmanuel Vadot - rgmii 2097ef62cebSEmmanuel Vadot - trgmii 2107ef62cebSEmmanuel Vadot 2117ef62cebSEmmanuel Vadot mt7531-dsa-port: 2127ef62cebSEmmanuel Vadot patternProperties: 2137ef62cebSEmmanuel Vadot "^(ethernet-)?ports$": 2147ef62cebSEmmanuel Vadot patternProperties: 21584943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-6]$": 2167ef62cebSEmmanuel Vadot if: 2177ef62cebSEmmanuel Vadot required: [ ethernet ] 2187ef62cebSEmmanuel Vadot then: 2197ef62cebSEmmanuel Vadot if: 2207ef62cebSEmmanuel Vadot properties: 2217ef62cebSEmmanuel Vadot reg: 2227ef62cebSEmmanuel Vadot const: 5 2237ef62cebSEmmanuel Vadot then: 2247ef62cebSEmmanuel Vadot properties: 2257ef62cebSEmmanuel Vadot phy-mode: 2267ef62cebSEmmanuel Vadot enum: 2277ef62cebSEmmanuel Vadot - 1000base-x 2287ef62cebSEmmanuel Vadot - 2500base-x 2297ef62cebSEmmanuel Vadot - rgmii 2307ef62cebSEmmanuel Vadot - sgmii 2317ef62cebSEmmanuel Vadot else: 2327ef62cebSEmmanuel Vadot properties: 2337ef62cebSEmmanuel Vadot phy-mode: 2347ef62cebSEmmanuel Vadot enum: 2357ef62cebSEmmanuel Vadot - 1000base-x 2367ef62cebSEmmanuel Vadot - 2500base-x 2377ef62cebSEmmanuel Vadot - sgmii 2387ef62cebSEmmanuel Vadot 239b97ee269SEmmanuel VadotallOf: 240cb7aa33aSEmmanuel Vadot - $ref: dsa.yaml#/$defs/ethernet-ports 241b97ee269SEmmanuel Vadot - if: 242b97ee269SEmmanuel Vadot required: 243b97ee269SEmmanuel Vadot - mediatek,mcm 244b97ee269SEmmanuel Vadot then: 2457ef62cebSEmmanuel Vadot properties: 2467ef62cebSEmmanuel Vadot reset-gpios: false 2477ef62cebSEmmanuel Vadot 248b97ee269SEmmanuel Vadot required: 249b97ee269SEmmanuel Vadot - resets 250b97ee269SEmmanuel Vadot - reset-names 251b97ee269SEmmanuel Vadot 252b97ee269SEmmanuel Vadot - dependencies: 253b97ee269SEmmanuel Vadot interrupt-controller: [ interrupts ] 254b97ee269SEmmanuel Vadot 255b97ee269SEmmanuel Vadot - if: 256b97ee269SEmmanuel Vadot properties: 257b97ee269SEmmanuel Vadot compatible: 2587ef62cebSEmmanuel Vadot const: mediatek,mt7530 259b97ee269SEmmanuel Vadot then: 2607ef62cebSEmmanuel Vadot $ref: "#/$defs/mt7530-dsa-port" 261b97ee269SEmmanuel Vadot required: 262b97ee269SEmmanuel Vadot - core-supply 263b97ee269SEmmanuel Vadot - io-supply 264b97ee269SEmmanuel Vadot 2657ef62cebSEmmanuel Vadot - if: 2667ef62cebSEmmanuel Vadot properties: 2677ef62cebSEmmanuel Vadot compatible: 2687ef62cebSEmmanuel Vadot const: mediatek,mt7531 2697ef62cebSEmmanuel Vadot then: 2707ef62cebSEmmanuel Vadot $ref: "#/$defs/mt7531-dsa-port" 2717ef62cebSEmmanuel Vadot properties: 2727ef62cebSEmmanuel Vadot gpio-controller: false 2737ef62cebSEmmanuel Vadot mediatek,mcm: false 2747ef62cebSEmmanuel Vadot 2757ef62cebSEmmanuel Vadot - if: 2767ef62cebSEmmanuel Vadot properties: 2777ef62cebSEmmanuel Vadot compatible: 2787ef62cebSEmmanuel Vadot const: mediatek,mt7621 2797ef62cebSEmmanuel Vadot then: 2807ef62cebSEmmanuel Vadot $ref: "#/$defs/mt7530-dsa-port" 2817ef62cebSEmmanuel Vadot required: 2827ef62cebSEmmanuel Vadot - mediatek,mcm 2837ef62cebSEmmanuel Vadot 284fac71e4eSEmmanuel Vadot - if: 285fac71e4eSEmmanuel Vadot properties: 286fac71e4eSEmmanuel Vadot compatible: 287fac71e4eSEmmanuel Vadot const: mediatek,mt7988-switch 288fac71e4eSEmmanuel Vadot then: 289fac71e4eSEmmanuel Vadot $ref: "#/$defs/mt7530-dsa-port" 290fac71e4eSEmmanuel Vadot properties: 291fac71e4eSEmmanuel Vadot gpio-controller: false 292fac71e4eSEmmanuel Vadot mediatek,mcm: false 293fac71e4eSEmmanuel Vadot reset-names: false 294fac71e4eSEmmanuel Vadot 295b97ee269SEmmanuel VadotunevaluatedProperties: false 296b97ee269SEmmanuel Vadot 297b97ee269SEmmanuel Vadotexamples: 2987ef62cebSEmmanuel Vadot # Example 1: Standalone MT7530 299b97ee269SEmmanuel Vadot - | 300b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 3017ef62cebSEmmanuel Vadot 302b97ee269SEmmanuel Vadot mdio { 303b97ee269SEmmanuel Vadot #address-cells = <1>; 304b97ee269SEmmanuel Vadot #size-cells = <0>; 3057ef62cebSEmmanuel Vadot 3067ef62cebSEmmanuel Vadot switch@1f { 307b97ee269SEmmanuel Vadot compatible = "mediatek,mt7530"; 3087ef62cebSEmmanuel Vadot reg = <0x1f>; 3097ef62cebSEmmanuel Vadot 3107ef62cebSEmmanuel Vadot reset-gpios = <&pio 33 0>; 311b97ee269SEmmanuel Vadot 312b97ee269SEmmanuel Vadot core-supply = <&mt6323_vpa_reg>; 313b97ee269SEmmanuel Vadot io-supply = <&mt6323_vemc3v3_reg>; 314b97ee269SEmmanuel Vadot 315b97ee269SEmmanuel Vadot ethernet-ports { 316b97ee269SEmmanuel Vadot #address-cells = <1>; 317b97ee269SEmmanuel Vadot #size-cells = <0>; 3187ef62cebSEmmanuel Vadot 319b97ee269SEmmanuel Vadot port@0 { 320b97ee269SEmmanuel Vadot reg = <0>; 3217ef62cebSEmmanuel Vadot label = "lan1"; 322b97ee269SEmmanuel Vadot }; 323b97ee269SEmmanuel Vadot 324b97ee269SEmmanuel Vadot port@1 { 325b97ee269SEmmanuel Vadot reg = <1>; 3267ef62cebSEmmanuel Vadot label = "lan2"; 327b97ee269SEmmanuel Vadot }; 328b97ee269SEmmanuel Vadot 329b97ee269SEmmanuel Vadot port@2 { 330b97ee269SEmmanuel Vadot reg = <2>; 3317ef62cebSEmmanuel Vadot label = "lan3"; 332b97ee269SEmmanuel Vadot }; 333b97ee269SEmmanuel Vadot 334b97ee269SEmmanuel Vadot port@3 { 335b97ee269SEmmanuel Vadot reg = <3>; 3367ef62cebSEmmanuel Vadot label = "lan4"; 337b97ee269SEmmanuel Vadot }; 338b97ee269SEmmanuel Vadot 339b97ee269SEmmanuel Vadot port@4 { 340b97ee269SEmmanuel Vadot reg = <4>; 341b97ee269SEmmanuel Vadot label = "wan"; 342b97ee269SEmmanuel Vadot }; 343b97ee269SEmmanuel Vadot 344b97ee269SEmmanuel Vadot port@6 { 345b97ee269SEmmanuel Vadot reg = <6>; 346b97ee269SEmmanuel Vadot ethernet = <&gmac0>; 347b97ee269SEmmanuel Vadot phy-mode = "rgmii"; 348b97ee269SEmmanuel Vadot 349b97ee269SEmmanuel Vadot fixed-link { 350b97ee269SEmmanuel Vadot speed = <1000>; 351b97ee269SEmmanuel Vadot full-duplex; 352b97ee269SEmmanuel Vadot pause; 353b97ee269SEmmanuel Vadot }; 354b97ee269SEmmanuel Vadot }; 3557ef62cebSEmmanuel Vadot }; 3567ef62cebSEmmanuel Vadot }; 357b97ee269SEmmanuel Vadot }; 358b97ee269SEmmanuel Vadot 3597ef62cebSEmmanuel Vadot # Example 2: MT7530 in MT7623AI SoC 3607ef62cebSEmmanuel Vadot - | 3617ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt2701-resets.h> 3627ef62cebSEmmanuel Vadot 3637ef62cebSEmmanuel Vadot mdio { 364b97ee269SEmmanuel Vadot #address-cells = <1>; 365b97ee269SEmmanuel Vadot #size-cells = <0>; 366b97ee269SEmmanuel Vadot 3677ef62cebSEmmanuel Vadot switch@1f { 3687ef62cebSEmmanuel Vadot compatible = "mediatek,mt7530"; 369b97ee269SEmmanuel Vadot reg = <0x1f>; 370b97ee269SEmmanuel Vadot 3717ef62cebSEmmanuel Vadot mediatek,mcm; 3727ef62cebSEmmanuel Vadot resets = <ðsys MT2701_ETHSYS_MCM_RST>; 373b97ee269SEmmanuel Vadot reset-names = "mcm"; 374b97ee269SEmmanuel Vadot 3757ef62cebSEmmanuel Vadot core-supply = <&mt6323_vpa_reg>; 3767ef62cebSEmmanuel Vadot io-supply = <&mt6323_vemc3v3_reg>; 3777ef62cebSEmmanuel Vadot 378b97ee269SEmmanuel Vadot ethernet-ports { 379b97ee269SEmmanuel Vadot #address-cells = <1>; 380b97ee269SEmmanuel Vadot #size-cells = <0>; 381b97ee269SEmmanuel Vadot 382b97ee269SEmmanuel Vadot port@0 { 383b97ee269SEmmanuel Vadot reg = <0>; 3847ef62cebSEmmanuel Vadot label = "lan1"; 385b97ee269SEmmanuel Vadot }; 386b97ee269SEmmanuel Vadot 387b97ee269SEmmanuel Vadot port@1 { 388b97ee269SEmmanuel Vadot reg = <1>; 3897ef62cebSEmmanuel Vadot label = "lan2"; 390b97ee269SEmmanuel Vadot }; 391b97ee269SEmmanuel Vadot 392b97ee269SEmmanuel Vadot port@2 { 393b97ee269SEmmanuel Vadot reg = <2>; 3947ef62cebSEmmanuel Vadot label = "lan3"; 395b97ee269SEmmanuel Vadot }; 396b97ee269SEmmanuel Vadot 397b97ee269SEmmanuel Vadot port@3 { 398b97ee269SEmmanuel Vadot reg = <3>; 399b97ee269SEmmanuel Vadot label = "lan4"; 400b97ee269SEmmanuel Vadot }; 4017ef62cebSEmmanuel Vadot 4027ef62cebSEmmanuel Vadot port@4 { 4037ef62cebSEmmanuel Vadot reg = <4>; 4047ef62cebSEmmanuel Vadot label = "wan"; 4057ef62cebSEmmanuel Vadot }; 406b97ee269SEmmanuel Vadot 407b97ee269SEmmanuel Vadot port@6 { 408b97ee269SEmmanuel Vadot reg = <6>; 409b97ee269SEmmanuel Vadot ethernet = <&gmac0>; 4107ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 411b97ee269SEmmanuel Vadot 412b97ee269SEmmanuel Vadot fixed-link { 413b97ee269SEmmanuel Vadot speed = <1000>; 414b97ee269SEmmanuel Vadot full-duplex; 415b97ee269SEmmanuel Vadot pause; 416b97ee269SEmmanuel Vadot }; 417b97ee269SEmmanuel Vadot }; 418b97ee269SEmmanuel Vadot }; 419b97ee269SEmmanuel Vadot }; 420b97ee269SEmmanuel Vadot }; 4217ef62cebSEmmanuel Vadot 4227ef62cebSEmmanuel Vadot # Example 3: Standalone MT7531 4237ef62cebSEmmanuel Vadot - | 4247ef62cebSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 4257ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 4267ef62cebSEmmanuel Vadot 4277ef62cebSEmmanuel Vadot mdio { 4287ef62cebSEmmanuel Vadot #address-cells = <1>; 4297ef62cebSEmmanuel Vadot #size-cells = <0>; 4307ef62cebSEmmanuel Vadot 4317ef62cebSEmmanuel Vadot switch@0 { 4327ef62cebSEmmanuel Vadot compatible = "mediatek,mt7531"; 4337ef62cebSEmmanuel Vadot reg = <0>; 4347ef62cebSEmmanuel Vadot 4357ef62cebSEmmanuel Vadot reset-gpios = <&pio 54 0>; 4367ef62cebSEmmanuel Vadot 4377ef62cebSEmmanuel Vadot interrupt-controller; 4387ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 4397ef62cebSEmmanuel Vadot interrupt-parent = <&pio>; 4407ef62cebSEmmanuel Vadot interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; 4417ef62cebSEmmanuel Vadot 4427ef62cebSEmmanuel Vadot ethernet-ports { 4437ef62cebSEmmanuel Vadot #address-cells = <1>; 4447ef62cebSEmmanuel Vadot #size-cells = <0>; 4457ef62cebSEmmanuel Vadot 4467ef62cebSEmmanuel Vadot port@0 { 4477ef62cebSEmmanuel Vadot reg = <0>; 4487ef62cebSEmmanuel Vadot label = "lan1"; 449b97ee269SEmmanuel Vadot }; 450b97ee269SEmmanuel Vadot 4517ef62cebSEmmanuel Vadot port@1 { 4527ef62cebSEmmanuel Vadot reg = <1>; 4537ef62cebSEmmanuel Vadot label = "lan2"; 4547ef62cebSEmmanuel Vadot }; 4557ef62cebSEmmanuel Vadot 4567ef62cebSEmmanuel Vadot port@2 { 4577ef62cebSEmmanuel Vadot reg = <2>; 4587ef62cebSEmmanuel Vadot label = "lan3"; 4597ef62cebSEmmanuel Vadot }; 4607ef62cebSEmmanuel Vadot 4617ef62cebSEmmanuel Vadot port@3 { 4627ef62cebSEmmanuel Vadot reg = <3>; 4637ef62cebSEmmanuel Vadot label = "lan4"; 4647ef62cebSEmmanuel Vadot }; 4657ef62cebSEmmanuel Vadot 4667ef62cebSEmmanuel Vadot port@4 { 4677ef62cebSEmmanuel Vadot reg = <4>; 4687ef62cebSEmmanuel Vadot label = "wan"; 4697ef62cebSEmmanuel Vadot }; 4707ef62cebSEmmanuel Vadot 4717ef62cebSEmmanuel Vadot port@6 { 4727ef62cebSEmmanuel Vadot reg = <6>; 4737ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 4747ef62cebSEmmanuel Vadot phy-mode = "2500base-x"; 4757ef62cebSEmmanuel Vadot 4767ef62cebSEmmanuel Vadot fixed-link { 4777ef62cebSEmmanuel Vadot speed = <2500>; 4787ef62cebSEmmanuel Vadot full-duplex; 4797ef62cebSEmmanuel Vadot pause; 4807ef62cebSEmmanuel Vadot }; 4817ef62cebSEmmanuel Vadot }; 4827ef62cebSEmmanuel Vadot }; 4837ef62cebSEmmanuel Vadot }; 4847ef62cebSEmmanuel Vadot }; 4857ef62cebSEmmanuel Vadot 4867ef62cebSEmmanuel Vadot # Example 4: MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs 487b97ee269SEmmanuel Vadot - | 4887ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 4897ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 4907ef62cebSEmmanuel Vadot 4917ef62cebSEmmanuel Vadot mdio { 4927ef62cebSEmmanuel Vadot #address-cells = <1>; 4937ef62cebSEmmanuel Vadot #size-cells = <0>; 4947ef62cebSEmmanuel Vadot 4957ef62cebSEmmanuel Vadot switch@1f { 4967ef62cebSEmmanuel Vadot compatible = "mediatek,mt7621"; 4977ef62cebSEmmanuel Vadot reg = <0x1f>; 4987ef62cebSEmmanuel Vadot 4997ef62cebSEmmanuel Vadot mediatek,mcm; 5007ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 5017ef62cebSEmmanuel Vadot reset-names = "mcm"; 5027ef62cebSEmmanuel Vadot 5037ef62cebSEmmanuel Vadot interrupt-controller; 5047ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 5057ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 5067ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 5077ef62cebSEmmanuel Vadot 5087ef62cebSEmmanuel Vadot ethernet-ports { 5097ef62cebSEmmanuel Vadot #address-cells = <1>; 5107ef62cebSEmmanuel Vadot #size-cells = <0>; 5117ef62cebSEmmanuel Vadot 5127ef62cebSEmmanuel Vadot port@0 { 5137ef62cebSEmmanuel Vadot reg = <0>; 5147ef62cebSEmmanuel Vadot label = "lan1"; 5157ef62cebSEmmanuel Vadot }; 5167ef62cebSEmmanuel Vadot 5177ef62cebSEmmanuel Vadot port@1 { 5187ef62cebSEmmanuel Vadot reg = <1>; 5197ef62cebSEmmanuel Vadot label = "lan2"; 5207ef62cebSEmmanuel Vadot }; 5217ef62cebSEmmanuel Vadot 5227ef62cebSEmmanuel Vadot port@2 { 5237ef62cebSEmmanuel Vadot reg = <2>; 5247ef62cebSEmmanuel Vadot label = "lan3"; 5257ef62cebSEmmanuel Vadot }; 5267ef62cebSEmmanuel Vadot 5277ef62cebSEmmanuel Vadot port@3 { 5287ef62cebSEmmanuel Vadot reg = <3>; 5297ef62cebSEmmanuel Vadot label = "lan4"; 5307ef62cebSEmmanuel Vadot }; 5317ef62cebSEmmanuel Vadot 5327ef62cebSEmmanuel Vadot port@4 { 5337ef62cebSEmmanuel Vadot reg = <4>; 5347ef62cebSEmmanuel Vadot label = "wan"; 5357ef62cebSEmmanuel Vadot }; 5367ef62cebSEmmanuel Vadot 5377ef62cebSEmmanuel Vadot port@6 { 5387ef62cebSEmmanuel Vadot reg = <6>; 5397ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 5407ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 5417ef62cebSEmmanuel Vadot 5427ef62cebSEmmanuel Vadot fixed-link { 5437ef62cebSEmmanuel Vadot speed = <1000>; 5447ef62cebSEmmanuel Vadot full-duplex; 5457ef62cebSEmmanuel Vadot pause; 5467ef62cebSEmmanuel Vadot }; 5477ef62cebSEmmanuel Vadot }; 5487ef62cebSEmmanuel Vadot }; 5497ef62cebSEmmanuel Vadot }; 5507ef62cebSEmmanuel Vadot }; 5517ef62cebSEmmanuel Vadot 5527ef62cebSEmmanuel Vadot # Example 5: MT7621: mux MT7530's phy4 to SoC's gmac1 5537ef62cebSEmmanuel Vadot - | 5547ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 5557ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 556b97ee269SEmmanuel Vadot 557b97ee269SEmmanuel Vadot ethernet { 558b97ee269SEmmanuel Vadot #address-cells = <1>; 559b97ee269SEmmanuel Vadot #size-cells = <0>; 5607ef62cebSEmmanuel Vadot 5617ef62cebSEmmanuel Vadot pinctrl-names = "default"; 5627ef62cebSEmmanuel Vadot pinctrl-0 = <&rgmii2_pins>; 5637ef62cebSEmmanuel Vadot 5647ef62cebSEmmanuel Vadot mac@1 { 565b97ee269SEmmanuel Vadot compatible = "mediatek,eth-mac"; 5667ef62cebSEmmanuel Vadot reg = <1>; 5677ef62cebSEmmanuel Vadot 568b97ee269SEmmanuel Vadot phy-mode = "rgmii"; 5697ef62cebSEmmanuel Vadot phy-handle = <&example5_ethphy4>; 570b97ee269SEmmanuel Vadot }; 571b97ee269SEmmanuel Vadot 5727ef62cebSEmmanuel Vadot mdio { 573b97ee269SEmmanuel Vadot #address-cells = <1>; 574b97ee269SEmmanuel Vadot #size-cells = <0>; 575b97ee269SEmmanuel Vadot 5767ef62cebSEmmanuel Vadot /* MT7530's phy4 */ 5777ef62cebSEmmanuel Vadot example5_ethphy4: ethernet-phy@4 { 5787ef62cebSEmmanuel Vadot reg = <4>; 579b97ee269SEmmanuel Vadot }; 580b97ee269SEmmanuel Vadot 581b97ee269SEmmanuel Vadot switch@1f { 582b97ee269SEmmanuel Vadot compatible = "mediatek,mt7621"; 583b97ee269SEmmanuel Vadot reg = <0x1f>; 584b97ee269SEmmanuel Vadot 5857ef62cebSEmmanuel Vadot mediatek,mcm; 5867ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 587b97ee269SEmmanuel Vadot reset-names = "mcm"; 588b97ee269SEmmanuel Vadot 5897ef62cebSEmmanuel Vadot interrupt-controller; 5907ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 5917ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 5927ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 5937ef62cebSEmmanuel Vadot 594b97ee269SEmmanuel Vadot ethernet-ports { 595b97ee269SEmmanuel Vadot #address-cells = <1>; 596b97ee269SEmmanuel Vadot #size-cells = <0>; 597b97ee269SEmmanuel Vadot 598b97ee269SEmmanuel Vadot port@0 { 599b97ee269SEmmanuel Vadot reg = <0>; 6007ef62cebSEmmanuel Vadot label = "lan1"; 601b97ee269SEmmanuel Vadot }; 602b97ee269SEmmanuel Vadot 603b97ee269SEmmanuel Vadot port@1 { 604b97ee269SEmmanuel Vadot reg = <1>; 6057ef62cebSEmmanuel Vadot label = "lan2"; 606b97ee269SEmmanuel Vadot }; 607b97ee269SEmmanuel Vadot 608b97ee269SEmmanuel Vadot port@2 { 609b97ee269SEmmanuel Vadot reg = <2>; 6107ef62cebSEmmanuel Vadot label = "lan3"; 611b97ee269SEmmanuel Vadot }; 612b97ee269SEmmanuel Vadot 613b97ee269SEmmanuel Vadot port@3 { 614b97ee269SEmmanuel Vadot reg = <3>; 6157ef62cebSEmmanuel Vadot label = "lan4"; 6167ef62cebSEmmanuel Vadot }; 6177ef62cebSEmmanuel Vadot 618cb7aa33aSEmmanuel Vadot /* Commented out, phy4 is connected to gmac1. 6197ef62cebSEmmanuel Vadot port@4 { 6207ef62cebSEmmanuel Vadot reg = <4>; 6217ef62cebSEmmanuel Vadot label = "wan"; 6227ef62cebSEmmanuel Vadot }; 6237ef62cebSEmmanuel Vadot */ 6247ef62cebSEmmanuel Vadot 6257ef62cebSEmmanuel Vadot port@6 { 6267ef62cebSEmmanuel Vadot reg = <6>; 6277ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 6287ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 6297ef62cebSEmmanuel Vadot 6307ef62cebSEmmanuel Vadot fixed-link { 6317ef62cebSEmmanuel Vadot speed = <1000>; 6327ef62cebSEmmanuel Vadot full-duplex; 6337ef62cebSEmmanuel Vadot pause; 6347ef62cebSEmmanuel Vadot }; 6357ef62cebSEmmanuel Vadot }; 6367ef62cebSEmmanuel Vadot }; 6377ef62cebSEmmanuel Vadot }; 6387ef62cebSEmmanuel Vadot }; 6397ef62cebSEmmanuel Vadot }; 6407ef62cebSEmmanuel Vadot 6417ef62cebSEmmanuel Vadot # Example 6: MT7621: mux external phy to SoC's gmac1 6427ef62cebSEmmanuel Vadot - | 6437ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 6447ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 6457ef62cebSEmmanuel Vadot 6467ef62cebSEmmanuel Vadot ethernet { 6477ef62cebSEmmanuel Vadot #address-cells = <1>; 6487ef62cebSEmmanuel Vadot #size-cells = <0>; 6497ef62cebSEmmanuel Vadot 6507ef62cebSEmmanuel Vadot pinctrl-names = "default"; 6517ef62cebSEmmanuel Vadot pinctrl-0 = <&rgmii2_pins>; 6527ef62cebSEmmanuel Vadot 6537ef62cebSEmmanuel Vadot mac@1 { 6547ef62cebSEmmanuel Vadot compatible = "mediatek,eth-mac"; 6557ef62cebSEmmanuel Vadot reg = <1>; 6567ef62cebSEmmanuel Vadot 6577ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 6587ef62cebSEmmanuel Vadot phy-handle = <&example6_ethphy7>; 6597ef62cebSEmmanuel Vadot }; 6607ef62cebSEmmanuel Vadot 6617ef62cebSEmmanuel Vadot mdio { 6627ef62cebSEmmanuel Vadot #address-cells = <1>; 6637ef62cebSEmmanuel Vadot #size-cells = <0>; 6647ef62cebSEmmanuel Vadot 6657ef62cebSEmmanuel Vadot /* External PHY */ 6667ef62cebSEmmanuel Vadot example6_ethphy7: ethernet-phy@7 { 6677ef62cebSEmmanuel Vadot reg = <7>; 6687ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 6697ef62cebSEmmanuel Vadot }; 6707ef62cebSEmmanuel Vadot 6717ef62cebSEmmanuel Vadot switch@1f { 6727ef62cebSEmmanuel Vadot compatible = "mediatek,mt7621"; 6737ef62cebSEmmanuel Vadot reg = <0x1f>; 6747ef62cebSEmmanuel Vadot 6757ef62cebSEmmanuel Vadot mediatek,mcm; 6767ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 6777ef62cebSEmmanuel Vadot reset-names = "mcm"; 6787ef62cebSEmmanuel Vadot 6797ef62cebSEmmanuel Vadot interrupt-controller; 6807ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 6817ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 6827ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 6837ef62cebSEmmanuel Vadot 6847ef62cebSEmmanuel Vadot ethernet-ports { 6857ef62cebSEmmanuel Vadot #address-cells = <1>; 6867ef62cebSEmmanuel Vadot #size-cells = <0>; 6877ef62cebSEmmanuel Vadot 6887ef62cebSEmmanuel Vadot port@0 { 6897ef62cebSEmmanuel Vadot reg = <0>; 6907ef62cebSEmmanuel Vadot label = "lan1"; 6917ef62cebSEmmanuel Vadot }; 6927ef62cebSEmmanuel Vadot 6937ef62cebSEmmanuel Vadot port@1 { 6947ef62cebSEmmanuel Vadot reg = <1>; 6957ef62cebSEmmanuel Vadot label = "lan2"; 6967ef62cebSEmmanuel Vadot }; 6977ef62cebSEmmanuel Vadot 6987ef62cebSEmmanuel Vadot port@2 { 6997ef62cebSEmmanuel Vadot reg = <2>; 700b97ee269SEmmanuel Vadot label = "lan3"; 701b97ee269SEmmanuel Vadot }; 702b97ee269SEmmanuel Vadot 7037ef62cebSEmmanuel Vadot port@3 { 7047ef62cebSEmmanuel Vadot reg = <3>; 7057ef62cebSEmmanuel Vadot label = "lan4"; 7067ef62cebSEmmanuel Vadot }; 7077ef62cebSEmmanuel Vadot 708b97ee269SEmmanuel Vadot port@4 { 709b97ee269SEmmanuel Vadot reg = <4>; 7107ef62cebSEmmanuel Vadot label = "wan"; 7117ef62cebSEmmanuel Vadot }; 7127ef62cebSEmmanuel Vadot 7137ef62cebSEmmanuel Vadot port@6 { 7147ef62cebSEmmanuel Vadot reg = <6>; 7157ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 7167ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 7177ef62cebSEmmanuel Vadot 7187ef62cebSEmmanuel Vadot fixed-link { 7197ef62cebSEmmanuel Vadot speed = <1000>; 7207ef62cebSEmmanuel Vadot full-duplex; 7217ef62cebSEmmanuel Vadot pause; 7227ef62cebSEmmanuel Vadot }; 7237ef62cebSEmmanuel Vadot }; 7247ef62cebSEmmanuel Vadot }; 7257ef62cebSEmmanuel Vadot }; 7267ef62cebSEmmanuel Vadot }; 7277ef62cebSEmmanuel Vadot }; 7287ef62cebSEmmanuel Vadot 7297ef62cebSEmmanuel Vadot # Example 7: MT7621: mux external phy to MT7530's port 5 7307ef62cebSEmmanuel Vadot - | 7317ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 7327ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 7337ef62cebSEmmanuel Vadot 7347ef62cebSEmmanuel Vadot ethernet { 7357ef62cebSEmmanuel Vadot #address-cells = <1>; 7367ef62cebSEmmanuel Vadot #size-cells = <0>; 7377ef62cebSEmmanuel Vadot 7387ef62cebSEmmanuel Vadot pinctrl-names = "default"; 7397ef62cebSEmmanuel Vadot pinctrl-0 = <&rgmii2_pins>; 7407ef62cebSEmmanuel Vadot 7417ef62cebSEmmanuel Vadot mdio { 7427ef62cebSEmmanuel Vadot #address-cells = <1>; 7437ef62cebSEmmanuel Vadot #size-cells = <0>; 7447ef62cebSEmmanuel Vadot 7457ef62cebSEmmanuel Vadot /* External PHY */ 7467ef62cebSEmmanuel Vadot example7_ethphy7: ethernet-phy@7 { 7477ef62cebSEmmanuel Vadot reg = <7>; 7487ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 7497ef62cebSEmmanuel Vadot }; 7507ef62cebSEmmanuel Vadot 7517ef62cebSEmmanuel Vadot switch@1f { 7527ef62cebSEmmanuel Vadot compatible = "mediatek,mt7621"; 7537ef62cebSEmmanuel Vadot reg = <0x1f>; 7547ef62cebSEmmanuel Vadot 7557ef62cebSEmmanuel Vadot mediatek,mcm; 7567ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 7577ef62cebSEmmanuel Vadot reset-names = "mcm"; 7587ef62cebSEmmanuel Vadot 7597ef62cebSEmmanuel Vadot interrupt-controller; 7607ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 7617ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 7627ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 7637ef62cebSEmmanuel Vadot 7647ef62cebSEmmanuel Vadot ethernet-ports { 7657ef62cebSEmmanuel Vadot #address-cells = <1>; 7667ef62cebSEmmanuel Vadot #size-cells = <0>; 7677ef62cebSEmmanuel Vadot 7687ef62cebSEmmanuel Vadot port@0 { 7697ef62cebSEmmanuel Vadot reg = <0>; 7707ef62cebSEmmanuel Vadot label = "lan1"; 7717ef62cebSEmmanuel Vadot }; 7727ef62cebSEmmanuel Vadot 7737ef62cebSEmmanuel Vadot port@1 { 7747ef62cebSEmmanuel Vadot reg = <1>; 7757ef62cebSEmmanuel Vadot label = "lan2"; 7767ef62cebSEmmanuel Vadot }; 7777ef62cebSEmmanuel Vadot 7787ef62cebSEmmanuel Vadot port@2 { 7797ef62cebSEmmanuel Vadot reg = <2>; 7807ef62cebSEmmanuel Vadot label = "lan3"; 7817ef62cebSEmmanuel Vadot }; 7827ef62cebSEmmanuel Vadot 7837ef62cebSEmmanuel Vadot port@3 { 7847ef62cebSEmmanuel Vadot reg = <3>; 785b97ee269SEmmanuel Vadot label = "lan4"; 786b97ee269SEmmanuel Vadot }; 787b97ee269SEmmanuel Vadot 7887ef62cebSEmmanuel Vadot port@4 { 7897ef62cebSEmmanuel Vadot reg = <4>; 7907ef62cebSEmmanuel Vadot label = "wan"; 7917ef62cebSEmmanuel Vadot }; 7927ef62cebSEmmanuel Vadot 793b97ee269SEmmanuel Vadot port@5 { 794b97ee269SEmmanuel Vadot reg = <5>; 7957ef62cebSEmmanuel Vadot label = "extphy"; 7967ef62cebSEmmanuel Vadot phy-mode = "rgmii-txid"; 7977ef62cebSEmmanuel Vadot phy-handle = <&example7_ethphy7>; 798b97ee269SEmmanuel Vadot }; 799b97ee269SEmmanuel Vadot 8007ef62cebSEmmanuel Vadot port@6 { 801b97ee269SEmmanuel Vadot reg = <6>; 8027ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 8037ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 804b97ee269SEmmanuel Vadot 805b97ee269SEmmanuel Vadot fixed-link { 806b97ee269SEmmanuel Vadot speed = <1000>; 807b97ee269SEmmanuel Vadot full-duplex; 808b97ee269SEmmanuel Vadot pause; 809b97ee269SEmmanuel Vadot }; 810b97ee269SEmmanuel Vadot }; 811b97ee269SEmmanuel Vadot }; 812b97ee269SEmmanuel Vadot }; 813b97ee269SEmmanuel Vadot }; 814b97ee269SEmmanuel Vadot }; 815