1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/net/mediatek-dwmac.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: MediaTek DWMAC glue layer controller
10 - Biao Huang <biao.huang@mediatek.com>
13 This file documents platform glue layer for stmmac.
15 # We need a select here so we don't match all nodes with 'snps,dwmac'
21 - mediatek,mt2712-gmac
22 - mediatek,mt8188-gmac
23 - mediatek,mt8195-gmac
28 - $ref: snps,dwmac.yaml#
35 - mediatek,mt2712-gmac
36 - const: snps,dwmac-4.20a
39 - mediatek,mt8195-gmac
40 - const: snps,dwmac-5.10a
43 - mediatek,mt8188-gmac
44 - const: mediatek,mt8195-gmac
45 - const: snps,dwmac-5.10a
50 - description: AXI clock
51 - description: APB clock
52 - description: MAC Main clock
53 - description: PTP clock
54 - description: RMII reference clock provided by MAC
55 - description: MAC clock gate
64 - const: rmii_internal
71 $ref: /schemas/types.yaml#/definitions/phandle
73 The phandle to the syscon node that control ethernet
74 interface and timing delay.
78 The internal TX clock delay (provided by this driver) in nanoseconds.
79 For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
80 or will round down. Range 0~31*170.
81 For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
82 or will round down. Range 0~31*550.
83 For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
84 or will round down. Range 0~31*290.
88 The internal RX clock delay (provided by this driver) in nanoseconds.
89 For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
90 or will round down. Range 0~31*170.
91 For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
92 or will round down. Range 0~31*550.
93 For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple
94 of 290, or will round down. Range 0~31*290.
99 If present, indicates that the RMII reference clock, which is from external
100 PHYs, is connected to RXC pin. Otherwise, is connected to TXC pin.
102 mediatek,rmii-clk-from-mac:
105 If present, indicates that MAC provides the RMII reference clock, which
106 outputs to TXC pin only.
108 mediatek,txc-inverse:
111 If present, indicates that
112 1. tx clock will be inversed in MII/RGMII case,
113 2. tx clock inside MAC will be inversed relative to reference clock
114 which is from external PHYs in RMII case, and it rarely happen.
115 3. the reference clock, which outputs to TXC pin will be inversed in RMII case
116 when the reference clock is from MAC.
118 mediatek,rxc-inverse:
121 If present, indicates that
122 1. rx clock will be inversed in MII/RGMII case.
123 2. reference clock will be inversed when arrived at MAC in RMII case, when
124 the reference clock is from external PHYs.
125 3. the inside clock, which be sent to MAC, will be inversed in RMII case when
126 the reference clock is from MAC.
131 If present, indicates that MAC supports WOL(Wake-On-LAN), and MAC WOL will be enabled.
132 Otherwise, PHY WOL is preferred.
144 unevaluatedProperties: false
148 #include <dt-bindings/clock/mt2712-clk.h>
149 #include <dt-bindings/gpio/gpio.h>
150 #include <dt-bindings/interrupt-controller/arm-gic.h>
151 #include <dt-bindings/interrupt-controller/irq.h>
152 #include <dt-bindings/power/mt2712-power.h>
154 eth: ethernet@1101c000 {
155 compatible = "mediatek,mt2712-gmac", "snps,dwmac-4.20a";
156 reg = <0x1101c000 0x1300>;
157 interrupts = <GIC_SPI 237 IRQ_TYPE_LEVEL_LOW>;
158 interrupt-names = "macirq";
159 phy-mode = "rgmii-rxid";
160 mac-address = [00 55 7b b5 7d f7];
166 clocks = <&pericfg CLK_PERI_GMAC>,
167 <&pericfg CLK_PERI_GMAC_PCLK>,
168 <&topckgen CLK_TOP_ETHER_125M_SEL>,
169 <&topckgen CLK_TOP_ETHER_50M_SEL>,
170 <&topckgen CLK_TOP_ETHER_50M_RMII_SEL>;
171 assigned-clocks = <&topckgen CLK_TOP_ETHER_125M_SEL>,
172 <&topckgen CLK_TOP_ETHER_50M_SEL>,
173 <&topckgen CLK_TOP_ETHER_50M_RMII_SEL>;
174 assigned-clock-parents = <&topckgen CLK_TOP_ETHERPLL_125M>,
175 <&topckgen CLK_TOP_APLL1_D3>,
176 <&topckgen CLK_TOP_ETHERPLL_50M>;
177 power-domains = <&scpsys MT2712_POWER_DOMAIN_AUDIO>;
178 mediatek,pericfg = <&pericfg>;
179 mediatek,tx-delay-ps = <1530>;
182 snps,reset-gpio = <&pio 87 GPIO_ACTIVE_LOW>;
183 snps,reset-delays-us = <0 10000 10000>;