1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
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"
14 stdout-path = "serial2:1500000n8";
18 compatible = "adc-keys";
19 io-channels = <&saradc 0>;
20 io-channel-names = "buttons";
21 keyup-threshold-microvolt = <1800000>;
25 * Button is mapped to F key in BSP kernel, but
26 * according to input guidelines it should be mode.
30 linux,code = <BTN_MODE>;
31 press-threshold-microvolt = <1750>;
35 gpio_keys_control: gpio-keys-control {
36 compatible = "gpio-keys";
37 pinctrl-0 = <&btn_pins_ctrl>;
38 pinctrl-names = "default";
41 gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
43 linux,code = <BTN_SOUTH>;
47 gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
49 linux,code = <BTN_DPAD_DOWN>;
53 gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
55 linux,code = <BTN_TL>;
59 gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
61 linux,code = <BTN_TL2>;
65 gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
67 linux,code = <BTN_SELECT>;
71 gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
73 linux,code = <BTN_START>;
77 gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
79 linux,code = <BTN_DPAD_UP>;
83 gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
85 linux,code = <BTN_NORTH>;
89 gpio_keys_vol: gpio-keys-vol {
90 compatible = "gpio-keys";
92 pinctrl-0 = <&btn_pins_vol>;
93 pinctrl-names = "default";
96 gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
98 linux,code = <KEY_VOLUMEDOWN>;
102 gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
104 linux,code = <KEY_VOLUMEUP>;
109 compatible = "hdmi-connector";
110 ddc-i2c-bus = <&i2c5>;
114 hdmi_con_in: endpoint {
115 remote-endpoint = <&hdmi_out_con>;
121 compatible = "pwm-leds";
124 color = <LED_COLOR_ID_GREEN>;
125 default-state = "on";
126 function = LED_FUNCTION_POWER;
127 max-brightness = <255>;
128 pwms = <&pwm6 0 25000 0>;
132 color = <LED_COLOR_ID_AMBER>;
133 function = LED_FUNCTION_CHARGING;
134 max-brightness = <255>;
135 pwms = <&pwm7 0 25000 0>;
139 color = <LED_COLOR_ID_RED>;
140 default-state = "off";
141 function = LED_FUNCTION_STATUS;
142 max-brightness = <255>;
143 pwms = <&pwm0 0 25000 0>;
147 sdio_pwrseq: sdio-pwrseq {
148 compatible = "mmc-pwrseq-simple";
150 clock-names = "ext_clock";
151 pinctrl-0 = <&wifi_enable_h>;
152 pinctrl-names = "default";
153 post-power-on-delay-ms = <200>;
154 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
157 vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 {
158 compatible = "regulator-fixed";
159 gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
161 pinctrl-0 = <&vcc_lcd_h>;
162 pinctrl-names = "default";
164 regulator-min-microvolt = <3300000>;
165 regulator-max-microvolt = <3300000>;
166 regulator-name = "vcc3v3_lcd0_n";
167 vin-supply = <&vcc_3v3>;
168 regulator-state-mem {
169 regulator-off-in-suspend;
173 vcc_sys: regulator-vcc-sys {
174 compatible = "regulator-fixed";
177 regulator-min-microvolt = <3800000>;
178 regulator-max-microvolt = <3800000>;
179 regulator-name = "vcc_sys";
182 vcc_wifi: regulator-vcc-wifi {
183 compatible = "regulator-fixed";
185 gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
186 pinctrl-0 = <&vcc_wifi_h>;
187 pinctrl-names = "default";
190 regulator-min-microvolt = <3300000>;
191 regulator-max-microvolt = <3300000>;
192 regulator-name = "vcc_wifi";
195 vibrator: pwm-vibrator {
196 compatible = "pwm-vibrator";
197 pwm-names = "enable";
198 pwms = <&pwm5 0 1000000000 0>;
207 cpu-supply = <&vdd_cpu>;
211 cpu-supply = <&vdd_cpu>;
215 cpu-supply = <&vdd_cpu>;
219 cpu-supply = <&vdd_cpu>;
223 mali-supply = <&vdd_gpu>;
228 ddc-i2c-bus = <&i2c5>;
229 pinctrl-0 = <&hdmitxm0_cec>;
230 pinctrl-names = "default";
235 hdmi_in_vp0: endpoint {
236 remote-endpoint = <&vp0_out_hdmi>;
241 hdmi_out_con: endpoint {
242 remote-endpoint = <&hdmi_con_in>;
254 compatible = "rockchip,rk817";
256 interrupt-parent = <&gpio0>;
257 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
258 clock-output-names = "rk808-clkout1", "rk808-clkout2";
259 clock-names = "mclk";
260 clocks = <&cru I2S1_MCLKOUT_TX>;
261 assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
262 assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
264 #sound-dai-cells = <0>;
265 pinctrl-names = "default";
266 pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
269 vcc1-supply = <&vcc_sys>;
270 vcc2-supply = <&vcc_sys>;
271 vcc3-supply = <&vcc_sys>;
272 vcc4-supply = <&vcc_sys>;
273 vcc5-supply = <&vcc_sys>;
274 vcc6-supply = <&vcc_sys>;
275 vcc7-supply = <&vcc_sys>;
276 vcc8-supply = <&vcc_sys>;
277 vcc9-supply = <&dcdc_boost>;
280 vdd_logic: DCDC_REG1 {
283 regulator-min-microvolt = <500000>;
284 regulator-max-microvolt = <1350000>;
285 regulator-ramp-delay = <6001>;
286 regulator-initial-mode = <0x2>;
287 regulator-name = "vdd_logic";
288 regulator-state-mem {
289 regulator-off-in-suspend;
290 regulator-suspend-microvolt = <900000>;
297 regulator-min-microvolt = <500000>;
298 regulator-max-microvolt = <1350000>;
299 regulator-ramp-delay = <6001>;
300 regulator-initial-mode = <0x2>;
301 regulator-name = "vdd_gpu";
302 regulator-state-mem {
303 regulator-off-in-suspend;
310 regulator-initial-mode = <0x2>;
311 regulator-name = "vcc_ddr";
312 regulator-state-mem {
313 regulator-on-in-suspend;
320 regulator-min-microvolt = <3300000>;
321 regulator-max-microvolt = <3300000>;
322 regulator-initial-mode = <0x2>;
323 regulator-name = "vcc_3v3";
324 regulator-state-mem {
325 regulator-on-in-suspend;
326 regulator-suspend-microvolt = <3300000>;
330 vcca1v8_pmu: LDO_REG1 {
333 regulator-min-microvolt = <1800000>;
334 regulator-max-microvolt = <1800000>;
335 regulator-name = "vcca1v8_pmu";
336 regulator-state-mem {
337 regulator-on-in-suspend;
338 regulator-suspend-microvolt = <1800000>;
345 regulator-min-microvolt = <900000>;
346 regulator-max-microvolt = <900000>;
347 regulator-name = "vdda_0v9";
348 regulator-state-mem {
349 regulator-off-in-suspend;
353 vdda0v9_pmu: LDO_REG3 {
356 regulator-min-microvolt = <900000>;
357 regulator-max-microvolt = <900000>;
358 regulator-name = "vdda0v9_pmu";
359 regulator-state-mem {
360 regulator-on-in-suspend;
361 regulator-suspend-microvolt = <900000>;
365 vccio_acodec: LDO_REG4 {
368 regulator-min-microvolt = <3300000>;
369 regulator-max-microvolt = <3300000>;
370 regulator-name = "vccio_acodec";
371 regulator-state-mem {
372 regulator-off-in-suspend;
379 regulator-min-microvolt = <1800000>;
380 regulator-max-microvolt = <3300000>;
381 regulator-name = "vccio_sd";
382 regulator-state-mem {
383 regulator-off-in-suspend;
387 vcc3v3_pmu: LDO_REG6 {
390 regulator-min-microvolt = <3300000>;
391 regulator-max-microvolt = <3300000>;
392 regulator-name = "vcc3v3_pmu";
393 regulator-state-mem {
394 regulator-on-in-suspend;
395 regulator-suspend-microvolt = <3300000>;
402 regulator-min-microvolt = <1800000>;
403 regulator-max-microvolt = <1800000>;
404 regulator-name = "vcc_1v8";
405 regulator-state-mem {
406 regulator-off-in-suspend;
410 vcc1v8_dvp: LDO_REG8 {
413 regulator-min-microvolt = <1800000>;
414 regulator-max-microvolt = <3300000>;
415 regulator-name = "vcc1v8_dvp";
416 regulator-state-mem {
417 regulator-off-in-suspend;
421 vcc2v8_dvp: LDO_REG9 {
424 regulator-min-microvolt = <2800000>;
425 regulator-max-microvolt = <2800000>;
426 regulator-name = "vcc2v8_dvp";
427 regulator-state-mem {
428 regulator-off-in-suspend;
435 regulator-min-microvolt = <4700000>;
436 regulator-max-microvolt = <5400000>;
437 regulator-name = "boost";
438 regulator-state-mem {
439 regulator-off-in-suspend;
443 otg_switch: OTG_SWITCH {
444 regulator-name = "otg_switch";
445 regulator-state-mem {
446 regulator-off-in-suspend;
452 vdd_cpu: regulator@40 {
453 compatible = "fcs,fan53555";
455 fcs,suspend-voltage-selector = <1>;
458 regulator-min-microvolt = <712500>;
459 regulator-max-microvolt = <1390000>;
460 regulator-name = "vdd_cpu";
461 regulator-ramp-delay = <2300>;
462 vin-supply = <&vcc_sys>;
463 regulator-state-mem {
464 regulator-off-in-suspend;
470 /* Unknown/unused device at 0x3c */
475 pinctrl-0 = <&i2c5m1_xfer>;
476 pinctrl-names = "default";
485 pinctrl-0 = <&i2s1m0_sclktx
489 pinctrl-names = "default";
490 rockchip,trcm-sync-tx-only;
496 btn_pins_ctrl: btn-pins-ctrl {
498 <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
499 <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
500 <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
501 <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
502 <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
503 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
504 <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
505 <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
506 <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
507 <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
508 <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
509 <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
510 <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
511 <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
512 <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
513 <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
516 btn_pins_vol: btn-pins-vol {
518 <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
519 <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
524 joy_mux_en: joy-mux-en {
526 <0 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>;
531 pmic_int_l: pmic-int-l {
533 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
538 wifi_enable_h: wifi-enable-h {
540 <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
545 vcc_lcd_h: vcc-lcd-h {
547 <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
552 vcc_wifi_h: vcc-wifi-h {
554 <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
561 pmuio1-supply = <&vcc3v3_pmu>;
562 pmuio2-supply = <&vcc3v3_pmu>;
563 vccio1-supply = <&vccio_acodec>;
564 vccio3-supply = <&vccio_sd>;
565 vccio4-supply = <&vcc_1v8>;
566 vccio5-supply = <&vcc_3v3>;
567 vccio6-supply = <&vcc1v8_dvp>;
568 vccio7-supply = <&vcc_3v3>;
572 pinctrl-0 = <&pwm0m1_pins>;
573 pinctrl-names = "default";
590 vref-supply = <&vcc_1v8>;
597 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
599 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
600 pinctrl-names = "default";
602 vmmc-supply = <&vcc_3v3>;
603 vqmmc-supply = <&vccio_sd>;
610 cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
612 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
613 pinctrl-names = "default";
615 vmmc-supply = <&vcc_3v3>;
616 vqmmc-supply = <&vcc1v8_dvp>;
624 keep-power-in-suspend;
625 mmc-pwrseq = <&sdio_pwrseq>;
627 pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
628 pinctrl-names = "default";
629 vmmc-supply = <&vcc_wifi>;
630 vqmmc-supply = <&vcca1v8_pmu>;
635 rockchip,hw-tshut-mode = <1>;
636 rockchip,hw-tshut-polarity = <0>;
641 pinctrl-0 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
642 pinctrl-names = "default";
647 compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt";
648 device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
649 enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
650 host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
659 * Lack the schematics to verify, but port works as a peripheral
660 * (and not a host or OTG port).
663 dr_mode = "peripheral";
664 phys = <&usb2phy0_otg>;
665 phy-names = "usb2-phy";
678 phy-names = "usb2-phy", "usb3-phy";
679 phys = <&usb2phy1_host>, <&combphy1 PHY_TYPE_USB3>;
700 assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
701 assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
710 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
711 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
712 remote-endpoint = <&hdmi_in_vp0>;