GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm64 / boot / dts / rockchip / rk3566-anbernic-rgxx3.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/linux-event-codes.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/pinctrl/rockchip.h>
9 #include <dt-bindings/soc/rockchip,vop2.h>
10 #include "rk3566.dtsi"
11
12 / {
13         chosen: chosen {
14                 stdout-path = "serial2:1500000n8";
15         };
16
17         adc-joystick {
18                 compatible = "adc-joystick";
19                 io-channels = <&adc_mux 0>,
20                               <&adc_mux 1>,
21                               <&adc_mux 2>,
22                               <&adc_mux 3>;
23                 pinctrl-0 = <&joy_mux_en>;
24                 pinctrl-names = "default";
25                 #address-cells = <1>;
26                 #size-cells = <0>;
27
28                 axis@0 {
29                         reg = <0>;
30                         abs-flat = <32>;
31                         abs-fuzz = <32>;
32                         abs-range = <1023 15>;
33                         linux,code = <ABS_X>;
34                 };
35
36                 axis@1 {
37                         reg = <1>;
38                         abs-flat = <32>;
39                         abs-fuzz = <32>;
40                         abs-range = <15 1023>;
41                         linux,code = <ABS_RX>;
42                 };
43
44                 axis@2 {
45                         reg = <2>;
46                         abs-flat = <32>;
47                         abs-fuzz = <32>;
48                         abs-range = <15 1023>;
49                         linux,code = <ABS_Y>;
50                 };
51
52                 axis@3 {
53                         reg = <3>;
54                         abs-flat = <32>;
55                         abs-fuzz = <32>;
56                         abs-range = <1023 15>;
57                         linux,code = <ABS_RY>;
58                 };
59         };
60
61         adc_keys: adc-keys {
62                 compatible = "adc-keys";
63                 io-channels = <&saradc 0>;
64                 io-channel-names = "buttons";
65                 keyup-threshold-microvolt = <1800000>;
66                 poll-interval = <60>;
67
68                 /*
69                  * Button is mapped to F key in BSP kernel, but
70                  * according to input guidelines it should be mode.
71                  */
72                 button-mode {
73                         label = "MODE";
74                         linux,code = <BTN_MODE>;
75                         press-threshold-microvolt = <1750>;
76                 };
77         };
78
79         adc_mux: adc-mux {
80                 compatible = "io-channel-mux";
81                 channels = "left_x", "right_x", "left_y", "right_y";
82                 #io-channel-cells = <1>;
83                 io-channels = <&saradc 3>;
84                 io-channel-names = "parent";
85                 mux-controls = <&gpio_mux>;
86                 settle-time-us = <100>;
87         };
88
89         gpio_keys_control: gpio-keys-control {
90                 compatible = "gpio-keys";
91                 pinctrl-0 = <&btn_pins_ctrl>;
92                 pinctrl-names = "default";
93
94                 button-b {
95                         gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
96                         label = "SOUTH";
97                         linux,code = <BTN_SOUTH>;
98                 };
99
100                 button-down {
101                         gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
102                         label = "DPAD-DOWN";
103                         linux,code = <BTN_DPAD_DOWN>;
104                 };
105
106                 button-l1 {
107                         gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
108                         label = "TL";
109                         linux,code = <BTN_TL>;
110                 };
111
112                 button-l2 {
113                         gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
114                         label = "TL2";
115                         linux,code = <BTN_TL2>;
116                 };
117
118                 button-select {
119                         gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
120                         label = "SELECT";
121                         linux,code = <BTN_SELECT>;
122                 };
123
124                 button-start {
125                         gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
126                         label = "START";
127                         linux,code = <BTN_START>;
128                 };
129
130                 button-thumbl {
131                         gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
132                         label = "THUMBL";
133                         linux,code = <BTN_THUMBL>;
134                 };
135
136                 button-thumbr {
137                         gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
138                         label = "THUMBR";
139                         linux,code = <BTN_THUMBR>;
140                 };
141
142                 button-up {
143                         gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
144                         label = "DPAD-UP";
145                         linux,code = <BTN_DPAD_UP>;
146                 };
147
148                 button-x {
149                         gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
150                         label = "NORTH";
151                         linux,code = <BTN_NORTH>;
152                 };
153         };
154
155         gpio_keys_vol: gpio-keys-vol {
156                 compatible = "gpio-keys";
157                 autorepeat;
158                 pinctrl-0 = <&btn_pins_vol>;
159                 pinctrl-names = "default";
160
161                 button-vol-down {
162                         gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
163                         label = "VOLUMEDOWN";
164                         linux,code = <KEY_VOLUMEDOWN>;
165                 };
166
167                 button-vol-up {
168                         gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
169                         label = "VOLUMEUP";
170                         linux,code = <KEY_VOLUMEUP>;
171                 };
172         };
173
174         gpio_mux: mux-controller {
175                 compatible = "gpio-mux";
176                 mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
177                             <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
178                 #mux-control-cells = <0>;
179         };
180
181         hdmi-con {
182                 compatible = "hdmi-connector";
183                 ddc-i2c-bus = <&i2c5>;
184                 type = "c";
185
186                 port {
187                         hdmi_con_in: endpoint {
188                                 remote-endpoint = <&hdmi_out_con>;
189                         };
190                 };
191         };
192
193         leds: gpio-leds {
194                 compatible = "gpio-leds";
195                 pinctrl-0 = <&led_pins>;
196                 pinctrl-names = "default";
197
198                 green_led: led-0 {
199                         color = <LED_COLOR_ID_GREEN>;
200                         default-state = "on";
201                         function = LED_FUNCTION_POWER;
202                         gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
203                 };
204
205                 amber_led: led-1 {
206                         color = <LED_COLOR_ID_AMBER>;
207                         function = LED_FUNCTION_CHARGING;
208                         gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
209                         retain-state-suspended;
210                 };
211
212                 red_led: led-2 {
213                         color = <LED_COLOR_ID_RED>;
214                         default-state = "off";
215                         function = LED_FUNCTION_STATUS;
216                         gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
217                 };
218         };
219
220         /* Channels reversed for both headphones and speakers. */
221         sound {
222                 compatible = "simple-audio-card";
223                 simple-audio-card,name = "anbernic_rk817";
224                 simple-audio-card,aux-devs = <&spk_amp>;
225                 simple-audio-card,format = "i2s";
226                 simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
227                 simple-audio-card,mclk-fs = <256>;
228                 simple-audio-card,widgets =
229                         "Microphone", "Mic Jack",
230                         "Headphone", "Headphones",
231                         "Speaker", "Internal Speakers";
232                 simple-audio-card,routing =
233                         "MICL", "Mic Jack",
234                         "Headphones", "HPOL",
235                         "Headphones", "HPOR",
236                         "Internal Speakers", "Speaker Amp OUTL",
237                         "Internal Speakers", "Speaker Amp OUTR",
238                         "Speaker Amp INL", "HPOL",
239                         "Speaker Amp INR", "HPOR";
240                 simple-audio-card,pin-switches = "Internal Speakers";
241
242                 simple-audio-card,codec {
243                         sound-dai = <&rk817>;
244                 };
245
246                 simple-audio-card,cpu {
247                         sound-dai = <&i2s1_8ch>;
248                 };
249         };
250
251         sdio_pwrseq: sdio-pwrseq {
252                 compatible = "mmc-pwrseq-simple";
253                 clocks = <&rk817 1>;
254                 clock-names = "ext_clock";
255                 pinctrl-0 = <&wifi_enable_h>;
256                 pinctrl-names = "default";
257                 post-power-on-delay-ms = <200>;
258                 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
259         };
260
261         spk_amp: audio-amplifier {
262                 compatible = "simple-audio-amplifier";
263                 enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
264                 pinctrl-0 = <&spk_amp_enable_h>;
265                 pinctrl-names = "default";
266                 sound-name-prefix = "Speaker Amp";
267         };
268
269         vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 {
270                 compatible = "regulator-fixed";
271                 gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
272                 enable-active-high;
273                 pinctrl-0 = <&vcc_lcd_h>;
274                 pinctrl-names = "default";
275                 regulator-boot-on;
276                 regulator-min-microvolt = <3300000>;
277                 regulator-max-microvolt = <3300000>;
278                 regulator-name = "vcc3v3_lcd0_n";
279                 vin-supply = <&vcc_3v3>;
280                 regulator-state-mem {
281                         regulator-off-in-suspend;
282                 };
283         };
284
285         vcc_sys: regulator-vcc-sys {
286                 compatible = "regulator-fixed";
287                 regulator-always-on;
288                 regulator-boot-on;
289                 regulator-min-microvolt = <3800000>;
290                 regulator-max-microvolt = <3800000>;
291                 regulator-name = "vcc_sys";
292         };
293
294         vcc_wifi: regulator-vcc-wifi {
295                 compatible = "regulator-fixed";
296                 enable-active-high;
297                 gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
298                 pinctrl-0 = <&vcc_wifi_h>;
299                 pinctrl-names = "default";
300                 regulator-always-on;
301                 regulator-boot-on;
302                 regulator-min-microvolt = <3300000>;
303                 regulator-max-microvolt = <3300000>;
304                 regulator-name = "vcc_wifi";
305         };
306
307         vibrator: pwm-vibrator {
308                 compatible = "pwm-vibrator";
309                 pwm-names = "enable";
310                 pwms = <&pwm5 0 1000000000 0>;
311         };
312 };
313
314 &combphy1 {
315         status = "okay";
316 };
317
318 &cpu0 {
319         cpu-supply = <&vdd_cpu>;
320 };
321
322 &cpu1 {
323         cpu-supply = <&vdd_cpu>;
324 };
325
326 &cpu2 {
327         cpu-supply = <&vdd_cpu>;
328 };
329
330 &cpu3 {
331         cpu-supply = <&vdd_cpu>;
332 };
333
334 &gpu {
335         mali-supply = <&vdd_gpu>;
336         status = "okay";
337 };
338
339 &hdmi {
340         ddc-i2c-bus = <&i2c5>;
341         pinctrl-0 = <&hdmitxm0_cec>;
342         pinctrl-names = "default";
343         status = "okay";
344 };
345
346 &hdmi_in {
347         hdmi_in_vp0: endpoint {
348                 remote-endpoint = <&vp0_out_hdmi>;
349         };
350 };
351
352 &hdmi_out {
353         hdmi_out_con: endpoint {
354                 remote-endpoint = <&hdmi_con_in>;
355         };
356 };
357
358 &hdmi_sound {
359         status = "okay";
360 };
361
362 &i2c0 {
363         status = "okay";
364
365         rk817: pmic@20 {
366                 compatible = "rockchip,rk817";
367                 reg = <0x20>;
368                 interrupt-parent = <&gpio0>;
369                 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
370                 clock-output-names = "rk808-clkout1", "rk808-clkout2";
371                 clock-names = "mclk";
372                 clocks = <&cru I2S1_MCLKOUT_TX>;
373                 assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
374                 assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
375                 #clock-cells = <1>;
376                 #sound-dai-cells = <0>;
377                 pinctrl-names = "default";
378                 pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
379                 wakeup-source;
380
381                 vcc1-supply = <&vcc_sys>;
382                 vcc2-supply = <&vcc_sys>;
383                 vcc3-supply = <&vcc_sys>;
384                 vcc4-supply = <&vcc_sys>;
385                 vcc5-supply = <&vcc_sys>;
386                 vcc6-supply = <&vcc_sys>;
387                 vcc7-supply = <&vcc_sys>;
388                 vcc8-supply = <&vcc_sys>;
389                 vcc9-supply = <&dcdc_boost>;
390
391                 regulators {
392                         vdd_logic: DCDC_REG1 {
393                                 regulator-always-on;
394                                 regulator-boot-on;
395                                 regulator-min-microvolt = <500000>;
396                                 regulator-max-microvolt = <1350000>;
397                                 regulator-init-microvolt = <900000>;
398                                 regulator-ramp-delay = <6001>;
399                                 regulator-initial-mode = <0x2>;
400                                 regulator-name = "vdd_logic";
401                                 regulator-state-mem {
402                                         regulator-off-in-suspend;
403                                         regulator-suspend-microvolt = <900000>;
404                                 };
405                         };
406
407                         vdd_gpu: DCDC_REG2 {
408                                 regulator-always-on;
409                                 regulator-boot-on;
410                                 regulator-min-microvolt = <500000>;
411                                 regulator-max-microvolt = <1350000>;
412                                 regulator-init-microvolt = <900000>;
413                                 regulator-ramp-delay = <6001>;
414                                 regulator-initial-mode = <0x2>;
415                                 regulator-name = "vdd_gpu";
416                                 regulator-state-mem {
417                                         regulator-off-in-suspend;
418                                 };
419                         };
420
421                         vcc_ddr: DCDC_REG3 {
422                                 regulator-always-on;
423                                 regulator-boot-on;
424                                 regulator-initial-mode = <0x2>;
425                                 regulator-name = "vcc_ddr";
426                                 regulator-state-mem {
427                                         regulator-on-in-suspend;
428                                 };
429                         };
430
431                         vcc_3v3: DCDC_REG4 {
432                                 regulator-always-on;
433                                 regulator-boot-on;
434                                 regulator-min-microvolt = <3300000>;
435                                 regulator-max-microvolt = <3300000>;
436                                 regulator-initial-mode = <0x2>;
437                                 regulator-name = "vcc_3v3";
438                                 regulator-state-mem {
439                                         regulator-on-in-suspend;
440                                         regulator-suspend-microvolt = <3300000>;
441                                 };
442                         };
443
444                         vcca1v8_pmu: LDO_REG1 {
445                                 regulator-always-on;
446                                 regulator-boot-on;
447                                 regulator-min-microvolt = <1800000>;
448                                 regulator-max-microvolt = <1800000>;
449                                 regulator-name = "vcca1v8_pmu";
450                                 regulator-state-mem {
451                                         regulator-on-in-suspend;
452                                         regulator-suspend-microvolt = <1800000>;
453                                 };
454                         };
455
456                         vdda_0v9: LDO_REG2 {
457                                 regulator-always-on;
458                                 regulator-boot-on;
459                                 regulator-min-microvolt = <900000>;
460                                 regulator-max-microvolt = <900000>;
461                                 regulator-name = "vdda_0v9";
462                                 regulator-state-mem {
463                                         regulator-off-in-suspend;
464                                 };
465                         };
466
467                         vdda0v9_pmu: LDO_REG3 {
468                                 regulator-always-on;
469                                 regulator-boot-on;
470                                 regulator-min-microvolt = <900000>;
471                                 regulator-max-microvolt = <900000>;
472                                 regulator-name = "vdda0v9_pmu";
473                                 regulator-state-mem {
474                                         regulator-on-in-suspend;
475                                         regulator-suspend-microvolt = <900000>;
476                                 };
477                         };
478
479                         vccio_acodec: LDO_REG4 {
480                                 regulator-always-on;
481                                 regulator-boot-on;
482                                 regulator-min-microvolt = <3300000>;
483                                 regulator-max-microvolt = <3300000>;
484                                 regulator-name = "vccio_acodec";
485                                 regulator-state-mem {
486                                         regulator-off-in-suspend;
487                                 };
488                         };
489
490                         vccio_sd: LDO_REG5 {
491                                 regulator-always-on;
492                                 regulator-boot-on;
493                                 regulator-min-microvolt = <1800000>;
494                                 regulator-max-microvolt = <3300000>;
495                                 regulator-name = "vccio_sd";
496                                 regulator-state-mem {
497                                         regulator-off-in-suspend;
498                                 };
499                         };
500
501                         vcc3v3_pmu: LDO_REG6 {
502                                 regulator-always-on;
503                                 regulator-boot-on;
504                                 regulator-min-microvolt = <3300000>;
505                                 regulator-max-microvolt = <3300000>;
506                                 regulator-name = "vcc3v3_pmu";
507                                 regulator-state-mem {
508                                         regulator-on-in-suspend;
509                                         regulator-suspend-microvolt = <3300000>;
510                                 };
511                         };
512
513                         vcc_1v8: LDO_REG7 {
514                                 regulator-always-on;
515                                 regulator-boot-on;
516                                 regulator-min-microvolt = <1800000>;
517                                 regulator-max-microvolt = <1800000>;
518                                 regulator-name = "vcc_1v8";
519                                 regulator-state-mem {
520                                         regulator-off-in-suspend;
521                                 };
522                         };
523
524                         vcc1v8_dvp: LDO_REG8 {
525                                 regulator-always-on;
526                                 regulator-boot-on;
527                                 regulator-min-microvolt = <1800000>;
528                                 regulator-max-microvolt = <3300000>;
529                                 regulator-name = "vcc1v8_dvp";
530                                 regulator-state-mem {
531                                         regulator-off-in-suspend;
532                                 };
533                         };
534
535                         vcc2v8_dvp: LDO_REG9 {
536                                 regulator-always-on;
537                                 regulator-boot-on;
538                                 regulator-min-microvolt = <2800000>;
539                                 regulator-max-microvolt = <2800000>;
540                                 regulator-name = "vcc2v8_dvp";
541                                 regulator-state-mem {
542                                         regulator-off-in-suspend;
543                                 };
544                         };
545
546                         dcdc_boost: BOOST {
547                                 regulator-always-on;
548                                 regulator-boot-on;
549                                 regulator-min-microvolt = <4700000>;
550                                 regulator-max-microvolt = <5400000>;
551                                 regulator-name = "boost";
552                                 regulator-state-mem {
553                                         regulator-off-in-suspend;
554                                 };
555                         };
556
557                         otg_switch: OTG_SWITCH {
558                                 regulator-name = "otg_switch";
559                                 regulator-state-mem {
560                                         regulator-off-in-suspend;
561                                 };
562                         };
563                 };
564         };
565
566         vdd_cpu: regulator@40 {
567                 compatible = "fcs,fan53555";
568                 reg = <0x40>;
569                 fcs,suspend-voltage-selector = <1>;
570                 regulator-always-on;
571                 regulator-boot-on;
572                 regulator-min-microvolt = <712500>;
573                 regulator-max-microvolt = <1390000>;
574                 regulator-init-microvolt = <900000>;
575                 regulator-name = "vdd_cpu";
576                 regulator-ramp-delay = <2300>;
577                 vin-supply = <&vcc_sys>;
578                 regulator-state-mem {
579                         regulator-off-in-suspend;
580                 };
581         };
582 };
583
584 &i2c1 {
585         /* Unknown/unused device at 0x3c */
586         status = "disabled";
587 };
588
589 &i2c5 {
590         pinctrl-0 = <&i2c5m1_xfer>;
591         pinctrl-names = "default";
592         status = "okay";
593 };
594
595 &i2s0_8ch {
596         status = "okay";
597 };
598
599 &i2s1_8ch {
600         pinctrl-0 = <&i2s1m0_sclktx
601                      &i2s1m0_lrcktx
602                      &i2s1m0_sdi0
603                      &i2s1m0_sdo0>;
604         pinctrl-names = "default";
605         rockchip,trcm-sync-tx-only;
606         status = "okay";
607 };
608
609 &pinctrl {
610         audio-amplifier {
611                 spk_amp_enable_h: spk-amp-enable-h {
612                         rockchip,pins =
613                                 <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
614                 };
615         };
616
617         gpio-btns {
618                 btn_pins_ctrl: btn-pins-ctrl {
619                         rockchip,pins =
620                                 <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
621                                 <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
622                                 <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
623                                 <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
624                                 <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
625                                 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
626                                 <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
627                                 <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
628                                 <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
629                                 <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
630                                 <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
631                                 <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
632                                 <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
633                                 <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
634                                 <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
635                                 <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
636                 };
637
638                 btn_pins_vol: btn-pins-vol {
639                         rockchip,pins =
640                         <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
641                         <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
642                 };
643         };
644
645         gpio-led {
646                 led_pins: led-pins {
647                         rockchip,pins =
648                                 <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,
649                                 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
650                                 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
651                 };
652         };
653
654         joy-mux {
655                 joy_mux_en: joy-mux-en {
656                         rockchip,pins =
657                                 <0 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>;
658                 };
659         };
660
661         pmic {
662                 pmic_int_l: pmic-int-l {
663                         rockchip,pins =
664                                 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
665                 };
666         };
667
668         sdio-pwrseq {
669                 wifi_enable_h: wifi-enable-h {
670                         rockchip,pins =
671                                 <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
672                 };
673         };
674
675         vcc3v3-lcd {
676                 vcc_lcd_h: vcc-lcd-h {
677                         rockchip,pins =
678                                 <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
679                 };
680         };
681
682         vcc-wifi {
683                 vcc_wifi_h: vcc-wifi-h {
684                         rockchip,pins =
685                                 <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
686                 };
687         };
688 };
689
690 &pmu_io_domains {
691         status = "okay";
692         pmuio1-supply = <&vcc3v3_pmu>;
693         pmuio2-supply = <&vcc3v3_pmu>;
694         vccio1-supply = <&vccio_acodec>;
695         vccio3-supply = <&vccio_sd>;
696         vccio4-supply = <&vcc_1v8>;
697         vccio5-supply = <&vcc_3v3>;
698         vccio6-supply = <&vcc1v8_dvp>;
699         vccio7-supply = <&vcc_3v3>;
700 };
701
702 &pwm5 {
703         status = "okay";
704 };
705
706 &saradc {
707         vref-supply = <&vcc_1v8>;
708         status = "okay";
709 };
710
711 &sdmmc0 {
712         bus-width = <4>;
713         cap-sd-highspeed;
714         cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
715         disable-wp;
716         pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
717         pinctrl-names = "default";
718         sd-uhs-sdr104;
719         vmmc-supply = <&vcc_3v3>;
720         vqmmc-supply = <&vccio_sd>;
721         status = "okay";
722 };
723
724 &sdmmc1 {
725         bus-width = <4>;
726         cap-sd-highspeed;
727         cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
728         disable-wp;
729         pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
730         pinctrl-names = "default";
731         sd-uhs-sdr104;
732         vmmc-supply = <&vcc_3v3>;
733         vqmmc-supply = <&vcc1v8_dvp>;
734         status = "okay";
735 };
736
737 &sdmmc2 {
738         bus-width = <4>;
739         cap-sd-highspeed;
740         cap-sdio-irq;
741         keep-power-in-suspend;
742         mmc-pwrseq = <&sdio_pwrseq>;
743         non-removable;
744         pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
745         pinctrl-names = "default";
746         vmmc-supply = <&vcc_wifi>;
747         vqmmc-supply = <&vcca1v8_pmu>;
748         status = "okay";
749 };
750
751 &tsadc {
752         rockchip,hw-tshut-mode = <1>;
753         rockchip,hw-tshut-polarity = <0>;
754         status = "okay";
755 };
756
757 &uart1 {
758         pinctrl-0 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
759         pinctrl-names = "default";
760         uart-has-rtscts;
761         status = "okay";
762
763         bluetooth {
764                 compatible = "realtek,rtl8821cs-bt";
765                 device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
766                 enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
767                 host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
768         };
769 };
770
771 &uart2 {
772         status = "okay";
773 };
774
775 /*
776  * Lack the schematics to verify, but port works as a peripheral
777  * (and not a host or OTG port).
778  */
779 &usb_host0_xhci {
780         dr_mode = "peripheral";
781         phys = <&usb2phy0_otg>;
782         phy-names = "usb2-phy";
783         status = "okay";
784 };
785
786 &usb_host1_ehci {
787         status = "okay";
788 };
789
790 &usb_host1_ohci {
791         status = "okay";
792 };
793
794 &usb_host1_xhci {
795         phy-names = "usb2-phy", "usb3-phy";
796         phys = <&usb2phy1_host>, <&combphy1 PHY_TYPE_USB3>;
797         status = "okay";
798 };
799
800 &usb2phy0 {
801         status = "okay";
802 };
803
804 &usb2phy0_otg {
805         status = "okay";
806 };
807
808 &usb2phy1 {
809         status = "okay";
810 };
811
812 &usb2phy1_host {
813         status = "okay";
814 };
815
816 &vop {
817         assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
818         assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
819         status = "okay";
820 };
821
822 &vop_mmu {
823         status = "okay";
824 };
825
826 &vp0 {
827         vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
828                 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
829                 remote-endpoint = <&hdmi_in_vp0>;
830         };
831 };