mediatek: add v4.19 support
[openwrt/staging/chunkeey.git] / target / linux / mediatek / files-4.19 / arch / arm / boot / dts / mt7629-lynx-rfb.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2019 MediaTek Inc.
4 * Author: Ryder Lee <ryder.lee@mediatek.com>
5 */
6
7 /dts-v1/;
8 #include <dt-bindings/input/input.h>
9 #include "mt7629.dtsi"
10
11 / {
12 model = "MediaTek MT7629 reference board";
13 compatible = "mediatek,mt7629-rfb", "mediatek,mt7629";
14
15 aliases {
16 serial0 = &uart0;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 };
22
23 gpio-keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "factory";
28 linux,code = <KEY_RESTART>;
29 gpios = <&pio 60 GPIO_ACTIVE_LOW>;
30 };
31
32 wps {
33 label = "wps";
34 linux,code = <KEY_WPS_BUTTON>;
35 gpios = <&pio 58 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 gsw: gsw@0 {
40 compatible = "mediatek,mt753x";
41 mediatek,ethsys = <&ethsys>;
42 #address-cells = <1>;
43 #size-cells = <0>;
44 };
45
46 memory@40000000 {
47 device_type = "memory";
48 reg = <0 0x40000000 0 0x10000000>;
49 };
50
51 reg_3p3v: regulator-3p3v {
52 compatible = "regulator-fixed";
53 regulator-name = "fixed-3.3V";
54 regulator-min-microvolt = <3300000>;
55 regulator-max-microvolt = <3300000>;
56 regulator-boot-on;
57 regulator-always-on;
58 };
59
60 reg_5v: regulator-5v {
61 compatible = "regulator-fixed";
62 regulator-name = "fixed-5V";
63 regulator-min-microvolt = <5000000>;
64 regulator-max-microvolt = <5000000>;
65 regulator-boot-on;
66 regulator-always-on;
67 };
68 };
69
70 &eth {
71 pinctrl-names = "default";
72 pinctrl-0 = <&ephy_leds_pins>;
73 status = "okay";
74
75 gmac0: mac@0 {
76 compatible = "mediatek,eth-mac";
77 reg = <0>;
78 phy-mode = "sgmii";
79 fixed-link {
80 speed = <1000>;
81 full-duplex;
82 pause;
83 };
84 };
85
86 gmac1: mac@1 {
87 compatible = "mediatek,eth-mac";
88 reg = <1>;
89 phy-handle = <&phy0>;
90 };
91
92 mdio: mdio-bus {
93 #address-cells = <1>;
94 #size-cells = <0>;
95
96 phy0: ethernet-phy@0 {
97 reg = <0>;
98 phy-mode = "gmii";
99 };
100 };
101 };
102
103 &gsw {
104 mediatek,mdio = <&mdio>;
105 mediatek,portmap = "llllw";
106 mediatek,mdio_master_pinmux = <0>;
107 reset-gpios = <&pio 28 0>;
108 interrupt-parent = <&pio>;
109 interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
110 status = "okay";
111
112 port6: port@6 {
113 compatible = "mediatek,mt753x-port";
114 reg = <6>;
115 phy-mode = "sgmii";
116 fixed-link {
117 speed = <2500>;
118 full-duplex;
119 };
120 };
121 };
122
123 &i2c {
124 pinctrl-names = "default";
125 pinctrl-0 = <&i2c_pins>;
126 status = "okay";
127 };
128
129 &qspi {
130 pinctrl-names = "default";
131 pinctrl-0 = <&qspi_pins>;
132 status = "okay";
133
134 flash@0 {
135 compatible = "jedec,spi-nor";
136 reg = <0>;
137
138 partitions {
139 compatible = "fixed-partitions";
140 #address-cells = <1>;
141 #size-cells = <1>;
142
143 partition@0 {
144 label = "u-boot";
145 reg = <0x00000 0x60000>;
146 read-only;
147 };
148
149 partition@60000 {
150 label = "u-boot-env";
151 reg = <0x60000 0x10000>;
152 read-only;
153 };
154
155 factory: partition@70000 {
156 label = "Factory";
157 reg = <0x70000 0x40000>;
158 read-only;
159 };
160
161 partition@b0000 {
162 label = "Kernel";
163 reg = <0xb0000 0xb50000>;
164 };
165 };
166 };
167 };
168
169 &pio {
170 eth_pins: eth-pins {
171 mux {
172 function = "eth";
173 groups = "mdc_mdio";
174 };
175 };
176
177 ephy_leds_pins: ephy-leds-pins {
178 mux {
179 function = "led";
180 groups = "gphy_leds_0", "ephy_leds";
181 };
182 };
183
184 i2c_pins: i2c-pins {
185 mux {
186 function = "i2c";
187 groups = "i2c_0";
188 };
189
190 conf {
191 pins = "I2C_SDA", "I2C_SCL";
192 drive-strength = <4>;
193 bias-disable;
194 };
195 };
196
197 pcie_pins: pcie-pins {
198 mux {
199 function = "pcie";
200 groups = "pcie_clkreq",
201 "pcie_pereset",
202 "pcie_wake";
203 };
204 };
205
206 pwm_pins: pwm-pins {
207 mux {
208 function = "pwm";
209 groups = "pwm_0";
210 };
211 };
212
213 /* Serial NAND is shared pin with SPI-NOR */
214 serial_nand_pins: serial-nand-pins {
215 mux {
216 function = "flash";
217 groups = "snfi";
218 };
219 };
220
221 spi_pins: spi-pins {
222 mux {
223 function = "spi";
224 groups = "spi_0";
225 };
226 };
227
228 /* SPI-NOR is shared pin with serial NAND */
229 qspi_pins: qspi-pins {
230 mux {
231 function = "flash";
232 groups = "spi_nor";
233 };
234 };
235
236 uart0_pins: uart0-pins {
237 mux {
238 function = "uart";
239 groups = "uart0_txd_rxd" ;
240 };
241 };
242
243 uart1_pins: uart1-pins {
244 mux {
245 function = "uart";
246 groups = "uart1_0_tx_rx" ;
247 };
248 };
249
250 uart2_pins: uart2-pins {
251 mux {
252 function = "uart";
253 groups = "uart2_0_txd_rxd" ;
254 };
255 };
256
257 watchdog_pins: watchdog-pins {
258 mux {
259 function = "watchdog";
260 groups = "watchdog";
261 };
262 };
263
264 wmac0_pins: wmac0-pins {
265 mux {
266 function = "wifi";
267 groups = "wf0_5g";
268 drive-strength = <4>;
269 };
270 };
271
272 wmac1_pins: wmac0-pins {
273 mux {
274 function = "wifi";
275 groups = "wf0_2g";
276 drive-strength = <4>;
277 };
278 };
279 };
280
281 &spi {
282 pinctrl-names = "default";
283 pinctrl-0 = <&spi_pins>;
284 status = "okay";
285 };
286
287 &uart0 {
288 pinctrl-names = "default";
289 pinctrl-0 = <&uart0_pins>;
290 status = "okay";
291 };
292
293 &ssusb {
294 vusb33-supply = <&reg_3p3v>;
295 vbus-supply = <&reg_5v>;
296 status = "okay";
297 };
298
299 &u3phy1 {
300 status = "okay";
301 };
302
303 &watchdog {
304 pinctrl-names = "default";
305 pinctrl-0 = <&watchdog_pins>;
306 status = "okay";
307 };
308
309 &wmac {
310 pinctrl-names = "default";
311 pinctrl-0 = <&wmac0_pins>;
312 pinctrl-1 = <&wmac1_pins>;
313 status = "okay";
314 };