blob: 69e2bba96bddd30cf539337a249e3032d55c8a33 [file] [log] [blame]
developercd6a1382022-01-11 15:45:19 +08001/dts-v1/;
2#include "mt7986b.dtsi"
3#include "mt7986b-pinctrl.dtsi"
4/ {
5 model = "MediaTek MT7986b RFB";
6 compatible = "mediatek,mt7986b-2500wan-sd-rfb";
7 chosen {
8 bootargs = "console=ttyS0,115200n1 loglevel=8 \
9 earlycon=uart8250,mmio32,0x11002000 \
10 root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
11 };
12
13 memory {
14 reg = <0 0x40000000 0 0x10000000>;
15 };
16
17 reg_3p3v: regulator-3p3v {
18 compatible = "regulator-fixed";
19 regulator-name = "fixed-3.3V";
20 regulator-min-microvolt = <3300000>;
21 regulator-max-microvolt = <3300000>;
22 regulator-boot-on;
23 regulator-always-on;
24 };
25};
26
27&uart0 {
28 status = "okay";
29};
30
31/* Warning: pins shared with &snand */
32&uart1 {
33 pinctrl-names = "default";
34 pinctrl-0 = <&uart1_pins>;
35 status = "disabled";
36};
37
38/* Warning: pins shared with &spi1 */
39&uart2 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&uart2_pins>;
42 status = "disabled";
43};
44
45&i2c0 {
46 pinctrl-names = "default";
47 pinctrl-0 = <&i2c_pins>;
48 status = "okay";
49};
50
51&watchdog {
52 status = "okay";
53};
54
55&eth {
56 status = "okay";
57
58 gmac0: mac@0 {
59 compatible = "mediatek,eth-mac";
60 reg = <0>;
61 phy-mode = "2500base-x";
developer283fc452022-08-18 19:50:33 +080062
63 fixed-link {
64 speed = <2500>;
65 full-duplex;
66 pause;
67 link-gpio = <&pio 47 0>;
68 phy-handle = <&phy5>;
69 label = "lan5";
70 };
developercd6a1382022-01-11 15:45:19 +080071 };
72
73 gmac1: mac@1 {
74 compatible = "mediatek,eth-mac";
75 reg = <1>;
76 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080077 phy-handle = <&phy6>;
developercd6a1382022-01-11 15:45:19 +080078 };
79
80 mdio: mdio-bus {
81 #address-cells = <1>;
82 #size-cells = <0>;
83
developerf0a1e452022-08-15 12:06:11 +080084 reset-gpios = <&pio 6 1>;
85 reset-delay-us = <600>;
86
developercd6a1382022-01-11 15:45:19 +080087 phy5: phy@5 {
developer283fc452022-08-18 19:50:33 +080088 compatible = "ethernet-phy-id67c9.de0a";
developercd6a1382022-01-11 15:45:19 +080089 reg = <5>;
developercd6a1382022-01-11 15:45:19 +080090 };
91
92 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +080093 compatible = "ethernet-phy-ieee802.3-c45";
developercd6a1382022-01-11 15:45:19 +080094 reg = <6>;
developercd6a1382022-01-11 15:45:19 +080095 };
96
97 switch@0 {
98 compatible = "mediatek,mt7531";
99 reg = <31>;
100 reset-gpios = <&pio 5 0>;
101
102 ports {
103 #address-cells = <1>;
104 #size-cells = <0>;
105
106 port@0 {
107 reg = <0>;
108 label = "lan0";
109 };
110
111 port@1 {
112 reg = <1>;
113 label = "lan1";
114 };
115
116 port@2 {
117 reg = <2>;
118 label = "lan2";
119 };
120
121 port@3 {
122 reg = <3>;
123 label = "lan3";
124 };
125
126 port@4 {
127 reg = <4>;
128 label = "lan4";
129 };
130
131 port@5 {
132 reg = <5>;
133 label = "lan5";
134 phy-mode = "2500base-x";
135
136 fixed-link {
137 speed = <2500>;
138 full-duplex;
139 pause;
140 };
141 };
142
143 port@6 {
144 reg = <6>;
145 label = "cpu";
146 ethernet = <&gmac0>;
147 phy-mode = "2500base-x";
148
149 fixed-link {
150 speed = <2500>;
151 full-duplex;
152 pause;
153 };
154 };
155 };
156 };
157 };
158};
159
160&hnat {
161 mtketh-wan = "eth1";
162 mtketh-lan = "lan";
163 mtketh-max-gmac = <2>;
164 status = "okay";
165};
166
167&mmc0 {
168 pinctrl-names = "default", "state_uhs";
169 pinctrl-0 = <&mmc0_pins_default>;
170 pinctrl-1 = <&mmc0_pins_uhs>;
171 bus-width = <4>;
172 max-frequency = <52000000>;
173 cap-sd-highspeed;
174 vmmc-supply = <&reg_3p3v>;
175 vqmmc-supply = <&reg_3p3v>;
176 status = "okay";
177};
178
179&pio {
180 mmc0_pins_default: mmc0-pins-22-to-32-default {
181 mux {
182 function = "flash";
183 groups = "emmc_45";
184 };
185
186 conf-cmd-dat {
187 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
188 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
189 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
190 input-enable;
191 drive-strength = <MTK_DRIVE_4mA>;
192 mediatek,pull-up-adv = <1>; /* pull-up 10K */
193 };
194
195 conf-clk {
196 pins = "SPI1_CS";
197 drive-strength = <MTK_DRIVE_6mA>;
198 mediatek,pull-down-adv = <2>; /* pull-down 50K */
199 };
200
201 conf-rst {
202 pins = "PWM1";
203 drive-strength = <MTK_DRIVE_4mA>;
204 mediatek,pull-up-adv = <1>; /* pull-up 10K */
205 };
206 };
207
208 mmc0_pins_uhs: mmc0-pins-22-to-32-uhs {
209 mux {
210 function = "flash";
211 groups = "emmc_45";
212 };
213
214 conf-cmd-dat {
215 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
216 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
217 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
218 input-enable;
219 drive-strength = <MTK_DRIVE_4mA>;
220 mediatek,pull-up-adv = <1>; /* pull-up 10K */
221 };
222
223 conf-clk {
224 pins = "SPI1_CS";
225 drive-strength = <MTK_DRIVE_6mA>;
226 mediatek,pull-down-adv = <2>; /* pull-down 50K */
227 };
228
229 conf-rst {
230 pins = "PWM1";
231 drive-strength = <MTK_DRIVE_4mA>;
232 mediatek,pull-up-adv = <1>; /* pull-up 10K */
233 };
234 };
235
236 wf_2g_5g_pins: wf_2g_5g-pins {
237 mux {
238 function = "wifi";
239 groups = "wf_2g", "wf_5g";
240 };
241 conf {
242 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
243 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
244 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
245 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
246 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
247 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
248 "WF1_TOP_CLK", "WF1_TOP_DATA";
249 drive-strength = <MTK_DRIVE_4mA>;
250 };
251 };
252
253 wf_dbdc_pins: wf_dbdc-pins {
254 mux {
255 function = "wifi";
256 groups = "wf_dbdc";
257 };
258 conf {
259 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
260 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
261 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
262 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
263 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
264 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
265 "WF1_TOP_CLK", "WF1_TOP_DATA";
266 drive-strength = <MTK_DRIVE_4mA>;
267 };
268 };
269};