dm: video: fix test failures with enabled default TrueType font
[platform/kernel/u-boot.git] / arch / arm / dts / rk3399-puma.dtsi
1 // SPDX-License-Identifier: GPL-2.0+ OR X11
2 /*
3  * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
4  */
5
6 #include <dt-bindings/pwm/pwm.h>
7 #include "rk3399.dtsi"
8
9 / {
10         model = "Theobroma Systems RK3399-Q7 SoM";
11         compatible = "tsd,rk3399-q7", "tsd,puma", "rockchip,rk3399";
12
13         config {
14                 u-boot,spl-payload-offset = <0x40000>; /* @ 256KB */
15                 u-boot,mmc-env-offset = <0x4000>;      /* @  16KB */
16                 u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
17                 u-boot,boot-led = "module_led";
18                 sysreset-gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
19         };
20
21         chosen {
22                 stdout-path = "serial0:115200n8";
23                 u-boot,spl-boot-order = \
24                         "same-as-spl", &spiflash, &sdhci, &sdmmc;
25         };
26
27         aliases {
28                 spi0 = &spi1;
29                 spi1 = &spi5;
30         };
31
32         leds {
33                 compatible = "gpio-leds";
34                 pinctrl-names = "default";
35                 pinctrl-0 = <&leds_pins_puma>;
36
37                 module_led {
38                         label = "module_led";
39                         gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
40                         linux,default-trigger = "heartbeat";
41                 };
42
43                 sd_card_led {
44                         label = "sd_card_led";
45                         gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
46                         linux,default-trigger = "mmc0";
47                 };
48         };
49
50         clkin_gmac: external-gmac-clock {
51                 compatible = "fixed-clock";
52                 clock-frequency = <125000000>;
53                 clock-output-names = "clkin_gmac";
54                 #clock-cells = <0>;
55         };
56
57         dw_hdmi_audio: dw-hdmi-audio {
58                 status = "enabled";
59                 compatible = "rockchip,dw-hdmi-audio";
60                 #sound-dai-cells = <0>;
61         };
62
63         hdmi_codec: hdmi-codec {
64                 compatible = "simple-audio-card";
65                 simple-audio-card,format = "i2s";
66                 simple-audio-card,mclk-fs = <256>;
67                 simple-audio-card,name = "HDMI-CODEC";
68
69                 simple-audio-card,cpu {
70                         sound-dai = <&i2s2>;
71                 };
72
73                 simple-audio-card,codec {
74                         sound-dai = <&hdmi>;
75                 };
76         };
77
78         hdmi_sound: hdmi-sound {
79                 status = "disabled";
80                 compatible = "simple-audio-card";
81                 simple-audio-card,format = "i2s";
82                 simple-audio-card,mclk-fs = <256>;
83                 simple-audio-card,name = "rockchip,hdmi";
84
85                 simple-audio-card,cpu {
86                         sound-dai = <&i2s2>;
87                 };
88                 simple-audio-card,codec {
89                         sound-dai = <&hdmi>;
90                 };
91         };
92
93         usbhub_enable: usbhub_enable {
94                 compatible = "regulator-fixed";
95                 regulator-name = "usbhub_enable";
96                 enable-active-low;
97                 gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
98                 pinctrl-names = "default";
99                 pinctrl-0 = <&host_vbus_drv>;
100                 regulator-boot-on;
101                 regulator-min-microvolt = <3300000>;
102                 regulator-max-microvolt = <3300000>;
103         };
104
105         /*
106          * The Qseven BIOS_DISABLE signal on the RK3399-Q7 keeps the on-module
107          * eMMC and SPI flash powered-down initially (in fact it keeps the
108          * reset signal asserted).  Even though it is an enable signal, we
109          * model this as a regulator.
110          */
111         bios_enable: bios_enable {
112                 compatible = "regulator-fixed";
113                 u-boot,dm-pre-reloc;
114                 regulator-name = "bios_enable";
115                 enable-active-high;
116                 gpio = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
117                 regulator-always-on;
118                 regulator-boot-on;
119                 regulator-min-microvolt = <1800000>;
120                 regulator-max-microvolt = <1800000>;
121         };
122
123         vccadc_ref: vccadc-ref {
124                 compatible = "regulator-fixed";
125                 regulator-name = "vcc1v8_sys";
126                 regulator-always-on;
127                 regulator-boot-on;
128                 regulator-min-microvolt = <1800000>;
129                 regulator-max-microvolt = <1800000>;
130         };
131
132         vcc3v3_sys: vcc3v3-sys {
133                 compatible = "regulator-fixed";
134                 regulator-name = "vcc3v3_sys";
135                 regulator-always-on;
136                 regulator-boot-on;
137                 regulator-min-microvolt = <3300000>;
138                 regulator-max-microvolt = <3300000>;
139         };
140
141         vcc5v0_otg: vcc5v0-otg-regulator {
142                 compatible = "regulator-fixed";
143                 enable-active-high;
144                 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
145                 pinctrl-names = "default";
146                 pinctrl-0 = <&otg_vbus_drv>;
147                 regulator-name = "vcc5v0_otg";
148                 regulator-always-on;
149         };
150
151         vcc5v0_sys: vcc5v0-sys {
152                 compatible = "regulator-fixed";
153                 regulator-name = "vcc5v0_sys";
154                 regulator-always-on;
155                 regulator-boot-on;
156                 regulator-min-microvolt = <5000000>;
157                 regulator-max-microvolt = <5000000>;
158         };
159
160         vcc_phy: vcc-phy-regulator {
161                 compatible = "regulator-fixed";
162                 regulator-name = "vcc_phy";
163                 regulator-always-on;
164                 regulator-boot-on;
165         };
166
167         vdd_log: vdd-log {
168                 compatible = "pwm-regulator";
169                 pwms = <&pwm2 0 25000 1>;
170                 regulator-name = "vdd_log";
171                 regulator-min-microvolt = <800000>;
172                 regulator-max-microvolt = <1400000>;
173                 regulator-always-on;
174                 regulator-boot-on;
175
176                 /* for rockchip boot on */
177                 rockchip,pwm_id= <2>;
178                 rockchip,pwm_voltage = <1000000>;
179         };
180 };
181
182 &emmc_phy {
183         status = "okay";
184 };
185
186 &gmac {
187         phy-supply = <&vcc_phy>;
188         phy-mode = "rgmii";
189         clock_in_out = "input";
190         snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
191         snps,reset-active-low;
192         snps,reset-delays-us = <2 10000 50000>;
193         assigned-clocks = <&cru SCLK_RMII_SRC>;
194         assigned-clock-parents = <&clkin_gmac>;
195         pinctrl-names = "default";
196         pinctrl-0 = <&rgmii_pins>;
197         tx_delay = <0x10>;
198         rx_delay = <0x10>;
199         status = "okay";
200 };
201
202 &hdmi {
203         #sound-dai-cells = <0>;
204         status = "okay";
205 };
206
207 &i2c0 {
208         status = "okay";
209         i2c-scl-rising-time-ns = <168>;
210         i2c-scl-falling-time-ns = <4>;
211         clock-frequency = <400000>;
212
213         vdd_gpu: vdd_gpu {
214                 status = "okay";
215                 compatible = "fcs,fan53555";
216                 reg = <0x60>;
217                 vsel-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
218                 vin-supply = <&vcc5v0_sys>;
219                 regulator-compatible = "fan53555-reg";
220                 regulator-name = "vdd_gpu";
221                 regulator-min-microvolt = <600000>;
222                 regulator-max-microvolt = <1230000>;
223                 regulator-ramp-delay = <1000>;
224                 fcs,suspend-voltage-selector = <1>;
225                 regulator-always-on;
226                 regulator-boot-on;
227                 regulator-initial-state = <3>;
228                         regulator-state-mem {
229                         regulator-off-in-suspend;
230                 };
231         };
232
233         rk808: pmic@1b {
234                 compatible = "rockchip,rk808";
235                 reg = <0x1b>;
236                 interrupt-parent = <&gpio1>;
237                 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;  // TODO check interrupt?
238                 pinctrl-names = "default";
239                 pinctrl-0 = <&pmic_int_l>;
240                 rockchip,system-power-controller;
241                 wakeup-source;
242                 #clock-cells = <1>;
243                 clock-output-names = "xin32k", "rk808-clkout2";
244
245                 vcc1-supply = <&vcc5v0_sys>;
246                 vcc2-supply = <&vcc5v0_sys>;
247                 vcc3-supply = <&vcc5v0_sys>;
248                 vcc4-supply = <&vcc5v0_sys>;
249                 vcc6-supply = <&vcc5v0_sys>;
250                 vcc7-supply = <&vcc5v0_sys>;
251                 vcc8-supply = <&vcc3v3_sys>;
252                 vcc9-supply = <&vcc5v0_sys>;
253                 vcc10-supply = <&vcc5v0_sys>;
254                 vcc11-supply = <&vcc5v0_sys>;
255                 vcc12-supply = <&vcc3v3_sys>;
256                 vddio-supply = <&vcc1v8_pmu>;
257
258                 regulators {
259                         vdd_center: DCDC_REG1 {
260                                 regulator-always-on;
261                                 regulator-boot-on;
262                                 regulator-min-microvolt = <750000>;
263                                 regulator-max-microvolt = <1350000>;
264                                 regulator-ramp-delay = <6001>;
265                                 regulator-name = "vdd_center";
266                                 regulator-state-mem {
267                                         regulator-off-in-suspend;
268                                 };
269                         };
270
271                         vdd_cpu_l: DCDC_REG2 {
272                                 regulator-always-on;
273                                 regulator-boot-on;
274                                 regulator-min-microvolt = <750000>;
275                                 regulator-max-microvolt = <1350000>;
276                                 regulator-ramp-delay = <6001>;
277                                 regulator-name = "vdd_cpu_l";
278                                 regulator-state-mem {
279                                         regulator-off-in-suspend;
280                                 };
281                         };
282
283                         vcc_ddr: DCDC_REG3 {
284                                 regulator-always-on;
285                                 regulator-boot-on;
286                                 regulator-name = "vcc_ddr";
287                                 regulator-state-mem {
288                                         regulator-on-in-suspend;
289                                 };
290                         };
291
292                         vcc_1v8: DCDC_REG4 {
293                                 regulator-always-on;
294                                 regulator-boot-on;
295                                 regulator-min-microvolt = <1800000>;
296                                 regulator-max-microvolt = <1800000>;
297                                 regulator-name = "vcc_1v8";
298                                 regulator-state-mem {
299                                         regulator-on-in-suspend;
300                                         regulator-suspend-microvolt = <1800000>;
301                                 };
302                         };
303
304                         vcc_ldo1: LDO_REG1 {
305                                 regulator-boot-on;
306                                 regulator-min-microvolt = <1800000>;
307                                 regulator-max-microvolt = <1800000>;
308                                 regulator-name = "vcc_ldo1";
309                                 regulator-state-mem {
310                                         regulator-off-in-suspend;
311                                 };
312                         };
313
314                         vcc1v8_hdmi: LDO_REG2 {
315                                 regulator-always-on;
316                                 regulator-boot-on;
317                                 regulator-min-microvolt = <1800000>;
318                                 regulator-max-microvolt = <1800000>;
319                                 regulator-name = "vcc1v8_hdmi";
320                                 regulator-state-mem {
321                                         regulator-off-in-suspend;
322                                 };
323                         };
324
325                         vcc1v8_pmu: LDO_REG3 {
326                                 regulator-always-on;
327                                 regulator-boot-on;
328                                 regulator-min-microvolt = <1800000>;
329                                 regulator-max-microvolt = <1800000>;
330                                 regulator-name = "vcc1v8_pmu";
331                                 regulator-state-mem {
332                                         regulator-on-in-suspend;
333                                         regulator-suspend-microvolt = <1800000>;
334                                 };
335                         };
336
337                         vcc_sd: LDO_REG4 {
338                                 regulator-always-on;
339                                 regulator-boot-on;
340                                 regulator-min-microvolt = <1800000>;
341                                 regulator-max-microvolt = <3000000>;
342                                 regulator-name = "vcc_sd";
343                                 regulator-state-mem {
344                                         regulator-on-in-suspend;
345                                         regulator-suspend-microvolt = <3000000>;
346                                 };
347                         };
348
349                         vcc_ldo5: LDO_REG5 {
350                                 regulator-boot-on;
351                                 regulator-min-microvolt = <3000000>;
352                                 regulator-max-microvolt = <3000000>;
353                                 regulator-name = "vcc_ldo5";
354                                 regulator-state-mem {
355                                         regulator-off-in-suspend;
356                                 };
357                         };
358
359                         vcc_ldo6: LDO_REG6 {
360                                 regulator-boot-on;
361                                 regulator-min-microvolt = <1500000>;
362                                 regulator-max-microvolt = <1500000>;
363                                 regulator-name = "vcc_ldo6";
364                                 regulator-state-mem {
365                                         regulator-off-in-suspend;
366                                 };
367                         };
368
369                         vcc0v9_hdmi: LDO_REG7 {
370                                 regulator-always-on;
371                                 regulator-boot-on;
372                                 regulator-min-microvolt = <900000>;
373                                 regulator-max-microvolt = <900000>;
374                                 regulator-name = "vcc0v9_hdmi";
375                                 regulator-state-mem {
376                                         regulator-off-in-suspend;
377                                 };
378                         };
379
380                         vcc_efuse: LDO_REG8 {
381                                 regulator-always-on;
382                                 regulator-boot-on;
383                                 regulator-min-microvolt = <1800000>;
384                                 regulator-max-microvolt = <1800000>;
385                                 regulator-name = "vcc_efuse";
386                                 regulator-state-mem {
387                                         regulator-off-in-suspend;
388                                 };
389                         };
390
391                         vcc3v3_s3: SWITCH_REG1 {
392                                 regulator-always-on;
393                                 regulator-boot-on;
394                                 regulator-name = "vcc3v3_s3";
395                                 regulator-state-mem {
396                                         regulator-off-in-suspend;
397                                 };
398                         };
399
400                         vcc3v3_s0: SWITCH_REG2 {
401                                 regulator-always-on;
402                                 regulator-boot-on;
403                                 regulator-name = "vcc3v3_s0";
404                                 regulator-state-mem {
405                                         regulator-off-in-suspend;
406                                 };
407                         };
408                 };
409         };
410 };
411
412 &i2c8 {
413         status = "okay";
414         clock-frequency = <400000>;
415
416         vdd_cpu_b: vdd_cpu_b {
417                 status = "okay";
418                 compatible = "fcs,fan53555";
419                 reg = <0x60>;
420                 vsel-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
421                 vin-supply = <&vcc5v0_sys>;
422                 regulator-compatible = "fan53555-reg";
423                 regulator-name = "vdd_cpu_b";
424                 regulator-min-microvolt = <600000>;
425                 regulator-max-microvolt = <1230000>;
426                 regulator-ramp-delay = <1000>;
427                 fcs,suspend-voltage-selector = <1>;
428                 regulator-always-on;
429                 regulator-boot-on;
430                 regulator-initial-state = <3>;
431                         regulator-state-mem {
432                         regulator-off-in-suspend;
433                 };
434         };
435 };
436
437 &i2s0 {
438         status = "okay";
439         rockchip,i2s-broken-burst-len;
440         rockchip,playback-channels = <8>;
441         rockchip,capture-channels = <8>;
442         #sound-dai-cells = <0>;
443 };
444
445 &i2s2 {
446         #sound-dai-cells = <0>;
447         status = "okay";
448 };
449
450 &io_domains {
451         status = "okay";
452
453         bt656-supply = <&vcc_1v8>;      /* bt656_gpio2ab_ms */
454         audio-supply = <&vcc_1v8>;      /* audio_gpio3d4a_ms */
455         sdmmc-supply = <&vcc_sd>;       /* sdmmc_gpio4b_ms */
456         gpio1830-supply = <&vcc_1v8>;   /* gpio1833_gpio4cd_ms */
457 };
458
459 &pcie0 {
460         assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
461         assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
462         assigned-clock-rates = <100000000>;
463         ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
464         num-lanes = <4>;
465         pinctrl-names = "default";
466         pinctrl-0 = <&pcie_clkreqn>;
467         status = "okay";
468 };
469
470 &pcie_phy {
471                 status = "okay";
472 };
473
474 &pmu_io_domains {
475         status = "okay";
476         pmu1830-supply = <&vcc_1v8>;
477 };
478
479 &pwm0 {
480         status = "okay";
481 };
482
483 &pwm2 {
484         status = "okay";
485 };
486
487 &sdhci {
488         bus-width = <8>;
489         mmc-hs400-1_8v;
490         supports-emmc;
491         non-removable;
492         keep-power-in-suspend;
493         mmc-hs400-enhanced-strobe;
494         status = "okay";
495 };
496
497 &sdmmc {
498         u-boot,dm-pre-reloc;
499         clock-frequency = <150000000>;
500         max-frequency = <40000000>;
501         supports-sd;
502         bus-width = <4>;
503         cap-mmc-highspeed;
504         cap-sd-highspeed;
505         disable-wp;
506         num-slots = <1>;
507         vqmmc-supply = <&vcc_sd>;
508         pinctrl-names = "default";
509         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
510         status = "okay";
511 };
512
513 &uart2 {
514         status = "okay";
515 };
516
517 &usb_host0_ehci {
518         status = "disabled";
519 };
520
521 &usb_host0_ohci {
522         status = "disabled";
523 };
524
525 &dwc3_typec0 {
526         status = "okay";
527 };
528
529 &usb_host1_ehci {
530         status = "disabled";
531 };
532
533 &usb_host1_ohci {
534         status = "disabled";
535 };
536
537 &dwc3_typec1 {
538         status = "okay";
539         tsd,usb-port-power = "usbhub_enable";
540 };
541
542 &vopb {
543         status = "okay";
544 };
545
546 &gpio1 {
547         u-boot,dm-pre-reloc;
548 };
549
550 &gpio3 {
551         u-boot,dm-pre-reloc;
552 };
553
554 &pinctrl {
555         /* Pins that are not explicitely used by any devices */
556         pinctrl-names = "default";
557         pinctrl-0 = <&puma_pin_hog>;
558
559         hog {
560                 puma_pin_hog: puma_pin_hog {
561                         rockchip,pins =
562                                 /* We need pull-ups on Q7 buttons */
563                                 <RK_GPIO0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, /* LID_BTN# */
564                                 <RK_GPIO0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, /* BATLOW# */
565                                 <RK_GPIO0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, /* SLP_BTN# */
566                                 <RK_GPIO0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; /* BIOS_DISABLE# */
567                 };
568         };
569
570         pmic {
571                 pmic_int_l: pmic-int-l {
572                         rockchip,pins =
573                                 <RK_GPIO1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
574                 };
575         };
576
577         leds_pins_puma: led_pins@0 {
578                         rockchip,pins =
579                                 <RK_GPIO2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
580                                 <RK_GPIO1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
581         };
582
583         usb2 {
584                 otg_vbus_drv: otg-vbus-drv {
585                         rockchip,pins =
586                                 <RK_GPIO0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
587                 };
588
589                 host_vbus_drv: host-vbus-drv {
590                         rockchip,pins =
591                                 <RK_GPIO4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
592                 };
593         };
594
595         i2c8 {
596                 i2c8_xfer_a: i2c8-xfer {
597                         rockchip,pins =
598                                 <RK_GPIO1 RK_PC5 RK_FUNC_1 &pcfg_pull_up>,
599                                 <RK_GPIO1 RK_PC4 RK_FUNC_1 &pcfg_pull_up>;
600                 };
601         };
602 };
603
604 &i2c1 {
605         status = "okay";
606         clock-frequency = <400000>;
607 };
608 &i2c2 {
609         status = "okay";
610         clock-frequency = <400000>;
611 };
612 &i2c4 {
613         status = "okay";
614         clock-frequency = <400000>;
615 };
616 &i2c6 {
617         status = "okay";
618         clock-frequency = <400000>;
619 };
620
621 &i2c6_xfer {
622         /* Enable pull-ups, the pins would float otherwise. */
623         rockchip,pins =
624                 <RK_GPIO2 RK_PB2 RK_FUNC_2 &pcfg_pull_up>,
625                 <RK_GPIO2 RK_PB1 RK_FUNC_2 &pcfg_pull_up>;
626 };
627
628 &i2c7 {
629         status = "okay";
630         clock-frequency = <400000>;
631
632         rtc_twi: rtc@6f {
633                 compatible = "isil,isl1208";
634                 reg = <0x6f>;
635         };
636         fan: fan@18 {
637                 compatible = "ti,amc6821";
638                 reg = <0x18>;
639                 cooling-min-state = <0>;
640                 cooling-max-state = <9>;
641                 #cooling-cells = <2>;
642         };
643 };
644
645 &uart0 {
646         u-boot,dm-pre-reloc;
647         pinctrl-names = "default";
648         pinctrl-0 = <&uart0_xfer &uart0_cts>;
649         status = "okay";
650 };
651
652
653 &spi1 {
654         u-boot,dm-pre-reloc;
655
656         status = "okay";
657
658         #address-cells = <1>;
659         #size-cells = <0>;
660
661         spiflash: w25q32dw@0 {
662                 u-boot,dm-pre-reloc;
663
664                 compatible = "spi-flash";
665                 reg = <0>;
666                 spi-max-frequency = <49500000>;
667                 spi-cpol;
668                 spi-cpha;
669         };
670 };
671
672 &spi5 {
673         status = "okay";
674 };