1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/gpio-keys.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include <dt-bindings/pinctrl/rockchip.h>
8 #include <dt-bindings/soc/rockchip,vop2.h>
9 #include <dt-bindings/usb/pd.h>
10 #include "rk3566.dtsi"
13 chassis-type = "tablet";
21 stdout-path = "serial2:1500000n8";
25 compatible = "adc-keys";
26 io-channels = <&saradc 0>;
27 io-channel-names = "buttons";
28 keyup-threshold-microvolt = <1800000>;
33 linux,code = <KEY_VOLUMEUP>;
34 press-threshold-microvolt = <297500>;
38 label = "Volume Down";
39 linux,code = <KEY_VOLUMEDOWN>;
40 press-threshold-microvolt = <1750>;
44 backlight: backlight {
45 compatible = "pwm-backlight";
46 pwms = <&pwm4 0 25000 0>;
47 brightness-levels = <20 220>;
48 num-interpolated-steps = <200>;
49 default-brightness-level = <100>;
50 power-supply = <&vcc_sys>;
54 compatible = "simple-battery";
55 charge-full-design-microamp-hours = <6000000>;
56 charge-term-current-microamp = <300000>;
57 constant-charge-current-max-microamp = <2000000>;
58 constant-charge-voltage-max-microvolt = <4300000>;
59 voltage-max-design-microvolt = <4350000>;
60 voltage-min-design-microvolt = <3400000>;
62 ocv-capacity-celsius = <20>;
63 ocv-capacity-table-0 = <4322000 100>, <4250000 95>, <4192000 90>, <4136000 85>,
64 <4080000 80>, <4022000 75>, <3972000 70>, <3928000 65>,
65 <3885000 60>, <3833000 55>, <3798000 50>, <3780000 45>,
66 <3776000 40>, <3773000 35>, <3755000 30>, <3706000 25>,
67 <3640000 20>, <3589000 15>, <3535000 10>, <3492000 5>,
71 gpio_keys: gpio-keys {
72 compatible = "gpio-keys";
73 pinctrl-names = "default";
74 pinctrl-0 = <&kb_id_det>;
77 debounce-interval = <20>;
78 gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
79 label = "Tablet Mode";
80 linux,input-type = <EV_SW>;
81 linux,code = <SW_TABLET_MODE>;
86 compatible = "hdmi-connector";
90 hdmi_con_in: endpoint {
91 remote-endpoint = <&hdmi_out_con>;
97 compatible = "regulator-led";
98 vled-supply = <&vcc5v0_flashled>;
99 color = <LED_COLOR_ID_WHITE>;
100 function = LED_FUNCTION_FLASH;
104 compatible = "simple-audio-card";
105 pinctrl-names = "default";
106 pinctrl-0 = <&hp_det_l>;
107 simple-audio-card,format = "i2s";
108 simple-audio-card,name = "rk817_ext";
109 simple-audio-card,mclk-fs = <256>;
111 simple-audio-card,widgets =
112 "Microphone", "Mic Jack",
113 "Headphone", "Headphones",
114 "Speaker", "Internal Speakers";
116 simple-audio-card,routing =
118 "Headphones", "HPOL",
119 "Headphones", "HPOR",
120 "Internal Speakers", "Speaker Amplifier OUTL",
121 "Internal Speakers", "Speaker Amplifier OUTR",
122 "Speaker Amplifier INL", "HPOL",
123 "Speaker Amplifier INR", "HPOR";
124 simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
125 simple-audio-card,aux-devs = <&speaker_amp>;
126 simple-audio-card,pin-switches = "Internal Speakers";
128 simple-audio-card,cpu {
129 sound-dai = <&i2s1_8ch>;
132 simple-audio-card,codec {
133 sound-dai = <&rk817>;
137 speaker_amp: speaker-amplifier {
138 compatible = "simple-audio-amplifier";
139 pinctrl-names = "default";
140 pinctrl-0 = <&spk_ctl>;
141 enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
142 sound-name-prefix = "Speaker Amplifier";
143 VCC-supply = <&vcc_bat>;
146 vcc_3v3: vcc-3v3-regulator {
147 compatible = "regulator-fixed";
148 regulator-name = "vcc_3v3";
151 regulator-min-microvolt = <3300000>;
152 regulator-max-microvolt = <3300000>;
153 vin-supply = <&vcc3v3_sys>;
156 vcc3v3_minipcie: vcc3v3-minipcie-regulator {
157 compatible = "regulator-fixed";
159 gpio = <&gpio4 RK_PC3 GPIO_ACTIVE_HIGH>;
160 pinctrl-names = "default";
161 pinctrl-0 = <&pcie_pwren_h>;
162 regulator-name = "vcc3v3_minipcie";
163 regulator-min-microvolt = <3300000>;
164 regulator-max-microvolt = <3300000>;
165 vin-supply = <&vcc_sys>;
168 vcc3v3_sd: vcc3v3-sd-regulator {
169 compatible = "regulator-fixed";
170 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
171 pinctrl-names = "default";
172 pinctrl-0 = <&sdmmc_pwren_l>;
173 regulator-name = "vcc3v3_sd";
174 regulator-min-microvolt = <3300000>;
175 regulator-max-microvolt = <3300000>;
176 vin-supply = <&vcc3v3_sys>;
179 vcc5v0_flashled: vcc5v0-flashled-regulator {
180 compatible = "regulator-fixed";
182 gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&flash_led_en_h>;
185 regulator-name = "vcc5v0_flashled";
186 regulator-min-microvolt = <5000000>;
187 regulator-max-microvolt = <5000000>;
188 vin-supply = <&vcc5v_midu>;
191 vcc5v0_usb_host0: vcc5v0-usb-host0-regulator {
192 compatible = "regulator-fixed";
194 gpio = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
195 pinctrl-names = "default";
196 pinctrl-0 = <&usb_host_pwren1_h>;
197 regulator-name = "vcc5v0_usb_host0";
198 regulator-min-microvolt = <5000000>;
199 regulator-max-microvolt = <5000000>;
200 vin-supply = <&vcc5v_midu>;
203 vcc5v0_usb_host2: vcc5v0-usb-host2-regulator {
204 compatible = "regulator-fixed";
206 gpio = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
207 pinctrl-names = "default";
208 pinctrl-0 = <&usb_host_pwren2_h>;
209 regulator-name = "vcc5v0_usb_host2";
210 regulator-min-microvolt = <5000000>;
211 regulator-max-microvolt = <5000000>;
212 vin-supply = <&vcc5v_midu>;
215 vcc_bat: vcc-bat-regulator {
216 compatible = "regulator-fixed";
217 regulator-name = "vcc_bat";
222 vcc_sys: vcc-sys-regulator {
223 compatible = "regulator-fixed";
224 regulator-name = "vcc_sys";
227 vin-supply = <&vcc_bat>;
230 vdd1v2_dvp: vdd1v2-dvp-regulator {
231 compatible = "regulator-fixed";
232 regulator-name = "vdd1v2_dvp";
233 regulator-min-microvolt = <1200000>;
234 regulator-max-microvolt = <1200000>;
235 vin-supply = <&vcc_3v3>;
248 cpu-supply = <&vdd_cpu>;
252 cpu-supply = <&vdd_cpu>;
256 cpu-supply = <&vdd_cpu>;
260 cpu-supply = <&vdd_cpu>;
264 assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
265 <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
266 assigned-clock-rates = <32768>, <1200000000>, <200000000>, <500000000>;
267 assigned-clock-parents = <&pmucru CLK_RTC32K_FRAC>;
277 #address-cells = <1>;
281 compatible = "boe,th101mb31ig002-28a";
283 backlight = <&backlight>;
284 enable-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
286 power-supply = <&vcc_3v3>;
289 panel_in_dsi: endpoint@0 {
290 remote-endpoint = <&dsi0_out_con>;
297 dsi0_in_vp1: endpoint {
298 remote-endpoint = <&vp1_out_dsi0>;
303 dsi0_out_con: endpoint {
304 remote-endpoint = <&panel_in_dsi>;
313 mali-supply = <&vdd_gpu_npu>;
318 avdd-0v9-supply = <&vdda_0v9_p>;
319 avdd-1v8-supply = <&vcc_1v8>;
324 hdmi_in_vp0: endpoint {
325 remote-endpoint = <&vp0_out_hdmi>;
330 hdmi_out_con: endpoint {
331 remote-endpoint = <&hdmi_con_in>;
340 clock-frequency = <400000>;
343 vdd_cpu: regulator@1c {
344 compatible = "tcs,tcs4525";
346 fcs,suspend-voltage-selector = <1>;
347 regulator-name = "vdd_cpu";
348 regulator-min-microvolt = <800000>;
349 regulator-max-microvolt = <1150000>;
350 regulator-ramp-delay = <2300>;
353 vin-supply = <&vcc_sys>;
355 regulator-state-mem {
356 regulator-off-in-suspend;
361 compatible = "rockchip,rk817";
363 interrupt-parent = <&gpio0>;
364 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
365 assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
366 assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
367 clock-names = "mclk";
368 clocks = <&cru I2S1_MCLKOUT_TX>;
369 clock-output-names = "rk808-clkout1", "rk808-clkout2";
371 pinctrl-names = "default";
372 pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
373 rockchip,system-power-controller;
374 #sound-dai-cells = <0>;
377 vcc1-supply = <&vcc_sys>;
378 vcc2-supply = <&vcc_sys>;
379 vcc3-supply = <&vcc_sys>;
380 vcc4-supply = <&vcc_sys>;
381 vcc5-supply = <&vcc_sys>;
382 vcc6-supply = <&vcc_sys>;
383 vcc7-supply = <&vcc_sys>;
384 vcc8-supply = <&vcc_sys>;
385 vcc9-supply = <&vcc5v_midu>;
388 vdd_logic: DCDC_REG1 {
391 regulator-min-microvolt = <500000>;
392 regulator-max-microvolt = <1350000>;
393 regulator-ramp-delay = <6001>;
394 regulator-initial-mode = <0x2>;
395 regulator-name = "vdd_logic";
396 regulator-state-mem {
397 regulator-off-in-suspend;
401 vdd_gpu_npu: DCDC_REG2 {
402 regulator-min-microvolt = <500000>;
403 regulator-max-microvolt = <1350000>;
404 regulator-ramp-delay = <6001>;
405 regulator-initial-mode = <0x2>;
406 regulator-name = "vdd_gpu_npu";
407 regulator-state-mem {
408 regulator-off-in-suspend;
415 regulator-initial-mode = <0x2>;
416 regulator-name = "vcc_ddr";
417 regulator-state-mem {
418 regulator-on-in-suspend;
422 vcc3v3_sys: DCDC_REG4 {
425 regulator-min-microvolt = <3300000>;
426 regulator-max-microvolt = <3300000>;
427 regulator-initial-mode = <0x2>;
428 regulator-name = "vcc3v3_sys";
429 regulator-state-mem {
430 regulator-off-in-suspend;
434 vcca1v8_pmu: LDO_REG1 {
437 regulator-min-microvolt = <1800000>;
438 regulator-max-microvolt = <1800000>;
439 regulator-name = "vcca1v8_pmu";
440 regulator-state-mem {
441 regulator-on-in-suspend;
445 vdda_0v9_p: LDO_REG2 {
448 regulator-min-microvolt = <900000>;
449 regulator-max-microvolt = <900000>;
450 regulator-name = "vdda_0v9_p";
451 regulator-state-mem {
452 regulator-off-in-suspend;
456 vdda0v9_pmu: LDO_REG3 {
459 regulator-min-microvolt = <900000>;
460 regulator-max-microvolt = <900000>;
461 regulator-name = "vdda0v9_pmu";
462 regulator-state-mem {
463 regulator-on-in-suspend;
467 vccio_acodec: LDO_REG4 {
470 regulator-min-microvolt = <3300000>;
471 regulator-max-microvolt = <3300000>;
472 regulator-name = "vccio_acodec";
473 regulator-state-mem {
474 regulator-off-in-suspend;
481 regulator-min-microvolt = <1800000>;
482 regulator-max-microvolt = <3300000>;
483 regulator-name = "vccio_sd";
484 regulator-state-mem {
485 regulator-off-in-suspend;
489 vcc3v3_pmu: LDO_REG6 {
492 regulator-min-microvolt = <3300000>;
493 regulator-max-microvolt = <3300000>;
494 regulator-name = "vcc3v3_pmu";
495 regulator-state-mem {
496 regulator-on-in-suspend;
503 regulator-min-microvolt = <1800000>;
504 regulator-max-microvolt = <1800000>;
505 regulator-name = "vcc_1v8";
506 regulator-state-mem {
507 regulator-off-in-suspend;
511 vcc1v8_dvp: LDO_REG8 {
514 regulator-min-microvolt = <1800000>;
515 regulator-max-microvolt = <1800000>;
516 regulator-name = "vcc1v8_dvp";
517 regulator-state-mem {
518 regulator-off-in-suspend;
522 vcc2v8_dvp: LDO_REG9 {
525 regulator-min-microvolt = <2800000>;
526 regulator-max-microvolt = <2800000>;
527 regulator-name = "vcc2v8_dvp";
528 regulator-state-mem {
529 regulator-off-in-suspend;
536 regulator-min-microvolt = <5000000>;
537 regulator-max-microvolt = <5000000>;
538 regulator-name = "boost";
539 regulator-state-mem {
540 regulator-off-in-suspend;
545 regulator-min-microvolt = <5000000>;
546 regulator-max-microvolt = <5000000>;
547 regulator-name = "otg_switch";
548 regulator-state-mem {
549 regulator-off-in-suspend;
555 monitored-battery = <&battery>;
556 rockchip,resistor-sense-micro-ohms = <10000>;
557 rockchip,sleep-enter-current-microamp = <300000>;
558 rockchip,sleep-filter-current-microamp = <100000>;
564 clock-frequency = <400000>;
568 compatible = "goodix,gt911";
570 interrupt-parent = <&gpio0>;
571 interrupts = <RK_PB0 IRQ_TYPE_EDGE_FALLING>;
572 pinctrl-names = "default";
573 pinctrl-0 = <&tp_int_l_pmuio2>, <&tp_rst_l_pmuio2>;
574 AVDD28-supply = <&vcc3v3_pmu>;
575 VDDIO-supply = <&vcca1v8_pmu>;
576 irq-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
577 reset-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
582 clock-frequency = <400000>;
583 pinctrl-0 = <&i2c2m1_xfer>;
587 compatible = "dongwoon,dw9714";
589 vcc-supply = <&vcc1v8_dvp>;
593 compatible = "ovti,ov5648";
595 pinctrl-names = "default";
596 pinctrl-0 = <&camerab_pdn_l &camerab_rst_l>;
598 clocks = <&cru CLK_CIF_OUT>;
599 assigned-clocks = <&cru CLK_CIF_OUT>;
600 assigned-clock-rates = <24000000>;
602 avdd-supply = <&vcc2v8_dvp>;
603 dvdd-supply = <&vdd1v2_dvp>;
604 dovdd-supply = <&vcc1v8_dvp>;
605 powerdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
606 reset-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_LOW>;
611 remote-endpoint = <0>;
612 link-frequencies = /bits/ 64 <210000000 168000000>;
619 clock-frequency = <400000>;
623 compatible = "silan,sc7a20";
625 interrupt-parent = <&gpio3>;
626 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
627 pinctrl-names = "default";
628 pinctrl-0 = <&gsensor_int_l>;
629 st,drdy-int-pin = <1>;
630 vdd-supply = <&vcc_1v8>;
631 vddio-supply = <&vcc_1v8>;
632 mount-matrix = "1", "0", "0",
643 pinctrl-names = "default";
644 pinctrl-0 = <&i2s1m0_sclktx
648 rockchip,trcm-sync-tx-only;
653 pinctrl-names = "default";
654 pinctrl-0 = <&pcie_reset_h>;
655 reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
656 vpcie3v3-supply = <&vcc3v3_minipcie>;
662 camerab_pdn_l: camerab-pdn-l {
663 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
666 camerab_rst_l: camerab-rst-l {
667 rockchip,pins = <4 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
672 cameraf_pdn_l: cameraf-pdn-l {
673 rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
676 cameraf_rst_l: cameraf-rst-l {
677 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
682 flash_led_en_h: flash-led-en-h {
683 rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
688 fspi_dual_io_pins: fspi-dual-io-pins {
691 <1 RK_PD0 1 &pcfg_pull_none>,
693 <1 RK_PD3 1 &pcfg_pull_none>,
695 <1 RK_PD1 1 &pcfg_pull_none>,
697 <1 RK_PD2 1 &pcfg_pull_none>;
702 gsensor_int_l: gsensor-int-l {
703 rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
708 kb_id_det: kb-id-det {
709 rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
714 lcd_pwren_h: lcd-pwren-h {
715 rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
720 pcie_pwren_h: pcie-pwren-h {
721 rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
724 pcie_reset_h: pcie-reset-h {
725 rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
730 pmic_int_l: pmic-int-l {
731 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
736 sdmmc_pwren_l: sdmmc-pwren-l {
737 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
743 rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
747 rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
752 tp_int_l_pmuio2: tp-int-l-pmuio2 {
753 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
756 tp_rst_l_pmuio2: tp-rst-l-pmuio2 {
757 rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
762 usbcc_int_l: usbcc-int-l {
763 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
766 usb_host_pwren1_h: usb-host-pwren1-h {
767 rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
770 usb_host_pwren2_h: usb-host-pwren2-h {
771 rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
776 host_wake_wl: host-wake-wl {
777 rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
780 wifi_wake_host_h: wifi-wake-host-h {
781 rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
787 pmuio1-supply = <&vcc3v3_pmu>;
788 pmuio2-supply = <&vcca1v8_pmu>;
789 vccio1-supply = <&vccio_acodec>;
790 vccio2-supply = <&vcc_1v8>;
791 vccio3-supply = <&vccio_sd>;
792 vccio4-supply = <&vcc_1v8>;
793 vccio5-supply = <&vcc_1v8>;
794 vccio6-supply = <&vcc1v8_dvp>;
795 vccio7-supply = <&vcc_3v3>;
804 vref-supply = <&vcc_1v8>;
813 max-frequency = <200000000>;
815 pinctrl-names = "default";
816 pinctrl-0 = <&emmc_bus8
821 vmmc-supply = <&vcc_3v3>;
822 vqmmc-supply = <&vcc_1v8>;
829 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
831 pinctrl-names = "default";
832 pinctrl-0 = <&sdmmc0_bus4
837 vmmc-supply = <&vcc3v3_sd>;
838 vqmmc-supply = <&vccio_sd>;
846 keep-power-in-suspend;
848 pinctrl-names = "default";
849 pinctrl-0 = <&sdmmc1_bus4
853 vqmmc-supply = <&vcca1v8_pmu>;
858 pinctrl-names = "default";
859 pinctrl-0 = <&fspi_dual_io_pins>;
861 #address-cells = <1>;
865 compatible = "jedec,spi-nor";
867 spi-max-frequency = <100000000>;
868 spi-rx-bus-width = <2>;
869 spi-tx-bus-width = <1>;
874 rockchip,hw-tshut-mode = <1>;
875 rockchip,hw-tshut-polarity = <0>;
904 phy-supply = <&vcc5v0_usb_host0>;
917 phy-supply = <&vcc5v0_usb_host2>;
922 assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
923 assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
932 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
933 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
934 remote-endpoint = <&hdmi_in_vp0>;
939 vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
940 reg = <ROCKCHIP_VOP2_EP_MIPI0>;
941 remote-endpoint = <&dsi0_in_vp1>;