blob: c5ca56981b2bd7fe51834457b5ed36fd9e09c191 [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
developer565bacb2021-09-28 21:26:32 +080029&pwm {
30 pinctrl-names = "default";
31 pinctrl-0 = <&pwm0_pin &pwm1_pin_g1>;
developer691e73f2021-06-28 19:41:35 +080032 status = "okay";
developer565bacb2021-09-28 21:26:32 +080033};
developer5b91be72021-09-27 14:03:07 +080034
developer565bacb2021-09-28 21:26:32 +080035&uart0 {
36 status = "okay";
37};
38
39&uart1 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&uart1_pins>;
42 status = "okay";
43};
44
45&uart2 {
46 pinctrl-names = "default";
47 pinctrl-0 = <&uart2_pins>;
48 status = "okay";
49};
50
51&i2c0 {
52 pinctrl-names = "default";
53 pinctrl-0 = <&i2c_pins>;
54 status = "okay";
55
56 wm8960: wm8960@1a {
57 compatible = "wlf,wm8960";
58 reg = <0x1a>;
developer5b91be72021-09-27 14:03:07 +080059 };
60};
61
developer565bacb2021-09-28 21:26:32 +080062&auxadc {
63 status = "okay";
developer5b91be72021-09-27 14:03:07 +080064};
65
developer565bacb2021-09-28 21:26:32 +080066&watchdog {
67 status = "okay";
developer691e73f2021-06-28 19:41:35 +080068};
69
developer565bacb2021-09-28 21:26:32 +080070&eth {
71 status = "okay";
72
73 gmac0: mac@0 {
74 compatible = "mediatek,eth-mac";
75 reg = <0>;
76 phy-mode = "2500base-x";
77
78 fixed-link {
79 speed = <2500>;
80 full-duplex;
81 pause;
82 };
83 };
84
85 gmac1: mac@1 {
86 compatible = "mediatek,eth-mac";
87 reg = <1>;
88 phy-mode = "2500base-x";
89
90 fixed-link {
91 speed = <2500>;
92 full-duplex;
93 pause;
94 };
95 };
96
97 mdio: mdio-bus {
98 #address-cells = <1>;
99 #size-cells = <0>;
developer691e73f2021-06-28 19:41:35 +0800100
developer565bacb2021-09-28 21:26:32 +0800101 phy5: phy@5 {
102 compatible = "ethernet-phy-id67c9.de0a";
103 reg = <5>;
104 reset-gpios = <&pio 6 1>;
developer8c5a08b2022-05-06 09:10:38 +0800105 reset-assert-us = <600>;
developer565bacb2021-09-28 21:26:32 +0800106 reset-deassert-us = <20000>;
107 phy-mode = "2500base-x";
108 };
developer691e73f2021-06-28 19:41:35 +0800109
developer565bacb2021-09-28 21:26:32 +0800110 phy6: phy@6 {
111 compatible = "ethernet-phy-id67c9.de0a";
112 reg = <6>;
113 phy-mode = "2500base-x";
114 };
115
116 switch@0 {
117 compatible = "mediatek,mt7531";
118 reg = <31>;
119 reset-gpios = <&pio 5 0>;
120
121 ports {
122 #address-cells = <1>;
123 #size-cells = <0>;
124
125 port@0 {
126 reg = <0>;
127 label = "lan0";
128 };
129
130 port@1 {
131 reg = <1>;
132 label = "lan1";
133 };
134
135 port@2 {
136 reg = <2>;
137 label = "lan2";
138 };
139
140 port@3 {
141 reg = <3>;
142 label = "lan3";
143 };
144
145 port@4 {
146 reg = <4>;
147 label = "lan4";
148 };
149
150 port@5 {
151 reg = <5>;
152 label = "lan5";
153 phy-mode = "2500base-x";
154
155 fixed-link {
156 speed = <2500>;
157 full-duplex;
158 pause;
159 };
160 };
161
162 port@6 {
163 reg = <6>;
164 label = "cpu";
165 ethernet = <&gmac0>;
166 phy-mode = "2500base-x";
167
168 fixed-link {
169 speed = <2500>;
170 full-duplex;
171 pause;
172 };
developer691e73f2021-06-28 19:41:35 +0800173 };
174 };
175 };
176 };
177};
developer565bacb2021-09-28 21:26:32 +0800178
179&hnat {
180 mtketh-wan = "eth1";
181 mtketh-lan = "lan";
182 mtketh-max-gmac = <2>;
183 status = "okay";
184};
185
186&spi0 {
187 pinctrl-names = "default";
188 pinctrl-0 = <&spi_flash_pins>;
189 cs-gpios = <0>, <0>;
190 status = "okay";
191 spi_nor@0 {
192 #address-cells = <1>;
193 #size-cells = <1>;
194 compatible = "jedec,spi-nor";
195 reg = <0>;
developerb9b1ffc2021-12-16 14:19:08 +0800196 spi-max-frequency = <52000000>;
developer565bacb2021-09-28 21:26:32 +0800197 spi-tx-buswidth = <4>;
198 spi-rx-buswidth = <4>;
199 };
200};
201
202&spi1 {
203 pinctrl-names = "default";
204 pinctrl-0 = <&spic_pins_g2>;
205 status = "okay";
206};
207
208&pcie0 {
209 pinctrl-names = "default";
210 pinctrl-0 = <&pcie0_pins>;
211 status = "okay";
212};
213
214&wbsys {
215 mediatek,mtd-eeprom = <&factory 0x0000>;
216 status = "okay";
217};
218
219&pio {
220 spi_flash_pins: spi-flash-pins-33-to-38 {
221 mux {
222 function = "flash";
223 groups = "spi0", "spi0_wp_hold";
224 };
225 conf-pu {
226 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
227 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800228 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800229 };
230 conf-pd {
231 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
232 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800233 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800234 };
235 };
236};