1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 Hardkernel Co., Ltd
4 * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/pinctrl/rockchip.h>
11 #include "rk3326.dtsi"
14 model = "ODROID-GO Advance";
15 compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
18 stdout-path = "serial2:115200n8";
21 backlight: backlight {
22 compatible = "pwm-backlight";
23 power-supply = <&vcc_bl>;
24 pwms = <&pwm1 0 25000 0>;
28 compatible = "adc-joystick";
29 io-channels = <&saradc 1>,
36 abs-range = <172 772>;
44 abs-range = <278 815>;
52 compatible = "gpio-keys";
53 pinctrl-names = "default";
54 pinctrl-0 = <&btn_pins>;
57 * *** ODROIDGO2-Advance Switch layout ***
58 * |------------------------------------------------|
60 * |------------------------------------------------|
61 * | sw1 |-------------------| sw8 |
62 * | sw3 sw4 | | sw7 sw5 |
63 * | sw2 | LCD Display | sw6 |
65 * | |-------------------| |
66 * | sw9 sw10 sw11 sw12 sw13 sw14 |
67 * |------------------------------------------------|
71 gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
73 linux,code = <BTN_DPAD_UP>;
76 gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
78 linux,code = <BTN_DPAD_DOWN>;
81 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
83 linux,code = <BTN_DPAD_LEFT>;
86 gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
88 linux,code = <BTN_DPAD_RIGHT>;
91 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
93 linux,code = <BTN_EAST>;
96 gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
98 linux,code = <BTN_SOUTH>;
101 gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
103 linux,code = <BTN_WEST>;
106 gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
108 linux,code = <BTN_NORTH>;
111 gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
113 linux,code = <BTN_TRIGGER_HAPPY1>;
116 gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
118 linux,code = <BTN_TRIGGER_HAPPY2>;
121 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
123 linux,code = <BTN_TRIGGER_HAPPY3>;
126 gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
128 linux,code = <BTN_TRIGGER_HAPPY4>;
131 gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
133 linux,code = <BTN_TRIGGER_HAPPY5>;
136 gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
138 linux,code = <BTN_TRIGGER_HAPPY6>;
141 gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
143 linux,code = <BTN_TL>;
146 gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
148 linux,code = <BTN_TR>;
153 compatible = "gpio-leds";
154 pinctrl-names = "default";
155 pinctrl-0 = <&blue_led_pin>;
158 label = "blue:heartbeat";
159 gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
160 linux,default-trigger = "heartbeat";
165 compatible = "simple-audio-card";
166 simple-audio-card,format = "i2s";
167 simple-audio-card,name = "rockchip,rk817-codec";
168 simple-audio-card,mclk-fs = <256>;
169 simple-audio-card,widgets =
170 "Microphone", "Mic Jack",
171 "Headphone", "Headphone Jack";
172 simple-audio-card,routing =
173 "MIC_IN", "Mic Jack",
174 "Headphone Jack", "HPOL",
175 "Headphone Jack", "HPOR";
176 simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
177 simple-audio-card,codec-hp-det = <1>;
179 simple-audio-card,cpu {
180 sound-dai = <&i2s1_2ch>;
183 simple-audio-card,codec {
184 sound-dai = <&rk817_codec>;
189 compatible = "regulator-fixed";
190 regulator-name = "vcc3v8_sys";
192 regulator-min-microvolt = <3800000>;
193 regulator-max-microvolt = <3800000>;
197 compatible = "regulator-fixed";
198 regulator-name = "vcc_host";
199 regulator-min-microvolt = <5000000>;
200 regulator-max-microvolt = <5000000>;
202 gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
205 vin-supply = <&vccsys>;
210 cpu-supply = <&vdd_arm>;
214 cpu-supply = <&vdd_arm>;
218 cpu-supply = <&vdd_arm>;
222 cpu-supply = <&vdd_arm>;
226 assigned-clocks = <&cru PLL_NPLL>,
227 <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
228 <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
229 <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>,
232 assigned-clock-rates = <1188000000>,
233 <200000000>, <200000000>,
234 <150000000>, <150000000>,
235 <100000000>, <200000000>,
250 mipi_out_panel: endpoint {
251 remote-endpoint = <&mipi_in_panel>;
257 compatible = "elida,kd35t133";
259 backlight = <&backlight>;
260 iovcc-supply = <&vcc_lcd>;
261 reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
262 vdd-supply = <&vcc_lcd>;
265 mipi_in_panel: endpoint {
266 remote-endpoint = <&mipi_out_panel>;
277 mali-supply = <&vdd_logic>;
282 clock-frequency = <400000>;
283 i2c-scl-falling-time-ns = <16>;
284 i2c-scl-rising-time-ns = <280>;
288 compatible = "rockchip,rk817";
290 interrupt-parent = <&gpio0>;
291 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
292 pinctrl-names = "default", "pmic-sleep",
293 "pmic-power-off", "pmic-reset";
294 pinctrl-0 = <&pmic_int>;
295 pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
296 pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
297 pinctrl-3 = <&soc_slppin_rst>, <&rk817_slppin_rst>;
298 rockchip,system-power-controller;
301 clock-output-names = "rk808-clkout1", "xin32k";
303 vcc1-supply = <&vccsys>;
304 vcc2-supply = <&vccsys>;
305 vcc3-supply = <&vccsys>;
306 vcc4-supply = <&vccsys>;
307 vcc5-supply = <&vccsys>;
308 vcc6-supply = <&vccsys>;
309 vcc7-supply = <&vccsys>;
311 pinctrl_rk8xx: pinctrl_rk8xx {
315 rk817_ts_gpio1: rk817_ts_gpio1 {
317 function = "pin_fun1";
322 rk817_gt_gpio2: rk817_gt_gpio2 {
324 function = "pin_fun1";
327 rk817_pin_ts: rk817_pin_ts {
329 function = "pin_fun0";
332 rk817_pin_gt: rk817_pin_gt {
334 function = "pin_fun0";
337 rk817_slppin_null: rk817_slppin_null {
339 function = "pin_fun0";
342 rk817_slppin_slp: rk817_slppin_slp {
344 function = "pin_fun1";
347 rk817_slppin_pwrdn: rk817_slppin_pwrdn {
349 function = "pin_fun2";
352 rk817_slppin_rst: rk817_slppin_rst {
354 function = "pin_fun3";
359 vdd_logic: DCDC_REG1 {
360 regulator-name = "vdd_logic";
361 regulator-min-microvolt = <950000>;
362 regulator-max-microvolt = <1150000>;
363 regulator-ramp-delay = <6001>;
367 regulator-state-mem {
368 regulator-on-in-suspend;
369 regulator-suspend-microvolt = <950000>;
374 regulator-name = "vdd_arm";
375 regulator-min-microvolt = <950000>;
376 regulator-max-microvolt = <1350000>;
377 regulator-ramp-delay = <6001>;
381 regulator-state-mem {
382 regulator-off-in-suspend;
383 regulator-suspend-microvolt = <950000>;
388 regulator-name = "vcc_ddr";
392 regulator-state-mem {
393 regulator-on-in-suspend;
398 regulator-name = "vcc_3v3";
399 regulator-min-microvolt = <3300000>;
400 regulator-max-microvolt = <3300000>;
404 regulator-state-mem {
405 regulator-off-in-suspend;
406 regulator-suspend-microvolt = <3300000>;
411 regulator-name = "vcc_1v8";
412 regulator-min-microvolt = <1800000>;
413 regulator-max-microvolt = <1800000>;
417 regulator-state-mem {
418 regulator-on-in-suspend;
419 regulator-suspend-microvolt = <1800000>;
424 regulator-name = "vdd_1v0";
425 regulator-min-microvolt = <1000000>;
426 regulator-max-microvolt = <1000000>;
430 regulator-state-mem {
431 regulator-on-in-suspend;
432 regulator-suspend-microvolt = <1000000>;
436 vcc3v3_pmu: LDO_REG4 {
437 regulator-name = "vcc3v3_pmu";
438 regulator-min-microvolt = <3300000>;
439 regulator-max-microvolt = <3300000>;
443 regulator-state-mem {
444 regulator-on-in-suspend;
445 regulator-suspend-microvolt = <3300000>;
450 regulator-name = "vccio_sd";
451 regulator-min-microvolt = <1800000>;
452 regulator-max-microvolt = <3300000>;
456 regulator-state-mem {
457 regulator-on-in-suspend;
458 regulator-suspend-microvolt = <3300000>;
463 regulator-name = "vcc_sd";
464 regulator-min-microvolt = <3300000>;
465 regulator-max-microvolt = <3300000>;
468 regulator-state-mem {
469 regulator-on-in-suspend;
470 regulator-suspend-microvolt = <3300000>;
475 regulator-name = "vcc_bl";
476 regulator-min-microvolt = <3300000>;
477 regulator-max-microvolt = <3300000>;
479 regulator-state-mem {
480 regulator-off-in-suspend;
481 regulator-suspend-microvolt = <3300000>;
486 regulator-name = "vcc_lcd";
487 regulator-min-microvolt = <2800000>;
488 regulator-max-microvolt = <2800000>;
490 regulator-state-mem {
491 regulator-off-in-suspend;
492 regulator-suspend-microvolt = <2800000>;
497 regulator-name = "vcc_cam";
498 regulator-min-microvolt = <3000000>;
499 regulator-max-microvolt = <3000000>;
501 regulator-state-mem {
502 regulator-off-in-suspend;
503 regulator-suspend-microvolt = <3000000>;
509 compatible = "rk817,battery";
510 ocv_table = <3500 3625 3685 3697 3718 3735 3748
511 3760 3774 3788 3802 3816 3834 3853
512 3877 3908 3946 3975 4018 4071 4106>;
514 /* KPL605475 Battery Spec */
516 Capacity : 3.7V 3000mA
517 Normal Voltage = 3.7V
518 Cut-Off Voltage : 3.1V
519 Internal Impedance : 180 mOhm
520 Charging Voltage : 4.2V
521 Charging Voltage Max : 4.25V
522 Sample resister : 10 mohm
524 design_capacity = <3000>;
525 design_qmax = <3000>;
527 sleep_enter_current = <300>;
528 sleep_exit_current = <300>;
529 sleep_filter_current = <100>;
530 power_off_thresd = <3500>;
531 zero_algorithm_vol = <3700>;
532 max_soc_offset = <60>;
539 compatible = "rk817,charger";
540 min_input_voltage = <4500>;
541 max_input_current = <1500>;
542 max_chrg_current = <2000>;
543 max_chrg_voltage = <4200>;
544 chrg_term_mode = <0>;
545 chrg_finish_cur = <300>;
549 /* P.C.B rev0.2 DC Detect & Charger Status LED GPIO */
550 dc_det_gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
551 chg_led_gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
557 #sound-dai-cells = <0>;
558 compatible = "rockchip,rk817-codec";
559 clocks = <&cru SCLK_I2S1_OUT>;
560 clock-names = "mclk";
561 pinctrl-names = "default";
562 pinctrl-0 = <&i2s1_2ch_mclk>;
570 /* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */
572 clock-frequency = <400000>;
576 /* I2S 1 Channel Used */
582 vccio1-supply = <&vcc_3v3>;
583 vccio2-supply = <&vccio_sd>;
584 vccio3-supply = <&vcc_3v3>;
585 vccio4-supply = <&vcc_3v3>;
586 vccio5-supply = <&vcc_3v3>;
587 vccio6-supply = <&vcc_3v3>;
592 pmuio1-supply = <&vcc3v3_pmu>;
593 pmuio2-supply = <&vcc3v3_pmu>;
602 vref-supply = <&vcc_1v8>;
609 card-detect-delay = <200>;
610 cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/
615 vmmc-supply = <&vcc_sd>;
616 vqmmc-supply = <&vccio_sd>;
627 u2phy_host: host-port {
631 u2phy_otg: otg-port {
640 /* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */
642 pinctrl-names = "default";
643 pinctrl-0 = <&uart1_xfer &uart1_cts>;
648 pinctrl-names = "default";
649 pinctrl-0 = <&uart2m1_xfer>;
664 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
665 <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
666 <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
667 <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
668 <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
669 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
670 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
671 <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
672 <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
673 <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
674 <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
675 <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
676 <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
677 <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
678 <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
679 <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
685 rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
690 blue_led_pin: blue-led-pin {
691 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
697 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
701 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
704 soc_slppin_gpio: soc_slppin_gpio {
705 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
708 soc_slppin_rst: soc_slppin_rst {
709 rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
712 soc_slppin_slp: soc_slppin_slp {
713 rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;