blob: d768e45572d1af1b2f529690185e3a6610ff4b08 [file] [log] [blame]
developer565bacb2021-09-28 21:26:32 +08001/dts-v1/;
2#include "mt7986b.dtsi"
3#include "mt7986b-pinctrl.dtsi"
4/ {
5 model = "MediaTek MT7986b RFB";
6 compatible = "mediatek,mt7986b-emmc-rfb";
7 chosen {
8 bootargs = "console=ttyS0,115200n1 loglevel=8 \
9 earlycon=uart8250,mmio32,0x11002000 \
developer8262b0d2021-11-12 09:02:17 +080010 root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
developer565bacb2021-09-28 21:26:32 +080011 };
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";
62
63 fixed-link {
64 speed = <2500>;
65 full-duplex;
66 pause;
67 };
68 };
69
70 gmac1: mac@1 {
71 compatible = "mediatek,eth-mac";
72 reg = <1>;
73 phy-mode = "2500base-x";
74
75 fixed-link {
76 speed = <2500>;
77 full-duplex;
78 pause;
79 };
80 };
81
82 mdio: mdio-bus {
83 #address-cells = <1>;
84 #size-cells = <0>;
85
86 phy5: phy@5 {
87 compatible = "ethernet-phy-id67c9.de0a";
88 reg = <5>;
89 reset-gpios = <&pio 6 1>;
90 reset-deassert-us = <20000>;
91 phy-mode = "2500base-x";
92 };
93
94 phy6: phy@6 {
95 compatible = "ethernet-phy-id67c9.de0a";
96 reg = <6>;
97 phy-mode = "2500base-x";
98 };
99
100 switch@0 {
101 compatible = "mediatek,mt7531";
102 reg = <31>;
103 reset-gpios = <&pio 5 0>;
104
105 ports {
106 #address-cells = <1>;
107 #size-cells = <0>;
108
109 port@0 {
110 reg = <0>;
111 label = "lan0";
112 };
113
114 port@1 {
115 reg = <1>;
116 label = "lan1";
117 };
118
119 port@2 {
120 reg = <2>;
121 label = "lan2";
122 };
123
124 port@3 {
125 reg = <3>;
126 label = "lan3";
127 };
128
129 port@4 {
130 reg = <4>;
131 label = "lan4";
132 };
133
134 port@5 {
135 reg = <5>;
136 label = "lan5";
137 phy-mode = "2500base-x";
138
139 fixed-link {
140 speed = <2500>;
141 full-duplex;
142 pause;
143 };
144 };
145
146 port@6 {
147 reg = <6>;
148 label = "cpu";
149 ethernet = <&gmac0>;
150 phy-mode = "2500base-x";
151
152 fixed-link {
153 speed = <2500>;
154 full-duplex;
155 pause;
156 };
157 };
158 };
159 };
160 };
161};
162
163&hnat {
164 mtketh-wan = "eth1";
165 mtketh-lan = "lan";
166 mtketh-max-gmac = <2>;
167 status = "okay";
168};
169
170/* Warning: pins shared with &uart2 */
171&spi1 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&spic_pins>;
174 status = "okay";
175};
176
177&mmc0 {
178 pinctrl-names = "default", "state_uhs";
179 pinctrl-0 = <&mmc0_pins_default>;
180 pinctrl-1 = <&mmc0_pins_uhs>;
181 bus-width = <8>;
182 max-frequency = <50000000>;
183 cap-mmc-highspeed;
184 vmmc-supply = <&reg_3p3v>;
185 vqmmc-supply = <&reg_3p3v>;
186 non-removable;
187 status = "okay";
188};
189
190&wbsys {
191 mediatek,mtd-eeprom = <&factory 0x0000>;
192 status = "okay";
193};
194
195&pio {
196 mmc0_pins_default: mmc0-pins-22-to-32-default {
197 mux {
198 function = "flash";
199 groups = "emmc_45";
200 };
201 conf-cmd-dat {
202 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
203 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
204 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
205 input-enable;
206 drive-strength = <MTK_DRIVE_4mA>;
207 mediatek,pull-up-adv = <1>; /* pull-up 10K */
208 };
209 conf-clk {
210 pins = "SPI1_CS";
211 drive-strength = <MTK_DRIVE_6mA>;
212 mediatek,pull-down-adv = <2>; /* pull-down 50K */
213 };
214 conf-rst {
215 pins = "PWM1";
216 drive-strength = <MTK_DRIVE_4mA>;
217 mediatek,pull-up-adv = <1>; /* pull-up 10K */
218 };
219 };
220
221 mmc0_pins_uhs: mmc0-pins-22-to-32-uhs {
222 mux {
223 function = "flash";
224 groups = "emmc_45";
225 };
226 conf-cmd-dat {
227 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
228 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
229 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
230 input-enable;
231 drive-strength = <MTK_DRIVE_4mA>;
232 mediatek,pull-up-adv = <1>; /* pull-up 10K */
233 };
234 conf-clk {
235 pins = "SPI1_CS";
236 drive-strength = <MTK_DRIVE_6mA>;
237 mediatek,pull-down-adv = <2>; /* pull-down 50K */
238 };
239 conf-rst {
240 pins = "PWM1";
241 drive-strength = <MTK_DRIVE_4mA>;
242 mediatek,pull-up-adv = <1>; /* pull-up 10K */
243 };
244 };
245};