Merge tag 'for-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / rk3288-miqi.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de>
4  */
5
6 /dts-v1/;
7 #include <dt-bindings/input/input.h>
8 #include "rk3288.dtsi"
9
10 / {
11         model = "mqmaker MiQi";
12         compatible = "mqmaker,miqi", "rockchip,rk3288";
13
14         chosen {
15                 stdout-path = "serial2:115200n8";
16         };
17
18         memory@0 {
19                 device_type = "memory";
20                 reg = <0x0 0x0 0x0 0x80000000>;
21         };
22
23         ext_gmac: external-gmac-clock {
24                 compatible = "fixed-clock";
25                 #clock-cells = <0>;
26                 clock-frequency = <125000000>;
27                 clock-output-names = "ext_gmac";
28         };
29
30         leds {
31                 compatible = "gpio-leds";
32
33                 work_led: led-0 {
34                         gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
35                         label = "miqi:green:user";
36                         linux,default-trigger = "timer";
37                 };
38         };
39
40         vcc_flash: flash-regulator {
41                 compatible = "regulator-fixed";
42                 regulator-name = "vcc_flash";
43                 regulator-min-microvolt = <1800000>;
44                 regulator-max-microvolt = <1800000>;
45                 vin-supply = <&vcc_io>;
46         };
47
48         vcc_host: usb-host-regulator {
49                 compatible = "regulator-fixed";
50                 enable-active-high;
51                 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
52                 pinctrl-names = "default";
53                 pinctrl-0 = <&host_vbus_drv>;
54                 regulator-name = "vcc_host";
55                 regulator-min-microvolt = <5000000>;
56                 regulator-max-microvolt = <5000000>;
57                 regulator-always-on;
58                 vin-supply = <&vcc_sys>;
59         };
60
61         vcc_sd: sdmmc-regulator {
62                 compatible = "regulator-fixed";
63                 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
64                 pinctrl-names = "default";
65                 pinctrl-0 = <&sdmmc_pwr>;
66                 regulator-name = "vcc_sd";
67                 regulator-min-microvolt = <3300000>;
68                 regulator-max-microvolt = <3300000>;
69                 startup-delay-us = <100000>;
70                 vin-supply = <&vcc_io>;
71         };
72
73         vcc_sys: vsys-regulator {
74                 compatible = "regulator-fixed";
75                 regulator-name = "vcc_sys";
76                 regulator-min-microvolt = <5000000>;
77                 regulator-max-microvolt = <5000000>;
78                 regulator-always-on;
79                 regulator-boot-on;
80         };
81 };
82
83 &cpu0 {
84         cpu-supply = <&vdd_cpu>;
85 };
86
87 &cpu1 {
88         cpu-supply = <&vdd_cpu>;
89 };
90
91 &cpu2 {
92         cpu-supply = <&vdd_cpu>;
93 };
94
95 &cpu3 {
96         cpu-supply = <&vdd_cpu>;
97 };
98
99 &emmc {
100         bus-width = <8>;
101         cap-mmc-highspeed;
102         non-removable;
103         pinctrl-names = "default";
104         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
105         vmmc-supply = <&vcc_io>;
106         vqmmc-supply = <&vcc_flash>;
107         status = "okay";
108 };
109
110 &gmac {
111         assigned-clocks = <&cru SCLK_MAC>;
112         assigned-clock-parents = <&ext_gmac>;
113         clock_in_out = "input";
114         pinctrl-names = "default";
115         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
116         phy-supply = <&vcc_lan>;
117         phy-mode = "rgmii";
118         snps,reset-active-low;
119         snps,reset-delays-us = <0 10000 1000000>;
120         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
121         tx_delay = <0x30>;
122         rx_delay = <0x10>;
123         status = "okay";
124 };
125
126 &hdmi {
127         ddc-i2c-bus = <&i2c5>;
128         status = "okay";
129 };
130
131 &i2c0 {
132         clock-frequency = <400000>;
133         status = "okay";
134
135         vdd_cpu: syr827@40 {
136                 compatible = "silergy,syr827";
137                 fcs,suspend-voltage-selector = <1>;
138                 reg = <0x40>;
139                 regulator-name = "vdd_cpu";
140                 regulator-min-microvolt = <850000>;
141                 regulator-max-microvolt = <1350000>;
142                 regulator-always-on;
143                 regulator-boot-on;
144                 regulator-enable-ramp-delay = <300>;
145                 regulator-ramp-delay = <8000>;
146                 vin-supply = <&vcc_sys>;
147         };
148
149         vdd_gpu: syr828@41 {
150                 compatible = "silergy,syr828";
151                 fcs,suspend-voltage-selector = <1>;
152                 reg = <0x41>;
153                 regulator-name = "vdd_gpu";
154                 regulator-min-microvolt = <850000>;
155                 regulator-max-microvolt = <1350000>;
156                 regulator-always-on;
157                 vin-supply = <&vcc_sys>;
158         };
159
160         hym8563: hym8563@51 {
161                 compatible = "haoyu,hym8563";
162                 reg = <0x51>;
163                 #clock-cells = <0>;
164                 clock-frequency = <32768>;
165                 clock-output-names = "xin32k";
166         };
167
168         act8846: act8846@5a {
169                 compatible = "active-semi,act8846";
170                 reg = <0x5a>;
171                 pinctrl-names = "default";
172                 pinctrl-0 = <&pmic_vsel>;
173                 system-power-controller;
174
175                 vp1-supply = <&vcc_sys>;
176                 vp2-supply = <&vcc_sys>;
177                 vp3-supply = <&vcc_sys>;
178                 vp4-supply = <&vcc_sys>;
179                 inl1-supply = <&vcc_sys>;
180                 inl2-supply = <&vcc_sys>;
181                 inl3-supply = <&vcc_20>;
182
183                 regulators {
184                         vcc_ddr: REG1 {
185                                 regulator-name = "vcc_ddr";
186                                 regulator-always-on;
187                         };
188
189                         vcc_io: REG2 {
190                                 regulator-name = "vcc_io";
191                                 regulator-min-microvolt = <3300000>;
192                                 regulator-max-microvolt = <3300000>;
193                                 regulator-always-on;
194                         };
195
196                         vdd_log: REG3 {
197                                 regulator-name = "vdd_log";
198                                 regulator-min-microvolt = <1100000>;
199                                 regulator-max-microvolt = <1100000>;
200                                 regulator-always-on;
201                         };
202
203                         vcc_20: REG4 {
204                                 regulator-name = "vcc_20";
205                                 regulator-min-microvolt = <2000000>;
206                                 regulator-max-microvolt = <2000000>;
207                                 regulator-always-on;
208                         };
209
210                         vccio_sd: REG5 {
211                                 regulator-name = "vccio_sd";
212                                 regulator-min-microvolt = <3300000>;
213                                 regulator-max-microvolt = <3300000>;
214                                 regulator-always-on;
215                         };
216
217                         vdd10_lcd: REG6 {
218                                 regulator-name = "vdd10_lcd";
219                                 regulator-min-microvolt = <1000000>;
220                                 regulator-max-microvolt = <1000000>;
221                                 regulator-always-on;
222                         };
223
224                         vcca_18: REG7 {
225                                 regulator-name = "vcca_18";
226                                 regulator-min-microvolt = <1800000>;
227                                 regulator-max-microvolt = <1800000>;
228                         };
229
230                         vcca_33: REG8 {
231                                 regulator-name = "vcca_33";
232                                 regulator-min-microvolt = <3300000>;
233                                 regulator-max-microvolt = <3300000>;
234                         };
235
236                         vcc_lan: REG9 {
237                                 regulator-name = "vcc_lan";
238                                 regulator-min-microvolt = <3300000>;
239                                 regulator-max-microvolt = <3300000>;
240                         };
241
242                         vdd_10: REG10 {
243                                 regulator-name = "vdd_10";
244                                 regulator-min-microvolt = <1000000>;
245                                 regulator-max-microvolt = <1000000>;
246                                 regulator-always-on;
247                         };
248
249                         vcc_18: REG11 {
250                                 regulator-name = "vcc_18";
251                                 regulator-min-microvolt = <1800000>;
252                                 regulator-max-microvolt = <1800000>;
253                                 regulator-always-on;
254                         };
255
256                         vcc18_lcd: REG12 {
257                                 regulator-name = "vcc18_lcd";
258                                 regulator-min-microvolt = <1800000>;
259                                 regulator-max-microvolt = <1800000>;
260                                 regulator-always-on;
261                         };
262                 };
263         };
264 };
265
266 &i2c1 {
267         status = "okay";
268 };
269
270 &i2c2 {
271         status = "okay";
272 };
273
274 &i2c4 {
275         status = "okay";
276 };
277
278 &i2c5 {
279         status = "okay";
280 };
281
282 &io_domains {
283         status = "okay";
284
285         audio-supply = <&vcca_33>;
286         flash0-supply = <&vcc_flash>;
287         flash1-supply = <&vcc_lan>;
288         gpio30-supply = <&vcc_io>;
289         gpio1830-supply = <&vcc_io>;
290         lcdc-supply = <&vcc_io>;
291         sdcard-supply = <&vccio_sd>;
292         wifi-supply = <&vcc_18>;
293 };
294
295 &pinctrl {
296         pcfg_output_high: pcfg-output-high {
297                 output-high;
298         };
299
300         pcfg_output_low: pcfg-output-low {
301                 output-low;
302         };
303
304         pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
305                 bias-pull-up;
306                 drive-strength = <12>;
307         };
308
309         act8846 {
310                 pmic_int: pmic-int {
311                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
312                 };
313
314                 pmic_sleep: pmic-sleep {
315                         rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_output_low>;
316                 };
317
318                 pmic_vsel: pmic-vsel {
319                         rockchip,pins = <7 RK_PA1 RK_FUNC_GPIO &pcfg_output_low>;
320                 };
321         };
322
323         gmac {
324                 phy_int: phy-int {
325                         rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
326                 };
327
328                 phy_pmeb: phy-pmeb {
329                         rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
330                 };
331
332                 phy_rst: phy-rst {
333                         rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
334                 };
335         };
336
337         sdmmc {
338                 /*
339                  * Default drive strength isn't enough to achieve even
340                  * high-speed mode on firefly board so bump up to 12ma.
341                  */
342                 sdmmc_bus4: sdmmc-bus4 {
343                         rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
344                                         <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
345                                         <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
346                                         <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
347                 };
348
349                 sdmmc_clk: sdmmc-clk {
350                         rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
351                 };
352
353                 sdmmc_cmd: sdmmc-cmd {
354                         rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
355                 };
356
357                 sdmmc_pwr: sdmmc-pwr {
358                         rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
359                 };
360         };
361
362         usb_host {
363                 host_vbus_drv: host-vbus-drv {
364                         rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
365                 };
366         };
367 };
368
369 &saradc {
370         vref-supply = <&vcc_18>;
371         status = "okay";
372 };
373
374 &sdmmc {
375         bus-width = <4>;
376         cap-mmc-highspeed;
377         cap-sd-highspeed;
378         card-detect-delay = <200>;
379         disable-wp;
380         pinctrl-names = "default";
381         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
382         vmmc-supply = <&vcc_sd>;
383         vqmmc-supply = <&vccio_sd>;
384         status = "okay";
385 };
386
387 &tsadc {
388         rockchip,hw-tshut-mode = <0>;
389         rockchip,hw-tshut-polarity = <0>;
390         status = "okay";
391 };
392
393 &uart2 {
394         status = "okay";
395 };
396
397 &uart3 {
398         status = "okay";
399 };
400
401 &usbphy {
402         status = "okay";
403 };
404
405 &usb_host1 {
406         status = "okay";
407 };
408
409 &usb_otg {
410         /*
411          * The otg controller is the only system power source,
412          * so needs to always stay in device mode.
413          */
414         dr_mode = "peripheral";
415         status = "okay";
416 };
417
418 &vopb {
419         status = "okay";
420 };
421
422 &vopb_mmu {
423         status = "okay";
424 };
425
426 &vopl {
427         status = "okay";
428 };
429
430 &vopl_mmu {
431         status = "okay";
432 };
433
434 &wdt {
435         status = "okay";
436 };