blob: 3282e8ccfb2c4ce6de02d18ec6fee45c8dc8b10e [file] [log] [blame]
developer565bacb2021-09-28 21:26:32 +08001/dts-v1/;
2#include "mt7986a.dtsi"
3#include "mt7986a-pinctrl.dtsi"
4#include "mt7986-spim-nand-partition.dtsi"
5/ {
6 model = "MediaTek MT7986a RFB";
7 compatible = "mediatek,mt7986a-2500wan-spim-snand-rfb";
8 chosen {
9 bootargs = "console=ttyS0,115200n1 loglevel=8 \
10 earlycon=uart8250,mmio32,0x11002000";
11 };
12
13 memory {
14 reg = <0 0x40000000 0 0x10000000>;
15 };
16
17 sound {
18 compatible = "mediatek,mt7986-wm8960-machine";
19 mediatek,platform = <&afe>;
20 audio-routing = "Headphone", "HP_L",
21 "Headphone", "HP_R",
22 "LINPUT1", "AMIC",
23 "RINPUT1", "AMIC";
24 mediatek,audio-codec = <&wm8960>;
25 status = "okay";
26 };
27};
28
developer209e52d2022-06-30 11:32:57 +080029&fan {
30 pwms = <&pwm 1 50000 0>;
31 status = "disabled";
32};
33
developer565bacb2021-09-28 21:26:32 +080034&pwm {
35 pinctrl-names = "default";
36 pinctrl-0 = <&pwm0_pin &pwm1_pin_g1>;
37 status = "okay";
38};
39
40&uart0 {
41 status = "okay";
42};
43
44&uart1 {
45 pinctrl-names = "default";
46 pinctrl-0 = <&uart1_pins>;
47 status = "okay";
48};
49
50&uart2 {
51 pinctrl-names = "default";
52 pinctrl-0 = <&uart2_pins>;
developera2613e62022-07-01 18:29:37 +080053 status = "disabled";
developer565bacb2021-09-28 21:26:32 +080054};
55
56&i2c0 {
57 pinctrl-names = "default";
58 pinctrl-0 = <&i2c_pins>;
59 status = "okay";
60
61 wm8960: wm8960@1a {
62 compatible = "wlf,wm8960";
63 reg = <0x1a>;
64 };
65};
66
67&auxadc {
68 status = "okay";
69};
70
71&watchdog {
72 status = "okay";
73};
74
75&eth {
76 status = "okay";
77
78 gmac0: mac@0 {
79 compatible = "mediatek,eth-mac";
80 reg = <0>;
81 phy-mode = "2500base-x";
developer283fc452022-08-18 19:50:33 +080082
83 fixed-link {
84 speed = <2500>;
85 full-duplex;
86 pause;
87 link-gpio = <&pio 47 0>;
88 phy-handle = <&phy5>;
89 label = "lan5";
90 };
developer565bacb2021-09-28 21:26:32 +080091 };
92
93 gmac1: mac@1 {
94 compatible = "mediatek,eth-mac";
95 reg = <1>;
96 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080097 phy-handle = <&phy6>;
developer565bacb2021-09-28 21:26:32 +080098 };
99
100 mdio: mdio-bus {
101 #address-cells = <1>;
102 #size-cells = <0>;
103
developerf0a1e452022-08-15 12:06:11 +0800104 reset-gpios = <&pio 6 1>;
105 reset-delay-us = <600>;
106
developer565bacb2021-09-28 21:26:32 +0800107 phy5: phy@5 {
developer283fc452022-08-18 19:50:33 +0800108 compatible = "ethernet-phy-id67c9.de0a";
developer565bacb2021-09-28 21:26:32 +0800109 reg = <5>;
developer565bacb2021-09-28 21:26:32 +0800110 };
111
112 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +0800113 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +0800114 reg = <6>;
developer565bacb2021-09-28 21:26:32 +0800115 };
116
117 switch@0 {
118 compatible = "mediatek,mt7531";
119 reg = <31>;
120 reset-gpios = <&pio 5 0>;
121
122 ports {
123 #address-cells = <1>;
124 #size-cells = <0>;
125
126 port@0 {
127 reg = <0>;
128 label = "lan0";
129 };
130
131 port@1 {
132 reg = <1>;
133 label = "lan1";
134 };
135
136 port@2 {
137 reg = <2>;
138 label = "lan2";
139 };
140
141 port@3 {
142 reg = <3>;
143 label = "lan3";
144 };
145
146 port@4 {
147 reg = <4>;
148 label = "lan4";
149 };
150
151 port@5 {
152 reg = <5>;
153 label = "lan5";
154 phy-mode = "2500base-x";
155
156 fixed-link {
157 speed = <2500>;
158 full-duplex;
159 pause;
160 };
161 };
162
163 port@6 {
164 reg = <6>;
165 label = "cpu";
166 ethernet = <&gmac0>;
167 phy-mode = "2500base-x";
168
169 fixed-link {
170 speed = <2500>;
171 full-duplex;
172 pause;
173 };
174 };
175 };
176 };
177 };
178};
179
180&hnat {
181 mtketh-wan = "eth1";
182 mtketh-lan = "lan";
183 mtketh-max-gmac = <2>;
184 status = "okay";
185};
186
187&spi0 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&spi_flash_pins>;
190 cs-gpios = <0>, <0>;
191 status = "okay";
192
193 spi_nor@0 {
194 #address-cells = <1>;
195 #size-cells = <1>;
196 compatible = "jedec,spi-nor";
197 reg = <0>;
198 spi-max-frequency = <20000000>;
199 spi-tx-buswidth = <4>;
200 spi-rx-buswidth = <4>;
201 };
202
203 spi_nand: spi_nand@1 {
204 #address-cells = <1>;
205 #size-cells = <1>;
206 compatible = "spi-nand";
207 reg = <1>;
208 spi-max-frequency = <20000000>;
209 spi-tx-buswidth = <4>;
210 spi-rx-buswidth = <4>;
211 };
212};
213
214&spi1 {
215 pinctrl-names = "default";
216 pinctrl-0 = <&spic_pins_g2>;
217 status = "okay";
218};
219
220&pcie0 {
221 pinctrl-names = "default";
222 pinctrl-0 = <&pcie0_pins>;
223 status = "okay";
224};
225
226&wbsys {
227 mediatek,mtd-eeprom = <&factory 0x0000>;
228 status = "okay";
developere138bcd2021-12-06 09:20:47 +0800229 pinctrl-names = "default", "dbdc";
230 pinctrl-0 = <&wf_2g_5g_pins>;
231 pinctrl-1 = <&wf_dbdc_pins>;
developer565bacb2021-09-28 21:26:32 +0800232};
233
234&pio {
235 spi_flash_pins: spi-flash-pins-33-to-38 {
236 mux {
237 function = "flash";
238 groups = "spi0", "spi0_wp_hold";
239 };
240 conf-pu {
241 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
242 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800243 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800244 };
245 conf-pd {
246 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
247 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800248 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800249 };
250 };
developere138bcd2021-12-06 09:20:47 +0800251
252 wf_2g_5g_pins: wf_2g_5g-pins {
253 mux {
254 function = "wifi";
255 groups = "wf_2g", "wf_5g";
256 };
257 conf {
258 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
259 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
260 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
261 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
262 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
263 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
264 "WF1_TOP_CLK", "WF1_TOP_DATA";
265 drive-strength = <MTK_DRIVE_4mA>;
266 };
267 };
268
269 wf_dbdc_pins: wf_dbdc-pins {
270 mux {
271 function = "wifi";
272 groups = "wf_dbdc";
273 };
274 conf {
275 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
276 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
277 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
278 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
279 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
280 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
281 "WF1_TOP_CLK", "WF1_TOP_DATA";
282 drive-strength = <MTK_DRIVE_4mA>;
283 };
284 };
developer565bacb2021-09-28 21:26:32 +0800285};