xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/mediatek,mt7530.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
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>
14b97ee269SEmmanuel Vadot
15b97ee269SEmmanuel Vadotdescription: |
167ef62cebSEmmanuel Vadot  There are two versions of MT7530, standalone and in a multi-chip module.
17b97ee269SEmmanuel Vadot
187ef62cebSEmmanuel Vadot  MT7530 is a part of the multi-chip module in MT7620AN, MT7620DA, MT7620DAN,
197ef62cebSEmmanuel Vadot  MT7620NN, MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs.
20b97ee269SEmmanuel Vadot
217ef62cebSEmmanuel Vadot  MT7530 in MT7620AN, MT7620DA, MT7620DAN and MT7620NN SoCs has got 10/100 PHYs
227ef62cebSEmmanuel Vadot  and the switch registers are directly mapped into SoC's memory map rather than
237ef62cebSEmmanuel Vadot  using MDIO. The DSA driver currently doesn't support this.
24b97ee269SEmmanuel Vadot
257ef62cebSEmmanuel Vadot  There is only the standalone version of MT7531.
26b97ee269SEmmanuel Vadot
27*cb7aa33aSEmmanuel Vadot  Port 5 on MT7530 has got various ways of configuration:
28b97ee269SEmmanuel Vadot
297ef62cebSEmmanuel Vadot    - Port 5 can be used as a CPU port.
307ef62cebSEmmanuel Vadot
31*cb7aa33aSEmmanuel Vadot    - PHY 0 or 4 of the switch can be muxed to gmac5 of the switch. Therefore,
32*cb7aa33aSEmmanuel Vadot      the gmac of the SoC which is wired to port 5 can connect to the PHY.
33*cb7aa33aSEmmanuel Vadot      This is usually used for connecting the wan port directly to the CPU to
34*cb7aa33aSEmmanuel Vadot      achieve 2 Gbps routing in total.
357ef62cebSEmmanuel Vadot
36*cb7aa33aSEmmanuel Vadot      The driver looks up the reg on the ethernet-phy node, which the phy-handle
37*cb7aa33aSEmmanuel Vadot      property on the gmac node refers to, to mux the specified phy.
387ef62cebSEmmanuel Vadot
397ef62cebSEmmanuel Vadot      The driver requires the gmac of the SoC to have "mediatek,eth-mac" as the
40*cb7aa33aSEmmanuel Vadot      compatible string and the reg must be 1. So, for now, only gmac1 of a
417ef62cebSEmmanuel Vadot      MediaTek SoC can benefit this. Banana Pi BPI-R2 suits this.
427ef62cebSEmmanuel Vadot
437ef62cebSEmmanuel Vadot      For the MT7621 SoCs, rgmii2 group must be claimed with rgmii2 function.
44*cb7aa33aSEmmanuel Vadot
457ef62cebSEmmanuel Vadot      Check out example 5.
467ef62cebSEmmanuel Vadot
47*cb7aa33aSEmmanuel Vadot    - For the multi-chip module MT7530, in case of an external phy wired to
48*cb7aa33aSEmmanuel Vadot      gmac1 of the SoC, port 5 must not be enabled.
497ef62cebSEmmanuel Vadot
507ef62cebSEmmanuel Vadot      In case of muxing PHY 0 or 4, the external phy must not be enabled.
517ef62cebSEmmanuel Vadot
527ef62cebSEmmanuel Vadot      For the MT7621 SoCs, rgmii2 group must be claimed with rgmii2 function.
53*cb7aa33aSEmmanuel Vadot
547ef62cebSEmmanuel Vadot      Check out example 6.
557ef62cebSEmmanuel Vadot
56*cb7aa33aSEmmanuel Vadot    - Port 5 can be wired to an external phy. Port 5 becomes a DSA slave.
577ef62cebSEmmanuel Vadot
58*cb7aa33aSEmmanuel Vadot      For the multi-chip module MT7530, the external phy must be wired TX to TX
59*cb7aa33aSEmmanuel Vadot      to gmac1 of the SoC for this to work. Ubiquiti EdgeRouter X SFP is wired
60*cb7aa33aSEmmanuel Vadot      this way.
61*cb7aa33aSEmmanuel Vadot
62*cb7aa33aSEmmanuel Vadot      For the multi-chip module MT7530, muxing PHY 0 or 4 won't work when the
63*cb7aa33aSEmmanuel Vadot      external phy is connected TX to TX.
647ef62cebSEmmanuel Vadot
657ef62cebSEmmanuel Vadot      For the MT7621 SoCs, rgmii2 group must be claimed with gpio function.
66*cb7aa33aSEmmanuel Vadot
677ef62cebSEmmanuel Vadot      Check out example 7.
68b97ee269SEmmanuel Vadot
69b97ee269SEmmanuel Vadotproperties:
70b97ee269SEmmanuel Vadot  compatible:
717ef62cebSEmmanuel Vadot    oneOf:
727ef62cebSEmmanuel Vadot      - description:
737ef62cebSEmmanuel Vadot          Standalone MT7530 and multi-chip module MT7530 in MT7623AI SoC
747ef62cebSEmmanuel Vadot        const: mediatek,mt7530
757ef62cebSEmmanuel Vadot
767ef62cebSEmmanuel Vadot      - description:
777ef62cebSEmmanuel Vadot          Standalone MT7531
787ef62cebSEmmanuel Vadot        const: mediatek,mt7531
797ef62cebSEmmanuel Vadot
807ef62cebSEmmanuel Vadot      - description:
817ef62cebSEmmanuel Vadot          Multi-chip module MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs
827ef62cebSEmmanuel Vadot        const: mediatek,mt7621
83b97ee269SEmmanuel Vadot
84b97ee269SEmmanuel Vadot  reg:
85b97ee269SEmmanuel Vadot    maxItems: 1
86b97ee269SEmmanuel Vadot
87b97ee269SEmmanuel Vadot  core-supply:
88b97ee269SEmmanuel Vadot    description:
89b97ee269SEmmanuel Vadot      Phandle to the regulator node necessary for the core power.
90b97ee269SEmmanuel Vadot
91b97ee269SEmmanuel Vadot  "#gpio-cells":
92b97ee269SEmmanuel Vadot    const: 2
93b97ee269SEmmanuel Vadot
94b97ee269SEmmanuel Vadot  gpio-controller:
95b97ee269SEmmanuel Vadot    type: boolean
96b97ee269SEmmanuel Vadot    description:
977ef62cebSEmmanuel Vadot      If defined, LED controller of the MT7530 switch will run on GPIO mode.
987ef62cebSEmmanuel Vadot
997ef62cebSEmmanuel Vadot      There are 15 controllable pins.
1007ef62cebSEmmanuel Vadot      port 0 LED 0..2 as GPIO 0..2
1017ef62cebSEmmanuel Vadot      port 1 LED 0..2 as GPIO 3..5
1027ef62cebSEmmanuel Vadot      port 2 LED 0..2 as GPIO 6..8
1037ef62cebSEmmanuel Vadot      port 3 LED 0..2 as GPIO 9..11
1047ef62cebSEmmanuel Vadot      port 4 LED 0..2 as GPIO 12..14
105b97ee269SEmmanuel Vadot
106b97ee269SEmmanuel Vadot  "#interrupt-cells":
107b97ee269SEmmanuel Vadot    const: 1
108b97ee269SEmmanuel Vadot
109b97ee269SEmmanuel Vadot  interrupt-controller: true
110b97ee269SEmmanuel Vadot
111b97ee269SEmmanuel Vadot  interrupts:
112b97ee269SEmmanuel Vadot    maxItems: 1
113b97ee269SEmmanuel Vadot
114b97ee269SEmmanuel Vadot  io-supply:
115b97ee269SEmmanuel Vadot    description:
116b97ee269SEmmanuel Vadot      Phandle to the regulator node necessary for the I/O power.
1177ef62cebSEmmanuel Vadot      See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt for
1187ef62cebSEmmanuel Vadot      details for the regulator setup on these boards.
119b97ee269SEmmanuel Vadot
120b97ee269SEmmanuel Vadot  mediatek,mcm:
121b97ee269SEmmanuel Vadot    type: boolean
122b97ee269SEmmanuel Vadot    description:
1237ef62cebSEmmanuel Vadot      Used for MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs which the MT7530
1247ef62cebSEmmanuel Vadot      switch is a part of the multi-chip module.
125b97ee269SEmmanuel Vadot
126b97ee269SEmmanuel Vadot  reset-gpios:
1277ef62cebSEmmanuel Vadot    description:
1287ef62cebSEmmanuel Vadot      GPIO to reset the switch. Use this if mediatek,mcm is not used.
1297ef62cebSEmmanuel Vadot      This property is optional because some boards share the reset line with
1307ef62cebSEmmanuel Vadot      other components which makes it impossible to probe the switch if the
1317ef62cebSEmmanuel Vadot      reset line is used.
132b97ee269SEmmanuel Vadot    maxItems: 1
133b97ee269SEmmanuel Vadot
134b97ee269SEmmanuel Vadot  reset-names:
135b97ee269SEmmanuel Vadot    const: mcm
136b97ee269SEmmanuel Vadot
137b97ee269SEmmanuel Vadot  resets:
138b97ee269SEmmanuel Vadot    description:
1397ef62cebSEmmanuel Vadot      Phandle pointing to the system reset controller with line index for the
1407ef62cebSEmmanuel Vadot      ethsys.
141b97ee269SEmmanuel Vadot    maxItems: 1
142b97ee269SEmmanuel Vadot
143b97ee269SEmmanuel VadotpatternProperties:
144b97ee269SEmmanuel Vadot  "^(ethernet-)?ports$":
145b97ee269SEmmanuel Vadot    type: object
146b97ee269SEmmanuel Vadot
147b97ee269SEmmanuel Vadot    patternProperties:
148b97ee269SEmmanuel Vadot      "^(ethernet-)?port@[0-9]+$":
149b97ee269SEmmanuel Vadot        type: object
150b97ee269SEmmanuel Vadot
151b97ee269SEmmanuel Vadot        properties:
152b97ee269SEmmanuel Vadot          reg:
153b97ee269SEmmanuel Vadot            description:
1547ef62cebSEmmanuel Vadot              Port address described must be 5 or 6 for CPU port and from 0 to 5
1557ef62cebSEmmanuel Vadot              for user ports.
156b97ee269SEmmanuel Vadot
157b97ee269SEmmanuel Vadot        allOf:
158b97ee269SEmmanuel Vadot          - if:
1597ef62cebSEmmanuel Vadot              required: [ ethernet ]
160b97ee269SEmmanuel Vadot            then:
1617ef62cebSEmmanuel Vadot              properties:
1627ef62cebSEmmanuel Vadot                reg:
1637ef62cebSEmmanuel Vadot                  enum:
1647ef62cebSEmmanuel Vadot                    - 5
1657ef62cebSEmmanuel Vadot                    - 6
166b97ee269SEmmanuel Vadot
167b97ee269SEmmanuel Vadotrequired:
168b97ee269SEmmanuel Vadot  - compatible
169b97ee269SEmmanuel Vadot  - reg
170b97ee269SEmmanuel Vadot
1717ef62cebSEmmanuel Vadot$defs:
1727ef62cebSEmmanuel Vadot  mt7530-dsa-port:
1737ef62cebSEmmanuel Vadot    patternProperties:
1747ef62cebSEmmanuel Vadot      "^(ethernet-)?ports$":
1757ef62cebSEmmanuel Vadot        patternProperties:
1767ef62cebSEmmanuel Vadot          "^(ethernet-)?port@[0-9]+$":
1777ef62cebSEmmanuel Vadot            if:
1787ef62cebSEmmanuel Vadot              required: [ ethernet ]
1797ef62cebSEmmanuel Vadot            then:
1807ef62cebSEmmanuel Vadot              if:
1817ef62cebSEmmanuel Vadot                properties:
1827ef62cebSEmmanuel Vadot                  reg:
1837ef62cebSEmmanuel Vadot                    const: 5
1847ef62cebSEmmanuel Vadot              then:
1857ef62cebSEmmanuel Vadot                properties:
1867ef62cebSEmmanuel Vadot                  phy-mode:
1877ef62cebSEmmanuel Vadot                    enum:
1887ef62cebSEmmanuel Vadot                      - gmii
1897ef62cebSEmmanuel Vadot                      - mii
1907ef62cebSEmmanuel Vadot                      - rgmii
1917ef62cebSEmmanuel Vadot              else:
1927ef62cebSEmmanuel Vadot                properties:
1937ef62cebSEmmanuel Vadot                  phy-mode:
1947ef62cebSEmmanuel Vadot                    enum:
1957ef62cebSEmmanuel Vadot                      - rgmii
1967ef62cebSEmmanuel Vadot                      - trgmii
1977ef62cebSEmmanuel Vadot
1987ef62cebSEmmanuel Vadot  mt7531-dsa-port:
1997ef62cebSEmmanuel Vadot    patternProperties:
2007ef62cebSEmmanuel Vadot      "^(ethernet-)?ports$":
2017ef62cebSEmmanuel Vadot        patternProperties:
2027ef62cebSEmmanuel Vadot          "^(ethernet-)?port@[0-9]+$":
2037ef62cebSEmmanuel Vadot            if:
2047ef62cebSEmmanuel Vadot              required: [ ethernet ]
2057ef62cebSEmmanuel Vadot            then:
2067ef62cebSEmmanuel Vadot              if:
2077ef62cebSEmmanuel Vadot                properties:
2087ef62cebSEmmanuel Vadot                  reg:
2097ef62cebSEmmanuel Vadot                    const: 5
2107ef62cebSEmmanuel Vadot              then:
2117ef62cebSEmmanuel Vadot                properties:
2127ef62cebSEmmanuel Vadot                  phy-mode:
2137ef62cebSEmmanuel Vadot                    enum:
2147ef62cebSEmmanuel Vadot                      - 1000base-x
2157ef62cebSEmmanuel Vadot                      - 2500base-x
2167ef62cebSEmmanuel Vadot                      - rgmii
2177ef62cebSEmmanuel Vadot                      - sgmii
2187ef62cebSEmmanuel Vadot              else:
2197ef62cebSEmmanuel Vadot                properties:
2207ef62cebSEmmanuel Vadot                  phy-mode:
2217ef62cebSEmmanuel Vadot                    enum:
2227ef62cebSEmmanuel Vadot                      - 1000base-x
2237ef62cebSEmmanuel Vadot                      - 2500base-x
2247ef62cebSEmmanuel Vadot                      - sgmii
2257ef62cebSEmmanuel Vadot
226b97ee269SEmmanuel VadotallOf:
227*cb7aa33aSEmmanuel Vadot  - $ref: dsa.yaml#/$defs/ethernet-ports
228b97ee269SEmmanuel Vadot  - if:
229b97ee269SEmmanuel Vadot      required:
230b97ee269SEmmanuel Vadot        - mediatek,mcm
231b97ee269SEmmanuel Vadot    then:
2327ef62cebSEmmanuel Vadot      properties:
2337ef62cebSEmmanuel Vadot        reset-gpios: false
2347ef62cebSEmmanuel Vadot
235b97ee269SEmmanuel Vadot      required:
236b97ee269SEmmanuel Vadot        - resets
237b97ee269SEmmanuel Vadot        - reset-names
238b97ee269SEmmanuel Vadot
239b97ee269SEmmanuel Vadot  - dependencies:
240b97ee269SEmmanuel Vadot      interrupt-controller: [ interrupts ]
241b97ee269SEmmanuel Vadot
242b97ee269SEmmanuel Vadot  - if:
243b97ee269SEmmanuel Vadot      properties:
244b97ee269SEmmanuel Vadot        compatible:
2457ef62cebSEmmanuel Vadot          const: mediatek,mt7530
246b97ee269SEmmanuel Vadot    then:
2477ef62cebSEmmanuel Vadot      $ref: "#/$defs/mt7530-dsa-port"
248b97ee269SEmmanuel Vadot      required:
249b97ee269SEmmanuel Vadot        - core-supply
250b97ee269SEmmanuel Vadot        - io-supply
251b97ee269SEmmanuel Vadot
2527ef62cebSEmmanuel Vadot  - if:
2537ef62cebSEmmanuel Vadot      properties:
2547ef62cebSEmmanuel Vadot        compatible:
2557ef62cebSEmmanuel Vadot          const: mediatek,mt7531
2567ef62cebSEmmanuel Vadot    then:
2577ef62cebSEmmanuel Vadot      $ref: "#/$defs/mt7531-dsa-port"
2587ef62cebSEmmanuel Vadot      properties:
2597ef62cebSEmmanuel Vadot        gpio-controller: false
2607ef62cebSEmmanuel Vadot        mediatek,mcm: false
2617ef62cebSEmmanuel Vadot
2627ef62cebSEmmanuel Vadot  - if:
2637ef62cebSEmmanuel Vadot      properties:
2647ef62cebSEmmanuel Vadot        compatible:
2657ef62cebSEmmanuel Vadot          const: mediatek,mt7621
2667ef62cebSEmmanuel Vadot    then:
2677ef62cebSEmmanuel Vadot      $ref: "#/$defs/mt7530-dsa-port"
2687ef62cebSEmmanuel Vadot      required:
2697ef62cebSEmmanuel Vadot        - mediatek,mcm
2707ef62cebSEmmanuel Vadot
271b97ee269SEmmanuel VadotunevaluatedProperties: false
272b97ee269SEmmanuel Vadot
273b97ee269SEmmanuel Vadotexamples:
2747ef62cebSEmmanuel Vadot  # Example 1: Standalone MT7530
275b97ee269SEmmanuel Vadot  - |
276b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
2777ef62cebSEmmanuel Vadot
278b97ee269SEmmanuel Vadot    mdio {
279b97ee269SEmmanuel Vadot        #address-cells = <1>;
280b97ee269SEmmanuel Vadot        #size-cells = <0>;
2817ef62cebSEmmanuel Vadot
2827ef62cebSEmmanuel Vadot        switch@1f {
283b97ee269SEmmanuel Vadot            compatible = "mediatek,mt7530";
2847ef62cebSEmmanuel Vadot            reg = <0x1f>;
2857ef62cebSEmmanuel Vadot
2867ef62cebSEmmanuel Vadot            reset-gpios = <&pio 33 0>;
287b97ee269SEmmanuel Vadot
288b97ee269SEmmanuel Vadot            core-supply = <&mt6323_vpa_reg>;
289b97ee269SEmmanuel Vadot            io-supply = <&mt6323_vemc3v3_reg>;
290b97ee269SEmmanuel Vadot
291b97ee269SEmmanuel Vadot            ethernet-ports {
292b97ee269SEmmanuel Vadot                #address-cells = <1>;
293b97ee269SEmmanuel Vadot                #size-cells = <0>;
2947ef62cebSEmmanuel Vadot
295b97ee269SEmmanuel Vadot                port@0 {
296b97ee269SEmmanuel Vadot                    reg = <0>;
2977ef62cebSEmmanuel Vadot                    label = "lan1";
298b97ee269SEmmanuel Vadot                };
299b97ee269SEmmanuel Vadot
300b97ee269SEmmanuel Vadot                port@1 {
301b97ee269SEmmanuel Vadot                    reg = <1>;
3027ef62cebSEmmanuel Vadot                    label = "lan2";
303b97ee269SEmmanuel Vadot                };
304b97ee269SEmmanuel Vadot
305b97ee269SEmmanuel Vadot                port@2 {
306b97ee269SEmmanuel Vadot                    reg = <2>;
3077ef62cebSEmmanuel Vadot                    label = "lan3";
308b97ee269SEmmanuel Vadot                };
309b97ee269SEmmanuel Vadot
310b97ee269SEmmanuel Vadot                port@3 {
311b97ee269SEmmanuel Vadot                    reg = <3>;
3127ef62cebSEmmanuel Vadot                    label = "lan4";
313b97ee269SEmmanuel Vadot                };
314b97ee269SEmmanuel Vadot
315b97ee269SEmmanuel Vadot                port@4 {
316b97ee269SEmmanuel Vadot                    reg = <4>;
317b97ee269SEmmanuel Vadot                    label = "wan";
318b97ee269SEmmanuel Vadot                };
319b97ee269SEmmanuel Vadot
320b97ee269SEmmanuel Vadot                port@6 {
321b97ee269SEmmanuel Vadot                    reg = <6>;
322b97ee269SEmmanuel Vadot                    ethernet = <&gmac0>;
323b97ee269SEmmanuel Vadot                    phy-mode = "rgmii";
324b97ee269SEmmanuel Vadot
325b97ee269SEmmanuel Vadot                    fixed-link {
326b97ee269SEmmanuel Vadot                        speed = <1000>;
327b97ee269SEmmanuel Vadot                        full-duplex;
328b97ee269SEmmanuel Vadot                        pause;
329b97ee269SEmmanuel Vadot                    };
330b97ee269SEmmanuel Vadot                };
3317ef62cebSEmmanuel Vadot            };
3327ef62cebSEmmanuel Vadot        };
333b97ee269SEmmanuel Vadot    };
334b97ee269SEmmanuel Vadot
3357ef62cebSEmmanuel Vadot  # Example 2: MT7530 in MT7623AI SoC
3367ef62cebSEmmanuel Vadot  - |
3377ef62cebSEmmanuel Vadot    #include <dt-bindings/reset/mt2701-resets.h>
3387ef62cebSEmmanuel Vadot
3397ef62cebSEmmanuel Vadot    mdio {
340b97ee269SEmmanuel Vadot        #address-cells = <1>;
341b97ee269SEmmanuel Vadot        #size-cells = <0>;
342b97ee269SEmmanuel Vadot
3437ef62cebSEmmanuel Vadot        switch@1f {
3447ef62cebSEmmanuel Vadot            compatible = "mediatek,mt7530";
345b97ee269SEmmanuel Vadot            reg = <0x1f>;
346b97ee269SEmmanuel Vadot
3477ef62cebSEmmanuel Vadot            mediatek,mcm;
3487ef62cebSEmmanuel Vadot            resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
349b97ee269SEmmanuel Vadot            reset-names = "mcm";
350b97ee269SEmmanuel Vadot
3517ef62cebSEmmanuel Vadot            core-supply = <&mt6323_vpa_reg>;
3527ef62cebSEmmanuel Vadot            io-supply = <&mt6323_vemc3v3_reg>;
3537ef62cebSEmmanuel Vadot
354b97ee269SEmmanuel Vadot            ethernet-ports {
355b97ee269SEmmanuel Vadot                #address-cells = <1>;
356b97ee269SEmmanuel Vadot                #size-cells = <0>;
357b97ee269SEmmanuel Vadot
358b97ee269SEmmanuel Vadot                port@0 {
359b97ee269SEmmanuel Vadot                    reg = <0>;
3607ef62cebSEmmanuel Vadot                    label = "lan1";
361b97ee269SEmmanuel Vadot                };
362b97ee269SEmmanuel Vadot
363b97ee269SEmmanuel Vadot                port@1 {
364b97ee269SEmmanuel Vadot                    reg = <1>;
3657ef62cebSEmmanuel Vadot                    label = "lan2";
366b97ee269SEmmanuel Vadot                };
367b97ee269SEmmanuel Vadot
368b97ee269SEmmanuel Vadot                port@2 {
369b97ee269SEmmanuel Vadot                    reg = <2>;
3707ef62cebSEmmanuel Vadot                    label = "lan3";
371b97ee269SEmmanuel Vadot                };
372b97ee269SEmmanuel Vadot
373b97ee269SEmmanuel Vadot                port@3 {
374b97ee269SEmmanuel Vadot                    reg = <3>;
375b97ee269SEmmanuel Vadot                    label = "lan4";
376b97ee269SEmmanuel Vadot                };
3777ef62cebSEmmanuel Vadot
3787ef62cebSEmmanuel Vadot                port@4 {
3797ef62cebSEmmanuel Vadot                    reg = <4>;
3807ef62cebSEmmanuel Vadot                    label = "wan";
3817ef62cebSEmmanuel Vadot                };
382b97ee269SEmmanuel Vadot
383b97ee269SEmmanuel Vadot                port@6 {
384b97ee269SEmmanuel Vadot                    reg = <6>;
385b97ee269SEmmanuel Vadot                    ethernet = <&gmac0>;
3867ef62cebSEmmanuel Vadot                    phy-mode = "trgmii";
387b97ee269SEmmanuel Vadot
388b97ee269SEmmanuel Vadot                    fixed-link {
389b97ee269SEmmanuel Vadot                        speed = <1000>;
390b97ee269SEmmanuel Vadot                        full-duplex;
391b97ee269SEmmanuel Vadot                        pause;
392b97ee269SEmmanuel Vadot                    };
393b97ee269SEmmanuel Vadot                };
394b97ee269SEmmanuel Vadot            };
395b97ee269SEmmanuel Vadot        };
396b97ee269SEmmanuel Vadot    };
3977ef62cebSEmmanuel Vadot
3987ef62cebSEmmanuel Vadot  # Example 3: Standalone MT7531
3997ef62cebSEmmanuel Vadot  - |
4007ef62cebSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
4017ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
4027ef62cebSEmmanuel Vadot
4037ef62cebSEmmanuel Vadot    mdio {
4047ef62cebSEmmanuel Vadot        #address-cells = <1>;
4057ef62cebSEmmanuel Vadot        #size-cells = <0>;
4067ef62cebSEmmanuel Vadot
4077ef62cebSEmmanuel Vadot        switch@0 {
4087ef62cebSEmmanuel Vadot            compatible = "mediatek,mt7531";
4097ef62cebSEmmanuel Vadot            reg = <0>;
4107ef62cebSEmmanuel Vadot
4117ef62cebSEmmanuel Vadot            reset-gpios = <&pio 54 0>;
4127ef62cebSEmmanuel Vadot
4137ef62cebSEmmanuel Vadot            interrupt-controller;
4147ef62cebSEmmanuel Vadot            #interrupt-cells = <1>;
4157ef62cebSEmmanuel Vadot            interrupt-parent = <&pio>;
4167ef62cebSEmmanuel Vadot            interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
4177ef62cebSEmmanuel Vadot
4187ef62cebSEmmanuel Vadot            ethernet-ports {
4197ef62cebSEmmanuel Vadot                #address-cells = <1>;
4207ef62cebSEmmanuel Vadot                #size-cells = <0>;
4217ef62cebSEmmanuel Vadot
4227ef62cebSEmmanuel Vadot                port@0 {
4237ef62cebSEmmanuel Vadot                    reg = <0>;
4247ef62cebSEmmanuel Vadot                    label = "lan1";
425b97ee269SEmmanuel Vadot                };
426b97ee269SEmmanuel Vadot
4277ef62cebSEmmanuel Vadot                port@1 {
4287ef62cebSEmmanuel Vadot                    reg = <1>;
4297ef62cebSEmmanuel Vadot                    label = "lan2";
4307ef62cebSEmmanuel Vadot                };
4317ef62cebSEmmanuel Vadot
4327ef62cebSEmmanuel Vadot                port@2 {
4337ef62cebSEmmanuel Vadot                    reg = <2>;
4347ef62cebSEmmanuel Vadot                    label = "lan3";
4357ef62cebSEmmanuel Vadot                };
4367ef62cebSEmmanuel Vadot
4377ef62cebSEmmanuel Vadot                port@3 {
4387ef62cebSEmmanuel Vadot                    reg = <3>;
4397ef62cebSEmmanuel Vadot                    label = "lan4";
4407ef62cebSEmmanuel Vadot                };
4417ef62cebSEmmanuel Vadot
4427ef62cebSEmmanuel Vadot                port@4 {
4437ef62cebSEmmanuel Vadot                    reg = <4>;
4447ef62cebSEmmanuel Vadot                    label = "wan";
4457ef62cebSEmmanuel Vadot                };
4467ef62cebSEmmanuel Vadot
4477ef62cebSEmmanuel Vadot                port@6 {
4487ef62cebSEmmanuel Vadot                    reg = <6>;
4497ef62cebSEmmanuel Vadot                    ethernet = <&gmac0>;
4507ef62cebSEmmanuel Vadot                    phy-mode = "2500base-x";
4517ef62cebSEmmanuel Vadot
4527ef62cebSEmmanuel Vadot                    fixed-link {
4537ef62cebSEmmanuel Vadot                        speed = <2500>;
4547ef62cebSEmmanuel Vadot                        full-duplex;
4557ef62cebSEmmanuel Vadot                        pause;
4567ef62cebSEmmanuel Vadot                    };
4577ef62cebSEmmanuel Vadot                };
4587ef62cebSEmmanuel Vadot            };
4597ef62cebSEmmanuel Vadot        };
4607ef62cebSEmmanuel Vadot    };
4617ef62cebSEmmanuel Vadot
4627ef62cebSEmmanuel Vadot  # Example 4: MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs
463b97ee269SEmmanuel Vadot  - |
4647ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mips-gic.h>
4657ef62cebSEmmanuel Vadot    #include <dt-bindings/reset/mt7621-reset.h>
4667ef62cebSEmmanuel Vadot
4677ef62cebSEmmanuel Vadot    mdio {
4687ef62cebSEmmanuel Vadot        #address-cells = <1>;
4697ef62cebSEmmanuel Vadot        #size-cells = <0>;
4707ef62cebSEmmanuel Vadot
4717ef62cebSEmmanuel Vadot        switch@1f {
4727ef62cebSEmmanuel Vadot            compatible = "mediatek,mt7621";
4737ef62cebSEmmanuel Vadot            reg = <0x1f>;
4747ef62cebSEmmanuel Vadot
4757ef62cebSEmmanuel Vadot            mediatek,mcm;
4767ef62cebSEmmanuel Vadot            resets = <&sysc MT7621_RST_MCM>;
4777ef62cebSEmmanuel Vadot            reset-names = "mcm";
4787ef62cebSEmmanuel Vadot
4797ef62cebSEmmanuel Vadot            interrupt-controller;
4807ef62cebSEmmanuel Vadot            #interrupt-cells = <1>;
4817ef62cebSEmmanuel Vadot            interrupt-parent = <&gic>;
4827ef62cebSEmmanuel Vadot            interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
4837ef62cebSEmmanuel Vadot
4847ef62cebSEmmanuel Vadot            ethernet-ports {
4857ef62cebSEmmanuel Vadot                #address-cells = <1>;
4867ef62cebSEmmanuel Vadot                #size-cells = <0>;
4877ef62cebSEmmanuel Vadot
4887ef62cebSEmmanuel Vadot                port@0 {
4897ef62cebSEmmanuel Vadot                    reg = <0>;
4907ef62cebSEmmanuel Vadot                    label = "lan1";
4917ef62cebSEmmanuel Vadot                };
4927ef62cebSEmmanuel Vadot
4937ef62cebSEmmanuel Vadot                port@1 {
4947ef62cebSEmmanuel Vadot                    reg = <1>;
4957ef62cebSEmmanuel Vadot                    label = "lan2";
4967ef62cebSEmmanuel Vadot                };
4977ef62cebSEmmanuel Vadot
4987ef62cebSEmmanuel Vadot                port@2 {
4997ef62cebSEmmanuel Vadot                    reg = <2>;
5007ef62cebSEmmanuel Vadot                    label = "lan3";
5017ef62cebSEmmanuel Vadot                };
5027ef62cebSEmmanuel Vadot
5037ef62cebSEmmanuel Vadot                port@3 {
5047ef62cebSEmmanuel Vadot                    reg = <3>;
5057ef62cebSEmmanuel Vadot                    label = "lan4";
5067ef62cebSEmmanuel Vadot                };
5077ef62cebSEmmanuel Vadot
5087ef62cebSEmmanuel Vadot                port@4 {
5097ef62cebSEmmanuel Vadot                    reg = <4>;
5107ef62cebSEmmanuel Vadot                    label = "wan";
5117ef62cebSEmmanuel Vadot                };
5127ef62cebSEmmanuel Vadot
5137ef62cebSEmmanuel Vadot                port@6 {
5147ef62cebSEmmanuel Vadot                    reg = <6>;
5157ef62cebSEmmanuel Vadot                    ethernet = <&gmac0>;
5167ef62cebSEmmanuel Vadot                    phy-mode = "trgmii";
5177ef62cebSEmmanuel Vadot
5187ef62cebSEmmanuel Vadot                    fixed-link {
5197ef62cebSEmmanuel Vadot                        speed = <1000>;
5207ef62cebSEmmanuel Vadot                        full-duplex;
5217ef62cebSEmmanuel Vadot                        pause;
5227ef62cebSEmmanuel Vadot                    };
5237ef62cebSEmmanuel Vadot                };
5247ef62cebSEmmanuel Vadot            };
5257ef62cebSEmmanuel Vadot        };
5267ef62cebSEmmanuel Vadot    };
5277ef62cebSEmmanuel Vadot
5287ef62cebSEmmanuel Vadot  # Example 5: MT7621: mux MT7530's phy4 to SoC's gmac1
5297ef62cebSEmmanuel Vadot  - |
5307ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mips-gic.h>
5317ef62cebSEmmanuel Vadot    #include <dt-bindings/reset/mt7621-reset.h>
532b97ee269SEmmanuel Vadot
533b97ee269SEmmanuel Vadot    ethernet {
534b97ee269SEmmanuel Vadot        #address-cells = <1>;
535b97ee269SEmmanuel Vadot        #size-cells = <0>;
5367ef62cebSEmmanuel Vadot
5377ef62cebSEmmanuel Vadot        pinctrl-names = "default";
5387ef62cebSEmmanuel Vadot        pinctrl-0 = <&rgmii2_pins>;
5397ef62cebSEmmanuel Vadot
5407ef62cebSEmmanuel Vadot        mac@1 {
541b97ee269SEmmanuel Vadot            compatible = "mediatek,eth-mac";
5427ef62cebSEmmanuel Vadot            reg = <1>;
5437ef62cebSEmmanuel Vadot
544b97ee269SEmmanuel Vadot            phy-mode = "rgmii";
5457ef62cebSEmmanuel Vadot            phy-handle = <&example5_ethphy4>;
546b97ee269SEmmanuel Vadot        };
547b97ee269SEmmanuel Vadot
5487ef62cebSEmmanuel Vadot        mdio {
549b97ee269SEmmanuel Vadot            #address-cells = <1>;
550b97ee269SEmmanuel Vadot            #size-cells = <0>;
551b97ee269SEmmanuel Vadot
5527ef62cebSEmmanuel Vadot            /* MT7530's phy4 */
5537ef62cebSEmmanuel Vadot            example5_ethphy4: ethernet-phy@4 {
5547ef62cebSEmmanuel Vadot                reg = <4>;
555b97ee269SEmmanuel Vadot            };
556b97ee269SEmmanuel Vadot
557b97ee269SEmmanuel Vadot            switch@1f {
558b97ee269SEmmanuel Vadot                compatible = "mediatek,mt7621";
559b97ee269SEmmanuel Vadot                reg = <0x1f>;
560b97ee269SEmmanuel Vadot
5617ef62cebSEmmanuel Vadot                mediatek,mcm;
5627ef62cebSEmmanuel Vadot                resets = <&sysc MT7621_RST_MCM>;
563b97ee269SEmmanuel Vadot                reset-names = "mcm";
564b97ee269SEmmanuel Vadot
5657ef62cebSEmmanuel Vadot                interrupt-controller;
5667ef62cebSEmmanuel Vadot                #interrupt-cells = <1>;
5677ef62cebSEmmanuel Vadot                interrupt-parent = <&gic>;
5687ef62cebSEmmanuel Vadot                interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
5697ef62cebSEmmanuel Vadot
570b97ee269SEmmanuel Vadot                ethernet-ports {
571b97ee269SEmmanuel Vadot                    #address-cells = <1>;
572b97ee269SEmmanuel Vadot                    #size-cells = <0>;
573b97ee269SEmmanuel Vadot
574b97ee269SEmmanuel Vadot                    port@0 {
575b97ee269SEmmanuel Vadot                        reg = <0>;
5767ef62cebSEmmanuel Vadot                        label = "lan1";
577b97ee269SEmmanuel Vadot                    };
578b97ee269SEmmanuel Vadot
579b97ee269SEmmanuel Vadot                    port@1 {
580b97ee269SEmmanuel Vadot                        reg = <1>;
5817ef62cebSEmmanuel Vadot                        label = "lan2";
582b97ee269SEmmanuel Vadot                    };
583b97ee269SEmmanuel Vadot
584b97ee269SEmmanuel Vadot                    port@2 {
585b97ee269SEmmanuel Vadot                        reg = <2>;
5867ef62cebSEmmanuel Vadot                        label = "lan3";
587b97ee269SEmmanuel Vadot                    };
588b97ee269SEmmanuel Vadot
589b97ee269SEmmanuel Vadot                    port@3 {
590b97ee269SEmmanuel Vadot                        reg = <3>;
5917ef62cebSEmmanuel Vadot                        label = "lan4";
5927ef62cebSEmmanuel Vadot                    };
5937ef62cebSEmmanuel Vadot
594*cb7aa33aSEmmanuel Vadot                    /* Commented out, phy4 is connected to gmac1.
5957ef62cebSEmmanuel Vadot                    port@4 {
5967ef62cebSEmmanuel Vadot                        reg = <4>;
5977ef62cebSEmmanuel Vadot                        label = "wan";
5987ef62cebSEmmanuel Vadot                    };
5997ef62cebSEmmanuel Vadot                    */
6007ef62cebSEmmanuel Vadot
6017ef62cebSEmmanuel Vadot                    port@6 {
6027ef62cebSEmmanuel Vadot                        reg = <6>;
6037ef62cebSEmmanuel Vadot                        ethernet = <&gmac0>;
6047ef62cebSEmmanuel Vadot                        phy-mode = "trgmii";
6057ef62cebSEmmanuel Vadot
6067ef62cebSEmmanuel Vadot                        fixed-link {
6077ef62cebSEmmanuel Vadot                            speed = <1000>;
6087ef62cebSEmmanuel Vadot                            full-duplex;
6097ef62cebSEmmanuel Vadot                            pause;
6107ef62cebSEmmanuel Vadot                        };
6117ef62cebSEmmanuel Vadot                    };
6127ef62cebSEmmanuel Vadot                };
6137ef62cebSEmmanuel Vadot            };
6147ef62cebSEmmanuel Vadot        };
6157ef62cebSEmmanuel Vadot    };
6167ef62cebSEmmanuel Vadot
6177ef62cebSEmmanuel Vadot  # Example 6: MT7621: mux external phy to SoC's gmac1
6187ef62cebSEmmanuel Vadot  - |
6197ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mips-gic.h>
6207ef62cebSEmmanuel Vadot    #include <dt-bindings/reset/mt7621-reset.h>
6217ef62cebSEmmanuel Vadot
6227ef62cebSEmmanuel Vadot    ethernet {
6237ef62cebSEmmanuel Vadot        #address-cells = <1>;
6247ef62cebSEmmanuel Vadot        #size-cells = <0>;
6257ef62cebSEmmanuel Vadot
6267ef62cebSEmmanuel Vadot        pinctrl-names = "default";
6277ef62cebSEmmanuel Vadot        pinctrl-0 = <&rgmii2_pins>;
6287ef62cebSEmmanuel Vadot
6297ef62cebSEmmanuel Vadot        mac@1 {
6307ef62cebSEmmanuel Vadot            compatible = "mediatek,eth-mac";
6317ef62cebSEmmanuel Vadot            reg = <1>;
6327ef62cebSEmmanuel Vadot
6337ef62cebSEmmanuel Vadot            phy-mode = "rgmii";
6347ef62cebSEmmanuel Vadot            phy-handle = <&example6_ethphy7>;
6357ef62cebSEmmanuel Vadot        };
6367ef62cebSEmmanuel Vadot
6377ef62cebSEmmanuel Vadot        mdio {
6387ef62cebSEmmanuel Vadot            #address-cells = <1>;
6397ef62cebSEmmanuel Vadot            #size-cells = <0>;
6407ef62cebSEmmanuel Vadot
6417ef62cebSEmmanuel Vadot            /* External PHY */
6427ef62cebSEmmanuel Vadot            example6_ethphy7: ethernet-phy@7 {
6437ef62cebSEmmanuel Vadot                reg = <7>;
6447ef62cebSEmmanuel Vadot                phy-mode = "rgmii";
6457ef62cebSEmmanuel Vadot            };
6467ef62cebSEmmanuel Vadot
6477ef62cebSEmmanuel Vadot            switch@1f {
6487ef62cebSEmmanuel Vadot                compatible = "mediatek,mt7621";
6497ef62cebSEmmanuel Vadot                reg = <0x1f>;
6507ef62cebSEmmanuel Vadot
6517ef62cebSEmmanuel Vadot                mediatek,mcm;
6527ef62cebSEmmanuel Vadot                resets = <&sysc MT7621_RST_MCM>;
6537ef62cebSEmmanuel Vadot                reset-names = "mcm";
6547ef62cebSEmmanuel Vadot
6557ef62cebSEmmanuel Vadot                interrupt-controller;
6567ef62cebSEmmanuel Vadot                #interrupt-cells = <1>;
6577ef62cebSEmmanuel Vadot                interrupt-parent = <&gic>;
6587ef62cebSEmmanuel Vadot                interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
6597ef62cebSEmmanuel Vadot
6607ef62cebSEmmanuel Vadot                ethernet-ports {
6617ef62cebSEmmanuel Vadot                    #address-cells = <1>;
6627ef62cebSEmmanuel Vadot                    #size-cells = <0>;
6637ef62cebSEmmanuel Vadot
6647ef62cebSEmmanuel Vadot                    port@0 {
6657ef62cebSEmmanuel Vadot                        reg = <0>;
6667ef62cebSEmmanuel Vadot                        label = "lan1";
6677ef62cebSEmmanuel Vadot                    };
6687ef62cebSEmmanuel Vadot
6697ef62cebSEmmanuel Vadot                    port@1 {
6707ef62cebSEmmanuel Vadot                        reg = <1>;
6717ef62cebSEmmanuel Vadot                        label = "lan2";
6727ef62cebSEmmanuel Vadot                    };
6737ef62cebSEmmanuel Vadot
6747ef62cebSEmmanuel Vadot                    port@2 {
6757ef62cebSEmmanuel Vadot                        reg = <2>;
676b97ee269SEmmanuel Vadot                        label = "lan3";
677b97ee269SEmmanuel Vadot                    };
678b97ee269SEmmanuel Vadot
6797ef62cebSEmmanuel Vadot                    port@3 {
6807ef62cebSEmmanuel Vadot                        reg = <3>;
6817ef62cebSEmmanuel Vadot                        label = "lan4";
6827ef62cebSEmmanuel Vadot                    };
6837ef62cebSEmmanuel Vadot
684b97ee269SEmmanuel Vadot                    port@4 {
685b97ee269SEmmanuel Vadot                        reg = <4>;
6867ef62cebSEmmanuel Vadot                        label = "wan";
6877ef62cebSEmmanuel Vadot                    };
6887ef62cebSEmmanuel Vadot
6897ef62cebSEmmanuel Vadot                    port@6 {
6907ef62cebSEmmanuel Vadot                        reg = <6>;
6917ef62cebSEmmanuel Vadot                        ethernet = <&gmac0>;
6927ef62cebSEmmanuel Vadot                        phy-mode = "trgmii";
6937ef62cebSEmmanuel Vadot
6947ef62cebSEmmanuel Vadot                        fixed-link {
6957ef62cebSEmmanuel Vadot                            speed = <1000>;
6967ef62cebSEmmanuel Vadot                            full-duplex;
6977ef62cebSEmmanuel Vadot                            pause;
6987ef62cebSEmmanuel Vadot                        };
6997ef62cebSEmmanuel Vadot                    };
7007ef62cebSEmmanuel Vadot                };
7017ef62cebSEmmanuel Vadot            };
7027ef62cebSEmmanuel Vadot        };
7037ef62cebSEmmanuel Vadot    };
7047ef62cebSEmmanuel Vadot
7057ef62cebSEmmanuel Vadot  # Example 7: MT7621: mux external phy to MT7530's port 5
7067ef62cebSEmmanuel Vadot  - |
7077ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mips-gic.h>
7087ef62cebSEmmanuel Vadot    #include <dt-bindings/reset/mt7621-reset.h>
7097ef62cebSEmmanuel Vadot
7107ef62cebSEmmanuel Vadot    ethernet {
7117ef62cebSEmmanuel Vadot        #address-cells = <1>;
7127ef62cebSEmmanuel Vadot        #size-cells = <0>;
7137ef62cebSEmmanuel Vadot
7147ef62cebSEmmanuel Vadot        pinctrl-names = "default";
7157ef62cebSEmmanuel Vadot        pinctrl-0 = <&rgmii2_pins>;
7167ef62cebSEmmanuel Vadot
7177ef62cebSEmmanuel Vadot        mdio {
7187ef62cebSEmmanuel Vadot            #address-cells = <1>;
7197ef62cebSEmmanuel Vadot            #size-cells = <0>;
7207ef62cebSEmmanuel Vadot
7217ef62cebSEmmanuel Vadot            /* External PHY */
7227ef62cebSEmmanuel Vadot            example7_ethphy7: ethernet-phy@7 {
7237ef62cebSEmmanuel Vadot                reg = <7>;
7247ef62cebSEmmanuel Vadot                phy-mode = "rgmii";
7257ef62cebSEmmanuel Vadot            };
7267ef62cebSEmmanuel Vadot
7277ef62cebSEmmanuel Vadot            switch@1f {
7287ef62cebSEmmanuel Vadot                compatible = "mediatek,mt7621";
7297ef62cebSEmmanuel Vadot                reg = <0x1f>;
7307ef62cebSEmmanuel Vadot
7317ef62cebSEmmanuel Vadot                mediatek,mcm;
7327ef62cebSEmmanuel Vadot                resets = <&sysc MT7621_RST_MCM>;
7337ef62cebSEmmanuel Vadot                reset-names = "mcm";
7347ef62cebSEmmanuel Vadot
7357ef62cebSEmmanuel Vadot                interrupt-controller;
7367ef62cebSEmmanuel Vadot                #interrupt-cells = <1>;
7377ef62cebSEmmanuel Vadot                interrupt-parent = <&gic>;
7387ef62cebSEmmanuel Vadot                interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
7397ef62cebSEmmanuel Vadot
7407ef62cebSEmmanuel Vadot                ethernet-ports {
7417ef62cebSEmmanuel Vadot                    #address-cells = <1>;
7427ef62cebSEmmanuel Vadot                    #size-cells = <0>;
7437ef62cebSEmmanuel Vadot
7447ef62cebSEmmanuel Vadot                    port@0 {
7457ef62cebSEmmanuel Vadot                        reg = <0>;
7467ef62cebSEmmanuel Vadot                        label = "lan1";
7477ef62cebSEmmanuel Vadot                    };
7487ef62cebSEmmanuel Vadot
7497ef62cebSEmmanuel Vadot                    port@1 {
7507ef62cebSEmmanuel Vadot                        reg = <1>;
7517ef62cebSEmmanuel Vadot                        label = "lan2";
7527ef62cebSEmmanuel Vadot                    };
7537ef62cebSEmmanuel Vadot
7547ef62cebSEmmanuel Vadot                    port@2 {
7557ef62cebSEmmanuel Vadot                        reg = <2>;
7567ef62cebSEmmanuel Vadot                        label = "lan3";
7577ef62cebSEmmanuel Vadot                    };
7587ef62cebSEmmanuel Vadot
7597ef62cebSEmmanuel Vadot                    port@3 {
7607ef62cebSEmmanuel Vadot                        reg = <3>;
761b97ee269SEmmanuel Vadot                        label = "lan4";
762b97ee269SEmmanuel Vadot                    };
763b97ee269SEmmanuel Vadot
7647ef62cebSEmmanuel Vadot                    port@4 {
7657ef62cebSEmmanuel Vadot                        reg = <4>;
7667ef62cebSEmmanuel Vadot                        label = "wan";
7677ef62cebSEmmanuel Vadot                    };
7687ef62cebSEmmanuel Vadot
769b97ee269SEmmanuel Vadot                    port@5 {
770b97ee269SEmmanuel Vadot                        reg = <5>;
7717ef62cebSEmmanuel Vadot                        label = "extphy";
7727ef62cebSEmmanuel Vadot                        phy-mode = "rgmii-txid";
7737ef62cebSEmmanuel Vadot                        phy-handle = <&example7_ethphy7>;
774b97ee269SEmmanuel Vadot                    };
775b97ee269SEmmanuel Vadot
7767ef62cebSEmmanuel Vadot                    port@6 {
777b97ee269SEmmanuel Vadot                        reg = <6>;
7787ef62cebSEmmanuel Vadot                        ethernet = <&gmac0>;
7797ef62cebSEmmanuel Vadot                        phy-mode = "trgmii";
780b97ee269SEmmanuel Vadot
781b97ee269SEmmanuel Vadot                        fixed-link {
782b97ee269SEmmanuel Vadot                            speed = <1000>;
783b97ee269SEmmanuel Vadot                            full-duplex;
784b97ee269SEmmanuel Vadot                            pause;
785b97ee269SEmmanuel Vadot                        };
786b97ee269SEmmanuel Vadot                    };
787b97ee269SEmmanuel Vadot                };
788b97ee269SEmmanuel Vadot            };
789b97ee269SEmmanuel Vadot        };
790b97ee269SEmmanuel Vadot    };
791