xref: /linux/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts (revision ce9999722656f2433af9029571bc2b99448dda74)
162e73f00SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
262e73f00SNeil Armstrong/*
362e73f00SNeil Armstrong * Copyright (c) 2022 Neil Armstrong <neil.armstrong@linaro.org>
462e73f00SNeil Armstrong */
562e73f00SNeil Armstrong
662e73f00SNeil Armstrong/dts-v1/;
762e73f00SNeil Armstrong
862e73f00SNeil Armstrong#include "meson-g12b-s922x.dtsi"
962e73f00SNeil Armstrong#include <dt-bindings/input/input.h>
1062e73f00SNeil Armstrong#include <dt-bindings/leds/common.h>
1162e73f00SNeil Armstrong#include <dt-bindings/gpio/meson-g12a-gpio.h>
1262e73f00SNeil Armstrong#include <dt-bindings/sound/meson-g12a-toacodec.h>
1362e73f00SNeil Armstrong#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
1462e73f00SNeil Armstrong
1562e73f00SNeil Armstrong/ {
1662e73f00SNeil Armstrong	compatible = "hardkernel,odroid-go-ultra", "amlogic,s922x", "amlogic,g12b";
1762e73f00SNeil Armstrong	model = "Hardkernel ODROID-GO-Ultra";
1862e73f00SNeil Armstrong
1962e73f00SNeil Armstrong	aliases {
2062e73f00SNeil Armstrong		serial0 = &uart_AO;
2162e73f00SNeil Armstrong		rtc0 = &vrtc;
2262e73f00SNeil Armstrong	};
2362e73f00SNeil Armstrong
2462e73f00SNeil Armstrong	adc-joystick-left {
2562e73f00SNeil Armstrong		compatible = "adc-joystick";
2662e73f00SNeil Armstrong		io-channels = <&saradc 2>, <&saradc 3>;
2762e73f00SNeil Armstrong		poll-interval = <10>;
2862e73f00SNeil Armstrong		#address-cells = <1>;
2962e73f00SNeil Armstrong		#size-cells = <0>;
3062e73f00SNeil Armstrong
3162e73f00SNeil Armstrong		axis@0 {
3262e73f00SNeil Armstrong			reg = <0>;
3362e73f00SNeil Armstrong			linux,code = <ABS_Y>;
3462e73f00SNeil Armstrong			abs-range = <3150 950>;
3562e73f00SNeil Armstrong			abs-fuzz = <32>;
3662e73f00SNeil Armstrong			abs-flat = <64>;
3762e73f00SNeil Armstrong		};
3862e73f00SNeil Armstrong		axis@1 {
3962e73f00SNeil Armstrong			reg = <1>;
4062e73f00SNeil Armstrong			linux,code = <ABS_X>;
4162e73f00SNeil Armstrong			abs-range = <700 2900>;
4262e73f00SNeil Armstrong			abs-fuzz = <32>;
4362e73f00SNeil Armstrong			abs-flat = <64>;
4462e73f00SNeil Armstrong		};
4562e73f00SNeil Armstrong	};
4662e73f00SNeil Armstrong
4762e73f00SNeil Armstrong	adc-joystick-right {
4862e73f00SNeil Armstrong		compatible = "adc-joystick";
4962e73f00SNeil Armstrong		io-channels = <&saradc 0>, <&saradc 1>;
5062e73f00SNeil Armstrong		poll-interval = <10>;
5162e73f00SNeil Armstrong		#address-cells = <1>;
5262e73f00SNeil Armstrong		#size-cells = <0>;
5362e73f00SNeil Armstrong
5462e73f00SNeil Armstrong		axis@0 {
5562e73f00SNeil Armstrong			reg = <0>;
5662e73f00SNeil Armstrong			linux,code = <ABS_RY>;
5762e73f00SNeil Armstrong			abs-range = <3150 950>;
5862e73f00SNeil Armstrong			abs-fuzz = <32>;
5962e73f00SNeil Armstrong			abs-flat = <64>;
6062e73f00SNeil Armstrong		};
6162e73f00SNeil Armstrong		axis@1 {
6262e73f00SNeil Armstrong			reg = <1>;
6362e73f00SNeil Armstrong			linux,code = <ABS_RX>;
6462e73f00SNeil Armstrong			abs-range = <800 3000>;
6562e73f00SNeil Armstrong			abs-fuzz = <32>;
6662e73f00SNeil Armstrong			abs-flat = <64>;
6762e73f00SNeil Armstrong		};
6862e73f00SNeil Armstrong	};
6962e73f00SNeil Armstrong
7062e73f00SNeil Armstrong	chosen {
7162e73f00SNeil Armstrong		stdout-path = "serial0:115200n8";
7262e73f00SNeil Armstrong	};
7362e73f00SNeil Armstrong
7462e73f00SNeil Armstrong	codec_clk: codec-clk {
7562e73f00SNeil Armstrong		compatible = "fixed-clock";
7662e73f00SNeil Armstrong		clock-frequency = <12288000>;
7762e73f00SNeil Armstrong		clock-output-names = "codec_clk";
7862e73f00SNeil Armstrong		#clock-cells = <0>;
7962e73f00SNeil Armstrong	};
8062e73f00SNeil Armstrong
8162e73f00SNeil Armstrong	gpio-keys {
8262e73f00SNeil Armstrong		compatible = "gpio-keys-polled";
8362e73f00SNeil Armstrong		poll-interval = <10>;
8462e73f00SNeil Armstrong		pinctrl-0 = <&keypad_gpio_pins>;
8562e73f00SNeil Armstrong		pinctrl-names = "default";
8662e73f00SNeil Armstrong
8762e73f00SNeil Armstrong		volume-up-button {
8862e73f00SNeil Armstrong			label = "VOLUME-UP";
8962e73f00SNeil Armstrong			linux,code = <KEY_VOLUMEUP>;
9062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_8 GPIO_ACTIVE_LOW>;
9162e73f00SNeil Armstrong		};
9262e73f00SNeil Armstrong		volume-down-button {
9362e73f00SNeil Armstrong			label = "VOLUME-DOWN";
9462e73f00SNeil Armstrong			linux,code = <KEY_VOLUMEDOWN>;
9562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_9 GPIO_ACTIVE_LOW>;
9662e73f00SNeil Armstrong		};
9762e73f00SNeil Armstrong		dpad-up-button {
9862e73f00SNeil Armstrong			label = "DPAD-UP";
9962e73f00SNeil Armstrong			linux,code = <BTN_DPAD_UP>;
10062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_0 GPIO_ACTIVE_LOW>;
10162e73f00SNeil Armstrong		};
10262e73f00SNeil Armstrong		dpad-down-button {
10362e73f00SNeil Armstrong			label = "DPAD-DOWN";
10462e73f00SNeil Armstrong			linux,code = <BTN_DPAD_DOWN>;
10562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_1 GPIO_ACTIVE_LOW>;
10662e73f00SNeil Armstrong		};
10762e73f00SNeil Armstrong		dpad-left-button {
10862e73f00SNeil Armstrong			label = "DPAD-LEFT";
10962e73f00SNeil Armstrong			linux,code = <BTN_DPAD_LEFT>;
11062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>;
11162e73f00SNeil Armstrong		};
11262e73f00SNeil Armstrong		dpad-right-button {
11362e73f00SNeil Armstrong			label = "DPAD-RIGHT";
11462e73f00SNeil Armstrong			linux,code = <BTN_DPAD_RIGHT>;
11562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
11662e73f00SNeil Armstrong		};
11762e73f00SNeil Armstrong		a-button {
11862e73f00SNeil Armstrong			label = "A";
11962e73f00SNeil Armstrong			linux,code = <BTN_EAST>;
12062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_4 GPIO_ACTIVE_LOW>;
12162e73f00SNeil Armstrong		};
12262e73f00SNeil Armstrong		b-button {
12362e73f00SNeil Armstrong			label = "B";
12462e73f00SNeil Armstrong			linux,code = <BTN_SOUTH>;
12562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_5 GPIO_ACTIVE_LOW>;
12662e73f00SNeil Armstrong		};
12762e73f00SNeil Armstrong		y-button {
12862e73f00SNeil Armstrong			label = "Y";
12962e73f00SNeil Armstrong			linux,code = <BTN_WEST>;
13062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
13162e73f00SNeil Armstrong		};
13262e73f00SNeil Armstrong		x-button {
13362e73f00SNeil Armstrong			label = "X";
13462e73f00SNeil Armstrong			linux,code = <BTN_NORTH>;
13562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
13662e73f00SNeil Armstrong		};
13762e73f00SNeil Armstrong		f1-button {
13862e73f00SNeil Armstrong			label = "F1";
13962e73f00SNeil Armstrong			linux,code = <BTN_TRIGGER_HAPPY1>;
14062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>;
14162e73f00SNeil Armstrong		};
14262e73f00SNeil Armstrong		f2-button {
14362e73f00SNeil Armstrong			label = "F2";
14462e73f00SNeil Armstrong			linux,code = <BTN_TRIGGER_HAPPY2>;
14562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
14662e73f00SNeil Armstrong		};
14762e73f00SNeil Armstrong		f3-button {
14862e73f00SNeil Armstrong			label = "F3";
14962e73f00SNeil Armstrong			linux,code = <BTN_TRIGGER_HAPPY3>;
15062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>;
15162e73f00SNeil Armstrong		};
15262e73f00SNeil Armstrong		f4-button {
15362e73f00SNeil Armstrong			label = "F4";
15462e73f00SNeil Armstrong			linux,code = <BTN_TRIGGER_HAPPY4>;
15562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_12 GPIO_ACTIVE_LOW>;
15662e73f00SNeil Armstrong		};
15762e73f00SNeil Armstrong		f5-button {
15862e73f00SNeil Armstrong			label = "F5";
15962e73f00SNeil Armstrong			linux,code = <BTN_TRIGGER_HAPPY5>;
16062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_13 GPIO_ACTIVE_LOW>;
16162e73f00SNeil Armstrong		};
16262e73f00SNeil Armstrong		f6-button {
16362e73f00SNeil Armstrong			label = "F6";
16462e73f00SNeil Armstrong			linux,code = <BTN_TRIGGER_HAPPY6>;
16562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_16 GPIO_ACTIVE_LOW>;
16662e73f00SNeil Armstrong		};
16762e73f00SNeil Armstrong		top-left-button {
16862e73f00SNeil Armstrong			label = "TOP Left";
16962e73f00SNeil Armstrong			linux,code = <BTN_TL>;
17062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_14 GPIO_ACTIVE_LOW>;
17162e73f00SNeil Armstrong		};
17262e73f00SNeil Armstrong		top-left2-button {
17362e73f00SNeil Armstrong			label = "TOP Left 2";
17462e73f00SNeil Armstrong			linux,code = <BTN_TL2>;
17562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>;
17662e73f00SNeil Armstrong		};
17762e73f00SNeil Armstrong		top-right-button {
17862e73f00SNeil Armstrong			label = "TOP Right";
17962e73f00SNeil Armstrong			linux,code = <BTN_TR>;
18062e73f00SNeil Armstrong			gpios = <&gpio GPIOX_15 GPIO_ACTIVE_LOW>;
18162e73f00SNeil Armstrong		};
18262e73f00SNeil Armstrong		top-right2-button {
18362e73f00SNeil Armstrong			label = "TOP Right 2";
18462e73f00SNeil Armstrong			linux,code = <BTN_TR2>;
18562e73f00SNeil Armstrong			gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>;
18662e73f00SNeil Armstrong		};
18762e73f00SNeil Armstrong	};
18862e73f00SNeil Armstrong
18962e73f00SNeil Armstrong	memory@0 {
19062e73f00SNeil Armstrong		device_type = "memory";
19162e73f00SNeil Armstrong		reg = <0x0 0x0 0x0 0x40000000>;
19262e73f00SNeil Armstrong	};
19362e73f00SNeil Armstrong
19462e73f00SNeil Armstrong	emmc_pwrseq: emmc-pwrseq {
19562e73f00SNeil Armstrong		compatible = "mmc-pwrseq-emmc";
19662e73f00SNeil Armstrong		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
19762e73f00SNeil Armstrong	};
19862e73f00SNeil Armstrong
19962e73f00SNeil Armstrong	leds {
20062e73f00SNeil Armstrong		compatible = "gpio-leds";
20162e73f00SNeil Armstrong
20262e73f00SNeil Armstrong		led-blue {
20362e73f00SNeil Armstrong			color = <LED_COLOR_ID_BLUE>;
20462e73f00SNeil Armstrong			gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
20562e73f00SNeil Armstrong			linux,default-trigger = "heartbeat";
20662e73f00SNeil Armstrong		};
20762e73f00SNeil Armstrong	};
20862e73f00SNeil Armstrong
20962e73f00SNeil Armstrong	vdd_sys: regulator-vdd-sys {
21062e73f00SNeil Armstrong		compatible = "regulator-fixed";
21162e73f00SNeil Armstrong		regulator-name = "VDD_SYS";
21262e73f00SNeil Armstrong		regulator-min-microvolt = <3800000>;
21362e73f00SNeil Armstrong		regulator-max-microvolt = <3800000>;
21462e73f00SNeil Armstrong		regulator-always-on;
21562e73f00SNeil Armstrong	};
21662e73f00SNeil Armstrong
21762e73f00SNeil Armstrong	sound {
21862e73f00SNeil Armstrong		compatible = "amlogic,axg-sound-card";
21962e73f00SNeil Armstrong		model = "Odroid GO Ultra";
22062e73f00SNeil Armstrong		audio-widgets = "Microphone", "Mic Jack",
22162e73f00SNeil Armstrong				"Headphone", "Headphones",
22262e73f00SNeil Armstrong				"Speaker", "Internal Speakers";
22362e73f00SNeil Armstrong		audio-aux-devs = <&tdmout_b>, <&tdmin_b>, <&speaker_amp>;
22462e73f00SNeil Armstrong		audio-routing =	"TDMOUT_B IN 0", "FRDDR_A OUT 1",
22562e73f00SNeil Armstrong				"TDM_B Playback", "TDMOUT_B OUT",
22662e73f00SNeil Armstrong				"TDMIN_B IN 1", "TDM_B Capture",
22762e73f00SNeil Armstrong				"TDMIN_B IN 4", "TDM_B Loopback",
22862e73f00SNeil Armstrong				"TODDR_A IN 1", "TDMIN_B OUT",
22962e73f00SNeil Armstrong				"MICL", "Mic Jack",
23062e73f00SNeil Armstrong				"Headphones", "HPOL",
23162e73f00SNeil Armstrong				"Headphones", "HPOR",
23262e73f00SNeil Armstrong				"Speaker Amplifier INL", "HPOL",
23362e73f00SNeil Armstrong				"Speaker Amplifier INR", "HPOR",
23462e73f00SNeil Armstrong				"Internal Speakers", "Speaker Amplifier OUTL",
23562e73f00SNeil Armstrong				"Internal Speakers", "Speaker Amplifier OUTR";
23662e73f00SNeil Armstrong
23762e73f00SNeil Armstrong		assigned-clocks = <&clkc CLKID_MPLL2>,
23862e73f00SNeil Armstrong				  <&clkc CLKID_MPLL0>,
23962e73f00SNeil Armstrong				  <&clkc CLKID_MPLL1>;
24062e73f00SNeil Armstrong		assigned-clock-parents = <0>, <0>, <0>;
24162e73f00SNeil Armstrong		assigned-clock-rates = <294912000>,
24262e73f00SNeil Armstrong				       <270950400>,
24362e73f00SNeil Armstrong				       <393216000>;
24462e73f00SNeil Armstrong
24562e73f00SNeil Armstrong		dai-link-0 {
24662e73f00SNeil Armstrong			sound-dai = <&frddr_a>;
24762e73f00SNeil Armstrong		};
24862e73f00SNeil Armstrong
24962e73f00SNeil Armstrong		dai-link-1 {
25062e73f00SNeil Armstrong			sound-dai = <&toddr_a>;
25162e73f00SNeil Armstrong		};
25262e73f00SNeil Armstrong
25362e73f00SNeil Armstrong		dai-link-2 {
25462e73f00SNeil Armstrong			sound-dai = <&tdmif_b>;
25562e73f00SNeil Armstrong			dai-format = "i2s";
25662e73f00SNeil Armstrong			dai-tdm-slot-tx-mask-0 = <1 1>;
25762e73f00SNeil Armstrong			mclk-fs = <256>;
25862e73f00SNeil Armstrong
25962e73f00SNeil Armstrong			codec-0 {
26062e73f00SNeil Armstrong				sound-dai = <&rk817>;
26162e73f00SNeil Armstrong			};
26262e73f00SNeil Armstrong		};
26362e73f00SNeil Armstrong	};
26462e73f00SNeil Armstrong
26562e73f00SNeil Armstrong	speaker_amp: speaker-amplifier {
26662e73f00SNeil Armstrong		compatible = "simple-audio-amplifier";
26762e73f00SNeil Armstrong		sound-name-prefix = "Speaker Amplifier";
26862e73f00SNeil Armstrong		VCC-supply = <&hp_5v>;
26962e73f00SNeil Armstrong	};
27062e73f00SNeil Armstrong};
27162e73f00SNeil Armstrong
27262e73f00SNeil Armstrong&arb {
27362e73f00SNeil Armstrong	status = "okay";
27462e73f00SNeil Armstrong};
27562e73f00SNeil Armstrong
27662e73f00SNeil Armstrong&cpu0 {
27762e73f00SNeil Armstrong	cpu-supply = <&vddcpu_b>;
27862e73f00SNeil Armstrong	operating-points-v2 = <&cpu_opp_table_0>;
27962e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPU_CLK>;
28062e73f00SNeil Armstrong	clock-latency = <50000>;
28162e73f00SNeil Armstrong};
28262e73f00SNeil Armstrong
28362e73f00SNeil Armstrong&cpu1 {
28462e73f00SNeil Armstrong	cpu-supply = <&vddcpu_b>;
28562e73f00SNeil Armstrong	operating-points-v2 = <&cpu_opp_table_0>;
28662e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPU_CLK>;
28762e73f00SNeil Armstrong	clock-latency = <50000>;
28862e73f00SNeil Armstrong};
28962e73f00SNeil Armstrong
29062e73f00SNeil Armstrong&cpu100 {
29162e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
29262e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
29362e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
29462e73f00SNeil Armstrong	clock-latency = <50000>;
29562e73f00SNeil Armstrong};
29662e73f00SNeil Armstrong
29762e73f00SNeil Armstrong&cpu101 {
29862e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
29962e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
30062e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
30162e73f00SNeil Armstrong	clock-latency = <50000>;
30262e73f00SNeil Armstrong};
30362e73f00SNeil Armstrong
30462e73f00SNeil Armstrong&cpu102 {
30562e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
30662e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
30762e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
30862e73f00SNeil Armstrong	clock-latency = <50000>;
30962e73f00SNeil Armstrong};
31062e73f00SNeil Armstrong
31162e73f00SNeil Armstrong&cpu103 {
31262e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
31362e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
31462e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
31562e73f00SNeil Armstrong	clock-latency = <50000>;
31662e73f00SNeil Armstrong};
31762e73f00SNeil Armstrong
31862e73f00SNeil Armstrong/* RK817 only supports 12.5mV steps, round up the values */
31962e73f00SNeil Armstrong&cpu_opp_table_0 {
32062e73f00SNeil Armstrong	opp-1000000000 {
32162e73f00SNeil Armstrong		opp-microvolt = <737500>;
32262e73f00SNeil Armstrong	};
32362e73f00SNeil Armstrong	opp-1200000000 {
32462e73f00SNeil Armstrong		opp-microvolt = <737500>;
32562e73f00SNeil Armstrong	};
32662e73f00SNeil Armstrong	opp-1398000000 {
32762e73f00SNeil Armstrong		opp-microvolt = <762500>;
32862e73f00SNeil Armstrong	};
32962e73f00SNeil Armstrong	opp-1512000000 {
33062e73f00SNeil Armstrong		opp-microvolt = <800000>;
33162e73f00SNeil Armstrong	};
33262e73f00SNeil Armstrong	opp-1608000000 {
33362e73f00SNeil Armstrong		opp-microvolt = <837500>;
33462e73f00SNeil Armstrong	};
33562e73f00SNeil Armstrong	opp-1704000000 {
33662e73f00SNeil Armstrong		opp-microvolt = <862500>;
33762e73f00SNeil Armstrong	};
33862e73f00SNeil Armstrong	opp-1896000000 {
33962e73f00SNeil Armstrong		opp-microvolt = <987500>;
34062e73f00SNeil Armstrong	};
34162e73f00SNeil Armstrong	opp-1992000000 {
34262e73f00SNeil Armstrong		opp-microvolt = <1012500>;
34362e73f00SNeil Armstrong	};
34462e73f00SNeil Armstrong};
34562e73f00SNeil Armstrong
34662e73f00SNeil Armstrong/* RK818 only supports 12.5mV steps, round up the values */
34762e73f00SNeil Armstrong&cpub_opp_table_1 {
34862e73f00SNeil Armstrong	opp-1000000000 {
34962e73f00SNeil Armstrong		opp-microvolt = <775000>;
35062e73f00SNeil Armstrong	};
35162e73f00SNeil Armstrong	opp-1200000000 {
35262e73f00SNeil Armstrong		opp-microvolt = <775000>;
35362e73f00SNeil Armstrong	};
35462e73f00SNeil Armstrong	opp-1398000000 {
35562e73f00SNeil Armstrong		opp-microvolt = <800000>;
35662e73f00SNeil Armstrong	};
35762e73f00SNeil Armstrong	opp-1512000000 {
35862e73f00SNeil Armstrong		opp-microvolt = <825000>;
35962e73f00SNeil Armstrong	};
36062e73f00SNeil Armstrong	opp-1608000000 {
36162e73f00SNeil Armstrong		opp-microvolt = <862500>;
36262e73f00SNeil Armstrong	};
36362e73f00SNeil Armstrong	opp-1704000000 {
36462e73f00SNeil Armstrong		opp-microvolt = <900000>;
36562e73f00SNeil Armstrong	};
36662e73f00SNeil Armstrong	opp-1800000000 {
36762e73f00SNeil Armstrong		opp-microvolt = <987500>;
36862e73f00SNeil Armstrong	};
36962e73f00SNeil Armstrong	opp-1908000000 {
37062e73f00SNeil Armstrong		opp-microvolt = <1025000>;
37162e73f00SNeil Armstrong	};
37262e73f00SNeil Armstrong};
37362e73f00SNeil Armstrong
37462e73f00SNeil Armstrong&i2c_AO {
37562e73f00SNeil Armstrong	status = "okay";
37662e73f00SNeil Armstrong	pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
37762e73f00SNeil Armstrong	pinctrl-names = "default";
37862e73f00SNeil Armstrong
37962e73f00SNeil Armstrong	rk818: pmic@1c {
38062e73f00SNeil Armstrong		compatible = "rockchip,rk818";
38162e73f00SNeil Armstrong		reg = <0x1c>;
38262e73f00SNeil Armstrong		interrupt-parent = <&gpio_intc>;
38362e73f00SNeil Armstrong		interrupts = <7 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_7 */
384*ce999972SNeil Armstrong		#clock-cells = <1>;
38562e73f00SNeil Armstrong
38662e73f00SNeil Armstrong		vcc1-supply = <&vdd_sys>;
38762e73f00SNeil Armstrong		vcc2-supply = <&vdd_sys>;
38862e73f00SNeil Armstrong		vcc3-supply = <&vdd_sys>;
38962e73f00SNeil Armstrong		vcc4-supply = <&vdd_sys>;
39062e73f00SNeil Armstrong		vcc6-supply = <&vdd_sys>;
39162e73f00SNeil Armstrong		vcc7-supply = <&vcc_2v3>;
39262e73f00SNeil Armstrong		vcc8-supply = <&vcc_2v3>;
39362e73f00SNeil Armstrong		vcc9-supply = <&vddao_3v3>;
39462e73f00SNeil Armstrong		boost-supply = <&vdd_sys>;
39562e73f00SNeil Armstrong
39662e73f00SNeil Armstrong		regulators {
39762e73f00SNeil Armstrong			vddcpu_a: DCDC_REG1 {
39862e73f00SNeil Armstrong				regulator-name = "vddcpu_a";
39962e73f00SNeil Armstrong				regulator-always-on;
40062e73f00SNeil Armstrong				regulator-boot-on;
40162e73f00SNeil Armstrong				regulator-min-microvolt = <775000>;
40262e73f00SNeil Armstrong				regulator-max-microvolt = <1025000>;
40362e73f00SNeil Armstrong				regulator-ramp-delay = <6001>;
40462e73f00SNeil Armstrong				regulator-state-mem {
40562e73f00SNeil Armstrong					regulator-on-in-suspend;
40662e73f00SNeil Armstrong					regulator-suspend-microvolt = <775000>;
40762e73f00SNeil Armstrong				};
40862e73f00SNeil Armstrong			};
40962e73f00SNeil Armstrong
41062e73f00SNeil Armstrong			vdd_ee: DCDC_REG2 {
41162e73f00SNeil Armstrong				regulator-name = "vdd_ee";
41262e73f00SNeil Armstrong				regulator-always-on;
41362e73f00SNeil Armstrong				regulator-boot-on;
41462e73f00SNeil Armstrong				regulator-min-microvolt = <875000>;
41562e73f00SNeil Armstrong				regulator-max-microvolt = <1250000>;
41662e73f00SNeil Armstrong				regulator-ramp-delay = <6001>;
41762e73f00SNeil Armstrong				regulator-state-mem {
41862e73f00SNeil Armstrong					regulator-on-in-suspend;
41962e73f00SNeil Armstrong					regulator-suspend-microvolt = <875000>;
42062e73f00SNeil Armstrong				};
42162e73f00SNeil Armstrong			};
42262e73f00SNeil Armstrong
42362e73f00SNeil Armstrong			vddq_1v1: DCDC_REG3 {
42462e73f00SNeil Armstrong				regulator-name = "vddq_1v1";
42562e73f00SNeil Armstrong				regulator-always-on;
42662e73f00SNeil Armstrong				regulator-boot-on;
42762e73f00SNeil Armstrong				regulator-state-mem {
42862e73f00SNeil Armstrong					regulator-on-in-suspend;
42962e73f00SNeil Armstrong				};
43062e73f00SNeil Armstrong			};
43162e73f00SNeil Armstrong
43262e73f00SNeil Armstrong			vddao_3v3: DCDC_REG4 {
43362e73f00SNeil Armstrong				regulator-always-on;
43462e73f00SNeil Armstrong				regulator-boot-on;
43562e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
43662e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
43762e73f00SNeil Armstrong				regulator-name = "vddao_3v3";
43862e73f00SNeil Armstrong				regulator-state-mem {
43962e73f00SNeil Armstrong					regulator-on-in-suspend;
44062e73f00SNeil Armstrong					regulator-suspend-microvolt = <3300000>;
44162e73f00SNeil Armstrong				};
44262e73f00SNeil Armstrong			};
44362e73f00SNeil Armstrong
44462e73f00SNeil Armstrong			hp_5v: DCDC_BOOST {
44562e73f00SNeil Armstrong				regulator-always-on;
44662e73f00SNeil Armstrong				regulator-boot-on;
44762e73f00SNeil Armstrong				regulator-name = "hp_5v";
44862e73f00SNeil Armstrong				regulator-min-microvolt = <5000000>;
44962e73f00SNeil Armstrong				regulator-max-microvolt = <5000000>;
45062e73f00SNeil Armstrong				regulator-state-mem {
45162e73f00SNeil Armstrong					regulator-off-in-suspend;
45262e73f00SNeil Armstrong				};
45362e73f00SNeil Armstrong			};
45462e73f00SNeil Armstrong
45562e73f00SNeil Armstrong			vddio_ao1v8: LDO_REG5 {
45662e73f00SNeil Armstrong				regulator-always-on;
45762e73f00SNeil Armstrong				regulator-boot-on;
45862e73f00SNeil Armstrong				regulator-min-microvolt = <1800000>;
45962e73f00SNeil Armstrong				regulator-max-microvolt = <1800000>;
46062e73f00SNeil Armstrong				regulator-name = "vddio_ao1v8";
46162e73f00SNeil Armstrong				regulator-state-mem {
46262e73f00SNeil Armstrong					regulator-on-in-suspend;
46362e73f00SNeil Armstrong					regulator-suspend-microvolt = <1800000>;
46462e73f00SNeil Armstrong				};
46562e73f00SNeil Armstrong			};
46662e73f00SNeil Armstrong
46762e73f00SNeil Armstrong			vddq_1v8: LDO_REG7 {
46862e73f00SNeil Armstrong				regulator-always-on;
46962e73f00SNeil Armstrong				regulator-boot-on;
47062e73f00SNeil Armstrong				regulator-min-microvolt = <1800000>;
47162e73f00SNeil Armstrong				regulator-max-microvolt = <1800000>;
47262e73f00SNeil Armstrong				regulator-name = "vddq_1v8";
47362e73f00SNeil Armstrong				regulator-state-mem {
47462e73f00SNeil Armstrong					regulator-on-in-suspend;
47562e73f00SNeil Armstrong					regulator-suspend-microvolt = <1800000>;
47662e73f00SNeil Armstrong				};
47762e73f00SNeil Armstrong			};
47862e73f00SNeil Armstrong
47962e73f00SNeil Armstrong			vddio_c: LDO_REG9 {
48062e73f00SNeil Armstrong				regulator-always-on;
48162e73f00SNeil Armstrong				regulator-boot-on;
48262e73f00SNeil Armstrong				regulator-min-microvolt = <1800000>;
48362e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
48462e73f00SNeil Armstrong				regulator-name = "vddio_c";
48562e73f00SNeil Armstrong				regulator-state-mem {
48662e73f00SNeil Armstrong					regulator-on-in-suspend;
48762e73f00SNeil Armstrong					regulator-suspend-microvolt = <3300000>;
48862e73f00SNeil Armstrong				};
48962e73f00SNeil Armstrong			};
49062e73f00SNeil Armstrong
49162e73f00SNeil Armstrong			vcc_sd: SWITCH_REG {
49262e73f00SNeil Armstrong				regulator-name = "vcc_sd";
49362e73f00SNeil Armstrong				regulator-always-on;
49462e73f00SNeil Armstrong				regulator-boot-on;
49562e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
49662e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
49762e73f00SNeil Armstrong				regulator-state-mem {
49862e73f00SNeil Armstrong					regulator-on-in-suspend;
49962e73f00SNeil Armstrong				};
50062e73f00SNeil Armstrong			};
50162e73f00SNeil Armstrong
50262e73f00SNeil Armstrong			OTG_SWITCH {
50362e73f00SNeil Armstrong				regulator-name = "otg_switch";
50462e73f00SNeil Armstrong				regulator-state-mem {
50562e73f00SNeil Armstrong					regulator-off-in-suspend;
50662e73f00SNeil Armstrong				};
50762e73f00SNeil Armstrong			};
50862e73f00SNeil Armstrong		};
50962e73f00SNeil Armstrong	};
51062e73f00SNeil Armstrong};
51162e73f00SNeil Armstrong
51262e73f00SNeil Armstrong&i2c3 {
51362e73f00SNeil Armstrong	status = "okay";
51462e73f00SNeil Armstrong	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
51562e73f00SNeil Armstrong	pinctrl-names = "default";
51662e73f00SNeil Armstrong
51762e73f00SNeil Armstrong	rk817: pmic@20 {
51862e73f00SNeil Armstrong		compatible = "rockchip,rk817";
51962e73f00SNeil Armstrong		reg = <0x20>;
52062e73f00SNeil Armstrong		interrupt-parent = <&gpio_intc>;
52162e73f00SNeil Armstrong
52262e73f00SNeil Armstrong		interrupts = <5 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_5 */
52362e73f00SNeil Armstrong
52462e73f00SNeil Armstrong		vcc1-supply = <&vdd_sys>;
52562e73f00SNeil Armstrong		vcc2-supply = <&vdd_sys>;
52662e73f00SNeil Armstrong		vcc3-supply = <&vdd_sys>;
52762e73f00SNeil Armstrong		vcc4-supply = <&vdd_sys>;
52862e73f00SNeil Armstrong		vcc5-supply = <&vdd_sys>;
52962e73f00SNeil Armstrong		vcc6-supply = <&vdd_sys>;
53062e73f00SNeil Armstrong		vcc7-supply = <&vdd_sys>;
53162e73f00SNeil Armstrong		vcc8-supply = <&vdd_sys>;
53262e73f00SNeil Armstrong		vcc9-supply = <&rk817_boost>;
53362e73f00SNeil Armstrong
53462e73f00SNeil Armstrong		#sound-dai-cells = <0>;
53562e73f00SNeil Armstrong		clocks = <&codec_clk>;
53662e73f00SNeil Armstrong		clock-names = "mclk";
53762e73f00SNeil Armstrong
53862e73f00SNeil Armstrong		#clock-cells = <1>;
53962e73f00SNeil Armstrong
54062e73f00SNeil Armstrong		regulators {
54162e73f00SNeil Armstrong			vddcpu_b: DCDC_REG2 {
54262e73f00SNeil Armstrong				regulator-always-on;
54362e73f00SNeil Armstrong				regulator-boot-on;
54462e73f00SNeil Armstrong				regulator-min-microvolt = <737500>;
54562e73f00SNeil Armstrong				regulator-max-microvolt = <1012500>;
54662e73f00SNeil Armstrong				regulator-ramp-delay = <6001>;
54762e73f00SNeil Armstrong				regulator-initial-mode = <0x2>;
54862e73f00SNeil Armstrong				regulator-name = "vddcpu_b";
54962e73f00SNeil Armstrong				regulator-state-mem {
55062e73f00SNeil Armstrong					regulator-on-in-suspend;
55162e73f00SNeil Armstrong					regulator-suspend-microvolt = <1000000>;
55262e73f00SNeil Armstrong				};
55362e73f00SNeil Armstrong			};
55462e73f00SNeil Armstrong
55562e73f00SNeil Armstrong			vcc_2v3: DCDC_REG3 {
55662e73f00SNeil Armstrong				regulator-always-on;
55762e73f00SNeil Armstrong				regulator-boot-on;
55862e73f00SNeil Armstrong				regulator-min-microvolt = <2300000>;
55962e73f00SNeil Armstrong				regulator-max-microvolt = <2400000>;
56062e73f00SNeil Armstrong				regulator-initial-mode = <0x2>;
56162e73f00SNeil Armstrong				regulator-name = "vcc_2v3";
56262e73f00SNeil Armstrong				regulator-state-mem {
56362e73f00SNeil Armstrong					regulator-on-in-suspend;
56462e73f00SNeil Armstrong				};
56562e73f00SNeil Armstrong			};
56662e73f00SNeil Armstrong
56762e73f00SNeil Armstrong			LDO_REG4 {
56862e73f00SNeil Armstrong				regulator-always-on;
56962e73f00SNeil Armstrong				regulator-boot-on;
57062e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
57162e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
57262e73f00SNeil Armstrong				regulator-name = "vdd_codec";
57362e73f00SNeil Armstrong				regulator-state-mem {
57462e73f00SNeil Armstrong					regulator-off-in-suspend;
57562e73f00SNeil Armstrong				};
57662e73f00SNeil Armstrong			};
57762e73f00SNeil Armstrong
57862e73f00SNeil Armstrong			vcc_lcd: LDO_REG8 {
57962e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
58062e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
58162e73f00SNeil Armstrong				regulator-name = "vcc_lcd";
58262e73f00SNeil Armstrong				regulator-state-mem {
58362e73f00SNeil Armstrong					regulator-off-in-suspend;
58462e73f00SNeil Armstrong				};
58562e73f00SNeil Armstrong			};
58662e73f00SNeil Armstrong
58762e73f00SNeil Armstrong			rk817_boost: BOOST {
58862e73f00SNeil Armstrong				regulator-always-on;
58962e73f00SNeil Armstrong				regulator-boot-on;
59062e73f00SNeil Armstrong				regulator-min-microvolt = <5000000>;
59162e73f00SNeil Armstrong				regulator-max-microvolt = <5400000>;
59262e73f00SNeil Armstrong				regulator-name = "rk817_boost";
59362e73f00SNeil Armstrong				regulator-state-mem {
59462e73f00SNeil Armstrong					regulator-off-in-suspend;
59562e73f00SNeil Armstrong				};
59662e73f00SNeil Armstrong			};
59762e73f00SNeil Armstrong
59862e73f00SNeil Armstrong			usb_host: OTG_SWITCH {
59962e73f00SNeil Armstrong				regulator-name = "usb_host";
60062e73f00SNeil Armstrong				regulator-min-microvolt = <5000000>;
60162e73f00SNeil Armstrong				regulator-max-microvolt = <5000000>;
60262e73f00SNeil Armstrong				regulator-state-mem {
60362e73f00SNeil Armstrong					regulator-off-in-suspend;
60462e73f00SNeil Armstrong				};
60562e73f00SNeil Armstrong			};
60662e73f00SNeil Armstrong		};
60762e73f00SNeil Armstrong	};
60862e73f00SNeil Armstrong};
60962e73f00SNeil Armstrong
61062e73f00SNeil Armstrong&clkc_audio {
61162e73f00SNeil Armstrong	status = "okay";
61262e73f00SNeil Armstrong};
61362e73f00SNeil Armstrong
61462e73f00SNeil Armstrong&eth_phy {
61562e73f00SNeil Armstrong	status = "disabled";
61662e73f00SNeil Armstrong};
61762e73f00SNeil Armstrong
61862e73f00SNeil Armstrong&frddr_a {
61962e73f00SNeil Armstrong	status = "okay";
62062e73f00SNeil Armstrong};
62162e73f00SNeil Armstrong
62262e73f00SNeil Armstrong&periphs_pinctrl {
62362e73f00SNeil Armstrong	keypad_gpio_pins: keypad-gpio {
62462e73f00SNeil Armstrong		mux {
62562e73f00SNeil Armstrong			groups = "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3",
62662e73f00SNeil Armstrong			         "GPIOX_4", "GPIOX_5", "GPIOX_6", "GPIOX_7",
62762e73f00SNeil Armstrong				 "GPIOX_8", "GPIOX_9", "GPIOX_10", "GPIOX_11",
62862e73f00SNeil Armstrong				 "GPIOX_12", "GPIOX_13", "GPIOX_14",  "GPIOX_15",
62962e73f00SNeil Armstrong				 "GPIOX_16", "GPIOX_17", "GPIOX_18",  "GPIOX_19";
63062e73f00SNeil Armstrong			function = "gpio_periphs";
63162e73f00SNeil Armstrong			bias-pull-up;
63262e73f00SNeil Armstrong			output-disable;
63362e73f00SNeil Armstrong		};
63462e73f00SNeil Armstrong	};
63562e73f00SNeil Armstrong};
63662e73f00SNeil Armstrong
63762e73f00SNeil Armstrong&saradc {
63862e73f00SNeil Armstrong	status = "okay";
63962e73f00SNeil Armstrong	vref-supply = <&vddio_ao1v8>;
64062e73f00SNeil Armstrong};
64162e73f00SNeil Armstrong
64262e73f00SNeil Armstrong/* SD card */
64362e73f00SNeil Armstrong&sd_emmc_b {
64462e73f00SNeil Armstrong	status = "okay";
64562e73f00SNeil Armstrong	pinctrl-0 = <&sdcard_c_pins>;
64662e73f00SNeil Armstrong	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
64762e73f00SNeil Armstrong	pinctrl-names = "default", "clk-gate";
64862e73f00SNeil Armstrong
64962e73f00SNeil Armstrong	bus-width = <4>;
65062e73f00SNeil Armstrong	cap-sd-highspeed;
65162e73f00SNeil Armstrong	max-frequency = <50000000>;
65262e73f00SNeil Armstrong	disable-wp;
65362e73f00SNeil Armstrong
65462e73f00SNeil Armstrong	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
65562e73f00SNeil Armstrong	vmmc-supply = <&vcc_sd>;
65662e73f00SNeil Armstrong	vqmmc-supply = <&vddio_c>;
65762e73f00SNeil Armstrong
65862e73f00SNeil Armstrong};
65962e73f00SNeil Armstrong
66062e73f00SNeil Armstrong/* eMMC */
66162e73f00SNeil Armstrong&sd_emmc_c {
66262e73f00SNeil Armstrong	status = "okay";
66362e73f00SNeil Armstrong	pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
66462e73f00SNeil Armstrong	pinctrl-1 = <&emmc_clk_gate_pins>;
66562e73f00SNeil Armstrong	pinctrl-names = "default", "clk-gate";
66662e73f00SNeil Armstrong
66762e73f00SNeil Armstrong	bus-width = <8>;
66862e73f00SNeil Armstrong	cap-mmc-highspeed;
66962e73f00SNeil Armstrong	mmc-ddr-1_8v;
67062e73f00SNeil Armstrong	mmc-hs200-1_8v;
67162e73f00SNeil Armstrong	max-frequency = <200000000>;
67262e73f00SNeil Armstrong	disable-wp;
67362e73f00SNeil Armstrong
67462e73f00SNeil Armstrong	mmc-pwrseq = <&emmc_pwrseq>;
67562e73f00SNeil Armstrong	vmmc-supply = <&vcc_sd>;
67662e73f00SNeil Armstrong	vqmmc-supply = <&vddio_ao1v8>;
67762e73f00SNeil Armstrong};
67862e73f00SNeil Armstrong
67962e73f00SNeil Armstrong
68062e73f00SNeil Armstrong&tdmif_b {
68162e73f00SNeil Armstrong	pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>, <&tdm_b_din1_pins>;
68262e73f00SNeil Armstrong	pinctrl-names = "default";
68362e73f00SNeil Armstrong	status = "okay";
68462e73f00SNeil Armstrong
68562e73f00SNeil Armstrong	assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
68662e73f00SNeil Armstrong			  <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
68762e73f00SNeil Armstrong	assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>,
68862e73f00SNeil Armstrong				 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
68962e73f00SNeil Armstrong	assigned-clock-rates = <0>, <0>;
69062e73f00SNeil Armstrong};
69162e73f00SNeil Armstrong
69262e73f00SNeil Armstrong&tdmin_b {
69362e73f00SNeil Armstrong	status = "okay";
69462e73f00SNeil Armstrong};
69562e73f00SNeil Armstrong
69662e73f00SNeil Armstrong&tdmout_b {
69762e73f00SNeil Armstrong	status = "okay";
69862e73f00SNeil Armstrong};
69962e73f00SNeil Armstrong
70062e73f00SNeil Armstrong&toddr_a {
70162e73f00SNeil Armstrong	status = "okay";
70262e73f00SNeil Armstrong};
70362e73f00SNeil Armstrong
70462e73f00SNeil Armstrong&uart_AO {
70562e73f00SNeil Armstrong	status = "okay";
70662e73f00SNeil Armstrong	pinctrl-0 = <&uart_ao_a_pins>;
70762e73f00SNeil Armstrong	pinctrl-names = "default";
70862e73f00SNeil Armstrong};
70962e73f00SNeil Armstrong
71062e73f00SNeil Armstrong&usb {
71162e73f00SNeil Armstrong	status = "okay";
71262e73f00SNeil Armstrong	dr_mode = "peripheral";
71362e73f00SNeil Armstrong};
71462e73f00SNeil Armstrong
71562e73f00SNeil Armstrong&usb2_phy0 {
71662e73f00SNeil Armstrong	status = "okay";
71762e73f00SNeil Armstrong};
71862e73f00SNeil Armstrong
71962e73f00SNeil Armstrong&usb2_phy1 {
72062e73f00SNeil Armstrong	status = "okay";
72162e73f00SNeil Armstrong	phy-supply = <&usb_host>;
72262e73f00SNeil Armstrong};
723