1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2022 Neil Armstrong <neil.armstrong@linaro.org>
8 #include "meson-g12b-s922x.dtsi"
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/gpio/meson-g12a-gpio.h>
12 #include <dt-bindings/sound/meson-g12a-toacodec.h>
13 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
16 compatible = "hardkernel,odroid-go-ultra", "amlogic,s922x", "amlogic,g12b";
17 model = "Hardkernel ODROID-GO-Ultra";
25 compatible = "adc-joystick";
26 io-channels = <&saradc 2>, <&saradc 3>;
34 abs-range = <3150 950>;
41 abs-range = <700 2900>;
48 compatible = "adc-joystick";
49 io-channels = <&saradc 0>, <&saradc 1>;
56 linux,code = <ABS_RY>;
57 abs-range = <3150 950>;
63 linux,code = <ABS_RX>;
64 abs-range = <800 3000>;
71 stdout-path = "serial0:115200n8";
74 codec_clk: codec-clk {
75 compatible = "fixed-clock";
76 clock-frequency = <12288000>;
77 clock-output-names = "codec_clk";
82 compatible = "gpio-keys-polled";
84 pinctrl-0 = <&keypad_gpio_pins>;
85 pinctrl-names = "default";
89 linux,code = <KEY_VOLUMEUP>;
90 gpios = <&gpio GPIOX_8 GPIO_ACTIVE_LOW>;
93 label = "VOLUME-DOWN";
94 linux,code = <KEY_VOLUMEDOWN>;
95 gpios = <&gpio GPIOX_9 GPIO_ACTIVE_LOW>;
99 linux,code = <BTN_DPAD_UP>;
100 gpios = <&gpio GPIOX_0 GPIO_ACTIVE_LOW>;
104 linux,code = <BTN_DPAD_DOWN>;
105 gpios = <&gpio GPIOX_1 GPIO_ACTIVE_LOW>;
109 linux,code = <BTN_DPAD_LEFT>;
110 gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>;
113 label = "DPAD-RIGHT";
114 linux,code = <BTN_DPAD_RIGHT>;
115 gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
119 linux,code = <BTN_EAST>;
120 gpios = <&gpio GPIOX_4 GPIO_ACTIVE_LOW>;
124 linux,code = <BTN_SOUTH>;
125 gpios = <&gpio GPIOX_5 GPIO_ACTIVE_LOW>;
129 linux,code = <BTN_WEST>;
130 gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
134 linux,code = <BTN_NORTH>;
135 gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
139 linux,code = <BTN_TRIGGER_HAPPY1>;
140 gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>;
144 linux,code = <BTN_TRIGGER_HAPPY2>;
145 gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
149 linux,code = <BTN_TRIGGER_HAPPY3>;
150 gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>;
154 linux,code = <BTN_TRIGGER_HAPPY4>;
155 gpios = <&gpio GPIOX_12 GPIO_ACTIVE_LOW>;
159 linux,code = <BTN_TRIGGER_HAPPY5>;
160 gpios = <&gpio GPIOX_13 GPIO_ACTIVE_LOW>;
164 linux,code = <BTN_TRIGGER_HAPPY6>;
165 gpios = <&gpio GPIOX_16 GPIO_ACTIVE_LOW>;
169 linux,code = <BTN_TL>;
170 gpios = <&gpio GPIOX_14 GPIO_ACTIVE_LOW>;
173 label = "TOP Left 2";
174 linux,code = <BTN_TL2>;
175 gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>;
179 linux,code = <BTN_TR>;
180 gpios = <&gpio GPIOX_15 GPIO_ACTIVE_LOW>;
183 label = "TOP Right 2";
184 linux,code = <BTN_TR2>;
185 gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>;
190 device_type = "memory";
191 reg = <0x0 0x0 0x0 0x40000000>;
194 emmc_pwrseq: emmc-pwrseq {
195 compatible = "mmc-pwrseq-emmc";
196 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
200 compatible = "gpio-leds";
203 color = <LED_COLOR_ID_BLUE>;
204 gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
205 linux,default-trigger = "heartbeat";
209 vdd_sys: regulator-vdd-sys {
210 compatible = "regulator-fixed";
211 regulator-name = "VDD_SYS";
212 regulator-min-microvolt = <3800000>;
213 regulator-max-microvolt = <3800000>;
218 compatible = "amlogic,axg-sound-card";
219 model = "Odroid GO Ultra";
220 audio-widgets = "Microphone", "Mic Jack",
221 "Headphone", "Headphones",
222 "Speaker", "Internal Speakers";
223 audio-aux-devs = <&tdmout_b>, <&tdmin_b>, <&speaker_amp>;
224 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
225 "TDM_B Playback", "TDMOUT_B OUT",
226 "TDMIN_B IN 1", "TDM_B Capture",
227 "TDMIN_B IN 4", "TDM_B Loopback",
228 "TODDR_A IN 1", "TDMIN_B OUT",
230 "Headphones", "HPOL",
231 "Headphones", "HPOR",
232 "Speaker Amplifier INL", "HPOL",
233 "Speaker Amplifier INR", "HPOR",
234 "Internal Speakers", "Speaker Amplifier OUTL",
235 "Internal Speakers", "Speaker Amplifier OUTR";
237 assigned-clocks = <&clkc CLKID_MPLL2>,
240 assigned-clock-parents = <0>, <0>, <0>;
241 assigned-clock-rates = <294912000>,
246 sound-dai = <&frddr_a>;
250 sound-dai = <&toddr_a>;
254 sound-dai = <&tdmif_b>;
256 dai-tdm-slot-tx-mask-0 = <1 1>;
260 sound-dai = <&rk817>;
265 speaker_amp: speaker-amplifier {
266 compatible = "simple-audio-amplifier";
267 sound-name-prefix = "Speaker Amplifier";
268 VCC-supply = <&hp_5v>;
277 cpu-supply = <&vddcpu_b>;
278 operating-points-v2 = <&cpu_opp_table_0>;
279 clocks = <&clkc CLKID_CPU_CLK>;
280 clock-latency = <50000>;
284 cpu-supply = <&vddcpu_b>;
285 operating-points-v2 = <&cpu_opp_table_0>;
286 clocks = <&clkc CLKID_CPU_CLK>;
287 clock-latency = <50000>;
291 cpu-supply = <&vddcpu_a>;
292 operating-points-v2 = <&cpub_opp_table_1>;
293 clocks = <&clkc CLKID_CPUB_CLK>;
294 clock-latency = <50000>;
298 cpu-supply = <&vddcpu_a>;
299 operating-points-v2 = <&cpub_opp_table_1>;
300 clocks = <&clkc CLKID_CPUB_CLK>;
301 clock-latency = <50000>;
305 cpu-supply = <&vddcpu_a>;
306 operating-points-v2 = <&cpub_opp_table_1>;
307 clocks = <&clkc CLKID_CPUB_CLK>;
308 clock-latency = <50000>;
312 cpu-supply = <&vddcpu_a>;
313 operating-points-v2 = <&cpub_opp_table_1>;
314 clocks = <&clkc CLKID_CPUB_CLK>;
315 clock-latency = <50000>;
318 /* RK817 only supports 12.5mV steps, round up the values */
321 opp-microvolt = <737500>;
324 opp-microvolt = <737500>;
327 opp-microvolt = <762500>;
330 opp-microvolt = <800000>;
333 opp-microvolt = <837500>;
336 opp-microvolt = <862500>;
339 opp-microvolt = <987500>;
342 opp-microvolt = <1012500>;
346 /* RK818 only supports 12.5mV steps, round up the values */
349 opp-microvolt = <775000>;
352 opp-microvolt = <775000>;
355 opp-microvolt = <800000>;
358 opp-microvolt = <825000>;
361 opp-microvolt = <862500>;
364 opp-microvolt = <900000>;
367 opp-microvolt = <987500>;
370 opp-microvolt = <1025000>;
376 pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
377 pinctrl-names = "default";
380 compatible = "rockchip,rk818";
382 interrupt-parent = <&gpio_intc>;
383 interrupts = <IRQID_GPIOAO_7 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_7 */
386 vcc1-supply = <&vdd_sys>;
387 vcc2-supply = <&vdd_sys>;
388 vcc3-supply = <&vdd_sys>;
389 vcc4-supply = <&vdd_sys>;
390 vcc6-supply = <&vdd_sys>;
391 vcc7-supply = <&vcc_2v3>;
392 vcc8-supply = <&vcc_2v3>;
393 vcc9-supply = <&vddao_3v3>;
394 boost-supply = <&vdd_sys>;
397 vddcpu_a: DCDC_REG1 {
398 regulator-name = "vddcpu_a";
401 regulator-min-microvolt = <775000>;
402 regulator-max-microvolt = <1025000>;
403 regulator-ramp-delay = <6001>;
404 regulator-state-mem {
405 regulator-on-in-suspend;
406 regulator-suspend-microvolt = <775000>;
411 regulator-name = "vdd_ee";
414 regulator-min-microvolt = <875000>;
415 regulator-max-microvolt = <1250000>;
416 regulator-ramp-delay = <6001>;
417 regulator-state-mem {
418 regulator-on-in-suspend;
419 regulator-suspend-microvolt = <875000>;
423 vddq_1v1: DCDC_REG3 {
424 regulator-name = "vddq_1v1";
427 regulator-state-mem {
428 regulator-on-in-suspend;
432 vddao_3v3: DCDC_REG4 {
435 regulator-min-microvolt = <3300000>;
436 regulator-max-microvolt = <3300000>;
437 regulator-name = "vddao_3v3";
438 regulator-state-mem {
439 regulator-on-in-suspend;
440 regulator-suspend-microvolt = <3300000>;
447 regulator-name = "hp_5v";
448 regulator-min-microvolt = <5000000>;
449 regulator-max-microvolt = <5000000>;
450 regulator-state-mem {
451 regulator-off-in-suspend;
455 vddio_ao1v8: LDO_REG5 {
458 regulator-min-microvolt = <1800000>;
459 regulator-max-microvolt = <1800000>;
460 regulator-name = "vddio_ao1v8";
461 regulator-state-mem {
462 regulator-on-in-suspend;
463 regulator-suspend-microvolt = <1800000>;
470 regulator-min-microvolt = <1800000>;
471 regulator-max-microvolt = <1800000>;
472 regulator-name = "vddq_1v8";
473 regulator-state-mem {
474 regulator-on-in-suspend;
475 regulator-suspend-microvolt = <1800000>;
482 regulator-min-microvolt = <1800000>;
483 regulator-max-microvolt = <3300000>;
484 regulator-name = "vddio_c";
485 regulator-state-mem {
486 regulator-on-in-suspend;
487 regulator-suspend-microvolt = <3300000>;
492 regulator-name = "vcc_sd";
495 regulator-min-microvolt = <3300000>;
496 regulator-max-microvolt = <3300000>;
497 regulator-state-mem {
498 regulator-on-in-suspend;
503 regulator-name = "otg_switch";
504 regulator-state-mem {
505 regulator-off-in-suspend;
514 pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
515 pinctrl-names = "default";
518 compatible = "rockchip,rk817";
520 interrupt-parent = <&gpio_intc>;
522 interrupts = <IRQID_GPIOAO_5 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_5 */
524 vcc1-supply = <&vdd_sys>;
525 vcc2-supply = <&vdd_sys>;
526 vcc3-supply = <&vdd_sys>;
527 vcc4-supply = <&vdd_sys>;
528 vcc5-supply = <&vdd_sys>;
529 vcc6-supply = <&vdd_sys>;
530 vcc7-supply = <&vdd_sys>;
531 vcc8-supply = <&vdd_sys>;
532 vcc9-supply = <&rk817_boost>;
534 #sound-dai-cells = <0>;
535 clocks = <&codec_clk>;
536 clock-names = "mclk";
541 vddcpu_b: DCDC_REG2 {
544 regulator-min-microvolt = <737500>;
545 regulator-max-microvolt = <1012500>;
546 regulator-ramp-delay = <6001>;
547 regulator-initial-mode = <0x2>;
548 regulator-name = "vddcpu_b";
549 regulator-state-mem {
550 regulator-on-in-suspend;
551 regulator-suspend-microvolt = <1000000>;
558 regulator-min-microvolt = <2300000>;
559 regulator-max-microvolt = <2400000>;
560 regulator-initial-mode = <0x2>;
561 regulator-name = "vcc_2v3";
562 regulator-state-mem {
563 regulator-on-in-suspend;
570 regulator-min-microvolt = <3300000>;
571 regulator-max-microvolt = <3300000>;
572 regulator-name = "vdd_codec";
573 regulator-state-mem {
574 regulator-off-in-suspend;
579 regulator-min-microvolt = <3300000>;
580 regulator-max-microvolt = <3300000>;
581 regulator-name = "vcc_lcd";
582 regulator-state-mem {
583 regulator-off-in-suspend;
590 regulator-min-microvolt = <5000000>;
591 regulator-max-microvolt = <5400000>;
592 regulator-name = "rk817_boost";
593 regulator-state-mem {
594 regulator-off-in-suspend;
598 usb_host: OTG_SWITCH {
599 regulator-name = "usb_host";
600 regulator-min-microvolt = <5000000>;
601 regulator-max-microvolt = <5000000>;
602 regulator-state-mem {
603 regulator-off-in-suspend;
623 keypad_gpio_pins: keypad-gpio-state {
625 groups = "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3",
626 "GPIOX_4", "GPIOX_5", "GPIOX_6", "GPIOX_7",
627 "GPIOX_8", "GPIOX_9", "GPIOX_10", "GPIOX_11",
628 "GPIOX_12", "GPIOX_13", "GPIOX_14", "GPIOX_15",
629 "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19";
630 function = "gpio_periphs";
639 vref-supply = <&vddio_ao1v8>;
645 pinctrl-0 = <&sdcard_c_pins>;
646 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
647 pinctrl-names = "default", "clk-gate";
651 max-frequency = <50000000>;
654 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
655 vmmc-supply = <&vcc_sd>;
656 vqmmc-supply = <&vddio_c>;
663 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
664 pinctrl-1 = <&emmc_clk_gate_pins>;
665 pinctrl-names = "default", "clk-gate";
671 max-frequency = <200000000>;
674 mmc-pwrseq = <&emmc_pwrseq>;
675 vmmc-supply = <&vcc_sd>;
676 vqmmc-supply = <&vddio_ao1v8>;
681 pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>, <&tdm_b_din1_pins>;
682 pinctrl-names = "default";
685 assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
686 <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
687 assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>,
688 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
689 assigned-clock-rates = <0>, <0>;
706 pinctrl-0 = <&uart_ao_a_pins>;
707 pinctrl-names = "default";
712 dr_mode = "peripheral";
721 phy-supply = <&usb_host>;