8043238fea89a1546f95dc9e2812deb59d064b0b
[openwrt/staging/jow.git] / target / linux / mediatek / files-4.19 / arch / arm / boot / dts / mt7629-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 memory@40000000 {
40 device_type = "memory";
41 reg = <0 0x40000000 0 0x10000000>;
42 };
43
44 reg_3p3v: regulator-3p3v {
45 compatible = "regulator-fixed";
46 regulator-name = "fixed-3.3V";
47 regulator-min-microvolt = <3300000>;
48 regulator-max-microvolt = <3300000>;
49 regulator-boot-on;
50 regulator-always-on;
51 };
52
53 reg_5v: regulator-5v {
54 compatible = "regulator-fixed";
55 regulator-name = "fixed-5V";
56 regulator-min-microvolt = <5000000>;
57 regulator-max-microvolt = <5000000>;
58 regulator-boot-on;
59 regulator-always-on;
60 };
61
62 rtkgsw: rtkgsw@0 {
63 compatible = "mediatek,rtk-gsw";
64 mediatek,ethsys = <&ethsys>;
65 mediatek,mdio = <&mdio>;
66 status = "okay";
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 &i2c {
104 pinctrl-names = "default";
105 pinctrl-0 = <&i2c_pins>;
106 status = "okay";
107 };
108
109 &qspi {
110 pinctrl-names = "default";
111 pinctrl-0 = <&qspi_pins>;
112 status = "okay";
113
114 flash@0 {
115 compatible = "jedec,spi-nor";
116 reg = <0>;
117
118 partitions {
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 partition@0 {
124 label = "u-boot";
125 reg = <0x00000 0x60000>;
126 read-only;
127 };
128
129 partition@60000 {
130 label = "u-boot-env";
131 reg = <0x60000 0x10000>;
132 read-only;
133 };
134
135 factory: partition@70000 {
136 label = "Factory";
137 reg = <0x70000 0x40000>;
138 read-only;
139 };
140
141 partition@b0000 {
142 label = "Kernel";
143 reg = <0xb0000 0xb50000>;
144 };
145 };
146 };
147 };
148
149 &pio {
150 eth_pins: eth-pins {
151 mux {
152 function = "eth";
153 groups = "mdc_mdio";
154 };
155 };
156
157 ephy_leds_pins: ephy-leds-pins {
158 mux {
159 function = "led";
160 groups = "gphy_leds_0", "ephy_leds";
161 };
162 };
163
164 i2c_pins: i2c-pins {
165 mux {
166 function = "i2c";
167 groups = "i2c_0";
168 };
169
170 conf {
171 pins = "I2C_SDA", "I2C_SCL";
172 drive-strength = <4>;
173 bias-disable;
174 };
175 };
176
177 pcie_pins: pcie-pins {
178 mux {
179 function = "pcie";
180 groups = "pcie_clkreq",
181 "pcie_pereset",
182 "pcie_wake";
183 };
184 };
185
186 pwm_pins: pwm-pins {
187 mux {
188 function = "pwm";
189 groups = "pwm_0";
190 };
191 };
192
193 /* Serial NAND is shared pin with SPI-NOR */
194 serial_nand_pins: serial-nand-pins {
195 mux {
196 function = "flash";
197 groups = "snfi";
198 };
199 };
200
201 spi_pins: spi-pins {
202 mux {
203 function = "spi";
204 groups = "spi_0";
205 };
206 };
207
208 /* SPI-NOR is shared pin with serial NAND */
209 qspi_pins: qspi-pins {
210 mux {
211 function = "flash";
212 groups = "spi_nor";
213 };
214 };
215
216 uart0_pins: uart0-pins {
217 mux {
218 function = "uart";
219 groups = "uart0_txd_rxd" ;
220 };
221 };
222
223 uart1_pins: uart1-pins {
224 mux {
225 function = "uart";
226 groups = "uart1_0_tx_rx" ;
227 };
228 };
229
230 uart2_pins: uart2-pins {
231 mux {
232 function = "uart";
233 groups = "uart2_0_txd_rxd" ;
234 };
235 };
236
237 watchdog_pins: watchdog-pins {
238 mux {
239 function = "watchdog";
240 groups = "watchdog";
241 };
242 };
243
244 wmac0_pins: wmac0-pins {
245 mux {
246 function = "wifi";
247 groups = "wf0_5g";
248 drive-strength = <4>;
249 };
250 };
251
252 wmac1_pins: wmac0-pins {
253 mux {
254 function = "wifi";
255 groups = "wf0_2g";
256 drive-strength = <4>;
257 };
258 };
259 };
260
261 &spi {
262 pinctrl-names = "default";
263 pinctrl-0 = <&spi_pins>;
264 status = "okay";
265 };
266
267 &uart0 {
268 pinctrl-names = "default";
269 pinctrl-0 = <&uart0_pins>;
270 status = "okay";
271 };
272
273 &ssusb {
274 vusb33-supply = <&reg_3p3v>;
275 vbus-supply = <&reg_5v>;
276 status = "okay";
277 };
278
279 &u3phy1 {
280 status = "okay";
281 };
282
283 &watchdog {
284 pinctrl-names = "default";
285 pinctrl-0 = <&watchdog_pins>;
286 status = "okay";
287 };
288
289 &wmac {
290 pinctrl-names = "default";
291 pinctrl-0 = <&wmac0_pins>;
292 pinctrl-1 = <&wmac1_pins>;
293 status = "okay";
294 };