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";
22 stdout-path = "serial2:115200n8";
26 compatible = "adc-joystick";
27 io-channels = <&saradc 1>,
36 abs-range = <172 772>;
44 abs-range = <278 815>;
49 backlight: backlight {
50 compatible = "pwm-backlight";
51 power-supply = <&vcc_bl>;
52 pwms = <&pwm1 0 25000 0>;
56 compatible = "simple-battery";
57 charge-full-design-microamp-hours = <3000000>;
58 charge-term-current-microamp = <300000>;
59 constant-charge-current-max-microamp = <2000000>;
60 constant-charge-voltage-max-microvolt = <4200000>;
61 factory-internal-resistance-micro-ohms = <180000>;
62 voltage-max-design-microvolt = <4100000>;
63 voltage-min-design-microvolt = <3500000>;
65 ocv-capacity-celsius = <20>;
66 ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>,
67 <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>,
68 <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>,
69 <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>,
70 <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>,
75 compatible = "gpio-keys";
76 pinctrl-names = "default";
77 pinctrl-0 = <&btn_pins>;
80 * *** ODROIDGO2-Advance Switch layout ***
81 * |------------------------------------------------|
83 * |------------------------------------------------|
84 * | sw1 |-------------------| sw8 |
85 * | sw3 sw4 | | sw7 sw5 |
86 * | sw2 | LCD Display | sw6 |
88 * | |-------------------| |
89 * | sw9 sw10 sw11 sw12 sw13 sw14 |
90 * |------------------------------------------------|
94 gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
96 linux,code = <BTN_DPAD_UP>;
99 gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
101 linux,code = <BTN_DPAD_DOWN>;
104 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
106 linux,code = <BTN_DPAD_LEFT>;
109 gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
110 label = "DPAD-RIGHT";
111 linux,code = <BTN_DPAD_RIGHT>;
114 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
116 linux,code = <BTN_EAST>;
119 gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
121 linux,code = <BTN_SOUTH>;
124 gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
126 linux,code = <BTN_WEST>;
129 gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
131 linux,code = <BTN_NORTH>;
134 gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
136 linux,code = <BTN_TRIGGER_HAPPY1>;
139 gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
141 linux,code = <BTN_TRIGGER_HAPPY2>;
144 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
146 linux,code = <BTN_TRIGGER_HAPPY3>;
149 gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
151 linux,code = <BTN_TRIGGER_HAPPY4>;
154 gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
156 linux,code = <BTN_TRIGGER_HAPPY5>;
159 gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
161 linux,code = <BTN_TRIGGER_HAPPY6>;
164 gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
166 linux,code = <BTN_TL>;
169 gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
171 linux,code = <BTN_TR>;
176 compatible = "gpio-leds";
177 pinctrl-names = "default";
178 pinctrl-0 = <&blue_led_pin>;
181 label = "blue:heartbeat";
182 gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
183 linux,default-trigger = "heartbeat";
188 compatible = "simple-audio-card";
189 simple-audio-card,name = "Analog";
190 simple-audio-card,format = "i2s";
191 simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
192 simple-audio-card,mclk-fs = <256>;
193 simple-audio-card,widgets =
194 "Microphone", "Mic Jack",
195 "Headphone", "Headphones",
196 "Speaker", "Speaker";
197 simple-audio-card,routing =
199 "Headphones", "HPOL",
200 "Headphones", "HPOR",
203 simple-audio-card,codec {
204 sound-dai = <&rk817>;
207 simple-audio-card,cpu {
208 sound-dai = <&i2s1_2ch>;
213 compatible = "regulator-fixed";
214 regulator-name = "vcc3v8_sys";
216 regulator-min-microvolt = <3800000>;
217 regulator-max-microvolt = <3800000>;
221 compatible = "regulator-fixed";
222 regulator-name = "vcc_host";
223 regulator-min-microvolt = <5000000>;
224 regulator-max-microvolt = <5000000>;
226 gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
230 vin-supply = <&usb_midu>;
235 cpu-supply = <&vdd_arm>;
239 cpu-supply = <&vdd_arm>;
243 cpu-supply = <&vdd_arm>;
247 cpu-supply = <&vdd_arm>;
251 assigned-clocks = <&cru PLL_NPLL>,
252 <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
253 <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
254 <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>,
257 assigned-clock-rates = <1188000000>,
258 <200000000>, <200000000>,
259 <150000000>, <150000000>,
260 <100000000>, <200000000>,
275 mipi_out_panel: endpoint {
276 remote-endpoint = <&mipi_in_panel>;
282 compatible = "elida,kd35t133";
284 backlight = <&backlight>;
285 iovcc-supply = <&vcc_lcd>;
286 reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
288 vdd-supply = <&vcc_lcd>;
291 mipi_in_panel: endpoint {
292 remote-endpoint = <&mipi_out_panel>;
303 mali-supply = <&vdd_logic>;
308 clock-frequency = <400000>;
309 i2c-scl-falling-time-ns = <16>;
310 i2c-scl-rising-time-ns = <280>;
314 compatible = "rockchip,rk817";
316 interrupt-parent = <&gpio0>;
317 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
318 clock-output-names = "rk808-clkout1", "xin32k";
319 clock-names = "mclk";
320 clocks = <&cru SCLK_I2S1_OUT>;
321 pinctrl-names = "default";
322 pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;
325 #sound-dai-cells = <0>;
327 vcc1-supply = <&vccsys>;
328 vcc2-supply = <&vccsys>;
329 vcc3-supply = <&vccsys>;
330 vcc4-supply = <&vccsys>;
331 vcc5-supply = <&vccsys>;
332 vcc6-supply = <&vccsys>;
333 vcc7-supply = <&vccsys>;
334 vcc8-supply = <&vccsys>;
337 vdd_logic: DCDC_REG1 {
338 regulator-name = "vdd_logic";
339 regulator-min-microvolt = <950000>;
340 regulator-max-microvolt = <1150000>;
341 regulator-ramp-delay = <6001>;
345 regulator-state-mem {
346 regulator-on-in-suspend;
347 regulator-suspend-microvolt = <950000>;
352 regulator-name = "vdd_arm";
353 regulator-min-microvolt = <950000>;
354 regulator-max-microvolt = <1350000>;
355 regulator-ramp-delay = <6001>;
359 regulator-state-mem {
360 regulator-off-in-suspend;
361 regulator-suspend-microvolt = <950000>;
366 regulator-name = "vcc_ddr";
370 regulator-state-mem {
371 regulator-on-in-suspend;
376 regulator-name = "vcc_3v3";
377 regulator-min-microvolt = <3300000>;
378 regulator-max-microvolt = <3300000>;
382 regulator-state-mem {
383 regulator-off-in-suspend;
384 regulator-suspend-microvolt = <3300000>;
389 regulator-name = "vcc_1v8";
390 regulator-min-microvolt = <1800000>;
391 regulator-max-microvolt = <1800000>;
395 regulator-state-mem {
396 regulator-on-in-suspend;
397 regulator-suspend-microvolt = <1800000>;
402 regulator-name = "vdd_1v0";
403 regulator-min-microvolt = <1000000>;
404 regulator-max-microvolt = <1000000>;
408 regulator-state-mem {
409 regulator-on-in-suspend;
410 regulator-suspend-microvolt = <1000000>;
414 vcc3v3_pmu: LDO_REG4 {
415 regulator-name = "vcc3v3_pmu";
416 regulator-min-microvolt = <3300000>;
417 regulator-max-microvolt = <3300000>;
421 regulator-state-mem {
422 regulator-on-in-suspend;
423 regulator-suspend-microvolt = <3300000>;
428 regulator-name = "vccio_sd";
429 regulator-min-microvolt = <1800000>;
430 regulator-max-microvolt = <3300000>;
434 regulator-state-mem {
435 regulator-on-in-suspend;
436 regulator-suspend-microvolt = <3300000>;
441 regulator-name = "vcc_sd";
442 regulator-min-microvolt = <3300000>;
443 regulator-max-microvolt = <3300000>;
446 regulator-state-mem {
447 regulator-on-in-suspend;
448 regulator-suspend-microvolt = <3300000>;
453 regulator-name = "vcc_bl";
454 regulator-min-microvolt = <3300000>;
455 regulator-max-microvolt = <3300000>;
457 regulator-state-mem {
458 regulator-off-in-suspend;
459 regulator-suspend-microvolt = <3300000>;
464 regulator-name = "vcc_lcd";
465 regulator-min-microvolt = <2800000>;
466 regulator-max-microvolt = <2800000>;
468 regulator-state-mem {
469 regulator-off-in-suspend;
470 regulator-suspend-microvolt = <2800000>;
475 regulator-name = "vcc_cam";
476 regulator-min-microvolt = <3000000>;
477 regulator-max-microvolt = <3000000>;
479 regulator-state-mem {
480 regulator-off-in-suspend;
481 regulator-suspend-microvolt = <3000000>;
486 regulator-name = "usb_midu";
487 regulator-min-microvolt = <5000000>;
488 regulator-max-microvolt = <5400000>;
494 rk817_charger: charger {
495 monitored-battery = <&battery>;
496 rockchip,resistor-sense-micro-ohms = <10000>;
497 rockchip,sleep-enter-current-microamp = <300000>;
498 rockchip,sleep-filter-current-microamp = <100000>;
502 rockchip,mic-in-differential;
507 /* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */
509 clock-frequency = <400000>;
513 /* I2S 1 Channel Used */
519 vccio1-supply = <&vcc_3v3>;
520 vccio2-supply = <&vccio_sd>;
521 vccio3-supply = <&vcc_3v3>;
522 vccio4-supply = <&vcc_3v3>;
523 vccio5-supply = <&vcc_3v3>;
524 vccio6-supply = <&vcc_3v3>;
529 pmuio1-supply = <&vcc3v3_pmu>;
530 pmuio2-supply = <&vcc3v3_pmu>;
539 vref-supply = <&vcc_1v8>;
545 card-detect-delay = <200>;
546 cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/
551 vmmc-supply = <&vcc_sd>;
552 vqmmc-supply = <&vccio_sd>;
557 pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>;
558 pinctrl-names = "default";
559 #address-cells = <1>;
564 compatible = "jedec,spi-nor";
566 spi-max-frequency = <108000000>;
567 spi-rx-bus-width = <2>;
568 spi-tx-bus-width = <1>;
579 u2phy_host: host-port {
583 u2phy_otg: otg-port {
592 /* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */
594 pinctrl-names = "default";
595 pinctrl-0 = <&uart1_xfer &uart1_cts>;
600 pinctrl-names = "default";
601 pinctrl-0 = <&uart2m1_xfer>;
616 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
617 <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
618 <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
619 <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
620 <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
621 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
622 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
623 <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
624 <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
625 <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
626 <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
627 <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
628 <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
629 <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
630 <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
631 <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
637 rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
642 blue_led_pin: blue-led-pin {
643 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
649 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
653 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
656 soc_slppin_gpio: soc_slppin_gpio {
657 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
660 soc_slppin_rst: soc_slppin_rst {
661 rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
664 soc_slppin_slp: soc_slppin_slp {
665 rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;