GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / rk3288-popmetal.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2014, 2015 Andy Yan <andy.yan@rock-chips.com>
4  */
5
6 /dts-v1/;
7 #include <dt-bindings/input/input.h>
8 #include "rk3288.dtsi"
9
10 / {
11         model = "PopMetal-RK3288";
12         compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
13
14         memory@0 {
15                 device_type = "memory";
16                 reg = <0x0 0x0 0x0 0x80000000>;
17         };
18
19         ext_gmac: external-gmac-clock {
20                 compatible = "fixed-clock";
21                 clock-frequency = <125000000>;
22                 clock-output-names = "ext_gmac";
23                 #clock-cells = <0>;
24         };
25
26         gpio-keys {
27                 compatible = "gpio-keys";
28                 autorepeat;
29
30                 pinctrl-names = "default";
31                 pinctrl-0 = <&pwrbtn>;
32
33                 power {
34                         gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_POWER>;
36                         label = "GPIO Key Power";
37                         linux,input-type = <1>;
38                         wakeup-source;
39                         debounce-interval = <100>;
40                 };
41         };
42
43         ir: ir-receiver {
44                 compatible = "gpio-ir-receiver";
45                 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
46                 pinctrl-names = "default";
47                 pinctrl-0 = <&ir_int>;
48         };
49
50         vcc_flash: flash-regulator {
51                 compatible = "regulator-fixed";
52                 regulator-name = "vcc_flash";
53                 regulator-min-microvolt = <1800000>;
54                 regulator-max-microvolt = <1800000>;
55                 vin-supply = <&vcc_io>;
56         };
57
58         vcc_sd: sdmmc-regulator {
59                 compatible = "regulator-fixed";
60                 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
61                 pinctrl-names = "default";
62                 pinctrl-0 = <&sdmmc_pwr>;
63                 regulator-name = "vcc_sd";
64                 regulator-min-microvolt = <3300000>;
65                 regulator-max-microvolt = <3300000>;
66                 startup-delay-us = <100000>;
67                 vin-supply = <&vcc_io>;
68         };
69
70         vcc_sys: vsys-regulator {
71                 compatible = "regulator-fixed";
72                 regulator-name = "vcc_sys";
73                 regulator-min-microvolt = <5000000>;
74                 regulator-max-microvolt = <5000000>;
75                 regulator-always-on;
76                 regulator-boot-on;
77         };
78
79         /*
80          * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
81          * by the dvp_pwr pin.
82          */
83         vcc18_dvp: vcc18-dvp-regulator {
84                 compatible = "regulator-fixed";
85                 regulator-name = "vcc18-dvp";
86                 regulator-min-microvolt = <1800000>;
87                 regulator-max-microvolt = <1800000>;
88                 vin-supply = <&vcc28_dvp>;
89         };
90
91         vcc28_dvp: vcc28-dvp-regulator {
92                 compatible = "regulator-fixed";
93                 enable-active-high;
94                 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
95                 pinctrl-names = "default";
96                 pinctrl-0 = <&dvp_pwr>;
97                 regulator-name = "vcc28_dvp";
98                 regulator-min-microvolt = <2800000>;
99                 regulator-max-microvolt = <2800000>;
100                 regulator-always-on;
101                 vin-supply = <&vcc_io>;
102         };
103 };
104
105 &cpu0 {
106         cpu0-supply = <&vdd_cpu>;
107 };
108
109 &emmc {
110         bus-width = <8>;
111         cap-mmc-highspeed;
112         disable-wp;
113         mmc-ddr-1_8v;
114         mmc-hs200-1_8v;
115         non-removable;
116         pinctrl-names = "default";
117         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
118         vmmc-supply = <&vcc_io>;
119         vqmmc-supply = <&vcc_flash>;
120         status = "okay";
121 };
122
123 &sdmmc {
124         bus-width = <4>;
125         cap-mmc-highspeed;
126         cap-sd-highspeed;
127         card-detect-delay = <200>;
128         disable-wp;                     /* wp not hooked up */
129         pinctrl-names = "default";
130         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
131         sd-uhs-sdr12;
132         sd-uhs-sdr25;
133         sd-uhs-sdr50;
134         sd-uhs-sdr104;
135         vmmc-supply = <&vcc_sd>;
136         vqmmc-supply = <&vccio_sd>;
137         status = "okay";
138 };
139
140 &gmac {
141         phy-supply = <&vcc_lan>;
142         phy-mode = "rgmii";
143         clock_in_out = "input";
144         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
145         snps,reset-active-low;
146         snps,reset-delays-us = <0 10000 1000000>;
147         assigned-clocks = <&cru SCLK_MAC>;
148         assigned-clock-parents = <&ext_gmac>;
149         pinctrl-names = "default";
150         pinctrl-0 = <&rgmii_pins>;
151         tx_delay = <0x30>;
152         rx_delay = <0x10>;
153         status = "ok";
154 };
155
156 &hdmi {
157         ddc-i2c-bus = <&i2c5>;
158         status = "okay";
159 };
160
161 &i2c0 {
162         status = "okay";
163         clock-frequency = <400000>;
164
165         rk808: pmic@1b {
166                 compatible = "rockchip,rk808";
167                 reg = <0x1b>;
168                 interrupt-parent = <&gpio0>;
169                 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
170                 pinctrl-names = "default";
171                 pinctrl-0 = <&pmic_int &global_pwroff>;
172                 rockchip,system-power-controller;
173                 wakeup-source;
174                 #clock-cells = <1>;
175                 clock-output-names = "xin32k", "rk808-clkout2";
176
177                 vcc1-supply = <&vcc_sys>;
178                 vcc2-supply = <&vcc_sys>;
179                 vcc3-supply = <&vcc_sys>;
180                 vcc4-supply = <&vcc_sys>;
181                 vcc6-supply = <&vcc_sys>;
182                 vcc7-supply = <&vcc_sys>;
183                 vcc8-supply = <&vcc_18>;
184                 vcc9-supply = <&vcc_io>;
185                 vcc10-supply = <&vcc_io>;
186                 vcc11-supply = <&vcc_sys>;
187                 vcc12-supply = <&vcc_io>;
188                 vddio-supply = <&vcc_io>;
189
190                 regulators {
191                         vdd_cpu: DCDC_REG1 {
192                                 regulator-always-on;
193                                 regulator-boot-on;
194                                 regulator-min-microvolt = <750000>;
195                                 regulator-max-microvolt = <1350000>;
196                                 regulator-name = "vdd_arm";
197                                 regulator-state-mem {
198                                         regulator-off-in-suspend;
199                                 };
200                         };
201
202                         vdd_gpu: DCDC_REG2 {
203                                 regulator-always-on;
204                                 regulator-boot-on;
205                                 regulator-min-microvolt = <850000>;
206                                 regulator-max-microvolt = <1250000>;
207                                 regulator-name = "vdd_gpu";
208                                 regulator-state-mem {
209                                         regulator-on-in-suspend;
210                                         regulator-suspend-microvolt = <1000000>;
211                                 };
212                         };
213
214                         vcc_ddr: DCDC_REG3 {
215                                 regulator-always-on;
216                                 regulator-boot-on;
217                                 regulator-name = "vcc_ddr";
218                                 regulator-state-mem {
219                                         regulator-on-in-suspend;
220                                 };
221                         };
222
223                         vcc_io: DCDC_REG4 {
224                                 regulator-always-on;
225                                 regulator-boot-on;
226                                 regulator-min-microvolt = <3300000>;
227                                 regulator-max-microvolt = <3300000>;
228                                 regulator-name = "vcc_io";
229                                 regulator-state-mem {
230                                         regulator-on-in-suspend;
231                                         regulator-suspend-microvolt = <3300000>;
232                                 };
233                         };
234
235                         vcc_lan: LDO_REG1 {
236                                 regulator-always-on;
237                                 regulator-boot-on;
238                                 regulator-min-microvolt = <3300000>;
239                                 regulator-max-microvolt = <3300000>;
240                                 regulator-name = "vcc_lan";
241                                 regulator-state-mem {
242                                         regulator-on-in-suspend;
243                                         regulator-suspend-microvolt = <3300000>;
244                                 };
245                         };
246
247                         vccio_sd: LDO_REG2 {
248                                 regulator-always-on;
249                                 regulator-boot-on;
250                                 regulator-min-microvolt = <1800000>;
251                                 regulator-max-microvolt = <3300000>;
252                                 regulator-name = "vccio_sd";
253                                 regulator-state-mem {
254                                         regulator-off-in-suspend;
255                                 };
256                         };
257
258                         vdd_10: LDO_REG3 {
259                                 regulator-always-on;
260                                 regulator-boot-on;
261                                 regulator-min-microvolt = <1000000>;
262                                 regulator-max-microvolt = <1000000>;
263                                 regulator-name = "vdd_10";
264                                 regulator-state-mem {
265                                         regulator-on-in-suspend;
266                                         regulator-suspend-microvolt = <1000000>;
267                                 };
268                         };
269
270                         vcc18_lcd: LDO_REG4 {
271                                 regulator-always-on;
272                                 regulator-boot-on;
273                                 regulator-min-microvolt = <1800000>;
274                                 regulator-max-microvolt = <1800000>;
275                                 regulator-name = "vcc18_lcd";
276                                 regulator-state-mem {
277                                         regulator-on-in-suspend;
278                                         regulator-suspend-microvolt = <1800000>;
279                                 };
280                         };
281
282                         ldo5: LDO_REG5 {
283                                 regulator-always-on;
284                                 regulator-min-microvolt = <1800000>;
285                                 regulator-max-microvolt = <3300000>;
286                                 regulator-name = "ldo5";
287                         };
288
289                         vdd10_lcd: LDO_REG6 {
290                                 regulator-always-on;
291                                 regulator-boot-on;
292                                 regulator-min-microvolt = <1000000>;
293                                 regulator-max-microvolt = <1000000>;
294                                 regulator-name = "vdd10_lcd";
295                                 regulator-state-mem {
296                                         regulator-on-in-suspend;
297                                         regulator-suspend-microvolt = <1000000>;
298                                 };
299                         };
300
301                         vcc_18: LDO_REG7 {
302                                 regulator-always-on;
303                                 regulator-boot-on;
304                                 regulator-min-microvolt = <1800000>;
305                                 regulator-max-microvolt = <1800000>;
306                                 regulator-name = "vcc_18";
307                                 regulator-state-mem {
308                                         regulator-on-in-suspend;
309                                         regulator-suspend-microvolt = <1800000>;
310                                 };
311                         };
312
313                         vcca_33: LDO_REG8 {
314                                 regulator-always-on;
315                                 regulator-boot-on;
316                                 regulator-min-microvolt = <3300000>;
317                                 regulator-max-microvolt = <3300000>;
318                                 regulator-name = "vcca_33";
319                                 regulator-state-mem {
320                                         regulator-on-in-suspend;
321                                         regulator-suspend-microvolt = <3300000>;
322                                 };
323                         };
324
325                         vccio_wl: SWITCH_REG1 {
326                                 regulator-always-on;
327                                 regulator-boot-on;
328                                 regulator-name = "vccio_wl";
329                                 regulator-state-mem {
330                                         regulator-on-in-suspend;
331                                 };
332                         };
333
334                         vcc_lcd: SWITCH_REG2 {
335                                 regulator-always-on;
336                                 regulator-boot-on;
337                                 regulator-name = "vcc_lcd";
338                                 regulator-state-mem {
339                                         regulator-on-in-suspend;
340                                 };
341                         };
342                 };
343         };
344 };
345
346 &i2c1 {
347         status = "okay";
348         clock-frequency = <400000>;
349
350         ak8963: ak8963@d {
351                 compatible = "asahi-kasei,ak8975";
352                 reg = <0x0d>;
353                 interrupt-parent = <&gpio8>;
354                 interrupts = <RK_PA1 IRQ_TYPE_EDGE_RISING>;
355                 pinctrl-names = "default";
356                 pinctrl-0 = <&comp_int>;
357                 vdd-supply = <&vcc_io>;
358                 vid-supply = <&vcc_io>;
359         };
360
361         l3g4200d: l3g4200d@69 {
362                 compatible = "st,l3g4200d-gyro";
363                 st,drdy-int-pin = <2>;
364                 reg = <0x69>;
365                 vdd-supply = <&vcc_io>;
366                 vddio-supply = <&vcc_io>;
367         };
368
369         mma8452: mma8452@1d {
370                 compatible = "fsl,mma8452";
371                 reg = <0x1d>;
372                 interrupt-parent = <&gpio8>;
373                 interrupts = <RK_PA0 IRQ_TYPE_EDGE_RISING>;
374                 pinctrl-names = "default";
375                 pinctrl-0 = <&gsensor_int>;
376         };
377 };
378
379 &i2c2 {
380         status = "okay";
381 };
382
383 &i2c3 {
384         status = "okay";
385 };
386
387 &i2c4 {
388         status = "okay";
389 };
390
391 &i2c5 {
392         status = "okay";
393 };
394
395 &io_domains {
396         status = "okay";
397
398         audio-supply = <&vcca_33>;
399         bb-supply = <&vcc_io>;
400         dvp-supply = <&vcc18_dvp>;
401         flash0-supply = <&vcc_flash>;
402         flash1-supply = <&vcc_lan>;
403         gpio30-supply = <&vcc_io>;
404         gpio1830-supply = <&vcc_io>;
405         lcdc-supply = <&vcc_io>;
406         sdcard-supply = <&vccio_sd>;
407         wifi-supply = <&vccio_wl>;
408 };
409
410 &pinctrl {
411         ak8963 {
412                 comp_int: comp-int {
413                         rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
414                 };
415         };
416
417         buttons {
418                 pwrbtn: pwrbtn {
419                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
420                 };
421         };
422
423         dvp {
424                 dvp_pwr: dvp-pwr {
425                         rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
426                 };
427         };
428
429         ir {
430                 ir_int: ir-int {
431                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
432                 };
433         };
434
435         mma8452 {
436                 gsensor_int: gsensor-int {
437                         rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
438                 };
439         };
440
441         pmic {
442                 pmic_int: pmic-int {
443                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
444                 };
445         };
446
447         sdmmc {
448                 sdmmc_pwr: sdmmc-pwr {
449                         rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
450                 };
451         };
452 };
453
454 &tsadc {
455         rockchip,hw-tshut-mode = <0>;
456         rockchip,hw-tshut-polarity = <0>;
457         status = "okay";
458 };
459
460 &vopb {
461         status = "okay";
462 };
463
464 &vopb_mmu {
465         status = "okay";
466 };
467
468 &vopl {
469         status = "okay";
470 };
471
472 &vopl_mmu {
473         status = "okay";
474 };
475
476 &uart0 {
477         status = "okay";
478 };
479
480 &uart1 {
481         status = "okay";
482 };
483
484 &uart2 {
485         status = "okay";
486 };
487
488 &uart3 {
489         status = "okay";
490 };
491
492 &uart4 {
493         status = "okay";
494 };
495
496 &usbphy {
497         status = "okay";
498 };
499
500 &usb_otg {
501         status = "okay";
502 };