blob: 629d509a6c992e66c89dcc587b0fc1edbb1699e8 [file] [log] [blame]
developer691e73f2021-06-28 19:41:35 +08001/dts-v1/;
developer565bacb2021-09-28 21:26:32 +08002#include "mt7986a.dtsi"
3#include "mt7986a-pinctrl.dtsi"
4#include "mt7986-spim-nor-partition.dtsi"
developer691e73f2021-06-28 19:41:35 +08005/ {
6 model = "MediaTek MT7986a RFB";
7 compatible = "mediatek,mt7986a-2500wan-nor-rfb";
developer565bacb2021-09-28 21:26:32 +08008 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 };
developer691e73f2021-06-28 19:41:35 +080027};
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>;
developer691e73f2021-06-28 19:41:35 +080037 status = "okay";
developer565bacb2021-09-28 21:26:32 +080038};
developer5b91be72021-09-27 14:03:07 +080039
developer565bacb2021-09-28 21:26:32 +080040&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>;
developere0c42a12022-08-19 11:01:38 +080053 status = "okay";
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>;
developer5b91be72021-09-27 14:03:07 +080064 };
65};
66
developer565bacb2021-09-28 21:26:32 +080067&auxadc {
68 status = "okay";
developer5b91be72021-09-27 14:03:07 +080069};
70
developer565bacb2021-09-28 21:26:32 +080071&watchdog {
72 status = "okay";
developer691e73f2021-06-28 19:41:35 +080073};
74
developer565bacb2021-09-28 21:26:32 +080075&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;
developer283fc452022-08-18 19:50:33 +080087 };
developer565bacb2021-09-28 21:26:32 +080088 };
89
90 gmac1: mac@1 {
91 compatible = "mediatek,eth-mac";
92 reg = <1>;
93 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080094 phy-handle = <&phy6>;
developer565bacb2021-09-28 21:26:32 +080095 };
96
97 mdio: mdio-bus {
98 #address-cells = <1>;
99 #size-cells = <0>;
developer691e73f2021-06-28 19:41:35 +0800100
developerf0a1e452022-08-15 12:06:11 +0800101 reset-gpios = <&pio 6 1>;
102 reset-delay-us = <600>;
103
developer565bacb2021-09-28 21:26:32 +0800104 phy5: phy@5 {
developere0c42a12022-08-19 11:01:38 +0800105 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +0800106 reg = <5>;
developer565bacb2021-09-28 21:26:32 +0800107 };
developer691e73f2021-06-28 19:41:35 +0800108
developer565bacb2021-09-28 21:26:32 +0800109 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +0800110 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +0800111 reg = <6>;
developer565bacb2021-09-28 21:26:32 +0800112 };
113
114 switch@0 {
115 compatible = "mediatek,mt7531";
116 reg = <31>;
117 reset-gpios = <&pio 5 0>;
118
119 ports {
120 #address-cells = <1>;
121 #size-cells = <0>;
122
123 port@0 {
124 reg = <0>;
125 label = "lan0";
126 };
127
128 port@1 {
129 reg = <1>;
130 label = "lan1";
131 };
132
133 port@2 {
134 reg = <2>;
135 label = "lan2";
136 };
137
138 port@3 {
139 reg = <3>;
140 label = "lan3";
141 };
142
143 port@4 {
144 reg = <4>;
145 label = "lan4";
146 };
147
148 port@5 {
149 reg = <5>;
150 label = "lan5";
151 phy-mode = "2500base-x";
developere0c42a12022-08-19 11:01:38 +0800152 phy-handle = <&phy5>;
developer565bacb2021-09-28 21:26:32 +0800153 };
154
155 port@6 {
156 reg = <6>;
157 label = "cpu";
158 ethernet = <&gmac0>;
159 phy-mode = "2500base-x";
160
161 fixed-link {
162 speed = <2500>;
163 full-duplex;
164 pause;
165 };
developer691e73f2021-06-28 19:41:35 +0800166 };
167 };
168 };
169 };
170};
developer565bacb2021-09-28 21:26:32 +0800171
172&hnat {
173 mtketh-wan = "eth1";
174 mtketh-lan = "lan";
175 mtketh-max-gmac = <2>;
176 status = "okay";
177};
178
179&spi0 {
180 pinctrl-names = "default";
181 pinctrl-0 = <&spi_flash_pins>;
182 cs-gpios = <0>, <0>;
183 status = "okay";
184 spi_nor@0 {
185 #address-cells = <1>;
186 #size-cells = <1>;
187 compatible = "jedec,spi-nor";
188 reg = <0>;
developerb9b1ffc2021-12-16 14:19:08 +0800189 spi-max-frequency = <52000000>;
developer565bacb2021-09-28 21:26:32 +0800190 spi-tx-buswidth = <4>;
191 spi-rx-buswidth = <4>;
192 };
193};
194
195&spi1 {
196 pinctrl-names = "default";
197 pinctrl-0 = <&spic_pins_g2>;
198 status = "okay";
199};
200
201&pcie0 {
202 pinctrl-names = "default";
203 pinctrl-0 = <&pcie0_pins>;
204 status = "okay";
205};
206
207&wbsys {
208 mediatek,mtd-eeprom = <&factory 0x0000>;
209 status = "okay";
210};
211
212&pio {
213 spi_flash_pins: spi-flash-pins-33-to-38 {
214 mux {
215 function = "flash";
216 groups = "spi0", "spi0_wp_hold";
217 };
218 conf-pu {
219 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
220 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800221 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800222 };
223 conf-pd {
224 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
225 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800226 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800227 };
228 };
229};