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 250e8011faSEmmanuel 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 280e8011faSEmmanuel 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 340e8011faSEmmanuel 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 95*b2d2a78aSEmmanuel Vadot - description: 96*b2d2a78aSEmmanuel Vadot Built-in switch of the Airoha EN7581 SoC 97*b2d2a78aSEmmanuel Vadot const: airoha,en7581-switch 98*b2d2a78aSEmmanuel Vadot 99b97ee269SEmmanuel Vadot reg: 100b97ee269SEmmanuel Vadot maxItems: 1 101b97ee269SEmmanuel Vadot 102b97ee269SEmmanuel Vadot core-supply: 103b97ee269SEmmanuel Vadot description: 104b97ee269SEmmanuel Vadot Phandle to the regulator node necessary for the core power. 105b97ee269SEmmanuel Vadot 106b97ee269SEmmanuel Vadot "#gpio-cells": 107b97ee269SEmmanuel Vadot const: 2 108b97ee269SEmmanuel Vadot 109b97ee269SEmmanuel Vadot gpio-controller: 110b97ee269SEmmanuel Vadot type: boolean 111fac71e4eSEmmanuel Vadot description: | 1127ef62cebSEmmanuel Vadot If defined, LED controller of the MT7530 switch will run on GPIO mode. 1137ef62cebSEmmanuel Vadot 1147ef62cebSEmmanuel Vadot There are 15 controllable pins. 1157ef62cebSEmmanuel Vadot port 0 LED 0..2 as GPIO 0..2 1167ef62cebSEmmanuel Vadot port 1 LED 0..2 as GPIO 3..5 1177ef62cebSEmmanuel Vadot port 2 LED 0..2 as GPIO 6..8 1187ef62cebSEmmanuel Vadot port 3 LED 0..2 as GPIO 9..11 1197ef62cebSEmmanuel Vadot port 4 LED 0..2 as GPIO 12..14 120b97ee269SEmmanuel Vadot 121b97ee269SEmmanuel Vadot "#interrupt-cells": 122b97ee269SEmmanuel Vadot const: 1 123b97ee269SEmmanuel Vadot 124b97ee269SEmmanuel Vadot interrupt-controller: true 125b97ee269SEmmanuel Vadot 126b97ee269SEmmanuel Vadot interrupts: 127b97ee269SEmmanuel Vadot maxItems: 1 128b97ee269SEmmanuel Vadot 129b97ee269SEmmanuel Vadot io-supply: 130fac71e4eSEmmanuel Vadot description: | 131b97ee269SEmmanuel Vadot Phandle to the regulator node necessary for the I/O power. 1327ef62cebSEmmanuel Vadot See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt for 1337ef62cebSEmmanuel Vadot details for the regulator setup on these boards. 134b97ee269SEmmanuel Vadot 135b97ee269SEmmanuel Vadot mediatek,mcm: 136b97ee269SEmmanuel Vadot type: boolean 137b97ee269SEmmanuel Vadot description: 1387ef62cebSEmmanuel Vadot Used for MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs which the MT7530 1397ef62cebSEmmanuel Vadot switch is a part of the multi-chip module. 140b97ee269SEmmanuel Vadot 141b97ee269SEmmanuel Vadot reset-gpios: 142fac71e4eSEmmanuel Vadot description: | 1437ef62cebSEmmanuel Vadot GPIO to reset the switch. Use this if mediatek,mcm is not used. 1447ef62cebSEmmanuel Vadot This property is optional because some boards share the reset line with 1457ef62cebSEmmanuel Vadot other components which makes it impossible to probe the switch if the 1467ef62cebSEmmanuel Vadot reset line is used. 147b97ee269SEmmanuel Vadot maxItems: 1 148b97ee269SEmmanuel Vadot 149b97ee269SEmmanuel Vadot reset-names: 150b97ee269SEmmanuel Vadot const: mcm 151b97ee269SEmmanuel Vadot 152b97ee269SEmmanuel Vadot resets: 153b97ee269SEmmanuel Vadot description: 1547ef62cebSEmmanuel Vadot Phandle pointing to the system reset controller with line index for the 1557ef62cebSEmmanuel Vadot ethsys. 156b97ee269SEmmanuel Vadot maxItems: 1 157b97ee269SEmmanuel Vadot 158b97ee269SEmmanuel VadotpatternProperties: 159b97ee269SEmmanuel Vadot "^(ethernet-)?ports$": 160b97ee269SEmmanuel Vadot type: object 16184943d6fSEmmanuel Vadot additionalProperties: true 162b97ee269SEmmanuel Vadot 163b97ee269SEmmanuel Vadot patternProperties: 16484943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-6]$": 165b97ee269SEmmanuel Vadot type: object 16684943d6fSEmmanuel Vadot additionalProperties: true 167b97ee269SEmmanuel Vadot 168b97ee269SEmmanuel Vadot properties: 169b97ee269SEmmanuel Vadot reg: 170b97ee269SEmmanuel Vadot description: 1717ef62cebSEmmanuel Vadot Port address described must be 5 or 6 for CPU port and from 0 to 5 1727ef62cebSEmmanuel Vadot for user ports. 173b97ee269SEmmanuel Vadot 174b97ee269SEmmanuel Vadot allOf: 175b97ee269SEmmanuel Vadot - if: 1767ef62cebSEmmanuel Vadot required: [ ethernet ] 177b97ee269SEmmanuel Vadot then: 1787ef62cebSEmmanuel Vadot properties: 1797ef62cebSEmmanuel Vadot reg: 1807ef62cebSEmmanuel Vadot enum: 1817ef62cebSEmmanuel Vadot - 5 1827ef62cebSEmmanuel Vadot - 6 183b97ee269SEmmanuel Vadot 184b97ee269SEmmanuel Vadotrequired: 185b97ee269SEmmanuel Vadot - compatible 186b97ee269SEmmanuel Vadot - reg 187b97ee269SEmmanuel Vadot 1887ef62cebSEmmanuel Vadot$defs: 1897ef62cebSEmmanuel Vadot mt7530-dsa-port: 1907ef62cebSEmmanuel Vadot patternProperties: 1917ef62cebSEmmanuel Vadot "^(ethernet-)?ports$": 1927ef62cebSEmmanuel Vadot patternProperties: 19384943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-6]$": 1947ef62cebSEmmanuel Vadot if: 1957ef62cebSEmmanuel Vadot required: [ ethernet ] 1967ef62cebSEmmanuel Vadot then: 1977ef62cebSEmmanuel Vadot if: 1987ef62cebSEmmanuel Vadot properties: 1997ef62cebSEmmanuel Vadot reg: 2007ef62cebSEmmanuel Vadot const: 5 2017ef62cebSEmmanuel Vadot then: 2027ef62cebSEmmanuel Vadot properties: 2037ef62cebSEmmanuel Vadot phy-mode: 2047ef62cebSEmmanuel Vadot enum: 2057ef62cebSEmmanuel Vadot - gmii 2067ef62cebSEmmanuel Vadot - mii 2077ef62cebSEmmanuel Vadot - rgmii 2087ef62cebSEmmanuel Vadot else: 2097ef62cebSEmmanuel Vadot properties: 2107ef62cebSEmmanuel Vadot phy-mode: 2117ef62cebSEmmanuel Vadot enum: 2127ef62cebSEmmanuel Vadot - rgmii 2137ef62cebSEmmanuel Vadot - trgmii 2147ef62cebSEmmanuel Vadot 2157ef62cebSEmmanuel Vadot mt7531-dsa-port: 2167ef62cebSEmmanuel Vadot patternProperties: 2177ef62cebSEmmanuel Vadot "^(ethernet-)?ports$": 2187ef62cebSEmmanuel Vadot patternProperties: 21984943d6fSEmmanuel Vadot "^(ethernet-)?port@[0-6]$": 2207ef62cebSEmmanuel Vadot if: 2217ef62cebSEmmanuel Vadot required: [ ethernet ] 2227ef62cebSEmmanuel Vadot then: 2237ef62cebSEmmanuel Vadot if: 2247ef62cebSEmmanuel Vadot properties: 2257ef62cebSEmmanuel Vadot reg: 2267ef62cebSEmmanuel Vadot const: 5 2277ef62cebSEmmanuel Vadot then: 2287ef62cebSEmmanuel Vadot properties: 2297ef62cebSEmmanuel Vadot phy-mode: 2307ef62cebSEmmanuel Vadot enum: 2317ef62cebSEmmanuel Vadot - 1000base-x 2327ef62cebSEmmanuel Vadot - 2500base-x 2337ef62cebSEmmanuel Vadot - rgmii 2347ef62cebSEmmanuel Vadot - sgmii 2357ef62cebSEmmanuel Vadot else: 2367ef62cebSEmmanuel Vadot properties: 2377ef62cebSEmmanuel Vadot phy-mode: 2387ef62cebSEmmanuel Vadot enum: 2397ef62cebSEmmanuel Vadot - 1000base-x 2407ef62cebSEmmanuel Vadot - 2500base-x 2417ef62cebSEmmanuel Vadot - sgmii 2427ef62cebSEmmanuel Vadot 243b97ee269SEmmanuel VadotallOf: 244cb7aa33aSEmmanuel Vadot - $ref: dsa.yaml#/$defs/ethernet-ports 245b97ee269SEmmanuel Vadot - if: 246b97ee269SEmmanuel Vadot required: 247b97ee269SEmmanuel Vadot - mediatek,mcm 248b97ee269SEmmanuel Vadot then: 2497ef62cebSEmmanuel Vadot properties: 2507ef62cebSEmmanuel Vadot reset-gpios: false 2517ef62cebSEmmanuel Vadot 252b97ee269SEmmanuel Vadot required: 253b97ee269SEmmanuel Vadot - resets 254b97ee269SEmmanuel Vadot - reset-names 255b97ee269SEmmanuel Vadot 256b97ee269SEmmanuel Vadot - dependencies: 257b97ee269SEmmanuel Vadot interrupt-controller: [ interrupts ] 258b97ee269SEmmanuel Vadot 259b97ee269SEmmanuel Vadot - if: 260b97ee269SEmmanuel Vadot properties: 261b97ee269SEmmanuel Vadot compatible: 2627ef62cebSEmmanuel Vadot const: mediatek,mt7530 263b97ee269SEmmanuel Vadot then: 2647ef62cebSEmmanuel Vadot $ref: "#/$defs/mt7530-dsa-port" 265b97ee269SEmmanuel Vadot required: 266b97ee269SEmmanuel Vadot - core-supply 267b97ee269SEmmanuel Vadot - io-supply 268b97ee269SEmmanuel Vadot 2697ef62cebSEmmanuel Vadot - if: 2707ef62cebSEmmanuel Vadot properties: 2717ef62cebSEmmanuel Vadot compatible: 2727ef62cebSEmmanuel Vadot const: mediatek,mt7531 2737ef62cebSEmmanuel Vadot then: 2747ef62cebSEmmanuel Vadot $ref: "#/$defs/mt7531-dsa-port" 2757ef62cebSEmmanuel Vadot properties: 2767ef62cebSEmmanuel Vadot gpio-controller: false 2777ef62cebSEmmanuel Vadot mediatek,mcm: false 2787ef62cebSEmmanuel Vadot 2797ef62cebSEmmanuel Vadot - if: 2807ef62cebSEmmanuel Vadot properties: 2817ef62cebSEmmanuel Vadot compatible: 2827ef62cebSEmmanuel Vadot const: mediatek,mt7621 2837ef62cebSEmmanuel Vadot then: 2847ef62cebSEmmanuel Vadot $ref: "#/$defs/mt7530-dsa-port" 2857ef62cebSEmmanuel Vadot required: 2867ef62cebSEmmanuel Vadot - mediatek,mcm 2877ef62cebSEmmanuel Vadot 288fac71e4eSEmmanuel Vadot - if: 289fac71e4eSEmmanuel Vadot properties: 290fac71e4eSEmmanuel Vadot compatible: 291*b2d2a78aSEmmanuel Vadot enum: 292*b2d2a78aSEmmanuel Vadot - mediatek,mt7988-switch 293*b2d2a78aSEmmanuel Vadot - airoha,en7581-switch 294fac71e4eSEmmanuel Vadot then: 295fac71e4eSEmmanuel Vadot $ref: "#/$defs/mt7530-dsa-port" 296fac71e4eSEmmanuel Vadot properties: 297fac71e4eSEmmanuel Vadot gpio-controller: false 298fac71e4eSEmmanuel Vadot mediatek,mcm: false 299fac71e4eSEmmanuel Vadot reset-names: false 300fac71e4eSEmmanuel Vadot 301b97ee269SEmmanuel VadotunevaluatedProperties: false 302b97ee269SEmmanuel Vadot 303b97ee269SEmmanuel Vadotexamples: 3047ef62cebSEmmanuel Vadot # Example 1: Standalone MT7530 305b97ee269SEmmanuel Vadot - | 306b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 3077ef62cebSEmmanuel Vadot 308b97ee269SEmmanuel Vadot mdio { 309b97ee269SEmmanuel Vadot #address-cells = <1>; 310b97ee269SEmmanuel Vadot #size-cells = <0>; 3117ef62cebSEmmanuel Vadot 3127ef62cebSEmmanuel Vadot switch@1f { 313b97ee269SEmmanuel Vadot compatible = "mediatek,mt7530"; 3147ef62cebSEmmanuel Vadot reg = <0x1f>; 3157ef62cebSEmmanuel Vadot 3167ef62cebSEmmanuel Vadot reset-gpios = <&pio 33 0>; 317b97ee269SEmmanuel Vadot 318b97ee269SEmmanuel Vadot core-supply = <&mt6323_vpa_reg>; 319b97ee269SEmmanuel Vadot io-supply = <&mt6323_vemc3v3_reg>; 320b97ee269SEmmanuel Vadot 321b97ee269SEmmanuel Vadot ethernet-ports { 322b97ee269SEmmanuel Vadot #address-cells = <1>; 323b97ee269SEmmanuel Vadot #size-cells = <0>; 3247ef62cebSEmmanuel Vadot 325b97ee269SEmmanuel Vadot port@0 { 326b97ee269SEmmanuel Vadot reg = <0>; 3277ef62cebSEmmanuel Vadot label = "lan1"; 328b97ee269SEmmanuel Vadot }; 329b97ee269SEmmanuel Vadot 330b97ee269SEmmanuel Vadot port@1 { 331b97ee269SEmmanuel Vadot reg = <1>; 3327ef62cebSEmmanuel Vadot label = "lan2"; 333b97ee269SEmmanuel Vadot }; 334b97ee269SEmmanuel Vadot 335b97ee269SEmmanuel Vadot port@2 { 336b97ee269SEmmanuel Vadot reg = <2>; 3377ef62cebSEmmanuel Vadot label = "lan3"; 338b97ee269SEmmanuel Vadot }; 339b97ee269SEmmanuel Vadot 340b97ee269SEmmanuel Vadot port@3 { 341b97ee269SEmmanuel Vadot reg = <3>; 3427ef62cebSEmmanuel Vadot label = "lan4"; 343b97ee269SEmmanuel Vadot }; 344b97ee269SEmmanuel Vadot 345b97ee269SEmmanuel Vadot port@4 { 346b97ee269SEmmanuel Vadot reg = <4>; 347b97ee269SEmmanuel Vadot label = "wan"; 348b97ee269SEmmanuel Vadot }; 349b97ee269SEmmanuel Vadot 350b97ee269SEmmanuel Vadot port@6 { 351b97ee269SEmmanuel Vadot reg = <6>; 352b97ee269SEmmanuel Vadot ethernet = <&gmac0>; 353b97ee269SEmmanuel Vadot phy-mode = "rgmii"; 354b97ee269SEmmanuel Vadot 355b97ee269SEmmanuel Vadot fixed-link { 356b97ee269SEmmanuel Vadot speed = <1000>; 357b97ee269SEmmanuel Vadot full-duplex; 358b97ee269SEmmanuel Vadot pause; 359b97ee269SEmmanuel Vadot }; 360b97ee269SEmmanuel Vadot }; 3617ef62cebSEmmanuel Vadot }; 3627ef62cebSEmmanuel Vadot }; 363b97ee269SEmmanuel Vadot }; 364b97ee269SEmmanuel Vadot 3657ef62cebSEmmanuel Vadot # Example 2: MT7530 in MT7623AI SoC 3667ef62cebSEmmanuel Vadot - | 3677ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt2701-resets.h> 3687ef62cebSEmmanuel Vadot 3697ef62cebSEmmanuel Vadot mdio { 370b97ee269SEmmanuel Vadot #address-cells = <1>; 371b97ee269SEmmanuel Vadot #size-cells = <0>; 372b97ee269SEmmanuel Vadot 3737ef62cebSEmmanuel Vadot switch@1f { 3747ef62cebSEmmanuel Vadot compatible = "mediatek,mt7530"; 375b97ee269SEmmanuel Vadot reg = <0x1f>; 376b97ee269SEmmanuel Vadot 3777ef62cebSEmmanuel Vadot mediatek,mcm; 3787ef62cebSEmmanuel Vadot resets = <ðsys MT2701_ETHSYS_MCM_RST>; 379b97ee269SEmmanuel Vadot reset-names = "mcm"; 380b97ee269SEmmanuel Vadot 3817ef62cebSEmmanuel Vadot core-supply = <&mt6323_vpa_reg>; 3827ef62cebSEmmanuel Vadot io-supply = <&mt6323_vemc3v3_reg>; 3837ef62cebSEmmanuel Vadot 384b97ee269SEmmanuel Vadot ethernet-ports { 385b97ee269SEmmanuel Vadot #address-cells = <1>; 386b97ee269SEmmanuel Vadot #size-cells = <0>; 387b97ee269SEmmanuel Vadot 388b97ee269SEmmanuel Vadot port@0 { 389b97ee269SEmmanuel Vadot reg = <0>; 3907ef62cebSEmmanuel Vadot label = "lan1"; 391b97ee269SEmmanuel Vadot }; 392b97ee269SEmmanuel Vadot 393b97ee269SEmmanuel Vadot port@1 { 394b97ee269SEmmanuel Vadot reg = <1>; 3957ef62cebSEmmanuel Vadot label = "lan2"; 396b97ee269SEmmanuel Vadot }; 397b97ee269SEmmanuel Vadot 398b97ee269SEmmanuel Vadot port@2 { 399b97ee269SEmmanuel Vadot reg = <2>; 4007ef62cebSEmmanuel Vadot label = "lan3"; 401b97ee269SEmmanuel Vadot }; 402b97ee269SEmmanuel Vadot 403b97ee269SEmmanuel Vadot port@3 { 404b97ee269SEmmanuel Vadot reg = <3>; 405b97ee269SEmmanuel Vadot label = "lan4"; 406b97ee269SEmmanuel Vadot }; 4077ef62cebSEmmanuel Vadot 4087ef62cebSEmmanuel Vadot port@4 { 4097ef62cebSEmmanuel Vadot reg = <4>; 4107ef62cebSEmmanuel Vadot label = "wan"; 4117ef62cebSEmmanuel Vadot }; 412b97ee269SEmmanuel Vadot 413b97ee269SEmmanuel Vadot port@6 { 414b97ee269SEmmanuel Vadot reg = <6>; 415b97ee269SEmmanuel Vadot ethernet = <&gmac0>; 4167ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 417b97ee269SEmmanuel Vadot 418b97ee269SEmmanuel Vadot fixed-link { 419b97ee269SEmmanuel Vadot speed = <1000>; 420b97ee269SEmmanuel Vadot full-duplex; 421b97ee269SEmmanuel Vadot pause; 422b97ee269SEmmanuel Vadot }; 423b97ee269SEmmanuel Vadot }; 424b97ee269SEmmanuel Vadot }; 425b97ee269SEmmanuel Vadot }; 426b97ee269SEmmanuel Vadot }; 4277ef62cebSEmmanuel Vadot 4287ef62cebSEmmanuel Vadot # Example 3: Standalone MT7531 4297ef62cebSEmmanuel Vadot - | 4307ef62cebSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 4317ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 4327ef62cebSEmmanuel Vadot 4337ef62cebSEmmanuel Vadot mdio { 4347ef62cebSEmmanuel Vadot #address-cells = <1>; 4357ef62cebSEmmanuel Vadot #size-cells = <0>; 4367ef62cebSEmmanuel Vadot 4377ef62cebSEmmanuel Vadot switch@0 { 4387ef62cebSEmmanuel Vadot compatible = "mediatek,mt7531"; 4397ef62cebSEmmanuel Vadot reg = <0>; 4407ef62cebSEmmanuel Vadot 4417ef62cebSEmmanuel Vadot reset-gpios = <&pio 54 0>; 4427ef62cebSEmmanuel Vadot 4437ef62cebSEmmanuel Vadot interrupt-controller; 4447ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 4457ef62cebSEmmanuel Vadot interrupt-parent = <&pio>; 4467ef62cebSEmmanuel Vadot interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; 4477ef62cebSEmmanuel Vadot 4487ef62cebSEmmanuel Vadot ethernet-ports { 4497ef62cebSEmmanuel Vadot #address-cells = <1>; 4507ef62cebSEmmanuel Vadot #size-cells = <0>; 4517ef62cebSEmmanuel Vadot 4527ef62cebSEmmanuel Vadot port@0 { 4537ef62cebSEmmanuel Vadot reg = <0>; 4547ef62cebSEmmanuel Vadot label = "lan1"; 455b97ee269SEmmanuel Vadot }; 456b97ee269SEmmanuel Vadot 4577ef62cebSEmmanuel Vadot port@1 { 4587ef62cebSEmmanuel Vadot reg = <1>; 4597ef62cebSEmmanuel Vadot label = "lan2"; 4607ef62cebSEmmanuel Vadot }; 4617ef62cebSEmmanuel Vadot 4627ef62cebSEmmanuel Vadot port@2 { 4637ef62cebSEmmanuel Vadot reg = <2>; 4647ef62cebSEmmanuel Vadot label = "lan3"; 4657ef62cebSEmmanuel Vadot }; 4667ef62cebSEmmanuel Vadot 4677ef62cebSEmmanuel Vadot port@3 { 4687ef62cebSEmmanuel Vadot reg = <3>; 4697ef62cebSEmmanuel Vadot label = "lan4"; 4707ef62cebSEmmanuel Vadot }; 4717ef62cebSEmmanuel Vadot 4727ef62cebSEmmanuel Vadot port@4 { 4737ef62cebSEmmanuel Vadot reg = <4>; 4747ef62cebSEmmanuel Vadot label = "wan"; 4757ef62cebSEmmanuel Vadot }; 4767ef62cebSEmmanuel Vadot 4777ef62cebSEmmanuel Vadot port@6 { 4787ef62cebSEmmanuel Vadot reg = <6>; 4797ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 4807ef62cebSEmmanuel Vadot phy-mode = "2500base-x"; 4817ef62cebSEmmanuel Vadot 4827ef62cebSEmmanuel Vadot fixed-link { 4837ef62cebSEmmanuel Vadot speed = <2500>; 4847ef62cebSEmmanuel Vadot full-duplex; 4857ef62cebSEmmanuel Vadot pause; 4867ef62cebSEmmanuel Vadot }; 4877ef62cebSEmmanuel Vadot }; 4887ef62cebSEmmanuel Vadot }; 4897ef62cebSEmmanuel Vadot }; 4907ef62cebSEmmanuel Vadot }; 4917ef62cebSEmmanuel Vadot 4927ef62cebSEmmanuel Vadot # Example 4: MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs 493b97ee269SEmmanuel Vadot - | 4947ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 4957ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 4967ef62cebSEmmanuel Vadot 4977ef62cebSEmmanuel Vadot mdio { 4987ef62cebSEmmanuel Vadot #address-cells = <1>; 4997ef62cebSEmmanuel Vadot #size-cells = <0>; 5007ef62cebSEmmanuel Vadot 5017ef62cebSEmmanuel Vadot switch@1f { 5027ef62cebSEmmanuel Vadot compatible = "mediatek,mt7621"; 5037ef62cebSEmmanuel Vadot reg = <0x1f>; 5047ef62cebSEmmanuel Vadot 5057ef62cebSEmmanuel Vadot mediatek,mcm; 5067ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 5077ef62cebSEmmanuel Vadot reset-names = "mcm"; 5087ef62cebSEmmanuel Vadot 5097ef62cebSEmmanuel Vadot interrupt-controller; 5107ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 5117ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 5127ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 5137ef62cebSEmmanuel Vadot 5147ef62cebSEmmanuel Vadot ethernet-ports { 5157ef62cebSEmmanuel Vadot #address-cells = <1>; 5167ef62cebSEmmanuel Vadot #size-cells = <0>; 5177ef62cebSEmmanuel Vadot 5187ef62cebSEmmanuel Vadot port@0 { 5197ef62cebSEmmanuel Vadot reg = <0>; 5207ef62cebSEmmanuel Vadot label = "lan1"; 5217ef62cebSEmmanuel Vadot }; 5227ef62cebSEmmanuel Vadot 5237ef62cebSEmmanuel Vadot port@1 { 5247ef62cebSEmmanuel Vadot reg = <1>; 5257ef62cebSEmmanuel Vadot label = "lan2"; 5267ef62cebSEmmanuel Vadot }; 5277ef62cebSEmmanuel Vadot 5287ef62cebSEmmanuel Vadot port@2 { 5297ef62cebSEmmanuel Vadot reg = <2>; 5307ef62cebSEmmanuel Vadot label = "lan3"; 5317ef62cebSEmmanuel Vadot }; 5327ef62cebSEmmanuel Vadot 5337ef62cebSEmmanuel Vadot port@3 { 5347ef62cebSEmmanuel Vadot reg = <3>; 5357ef62cebSEmmanuel Vadot label = "lan4"; 5367ef62cebSEmmanuel Vadot }; 5377ef62cebSEmmanuel Vadot 5387ef62cebSEmmanuel Vadot port@4 { 5397ef62cebSEmmanuel Vadot reg = <4>; 5407ef62cebSEmmanuel Vadot label = "wan"; 5417ef62cebSEmmanuel Vadot }; 5427ef62cebSEmmanuel Vadot 5437ef62cebSEmmanuel Vadot port@6 { 5447ef62cebSEmmanuel Vadot reg = <6>; 5457ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 5467ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 5477ef62cebSEmmanuel Vadot 5487ef62cebSEmmanuel Vadot fixed-link { 5497ef62cebSEmmanuel Vadot speed = <1000>; 5507ef62cebSEmmanuel Vadot full-duplex; 5517ef62cebSEmmanuel Vadot pause; 5527ef62cebSEmmanuel Vadot }; 5537ef62cebSEmmanuel Vadot }; 5547ef62cebSEmmanuel Vadot }; 5557ef62cebSEmmanuel Vadot }; 5567ef62cebSEmmanuel Vadot }; 5577ef62cebSEmmanuel Vadot 5587ef62cebSEmmanuel Vadot # Example 5: MT7621: mux MT7530's phy4 to SoC's gmac1 5597ef62cebSEmmanuel Vadot - | 5607ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 5617ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 562b97ee269SEmmanuel Vadot 563b97ee269SEmmanuel Vadot ethernet { 564b97ee269SEmmanuel Vadot #address-cells = <1>; 565b97ee269SEmmanuel Vadot #size-cells = <0>; 5667ef62cebSEmmanuel Vadot 5677ef62cebSEmmanuel Vadot pinctrl-names = "default"; 5687ef62cebSEmmanuel Vadot pinctrl-0 = <&rgmii2_pins>; 5697ef62cebSEmmanuel Vadot 5707ef62cebSEmmanuel Vadot mac@1 { 571b97ee269SEmmanuel Vadot compatible = "mediatek,eth-mac"; 5727ef62cebSEmmanuel Vadot reg = <1>; 5737ef62cebSEmmanuel Vadot 574b97ee269SEmmanuel Vadot phy-mode = "rgmii"; 5757ef62cebSEmmanuel Vadot phy-handle = <&example5_ethphy4>; 576b97ee269SEmmanuel Vadot }; 577b97ee269SEmmanuel Vadot 5787ef62cebSEmmanuel Vadot mdio { 579b97ee269SEmmanuel Vadot #address-cells = <1>; 580b97ee269SEmmanuel Vadot #size-cells = <0>; 581b97ee269SEmmanuel Vadot 5827ef62cebSEmmanuel Vadot /* MT7530's phy4 */ 5837ef62cebSEmmanuel Vadot example5_ethphy4: ethernet-phy@4 { 5847ef62cebSEmmanuel Vadot reg = <4>; 585b97ee269SEmmanuel Vadot }; 586b97ee269SEmmanuel Vadot 587b97ee269SEmmanuel Vadot switch@1f { 588b97ee269SEmmanuel Vadot compatible = "mediatek,mt7621"; 589b97ee269SEmmanuel Vadot reg = <0x1f>; 590b97ee269SEmmanuel Vadot 5917ef62cebSEmmanuel Vadot mediatek,mcm; 5927ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 593b97ee269SEmmanuel Vadot reset-names = "mcm"; 594b97ee269SEmmanuel Vadot 5957ef62cebSEmmanuel Vadot interrupt-controller; 5967ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 5977ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 5987ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 5997ef62cebSEmmanuel Vadot 600b97ee269SEmmanuel Vadot ethernet-ports { 601b97ee269SEmmanuel Vadot #address-cells = <1>; 602b97ee269SEmmanuel Vadot #size-cells = <0>; 603b97ee269SEmmanuel Vadot 604b97ee269SEmmanuel Vadot port@0 { 605b97ee269SEmmanuel Vadot reg = <0>; 6067ef62cebSEmmanuel Vadot label = "lan1"; 607b97ee269SEmmanuel Vadot }; 608b97ee269SEmmanuel Vadot 609b97ee269SEmmanuel Vadot port@1 { 610b97ee269SEmmanuel Vadot reg = <1>; 6117ef62cebSEmmanuel Vadot label = "lan2"; 612b97ee269SEmmanuel Vadot }; 613b97ee269SEmmanuel Vadot 614b97ee269SEmmanuel Vadot port@2 { 615b97ee269SEmmanuel Vadot reg = <2>; 6167ef62cebSEmmanuel Vadot label = "lan3"; 617b97ee269SEmmanuel Vadot }; 618b97ee269SEmmanuel Vadot 619b97ee269SEmmanuel Vadot port@3 { 620b97ee269SEmmanuel Vadot reg = <3>; 6217ef62cebSEmmanuel Vadot label = "lan4"; 6227ef62cebSEmmanuel Vadot }; 6237ef62cebSEmmanuel Vadot 624cb7aa33aSEmmanuel Vadot /* Commented out, phy4 is connected to gmac1. 6257ef62cebSEmmanuel Vadot port@4 { 6267ef62cebSEmmanuel Vadot reg = <4>; 6277ef62cebSEmmanuel Vadot label = "wan"; 6287ef62cebSEmmanuel Vadot }; 6297ef62cebSEmmanuel Vadot */ 6307ef62cebSEmmanuel Vadot 6317ef62cebSEmmanuel Vadot port@6 { 6327ef62cebSEmmanuel Vadot reg = <6>; 6337ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 6347ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 6357ef62cebSEmmanuel Vadot 6367ef62cebSEmmanuel Vadot fixed-link { 6377ef62cebSEmmanuel Vadot speed = <1000>; 6387ef62cebSEmmanuel Vadot full-duplex; 6397ef62cebSEmmanuel Vadot pause; 6407ef62cebSEmmanuel Vadot }; 6417ef62cebSEmmanuel Vadot }; 6427ef62cebSEmmanuel Vadot }; 6437ef62cebSEmmanuel Vadot }; 6447ef62cebSEmmanuel Vadot }; 6457ef62cebSEmmanuel Vadot }; 6467ef62cebSEmmanuel Vadot 6477ef62cebSEmmanuel Vadot # Example 6: MT7621: mux external phy to SoC's gmac1 6487ef62cebSEmmanuel Vadot - | 6497ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 6507ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 6517ef62cebSEmmanuel Vadot 6527ef62cebSEmmanuel Vadot ethernet { 6537ef62cebSEmmanuel Vadot #address-cells = <1>; 6547ef62cebSEmmanuel Vadot #size-cells = <0>; 6557ef62cebSEmmanuel Vadot 6567ef62cebSEmmanuel Vadot pinctrl-names = "default"; 6577ef62cebSEmmanuel Vadot pinctrl-0 = <&rgmii2_pins>; 6587ef62cebSEmmanuel Vadot 6597ef62cebSEmmanuel Vadot mac@1 { 6607ef62cebSEmmanuel Vadot compatible = "mediatek,eth-mac"; 6617ef62cebSEmmanuel Vadot reg = <1>; 6627ef62cebSEmmanuel Vadot 6637ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 6647ef62cebSEmmanuel Vadot phy-handle = <&example6_ethphy7>; 6657ef62cebSEmmanuel Vadot }; 6667ef62cebSEmmanuel Vadot 6677ef62cebSEmmanuel Vadot mdio { 6687ef62cebSEmmanuel Vadot #address-cells = <1>; 6697ef62cebSEmmanuel Vadot #size-cells = <0>; 6707ef62cebSEmmanuel Vadot 6717ef62cebSEmmanuel Vadot /* External PHY */ 6727ef62cebSEmmanuel Vadot example6_ethphy7: ethernet-phy@7 { 6737ef62cebSEmmanuel Vadot reg = <7>; 6747ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 6757ef62cebSEmmanuel Vadot }; 6767ef62cebSEmmanuel Vadot 6777ef62cebSEmmanuel Vadot switch@1f { 6787ef62cebSEmmanuel Vadot compatible = "mediatek,mt7621"; 6797ef62cebSEmmanuel Vadot reg = <0x1f>; 6807ef62cebSEmmanuel Vadot 6817ef62cebSEmmanuel Vadot mediatek,mcm; 6827ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 6837ef62cebSEmmanuel Vadot reset-names = "mcm"; 6847ef62cebSEmmanuel Vadot 6857ef62cebSEmmanuel Vadot interrupt-controller; 6867ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 6877ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 6887ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 6897ef62cebSEmmanuel Vadot 6907ef62cebSEmmanuel Vadot ethernet-ports { 6917ef62cebSEmmanuel Vadot #address-cells = <1>; 6927ef62cebSEmmanuel Vadot #size-cells = <0>; 6937ef62cebSEmmanuel Vadot 6947ef62cebSEmmanuel Vadot port@0 { 6957ef62cebSEmmanuel Vadot reg = <0>; 6967ef62cebSEmmanuel Vadot label = "lan1"; 6977ef62cebSEmmanuel Vadot }; 6987ef62cebSEmmanuel Vadot 6997ef62cebSEmmanuel Vadot port@1 { 7007ef62cebSEmmanuel Vadot reg = <1>; 7017ef62cebSEmmanuel Vadot label = "lan2"; 7027ef62cebSEmmanuel Vadot }; 7037ef62cebSEmmanuel Vadot 7047ef62cebSEmmanuel Vadot port@2 { 7057ef62cebSEmmanuel Vadot reg = <2>; 706b97ee269SEmmanuel Vadot label = "lan3"; 707b97ee269SEmmanuel Vadot }; 708b97ee269SEmmanuel Vadot 7097ef62cebSEmmanuel Vadot port@3 { 7107ef62cebSEmmanuel Vadot reg = <3>; 7117ef62cebSEmmanuel Vadot label = "lan4"; 7127ef62cebSEmmanuel Vadot }; 7137ef62cebSEmmanuel Vadot 714b97ee269SEmmanuel Vadot port@4 { 715b97ee269SEmmanuel Vadot reg = <4>; 7167ef62cebSEmmanuel Vadot label = "wan"; 7177ef62cebSEmmanuel Vadot }; 7187ef62cebSEmmanuel Vadot 7197ef62cebSEmmanuel Vadot port@6 { 7207ef62cebSEmmanuel Vadot reg = <6>; 7217ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 7227ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 7237ef62cebSEmmanuel Vadot 7247ef62cebSEmmanuel Vadot fixed-link { 7257ef62cebSEmmanuel Vadot speed = <1000>; 7267ef62cebSEmmanuel Vadot full-duplex; 7277ef62cebSEmmanuel Vadot pause; 7287ef62cebSEmmanuel Vadot }; 7297ef62cebSEmmanuel Vadot }; 7307ef62cebSEmmanuel Vadot }; 7317ef62cebSEmmanuel Vadot }; 7327ef62cebSEmmanuel Vadot }; 7337ef62cebSEmmanuel Vadot }; 7347ef62cebSEmmanuel Vadot 7357ef62cebSEmmanuel Vadot # Example 7: MT7621: mux external phy to MT7530's port 5 7367ef62cebSEmmanuel Vadot - | 7377ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/mips-gic.h> 7387ef62cebSEmmanuel Vadot #include <dt-bindings/reset/mt7621-reset.h> 7397ef62cebSEmmanuel Vadot 7407ef62cebSEmmanuel Vadot ethernet { 7417ef62cebSEmmanuel Vadot #address-cells = <1>; 7427ef62cebSEmmanuel Vadot #size-cells = <0>; 7437ef62cebSEmmanuel Vadot 7447ef62cebSEmmanuel Vadot pinctrl-names = "default"; 7457ef62cebSEmmanuel Vadot pinctrl-0 = <&rgmii2_pins>; 7467ef62cebSEmmanuel Vadot 7477ef62cebSEmmanuel Vadot mdio { 7487ef62cebSEmmanuel Vadot #address-cells = <1>; 7497ef62cebSEmmanuel Vadot #size-cells = <0>; 7507ef62cebSEmmanuel Vadot 7517ef62cebSEmmanuel Vadot /* External PHY */ 7527ef62cebSEmmanuel Vadot example7_ethphy7: ethernet-phy@7 { 7537ef62cebSEmmanuel Vadot reg = <7>; 7547ef62cebSEmmanuel Vadot phy-mode = "rgmii"; 7557ef62cebSEmmanuel Vadot }; 7567ef62cebSEmmanuel Vadot 7577ef62cebSEmmanuel Vadot switch@1f { 7587ef62cebSEmmanuel Vadot compatible = "mediatek,mt7621"; 7597ef62cebSEmmanuel Vadot reg = <0x1f>; 7607ef62cebSEmmanuel Vadot 7617ef62cebSEmmanuel Vadot mediatek,mcm; 7627ef62cebSEmmanuel Vadot resets = <&sysc MT7621_RST_MCM>; 7637ef62cebSEmmanuel Vadot reset-names = "mcm"; 7647ef62cebSEmmanuel Vadot 7657ef62cebSEmmanuel Vadot interrupt-controller; 7667ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 7677ef62cebSEmmanuel Vadot interrupt-parent = <&gic>; 7687ef62cebSEmmanuel Vadot interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; 7697ef62cebSEmmanuel Vadot 7707ef62cebSEmmanuel Vadot ethernet-ports { 7717ef62cebSEmmanuel Vadot #address-cells = <1>; 7727ef62cebSEmmanuel Vadot #size-cells = <0>; 7737ef62cebSEmmanuel Vadot 7747ef62cebSEmmanuel Vadot port@0 { 7757ef62cebSEmmanuel Vadot reg = <0>; 7767ef62cebSEmmanuel Vadot label = "lan1"; 7777ef62cebSEmmanuel Vadot }; 7787ef62cebSEmmanuel Vadot 7797ef62cebSEmmanuel Vadot port@1 { 7807ef62cebSEmmanuel Vadot reg = <1>; 7817ef62cebSEmmanuel Vadot label = "lan2"; 7827ef62cebSEmmanuel Vadot }; 7837ef62cebSEmmanuel Vadot 7847ef62cebSEmmanuel Vadot port@2 { 7857ef62cebSEmmanuel Vadot reg = <2>; 7867ef62cebSEmmanuel Vadot label = "lan3"; 7877ef62cebSEmmanuel Vadot }; 7887ef62cebSEmmanuel Vadot 7897ef62cebSEmmanuel Vadot port@3 { 7907ef62cebSEmmanuel Vadot reg = <3>; 791b97ee269SEmmanuel Vadot label = "lan4"; 792b97ee269SEmmanuel Vadot }; 793b97ee269SEmmanuel Vadot 7947ef62cebSEmmanuel Vadot port@4 { 7957ef62cebSEmmanuel Vadot reg = <4>; 7967ef62cebSEmmanuel Vadot label = "wan"; 7977ef62cebSEmmanuel Vadot }; 7987ef62cebSEmmanuel Vadot 799b97ee269SEmmanuel Vadot port@5 { 800b97ee269SEmmanuel Vadot reg = <5>; 8017ef62cebSEmmanuel Vadot label = "extphy"; 8027ef62cebSEmmanuel Vadot phy-mode = "rgmii-txid"; 8037ef62cebSEmmanuel Vadot phy-handle = <&example7_ethphy7>; 804b97ee269SEmmanuel Vadot }; 805b97ee269SEmmanuel Vadot 8067ef62cebSEmmanuel Vadot port@6 { 807b97ee269SEmmanuel Vadot reg = <6>; 8087ef62cebSEmmanuel Vadot ethernet = <&gmac0>; 8097ef62cebSEmmanuel Vadot phy-mode = "trgmii"; 810b97ee269SEmmanuel Vadot 811b97ee269SEmmanuel Vadot fixed-link { 812b97ee269SEmmanuel Vadot speed = <1000>; 813b97ee269SEmmanuel Vadot full-duplex; 814b97ee269SEmmanuel Vadot pause; 815b97ee269SEmmanuel Vadot }; 816b97ee269SEmmanuel Vadot }; 817b97ee269SEmmanuel Vadot }; 818b97ee269SEmmanuel Vadot }; 819b97ee269SEmmanuel Vadot }; 820b97ee269SEmmanuel Vadot }; 821