Linux 5.6.13
[linux/fpc-iii.git] / arch / arm / boot / dts / rk3288-miqi.dts
blobc41d012c88503d4663e8d5ce2c22e5eca844d819
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de>
4  */
6 /dts-v1/;
7 #include <dt-bindings/input/input.h>
8 #include "rk3288.dtsi"
10 / {
11         model = "mqmaker MiQi";
12         compatible = "mqmaker,miqi", "rockchip,rk3288";
14         chosen {
15                 stdout-path = "serial2:115200n8";
16         };
18         memory@0 {
19                 device_type = "memory";
20                 reg = <0x0 0x0 0x0 0x80000000>;
21         };
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         };
30         leds {
31                 compatible = "gpio-leds";
33                 work {
34                         gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
35                         label = "miqi:green:user";
36                         linux,default-trigger = "timer";
37                 };
38         };
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         };
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         };
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         };
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         };
83 &cpu0 {
84         cpu0-supply = <&vdd_cpu>;
87 &emmc {
88         bus-width = <8>;
89         cap-mmc-highspeed;
90         non-removable;
91         pinctrl-names = "default";
92         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
93         vmmc-supply = <&vcc_io>;
94         vqmmc-supply = <&vcc_flash>;
95         status = "okay";
98 &gmac {
99         assigned-clocks = <&cru SCLK_MAC>;
100         assigned-clock-parents = <&ext_gmac>;
101         clock_in_out = "input";
102         pinctrl-names = "default";
103         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
104         phy-supply = <&vcc_lan>;
105         phy-mode = "rgmii";
106         snps,reset-active-low;
107         snps,reset-delays-us = <0 10000 1000000>;
108         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
109         tx_delay = <0x30>;
110         rx_delay = <0x10>;
111         status = "ok";
114 &hdmi {
115         ddc-i2c-bus = <&i2c5>;
116         status = "okay";
119 &i2c0 {
120         clock-frequency = <400000>;
121         status = "okay";
123         vdd_cpu: syr827@40 {
124                 compatible = "silergy,syr827";
125                 fcs,suspend-voltage-selector = <1>;
126                 reg = <0x40>;
127                 regulator-name = "vdd_cpu";
128                 regulator-min-microvolt = <850000>;
129                 regulator-max-microvolt = <1350000>;
130                 regulator-always-on;
131                 regulator-boot-on;
132                 regulator-enable-ramp-delay = <300>;
133                 regulator-ramp-delay = <8000>;
134                 vin-supply = <&vcc_sys>;
135         };
137         vdd_gpu: syr828@41 {
138                 compatible = "silergy,syr828";
139                 fcs,suspend-voltage-selector = <1>;
140                 reg = <0x41>;
141                 regulator-name = "vdd_gpu";
142                 regulator-min-microvolt = <850000>;
143                 regulator-max-microvolt = <1350000>;
144                 regulator-always-on;
145                 vin-supply = <&vcc_sys>;
146         };
148         hym8563: hym8563@51 {
149                 compatible = "haoyu,hym8563";
150                 reg = <0x51>;
151                 #clock-cells = <0>;
152                 clock-frequency = <32768>;
153                 clock-output-names = "xin32k";
154         };
156         act8846: act8846@5a {
157                 compatible = "active-semi,act8846";
158                 reg = <0x5a>;
159                 pinctrl-names = "default";
160                 pinctrl-0 = <&pmic_vsel>;
161                 system-power-controller;
163                 vp1-supply = <&vcc_sys>;
164                 vp2-supply = <&vcc_sys>;
165                 vp3-supply = <&vcc_sys>;
166                 vp4-supply = <&vcc_sys>;
167                 inl1-supply = <&vcc_sys>;
168                 inl2-supply = <&vcc_sys>;
169                 inl3-supply = <&vcc_20>;
171                 regulators {
172                         vcc_ddr: REG1 {
173                                 regulator-name = "vcc_ddr";
174                                 regulator-always-on;
175                         };
177                         vcc_io: REG2 {
178                                 regulator-name = "vcc_io";
179                                 regulator-min-microvolt = <3300000>;
180                                 regulator-max-microvolt = <3300000>;
181                                 regulator-always-on;
182                         };
184                         vdd_log: REG3 {
185                                 regulator-name = "vdd_log";
186                                 regulator-min-microvolt = <1100000>;
187                                 regulator-max-microvolt = <1100000>;
188                                 regulator-always-on;
189                         };
191                         vcc_20: REG4 {
192                                 regulator-name = "vcc_20";
193                                 regulator-min-microvolt = <2000000>;
194                                 regulator-max-microvolt = <2000000>;
195                                 regulator-always-on;
196                         };
198                         vccio_sd: REG5 {
199                                 regulator-name = "vccio_sd";
200                                 regulator-min-microvolt = <3300000>;
201                                 regulator-max-microvolt = <3300000>;
202                                 regulator-always-on;
203                         };
205                         vdd10_lcd: REG6 {
206                                 regulator-name = "vdd10_lcd";
207                                 regulator-min-microvolt = <1000000>;
208                                 regulator-max-microvolt = <1000000>;
209                                 regulator-always-on;
210                         };
212                         vcca_18: REG7 {
213                                 regulator-name = "vcca_18";
214                                 regulator-min-microvolt = <1800000>;
215                                 regulator-max-microvolt = <1800000>;
216                         };
218                         vcca_33: REG8 {
219                                 regulator-name = "vcca_33";
220                                 regulator-min-microvolt = <3300000>;
221                                 regulator-max-microvolt = <3300000>;
222                         };
224                         vcc_lan: REG9 {
225                                 regulator-name = "vcc_lan";
226                                 regulator-min-microvolt = <3300000>;
227                                 regulator-max-microvolt = <3300000>;
228                         };
230                         vdd_10: REG10 {
231                                 regulator-name = "vdd_10";
232                                 regulator-min-microvolt = <1000000>;
233                                 regulator-max-microvolt = <1000000>;
234                                 regulator-always-on;
235                         };
237                         vcc_18: REG11 {
238                                 regulator-name = "vcc_18";
239                                 regulator-min-microvolt = <1800000>;
240                                 regulator-max-microvolt = <1800000>;
241                                 regulator-always-on;
242                         };
244                         vcc18_lcd: REG12 {
245                                 regulator-name = "vcc18_lcd";
246                                 regulator-min-microvolt = <1800000>;
247                                 regulator-max-microvolt = <1800000>;
248                                 regulator-always-on;
249                         };
250                 };
251         };
254 &i2c1 {
255         status = "okay";
258 &i2c2 {
259         status = "okay";
262 &i2c4 {
263         status = "okay";
266 &i2c5 {
267         status = "okay";
270 &io_domains {
271         status = "okay";
273         audio-supply = <&vcca_33>;
274         flash0-supply = <&vcc_flash>;
275         flash1-supply = <&vcc_lan>;
276         gpio30-supply = <&vcc_io>;
277         gpio1830-supply = <&vcc_io>;
278         lcdc-supply = <&vcc_io>;
279         sdcard-supply = <&vccio_sd>;
280         wifi-supply = <&vcc_18>;
283 &pinctrl {
284         pcfg_output_high: pcfg-output-high {
285                 output-high;
286         };
288         pcfg_output_low: pcfg-output-low {
289                 output-low;
290         };
292         pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
293                 bias-pull-up;
294                 drive-strength = <12>;
295         };
297         act8846 {
298                 pmic_int: pmic-int {
299                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
300                 };
302                 pmic_sleep: pmic-sleep {
303                         rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_output_low>;
304                 };
306                 pmic_vsel: pmic-vsel {
307                         rockchip,pins = <7 RK_PA1 RK_FUNC_GPIO &pcfg_output_low>;
308                 };
309         };
311         gmac {
312                 phy_int: phy-int {
313                         rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
314                 };
316                 phy_pmeb: phy-pmeb {
317                         rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
318                 };
320                 phy_rst: phy-rst {
321                         rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
322                 };
323         };
325         sdmmc {
326                 /*
327                  * Default drive strength isn't enough to achieve even
328                  * high-speed mode on firefly board so bump up to 12ma.
329                  */
330                 sdmmc_bus4: sdmmc-bus4 {
331                         rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
332                                         <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
333                                         <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
334                                         <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
335                 };
337                 sdmmc_clk: sdmmc-clk {
338                         rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
339                 };
341                 sdmmc_cmd: sdmmc-cmd {
342                         rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
343                 };
345                 sdmmc_pwr: sdmmc-pwr {
346                         rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
347                 };
348         };
350         usb_host {
351                 host_vbus_drv: host-vbus-drv {
352                         rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
353                 };
354         };
357 &saradc {
358         vref-supply = <&vcc_18>;
359         status = "okay";
362 &sdmmc {
363         bus-width = <4>;
364         cap-mmc-highspeed;
365         cap-sd-highspeed;
366         card-detect-delay = <200>;
367         disable-wp;
368         pinctrl-names = "default";
369         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
370         vmmc-supply = <&vcc_sd>;
371         vqmmc-supply = <&vccio_sd>;
372         status = "okay";
375 &tsadc {
376         rockchip,hw-tshut-mode = <0>;
377         rockchip,hw-tshut-polarity = <0>;
378         status = "okay";
381 &uart2 {
382         status = "okay";
385 &uart3 {
386         status = "okay";
389 &usbphy {
390         status = "okay";
393 &usb_host1 {
394         status = "okay";
397 &usb_otg {
398         /*
399          * The otg controller is the only system power source,
400          * so needs to always stay in device mode.
401          */
402         dr_mode = "peripheral";
403         status = "okay";
406 &vopb {
407         status = "okay";
410 &vopb_mmu {
411         status = "okay";
414 &vopl {
415         status = "okay";
418 &vopl_mmu {
419         status = "okay";
422 &wdt {
423         status = "okay";