Merge branch 'drm-fixes-4.19' of git://people.freedesktop.org/~agd5f/linux into drm...
[sfrench/cifs-2.6.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 {
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         cpu0-supply = <&vdd_cpu>;
85 };
86
87 &emmc {
88         bus-width = <8>;
89         cap-mmc-highspeed;
90         disable-wp;
91         non-removable;
92         pinctrl-names = "default";
93         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
94         vmmc-supply = <&vcc_io>;
95         vqmmc-supply = <&vcc_flash>;
96         status = "okay";
97 };
98
99 &gmac {
100         assigned-clocks = <&cru SCLK_MAC>;
101         assigned-clock-parents = <&ext_gmac>;
102         clock_in_out = "input";
103         pinctrl-names = "default";
104         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
105         phy-supply = <&vcc_lan>;
106         phy-mode = "rgmii";
107         snps,reset-active-low;
108         snps,reset-delays-us = <0 10000 1000000>;
109         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
110         tx_delay = <0x30>;
111         rx_delay = <0x10>;
112         status = "ok";
113 };
114
115 &hdmi {
116         ddc-i2c-bus = <&i2c5>;
117         status = "okay";
118 };
119
120 &i2c0 {
121         clock-frequency = <400000>;
122         status = "okay";
123
124         vdd_cpu: syr827@40 {
125                 compatible = "silergy,syr827";
126                 fcs,suspend-voltage-selector = <1>;
127                 reg = <0x40>;
128                 regulator-name = "vdd_cpu";
129                 regulator-min-microvolt = <850000>;
130                 regulator-max-microvolt = <1350000>;
131                 regulator-always-on;
132                 regulator-boot-on;
133                 regulator-enable-ramp-delay = <300>;
134                 regulator-ramp-delay = <8000>;
135                 vin-supply = <&vcc_sys>;
136         };
137
138         vdd_gpu: syr828@41 {
139                 compatible = "silergy,syr828";
140                 fcs,suspend-voltage-selector = <1>;
141                 reg = <0x41>;
142                 regulator-name = "vdd_gpu";
143                 regulator-min-microvolt = <850000>;
144                 regulator-max-microvolt = <1350000>;
145                 regulator-always-on;
146                 vin-supply = <&vcc_sys>;
147         };
148
149         hym8563: hym8563@51 {
150                 compatible = "haoyu,hym8563";
151                 reg = <0x51>;
152                 #clock-cells = <0>;
153                 clock-frequency = <32768>;
154                 clock-output-names = "xin32k";
155         };
156
157         act8846: act8846@5a {
158                 compatible = "active-semi,act8846";
159                 reg = <0x5a>;
160                 pinctrl-names = "default";
161                 pinctrl-0 = <&pmic_vsel>;
162                 system-power-controller;
163
164                 vp1-supply = <&vcc_sys>;
165                 vp2-supply = <&vcc_sys>;
166                 vp3-supply = <&vcc_sys>;
167                 vp4-supply = <&vcc_sys>;
168                 inl1-supply = <&vcc_sys>;
169                 inl2-supply = <&vcc_sys>;
170                 inl3-supply = <&vcc_20>;
171
172                 regulators {
173                         vcc_ddr: REG1 {
174                                 regulator-name = "vcc_ddr";
175                                 regulator-always-on;
176                         };
177
178                         vcc_io: REG2 {
179                                 regulator-name = "vcc_io";
180                                 regulator-min-microvolt = <3300000>;
181                                 regulator-max-microvolt = <3300000>;
182                                 regulator-always-on;
183                         };
184
185                         vdd_log: REG3 {
186                                 regulator-name = "vdd_log";
187                                 regulator-min-microvolt = <1100000>;
188                                 regulator-max-microvolt = <1100000>;
189                                 regulator-always-on;
190                         };
191
192                         vcc_20: REG4 {
193                                 regulator-name = "vcc_20";
194                                 regulator-min-microvolt = <2000000>;
195                                 regulator-max-microvolt = <2000000>;
196                                 regulator-always-on;
197                         };
198
199                         vccio_sd: REG5 {
200                                 regulator-name = "vccio_sd";
201                                 regulator-min-microvolt = <3300000>;
202                                 regulator-max-microvolt = <3300000>;
203                                 regulator-always-on;
204                         };
205
206                         vdd10_lcd: REG6 {
207                                 regulator-name = "vdd10_lcd";
208                                 regulator-min-microvolt = <1000000>;
209                                 regulator-max-microvolt = <1000000>;
210                                 regulator-always-on;
211                         };
212
213                         vcca_18: REG7 {
214                                 regulator-name = "vcca_18";
215                                 regulator-min-microvolt = <1800000>;
216                                 regulator-max-microvolt = <1800000>;
217                         };
218
219                         vcca_33: REG8 {
220                                 regulator-name = "vcca_33";
221                                 regulator-min-microvolt = <3300000>;
222                                 regulator-max-microvolt = <3300000>;
223                         };
224
225                         vcc_lan: REG9 {
226                                 regulator-name = "vcc_lan";
227                                 regulator-min-microvolt = <3300000>;
228                                 regulator-max-microvolt = <3300000>;
229                         };
230
231                         vdd_10: REG10 {
232                                 regulator-name = "vdd_10";
233                                 regulator-min-microvolt = <1000000>;
234                                 regulator-max-microvolt = <1000000>;
235                                 regulator-always-on;
236                         };
237
238                         vcc_18: REG11 {
239                                 regulator-name = "vcc_18";
240                                 regulator-min-microvolt = <1800000>;
241                                 regulator-max-microvolt = <1800000>;
242                                 regulator-always-on;
243                         };
244
245                         vcc18_lcd: REG12 {
246                                 regulator-name = "vcc18_lcd";
247                                 regulator-min-microvolt = <1800000>;
248                                 regulator-max-microvolt = <1800000>;
249                                 regulator-always-on;
250                         };
251                 };
252         };
253 };
254
255 &i2c1 {
256         status = "okay";
257 };
258
259 &i2c2 {
260         status = "okay";
261 };
262
263 &i2c4 {
264         status = "okay";
265 };
266
267 &i2c5 {
268         status = "okay";
269 };
270
271 &io_domains {
272         status = "okay";
273
274         audio-supply = <&vcca_33>;
275         flash0-supply = <&vcc_flash>;
276         flash1-supply = <&vcc_lan>;
277         gpio30-supply = <&vcc_io>;
278         gpio1830-supply = <&vcc_io>;
279         lcdc-supply = <&vcc_io>;
280         sdcard-supply = <&vccio_sd>;
281         wifi-supply = <&vcc_18>;
282 };
283
284 &pinctrl {
285         pcfg_output_high: pcfg-output-high {
286                 output-high;
287         };
288
289         pcfg_output_low: pcfg-output-low {
290                 output-low;
291         };
292
293         pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
294                 bias-pull-up;
295                 drive-strength = <12>;
296         };
297
298         act8846 {
299                 pmic_int: pmic-int {
300                         rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
301                 };
302
303                 pmic_sleep: pmic-sleep {
304                         rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_output_low>;
305                 };
306
307                 pmic_vsel: pmic-vsel {
308                         rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>;
309                 };
310         };
311
312         gmac {
313                 phy_int: phy-int {
314                         rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
315                 };
316
317                 phy_pmeb: phy-pmeb {
318                         rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
319                 };
320
321                 phy_rst: phy-rst {
322                         rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
323                 };
324         };
325
326         sdmmc {
327                 /*
328                  * Default drive strength isn't enough to achieve even
329                  * high-speed mode on firefly board so bump up to 12ma.
330                  */
331                 sdmmc_bus4: sdmmc-bus4 {
332                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
333                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
334                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
335                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
336                 };
337
338                 sdmmc_clk: sdmmc-clk {
339                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
340                 };
341
342                 sdmmc_cmd: sdmmc-cmd {
343                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
344                 };
345
346                 sdmmc_pwr: sdmmc-pwr {
347                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
348                 };
349         };
350
351         usb_host {
352                 host_vbus_drv: host-vbus-drv {
353                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
354                 };
355         };
356 };
357
358 &saradc {
359         vref-supply = <&vcc_18>;
360         status = "okay";
361 };
362
363 &sdmmc {
364         bus-width = <4>;
365         cap-mmc-highspeed;
366         cap-sd-highspeed;
367         card-detect-delay = <200>;
368         disable-wp;
369         pinctrl-names = "default";
370         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
371         vmmc-supply = <&vcc_sd>;
372         vqmmc-supply = <&vccio_sd>;
373         status = "okay";
374 };
375
376 &tsadc {
377         rockchip,hw-tshut-mode = <0>;
378         rockchip,hw-tshut-polarity = <0>;
379         status = "okay";
380 };
381
382 &uart2 {
383         status = "okay";
384 };
385
386 &uart3 {
387         status = "okay";
388 };
389
390 &usbphy {
391         status = "okay";
392 };
393
394 &usb_host1 {
395         status = "okay";
396 };
397
398 &usb_otg {
399         /*
400          * The otg controller is the only system power source,
401          * so needs to always stay in device mode.
402          */
403         dr_mode = "peripheral";
404         status = "okay";
405 };
406
407 &vopb {
408         status = "okay";
409 };
410
411 &vopb_mmu {
412         status = "okay";
413 };
414
415 &vopl {
416         status = "okay";
417 };
418
419 &vopl_mmu {
420         status = "okay";
421 };
422
423 &wdt {
424         status = "okay";
425 };