arm64: dts: rockchip: enable the gpu on px30-evb
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / rockchip / px30-evb.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4  */
5
6 /dts-v1/;
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/pinctrl/rockchip.h>
10 #include "px30.dtsi"
11
12 / {
13         model = "Rockchip PX30 EVB";
14         compatible = "rockchip,px30-evb", "rockchip,px30";
15
16         chosen {
17                 stdout-path = "serial5:115200n8";
18         };
19
20         adc-keys {
21                 compatible = "adc-keys";
22                 io-channels = <&saradc 2>;
23                 io-channel-names = "buttons";
24                 keyup-threshold-microvolt = <1800000>;
25                 poll-interval = <100>;
26
27                 esc-key {
28                         label = "esc";
29                         linux,code = <KEY_ESC>;
30                         press-threshold-microvolt = <1310000>;
31                 };
32
33                 home-key {
34                         label = "home";
35                         linux,code = <KEY_HOME>;
36                         press-threshold-microvolt = <624000>;
37                 };
38
39                 menu-key {
40                         label = "menu";
41                         linux,code = <KEY_MENU>;
42                         press-threshold-microvolt = <987000>;
43                 };
44
45                 vol-down-key {
46                         label = "volume down";
47                         linux,code = <KEY_VOLUMEDOWN>;
48                         press-threshold-microvolt = <300000>;
49                 };
50
51                 vol-up-key {
52                         label = "volume up";
53                         linux,code = <KEY_VOLUMEUP>;
54                         press-threshold-microvolt = <17000>;
55                 };
56         };
57
58         backlight: backlight {
59                 compatible = "pwm-backlight";
60                 pwms = <&pwm1 0 25000 0>;
61                 power-supply = <&vcc3v3_lcd>;
62         };
63
64         emmc_pwrseq: emmc-pwrseq {
65                 compatible = "mmc-pwrseq-emmc";
66                 pinctrl-0 = <&emmc_reset>;
67                 pinctrl-names = "default";
68                 reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
69         };
70
71         sdio_pwrseq: sdio-pwrseq {
72                 compatible = "mmc-pwrseq-simple";
73                 pinctrl-names = "default";
74                 pinctrl-0 = <&wifi_enable_h>;
75
76                 /*
77                  * On the module itself this is one of these (depending
78                  * on the actual card populated):
79                  * - SDIO_RESET_L_WL_REG_ON
80                  * - PDN (power down when low)
81                  */
82                 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
83         };
84
85         vcc5v0_sys: vccsys {
86                 compatible = "regulator-fixed";
87                 regulator-name = "vcc5v0_sys";
88                 regulator-always-on;
89                 regulator-boot-on;
90                 regulator-min-microvolt = <5000000>;
91                 regulator-max-microvolt = <5000000>;
92         };
93 };
94
95 &cpu0 {
96         cpu-supply = <&vdd_arm>;
97 };
98
99 &cpu1 {
100         cpu-supply = <&vdd_arm>;
101 };
102
103 &cpu2 {
104         cpu-supply = <&vdd_arm>;
105 };
106
107 &cpu3 {
108         cpu-supply = <&vdd_arm>;
109 };
110
111 &display_subsystem {
112         status = "okay";
113 };
114
115 &emmc {
116         bus-width = <8>;
117         cap-mmc-highspeed;
118         mmc-hs200-1_8v;
119         non-removable;
120         mmc-pwrseq = <&emmc_pwrseq>;
121         vmmc-supply = <&vcc_3v0>;
122         vqmmc-supply = <&vccio_flash>;
123         status = "okay";
124 };
125
126 &gmac {
127         clock_in_out = "output";
128         phy-supply = <&vcc_rmii>;
129         snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
130         snps,reset-active-low;
131         snps,reset-delays-us = <0 50000 50000>;
132         status = "okay";
133 };
134
135 &gpu {
136         mali-supply = <&vdd_log>;
137         status = "okay";
138 };
139
140 &i2c0 {
141         status = "okay";
142
143         rk809: pmic@20 {
144                 compatible = "rockchip,rk809";
145                 reg = <0x20>;
146                 interrupt-parent = <&gpio0>;
147                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
148                 pinctrl-names = "default";
149                 pinctrl-0 = <&pmic_int>;
150                 rockchip,system-power-controller;
151                 wakeup-source;
152                 #clock-cells = <0>;
153                 clock-output-names = "xin32k";
154
155                 vcc1-supply = <&vcc5v0_sys>;
156                 vcc2-supply = <&vcc5v0_sys>;
157                 vcc3-supply = <&vcc5v0_sys>;
158                 vcc4-supply = <&vcc5v0_sys>;
159                 vcc5-supply = <&vcc3v3_sys>;
160                 vcc6-supply = <&vcc3v3_sys>;
161                 vcc7-supply = <&vcc3v3_sys>;
162                 vcc8-supply = <&vcc3v3_sys>;
163                 vcc9-supply = <&vcc5v0_sys>;
164
165                 regulators {
166                         vdd_log: DCDC_REG1 {
167                                 regulator-name = "vdd_log";
168                                 regulator-min-microvolt = <950000>;
169                                 regulator-max-microvolt = <1350000>;
170                                 regulator-ramp-delay = <6001>;
171                                 regulator-always-on;
172                                 regulator-boot-on;
173
174                                 regulator-state-mem {
175                                         regulator-on-in-suspend;
176                                         regulator-suspend-microvolt = <950000>;
177                                 };
178                         };
179
180                         vdd_arm: DCDC_REG2 {
181                                 regulator-name = "vdd_arm";
182                                 regulator-min-microvolt = <950000>;
183                                 regulator-max-microvolt = <1350000>;
184                                 regulator-ramp-delay = <6001>;
185                                 regulator-always-on;
186                                 regulator-boot-on;
187
188                                 regulator-state-mem {
189                                         regulator-off-in-suspend;
190                                         regulator-suspend-microvolt = <950000>;
191                                 };
192                         };
193
194                         vcc_ddr: DCDC_REG3 {
195                                 regulator-name = "vcc_ddr";
196                                 regulator-always-on;
197                                 regulator-boot-on;
198
199                                 regulator-state-mem {
200                                         regulator-on-in-suspend;
201                                 };
202                         };
203
204                         vcc_3v0: vcc_rmii: DCDC_REG4 {
205                                 regulator-name = "vcc_3v0";
206                                 regulator-min-microvolt = <3000000>;
207                                 regulator-max-microvolt = <3000000>;
208                                 regulator-always-on;
209                                 regulator-boot-on;
210
211                                 regulator-state-mem {
212                                         regulator-on-in-suspend;
213                                         regulator-suspend-microvolt = <3000000>;
214                                 };
215                         };
216
217                         vcc3v3_sys: DCDC_REG5 {
218                                 regulator-name = "vcc3v3_sys";
219                                 regulator-min-microvolt = <3300000>;
220                                 regulator-max-microvolt = <3300000>;
221                                 regulator-always-on;
222                                 regulator-boot-on;
223
224                                 regulator-state-mem {
225                                         regulator-on-in-suspend;
226                                         regulator-suspend-microvolt = <3300000>;
227                                 };
228                         };
229
230                         vcc_1v0: LDO_REG1 {
231                                 regulator-name = "vcc_1v0";
232                                 regulator-min-microvolt = <1000000>;
233                                 regulator-max-microvolt = <1000000>;
234                                 regulator-always-on;
235                                 regulator-boot-on;
236
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <1000000>;
240                                 };
241                         };
242
243                         vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 {
244                                 regulator-name = "vcc_1v8";
245                                 regulator-min-microvolt = <1800000>;
246                                 regulator-max-microvolt = <1800000>;
247                                 regulator-always-on;
248                                 regulator-boot-on;
249
250                                 regulator-state-mem {
251                                         regulator-on-in-suspend;
252                                         regulator-suspend-microvolt = <1800000>;
253                                 };
254                         };
255
256                         vdd_1v0: LDO_REG3 {
257                                 regulator-name = "vdd_1v0";
258                                 regulator-min-microvolt = <1000000>;
259                                 regulator-max-microvolt = <1000000>;
260                                 regulator-always-on;
261                                 regulator-boot-on;
262
263                                 regulator-state-mem {
264                                         regulator-on-in-suspend;
265                                         regulator-suspend-microvolt = <1000000>;
266                                 };
267                         };
268
269                         vcc3v0_pmu: LDO_REG4 {
270                                 regulator-name = "vcc3v0_pmu";
271                                 regulator-min-microvolt = <3000000>;
272                                 regulator-max-microvolt = <3000000>;
273                                 regulator-always-on;
274                                 regulator-boot-on;
275
276                                 regulator-state-mem {
277                                         regulator-on-in-suspend;
278                                         regulator-suspend-microvolt = <3000000>;
279                                 };
280                         };
281
282                         vccio_sd: LDO_REG5 {
283                                 regulator-name = "vccio_sd";
284                                 regulator-min-microvolt = <1800000>;
285                                 regulator-max-microvolt = <3300000>;
286                                 regulator-always-on;
287                                 regulator-boot-on;
288
289                                 regulator-state-mem {
290                                         regulator-on-in-suspend;
291                                         regulator-suspend-microvolt = <3300000>;
292                                 };
293                         };
294
295                         vcc_sd: LDO_REG6 {
296                                 regulator-name = "vcc_sd";
297                                 regulator-min-microvolt = <3300000>;
298                                 regulator-max-microvolt = <3300000>;
299                                 regulator-boot-on;
300
301                                 regulator-state-mem {
302                                         regulator-on-in-suspend;
303                                         regulator-suspend-microvolt = <3300000>;
304                                 };
305                         };
306
307                         vcc2v8_dvp: LDO_REG7 {
308                                 regulator-name = "vcc2v8_dvp";
309                                 regulator-min-microvolt = <2800000>;
310                                 regulator-max-microvolt = <2800000>;
311                                 regulator-boot-on;
312
313                                 regulator-state-mem {
314                                         regulator-off-in-suspend;
315                                         regulator-suspend-microvolt = <2800000>;
316                                 };
317                         };
318
319                         vcc1v8_dvp: LDO_REG8 {
320                                 regulator-name = "vcc1v8_dvp";
321                                 regulator-min-microvolt = <1800000>;
322                                 regulator-max-microvolt = <1800000>;
323                                 regulator-boot-on;
324
325                                 regulator-state-mem {
326                                         regulator-on-in-suspend;
327                                         regulator-suspend-microvolt = <1800000>;
328                                 };
329                         };
330
331                         vcc1v5_dvp: LDO_REG9 {
332                                 regulator-name = "vcc1v5_dvp";
333                                 regulator-min-microvolt = <1500000>;
334                                 regulator-max-microvolt = <1500000>;
335                                 regulator-boot-on;
336
337                                 regulator-state-mem {
338                                         regulator-off-in-suspend;
339                                         regulator-suspend-microvolt = <1500000>;
340                                 };
341                         };
342
343                         vcc3v3_lcd: SWITCH_REG1 {
344                                 regulator-name = "vcc3v3_lcd";
345                                 regulator-boot-on;
346                         };
347
348                         vcc5v0_host: SWITCH_REG2 {
349                                 regulator-name = "vcc5v0_host";
350                                 regulator-always-on;
351                                 regulator-boot-on;
352                         };
353                 };
354         };
355 };
356
357 &i2c1 {
358         status = "okay";
359
360         sensor@d {
361                 compatible = "asahi-kasei,ak8963";
362                 reg = <0x0d>;
363                 gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
364                 vdd-supply = <&vcc3v0_pmu>;
365                 mount-matrix = "1", /* x0 */
366                                "0", /* y0 */
367                                "0", /* z0 */
368                                "0", /* x1 */
369                                "1", /* y1 */
370                                "0", /* z1 */
371                                "0", /* x2 */
372                                "0", /* y2 */
373                                "1"; /* z2 */
374         };
375
376         touchscreen@14 {
377                 compatible = "goodix,gt1151";
378                 reg = <0x14>;
379                 interrupt-parent = <&gpio0>;
380                 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
381                 irq-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
382                 reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
383                 VDDIO-supply = <&vcc3v3_lcd>;
384         };
385
386         sensor@4c {
387                 compatible = "fsl,mma7660";
388                 reg = <0x4c>;
389                 interrupt-parent = <&gpio0>;
390                 interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>;
391         };
392 };
393
394 &i2s1_2ch {
395         status = "okay";
396 };
397
398 &io_domains {
399         status = "okay";
400
401         vccio1-supply = <&vccio_sdio>;
402         vccio2-supply = <&vccio_sd>;
403         vccio3-supply = <&vcc_3v0>;
404         vccio4-supply = <&vcc3v0_pmu>;
405         vccio5-supply = <&vcc_3v0>;
406         vccio6-supply = <&vccio_flash>;
407 };
408
409 &pinctrl {
410         headphone {
411                 hp_det: hp-det {
412                         rockchip,pins =
413                                 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
414                 };
415         };
416
417         emmc {
418                 emmc_reset: emmc-reset {
419                         rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
420                 };
421         };
422
423         pmic {
424                 pmic_int: pmic_int {
425                         rockchip,pins =
426                                 <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
427                 };
428
429                 soc_slppin_gpio: soc_slppin_gpio {
430                         rockchip,pins =
431                                 <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
432                 };
433
434                 soc_slppin_slp: soc_slppin_slp {
435                         rockchip,pins =
436                                 <0 RK_PA4 1 &pcfg_pull_none>;
437                 };
438
439                 soc_slppin_rst: soc_slppin_rst {
440                         rockchip,pins =
441                                 <0 RK_PA4 2 &pcfg_pull_none>;
442                 };
443         };
444
445         sdio-pwrseq {
446                 wifi_enable_h: wifi-enable-h {
447                         rockchip,pins =
448                                 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
449                 };
450         };
451 };
452
453 &pmu_io_domains {
454         status = "okay";
455
456         pmuio1-supply = <&vcc3v0_pmu>;
457         pmuio2-supply = <&vcc3v0_pmu>;
458 };
459
460 &pwm1 {
461         status = "okay";
462 };
463
464 &saradc {
465         vref-supply = <&vcc_1v8>;
466         status = "okay";
467 };
468
469 &sdmmc {
470         bus-width = <4>;
471         cap-mmc-highspeed;
472         cap-sd-highspeed;
473         card-detect-delay = <800>;
474         sd-uhs-sdr12;
475         sd-uhs-sdr25;
476         sd-uhs-sdr50;
477         sd-uhs-sdr104;
478         vmmc-supply = <&vcc_sd>;
479         vqmmc-supply = <&vccio_sd>;
480         status = "okay";
481 };
482
483 &sdio {
484         bus-width = <4>;
485         cap-sd-highspeed;
486         keep-power-in-suspend;
487         non-removable;
488         mmc-pwrseq = <&sdio_pwrseq>;
489         sd-uhs-sdr104;
490         status = "okay";
491 };
492
493 &tsadc {
494         rockchip,hw-tshut-mode = <1>;
495         rockchip,hw-tshut-polarity = <1>;
496         status = "okay";
497 };
498
499 &u2phy {
500         status = "okay";
501
502         u2phy_host: host-port {
503                 status = "okay";
504         };
505
506         u2phy_otg: otg-port {
507                 status = "okay";
508         };
509 };
510
511 &uart1 {
512         pinctrl-names = "default";
513         pinctrl-0 = <&uart1_xfer &uart1_cts>;
514         status = "okay";
515 };
516
517 &uart5 {
518         status = "okay";
519 };
520
521 &usb20_otg {
522         status = "okay";
523 };
524
525 &usb_host0_ehci {
526         status = "okay";
527 };
528
529 &usb_host0_ohci {
530         status = "okay";
531 };
532
533 &vopb {
534         status = "okay";
535 };
536
537 &vopb_mmu {
538         status = "okay";
539 };
540
541 &vopl {
542         status = "okay";
543 };
544
545 &vopl_mmu {
546         status = "okay";
547 };