xref: /linux/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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
237*9b5d2511SNeil Armstrong		clocks = <&clkc CLKID_MPLL2>,
238*9b5d2511SNeil Armstrong			 <&clkc CLKID_MPLL0>,
239*9b5d2511SNeil Armstrong			 <&clkc CLKID_MPLL1>;
240*9b5d2511SNeil Armstrong
24162e73f00SNeil Armstrong		assigned-clocks = <&clkc CLKID_MPLL2>,
24262e73f00SNeil Armstrong				  <&clkc CLKID_MPLL0>,
24362e73f00SNeil Armstrong				  <&clkc CLKID_MPLL1>;
24462e73f00SNeil Armstrong		assigned-clock-parents = <0>, <0>, <0>;
24562e73f00SNeil Armstrong		assigned-clock-rates = <294912000>,
24662e73f00SNeil Armstrong				       <270950400>,
24762e73f00SNeil Armstrong				       <393216000>;
24862e73f00SNeil Armstrong
24962e73f00SNeil Armstrong		dai-link-0 {
25062e73f00SNeil Armstrong			sound-dai = <&frddr_a>;
25162e73f00SNeil Armstrong		};
25262e73f00SNeil Armstrong
25362e73f00SNeil Armstrong		dai-link-1 {
25462e73f00SNeil Armstrong			sound-dai = <&toddr_a>;
25562e73f00SNeil Armstrong		};
25662e73f00SNeil Armstrong
25762e73f00SNeil Armstrong		dai-link-2 {
25862e73f00SNeil Armstrong			sound-dai = <&tdmif_b>;
25962e73f00SNeil Armstrong			dai-format = "i2s";
26062e73f00SNeil Armstrong			dai-tdm-slot-tx-mask-0 = <1 1>;
26162e73f00SNeil Armstrong			mclk-fs = <256>;
26262e73f00SNeil Armstrong
26362e73f00SNeil Armstrong			codec-0 {
26462e73f00SNeil Armstrong				sound-dai = <&rk817>;
26562e73f00SNeil Armstrong			};
26662e73f00SNeil Armstrong		};
26762e73f00SNeil Armstrong	};
26862e73f00SNeil Armstrong
26962e73f00SNeil Armstrong	speaker_amp: speaker-amplifier {
27062e73f00SNeil Armstrong		compatible = "simple-audio-amplifier";
27162e73f00SNeil Armstrong		sound-name-prefix = "Speaker Amplifier";
27262e73f00SNeil Armstrong		VCC-supply = <&hp_5v>;
27362e73f00SNeil Armstrong	};
27462e73f00SNeil Armstrong};
27562e73f00SNeil Armstrong
27662e73f00SNeil Armstrong&arb {
27762e73f00SNeil Armstrong	status = "okay";
27862e73f00SNeil Armstrong};
27962e73f00SNeil Armstrong
28062e73f00SNeil Armstrong&cpu0 {
28162e73f00SNeil Armstrong	cpu-supply = <&vddcpu_b>;
28262e73f00SNeil Armstrong	operating-points-v2 = <&cpu_opp_table_0>;
28362e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPU_CLK>;
28462e73f00SNeil Armstrong	clock-latency = <50000>;
28562e73f00SNeil Armstrong};
28662e73f00SNeil Armstrong
28762e73f00SNeil Armstrong&cpu1 {
28862e73f00SNeil Armstrong	cpu-supply = <&vddcpu_b>;
28962e73f00SNeil Armstrong	operating-points-v2 = <&cpu_opp_table_0>;
29062e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPU_CLK>;
29162e73f00SNeil Armstrong	clock-latency = <50000>;
29262e73f00SNeil Armstrong};
29362e73f00SNeil Armstrong
29462e73f00SNeil Armstrong&cpu100 {
29562e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
29662e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
29762e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
29862e73f00SNeil Armstrong	clock-latency = <50000>;
29962e73f00SNeil Armstrong};
30062e73f00SNeil Armstrong
30162e73f00SNeil Armstrong&cpu101 {
30262e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
30362e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
30462e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
30562e73f00SNeil Armstrong	clock-latency = <50000>;
30662e73f00SNeil Armstrong};
30762e73f00SNeil Armstrong
30862e73f00SNeil Armstrong&cpu102 {
30962e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
31062e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
31162e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
31262e73f00SNeil Armstrong	clock-latency = <50000>;
31362e73f00SNeil Armstrong};
31462e73f00SNeil Armstrong
31562e73f00SNeil Armstrong&cpu103 {
31662e73f00SNeil Armstrong	cpu-supply = <&vddcpu_a>;
31762e73f00SNeil Armstrong	operating-points-v2 = <&cpub_opp_table_1>;
31862e73f00SNeil Armstrong	clocks = <&clkc CLKID_CPUB_CLK>;
31962e73f00SNeil Armstrong	clock-latency = <50000>;
32062e73f00SNeil Armstrong};
32162e73f00SNeil Armstrong
32262e73f00SNeil Armstrong/* RK817 only supports 12.5mV steps, round up the values */
32362e73f00SNeil Armstrong&cpu_opp_table_0 {
32462e73f00SNeil Armstrong	opp-1000000000 {
32562e73f00SNeil Armstrong		opp-microvolt = <737500>;
32662e73f00SNeil Armstrong	};
32762e73f00SNeil Armstrong	opp-1200000000 {
32862e73f00SNeil Armstrong		opp-microvolt = <737500>;
32962e73f00SNeil Armstrong	};
33062e73f00SNeil Armstrong	opp-1398000000 {
33162e73f00SNeil Armstrong		opp-microvolt = <762500>;
33262e73f00SNeil Armstrong	};
33362e73f00SNeil Armstrong	opp-1512000000 {
33462e73f00SNeil Armstrong		opp-microvolt = <800000>;
33562e73f00SNeil Armstrong	};
33662e73f00SNeil Armstrong	opp-1608000000 {
33762e73f00SNeil Armstrong		opp-microvolt = <837500>;
33862e73f00SNeil Armstrong	};
33962e73f00SNeil Armstrong	opp-1704000000 {
34062e73f00SNeil Armstrong		opp-microvolt = <862500>;
34162e73f00SNeil Armstrong	};
34262e73f00SNeil Armstrong	opp-1896000000 {
34362e73f00SNeil Armstrong		opp-microvolt = <987500>;
34462e73f00SNeil Armstrong	};
34562e73f00SNeil Armstrong	opp-1992000000 {
34662e73f00SNeil Armstrong		opp-microvolt = <1012500>;
34762e73f00SNeil Armstrong	};
34862e73f00SNeil Armstrong};
34962e73f00SNeil Armstrong
35062e73f00SNeil Armstrong/* RK818 only supports 12.5mV steps, round up the values */
35162e73f00SNeil Armstrong&cpub_opp_table_1 {
35262e73f00SNeil Armstrong	opp-1000000000 {
35362e73f00SNeil Armstrong		opp-microvolt = <775000>;
35462e73f00SNeil Armstrong	};
35562e73f00SNeil Armstrong	opp-1200000000 {
35662e73f00SNeil Armstrong		opp-microvolt = <775000>;
35762e73f00SNeil Armstrong	};
35862e73f00SNeil Armstrong	opp-1398000000 {
35962e73f00SNeil Armstrong		opp-microvolt = <800000>;
36062e73f00SNeil Armstrong	};
36162e73f00SNeil Armstrong	opp-1512000000 {
36262e73f00SNeil Armstrong		opp-microvolt = <825000>;
36362e73f00SNeil Armstrong	};
36462e73f00SNeil Armstrong	opp-1608000000 {
36562e73f00SNeil Armstrong		opp-microvolt = <862500>;
36662e73f00SNeil Armstrong	};
36762e73f00SNeil Armstrong	opp-1704000000 {
36862e73f00SNeil Armstrong		opp-microvolt = <900000>;
36962e73f00SNeil Armstrong	};
37062e73f00SNeil Armstrong	opp-1800000000 {
37162e73f00SNeil Armstrong		opp-microvolt = <987500>;
37262e73f00SNeil Armstrong	};
37362e73f00SNeil Armstrong	opp-1908000000 {
37462e73f00SNeil Armstrong		opp-microvolt = <1025000>;
37562e73f00SNeil Armstrong	};
37662e73f00SNeil Armstrong};
37762e73f00SNeil Armstrong
37862e73f00SNeil Armstrong&i2c_AO {
37962e73f00SNeil Armstrong	status = "okay";
38062e73f00SNeil Armstrong	pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
38162e73f00SNeil Armstrong	pinctrl-names = "default";
38262e73f00SNeil Armstrong
38362e73f00SNeil Armstrong	rk818: pmic@1c {
38462e73f00SNeil Armstrong		compatible = "rockchip,rk818";
38562e73f00SNeil Armstrong		reg = <0x1c>;
38662e73f00SNeil Armstrong		interrupt-parent = <&gpio_intc>;
3876387e0aaSHuqiang Qin		interrupts = <IRQID_GPIOAO_7 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_7 */
388ce999972SNeil Armstrong		#clock-cells = <1>;
38962e73f00SNeil Armstrong
39062e73f00SNeil Armstrong		vcc1-supply = <&vdd_sys>;
39162e73f00SNeil Armstrong		vcc2-supply = <&vdd_sys>;
39262e73f00SNeil Armstrong		vcc3-supply = <&vdd_sys>;
39362e73f00SNeil Armstrong		vcc4-supply = <&vdd_sys>;
39462e73f00SNeil Armstrong		vcc6-supply = <&vdd_sys>;
39562e73f00SNeil Armstrong		vcc7-supply = <&vcc_2v3>;
39662e73f00SNeil Armstrong		vcc8-supply = <&vcc_2v3>;
39762e73f00SNeil Armstrong		vcc9-supply = <&vddao_3v3>;
39862e73f00SNeil Armstrong		boost-supply = <&vdd_sys>;
39962e73f00SNeil Armstrong
40062e73f00SNeil Armstrong		regulators {
40162e73f00SNeil Armstrong			vddcpu_a: DCDC_REG1 {
40262e73f00SNeil Armstrong				regulator-name = "vddcpu_a";
40362e73f00SNeil Armstrong				regulator-always-on;
40462e73f00SNeil Armstrong				regulator-boot-on;
40562e73f00SNeil Armstrong				regulator-min-microvolt = <775000>;
40662e73f00SNeil Armstrong				regulator-max-microvolt = <1025000>;
40762e73f00SNeil Armstrong				regulator-ramp-delay = <6001>;
40862e73f00SNeil Armstrong				regulator-state-mem {
40962e73f00SNeil Armstrong					regulator-on-in-suspend;
41062e73f00SNeil Armstrong					regulator-suspend-microvolt = <775000>;
41162e73f00SNeil Armstrong				};
41262e73f00SNeil Armstrong			};
41362e73f00SNeil Armstrong
41462e73f00SNeil Armstrong			vdd_ee: DCDC_REG2 {
41562e73f00SNeil Armstrong				regulator-name = "vdd_ee";
41662e73f00SNeil Armstrong				regulator-always-on;
41762e73f00SNeil Armstrong				regulator-boot-on;
41862e73f00SNeil Armstrong				regulator-min-microvolt = <875000>;
41962e73f00SNeil Armstrong				regulator-max-microvolt = <1250000>;
42062e73f00SNeil Armstrong				regulator-ramp-delay = <6001>;
42162e73f00SNeil Armstrong				regulator-state-mem {
42262e73f00SNeil Armstrong					regulator-on-in-suspend;
42362e73f00SNeil Armstrong					regulator-suspend-microvolt = <875000>;
42462e73f00SNeil Armstrong				};
42562e73f00SNeil Armstrong			};
42662e73f00SNeil Armstrong
42762e73f00SNeil Armstrong			vddq_1v1: DCDC_REG3 {
42862e73f00SNeil Armstrong				regulator-name = "vddq_1v1";
42962e73f00SNeil Armstrong				regulator-always-on;
43062e73f00SNeil Armstrong				regulator-boot-on;
43162e73f00SNeil Armstrong				regulator-state-mem {
43262e73f00SNeil Armstrong					regulator-on-in-suspend;
43362e73f00SNeil Armstrong				};
43462e73f00SNeil Armstrong			};
43562e73f00SNeil Armstrong
43662e73f00SNeil Armstrong			vddao_3v3: DCDC_REG4 {
43762e73f00SNeil Armstrong				regulator-always-on;
43862e73f00SNeil Armstrong				regulator-boot-on;
43962e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
44062e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
44162e73f00SNeil Armstrong				regulator-name = "vddao_3v3";
44262e73f00SNeil Armstrong				regulator-state-mem {
44362e73f00SNeil Armstrong					regulator-on-in-suspend;
44462e73f00SNeil Armstrong					regulator-suspend-microvolt = <3300000>;
44562e73f00SNeil Armstrong				};
44662e73f00SNeil Armstrong			};
44762e73f00SNeil Armstrong
44862e73f00SNeil Armstrong			hp_5v: DCDC_BOOST {
44962e73f00SNeil Armstrong				regulator-always-on;
45062e73f00SNeil Armstrong				regulator-boot-on;
45162e73f00SNeil Armstrong				regulator-name = "hp_5v";
45262e73f00SNeil Armstrong				regulator-min-microvolt = <5000000>;
45362e73f00SNeil Armstrong				regulator-max-microvolt = <5000000>;
45462e73f00SNeil Armstrong				regulator-state-mem {
45562e73f00SNeil Armstrong					regulator-off-in-suspend;
45662e73f00SNeil Armstrong				};
45762e73f00SNeil Armstrong			};
45862e73f00SNeil Armstrong
45962e73f00SNeil Armstrong			vddio_ao1v8: LDO_REG5 {
46062e73f00SNeil Armstrong				regulator-always-on;
46162e73f00SNeil Armstrong				regulator-boot-on;
46262e73f00SNeil Armstrong				regulator-min-microvolt = <1800000>;
46362e73f00SNeil Armstrong				regulator-max-microvolt = <1800000>;
46462e73f00SNeil Armstrong				regulator-name = "vddio_ao1v8";
46562e73f00SNeil Armstrong				regulator-state-mem {
46662e73f00SNeil Armstrong					regulator-on-in-suspend;
46762e73f00SNeil Armstrong					regulator-suspend-microvolt = <1800000>;
46862e73f00SNeil Armstrong				};
46962e73f00SNeil Armstrong			};
47062e73f00SNeil Armstrong
47162e73f00SNeil Armstrong			vddq_1v8: LDO_REG7 {
47262e73f00SNeil Armstrong				regulator-always-on;
47362e73f00SNeil Armstrong				regulator-boot-on;
47462e73f00SNeil Armstrong				regulator-min-microvolt = <1800000>;
47562e73f00SNeil Armstrong				regulator-max-microvolt = <1800000>;
47662e73f00SNeil Armstrong				regulator-name = "vddq_1v8";
47762e73f00SNeil Armstrong				regulator-state-mem {
47862e73f00SNeil Armstrong					regulator-on-in-suspend;
47962e73f00SNeil Armstrong					regulator-suspend-microvolt = <1800000>;
48062e73f00SNeil Armstrong				};
48162e73f00SNeil Armstrong			};
48262e73f00SNeil Armstrong
48362e73f00SNeil Armstrong			vddio_c: LDO_REG9 {
48462e73f00SNeil Armstrong				regulator-always-on;
48562e73f00SNeil Armstrong				regulator-boot-on;
48662e73f00SNeil Armstrong				regulator-min-microvolt = <1800000>;
48762e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
48862e73f00SNeil Armstrong				regulator-name = "vddio_c";
48962e73f00SNeil Armstrong				regulator-state-mem {
49062e73f00SNeil Armstrong					regulator-on-in-suspend;
49162e73f00SNeil Armstrong					regulator-suspend-microvolt = <3300000>;
49262e73f00SNeil Armstrong				};
49362e73f00SNeil Armstrong			};
49462e73f00SNeil Armstrong
49562e73f00SNeil Armstrong			vcc_sd: SWITCH_REG {
49662e73f00SNeil Armstrong				regulator-name = "vcc_sd";
49762e73f00SNeil Armstrong				regulator-always-on;
49862e73f00SNeil Armstrong				regulator-boot-on;
49962e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
50062e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
50162e73f00SNeil Armstrong				regulator-state-mem {
50262e73f00SNeil Armstrong					regulator-on-in-suspend;
50362e73f00SNeil Armstrong				};
50462e73f00SNeil Armstrong			};
50562e73f00SNeil Armstrong
50662e73f00SNeil Armstrong			OTG_SWITCH {
50762e73f00SNeil Armstrong				regulator-name = "otg_switch";
50862e73f00SNeil Armstrong				regulator-state-mem {
50962e73f00SNeil Armstrong					regulator-off-in-suspend;
51062e73f00SNeil Armstrong				};
51162e73f00SNeil Armstrong			};
51262e73f00SNeil Armstrong		};
51362e73f00SNeil Armstrong	};
51462e73f00SNeil Armstrong};
51562e73f00SNeil Armstrong
51662e73f00SNeil Armstrong&i2c3 {
51762e73f00SNeil Armstrong	status = "okay";
51862e73f00SNeil Armstrong	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
51962e73f00SNeil Armstrong	pinctrl-names = "default";
52062e73f00SNeil Armstrong
52162e73f00SNeil Armstrong	rk817: pmic@20 {
52262e73f00SNeil Armstrong		compatible = "rockchip,rk817";
52362e73f00SNeil Armstrong		reg = <0x20>;
52462e73f00SNeil Armstrong		interrupt-parent = <&gpio_intc>;
52562e73f00SNeil Armstrong
5266387e0aaSHuqiang Qin		interrupts = <IRQID_GPIOAO_5 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_5 */
52762e73f00SNeil Armstrong
52862e73f00SNeil Armstrong		vcc1-supply = <&vdd_sys>;
52962e73f00SNeil Armstrong		vcc2-supply = <&vdd_sys>;
53062e73f00SNeil Armstrong		vcc3-supply = <&vdd_sys>;
53162e73f00SNeil Armstrong		vcc4-supply = <&vdd_sys>;
53262e73f00SNeil Armstrong		vcc5-supply = <&vdd_sys>;
53362e73f00SNeil Armstrong		vcc6-supply = <&vdd_sys>;
53462e73f00SNeil Armstrong		vcc7-supply = <&vdd_sys>;
53562e73f00SNeil Armstrong		vcc8-supply = <&vdd_sys>;
53662e73f00SNeil Armstrong		vcc9-supply = <&rk817_boost>;
53762e73f00SNeil Armstrong
53862e73f00SNeil Armstrong		#sound-dai-cells = <0>;
53962e73f00SNeil Armstrong		clocks = <&codec_clk>;
54062e73f00SNeil Armstrong		clock-names = "mclk";
54162e73f00SNeil Armstrong
54262e73f00SNeil Armstrong		#clock-cells = <1>;
54362e73f00SNeil Armstrong
54462e73f00SNeil Armstrong		regulators {
54562e73f00SNeil Armstrong			vddcpu_b: DCDC_REG2 {
54662e73f00SNeil Armstrong				regulator-always-on;
54762e73f00SNeil Armstrong				regulator-boot-on;
54862e73f00SNeil Armstrong				regulator-min-microvolt = <737500>;
54962e73f00SNeil Armstrong				regulator-max-microvolt = <1012500>;
55062e73f00SNeil Armstrong				regulator-ramp-delay = <6001>;
55162e73f00SNeil Armstrong				regulator-initial-mode = <0x2>;
55262e73f00SNeil Armstrong				regulator-name = "vddcpu_b";
55362e73f00SNeil Armstrong				regulator-state-mem {
55462e73f00SNeil Armstrong					regulator-on-in-suspend;
55562e73f00SNeil Armstrong					regulator-suspend-microvolt = <1000000>;
55662e73f00SNeil Armstrong				};
55762e73f00SNeil Armstrong			};
55862e73f00SNeil Armstrong
55962e73f00SNeil Armstrong			vcc_2v3: DCDC_REG3 {
56062e73f00SNeil Armstrong				regulator-always-on;
56162e73f00SNeil Armstrong				regulator-boot-on;
56262e73f00SNeil Armstrong				regulator-min-microvolt = <2300000>;
56362e73f00SNeil Armstrong				regulator-max-microvolt = <2400000>;
56462e73f00SNeil Armstrong				regulator-initial-mode = <0x2>;
56562e73f00SNeil Armstrong				regulator-name = "vcc_2v3";
56662e73f00SNeil Armstrong				regulator-state-mem {
56762e73f00SNeil Armstrong					regulator-on-in-suspend;
56862e73f00SNeil Armstrong				};
56962e73f00SNeil Armstrong			};
57062e73f00SNeil Armstrong
57162e73f00SNeil Armstrong			LDO_REG4 {
57262e73f00SNeil Armstrong				regulator-always-on;
57362e73f00SNeil Armstrong				regulator-boot-on;
57462e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
57562e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
57662e73f00SNeil Armstrong				regulator-name = "vdd_codec";
57762e73f00SNeil Armstrong				regulator-state-mem {
57862e73f00SNeil Armstrong					regulator-off-in-suspend;
57962e73f00SNeil Armstrong				};
58062e73f00SNeil Armstrong			};
58162e73f00SNeil Armstrong
58262e73f00SNeil Armstrong			vcc_lcd: LDO_REG8 {
58362e73f00SNeil Armstrong				regulator-min-microvolt = <3300000>;
58462e73f00SNeil Armstrong				regulator-max-microvolt = <3300000>;
58562e73f00SNeil Armstrong				regulator-name = "vcc_lcd";
58662e73f00SNeil Armstrong				regulator-state-mem {
58762e73f00SNeil Armstrong					regulator-off-in-suspend;
58862e73f00SNeil Armstrong				};
58962e73f00SNeil Armstrong			};
59062e73f00SNeil Armstrong
59162e73f00SNeil Armstrong			rk817_boost: BOOST {
59262e73f00SNeil Armstrong				regulator-always-on;
59362e73f00SNeil Armstrong				regulator-boot-on;
59462e73f00SNeil Armstrong				regulator-min-microvolt = <5000000>;
59562e73f00SNeil Armstrong				regulator-max-microvolt = <5400000>;
59662e73f00SNeil Armstrong				regulator-name = "rk817_boost";
59762e73f00SNeil Armstrong				regulator-state-mem {
59862e73f00SNeil Armstrong					regulator-off-in-suspend;
59962e73f00SNeil Armstrong				};
60062e73f00SNeil Armstrong			};
60162e73f00SNeil Armstrong
60262e73f00SNeil Armstrong			usb_host: OTG_SWITCH {
60362e73f00SNeil Armstrong				regulator-name = "usb_host";
60462e73f00SNeil Armstrong				regulator-min-microvolt = <5000000>;
60562e73f00SNeil Armstrong				regulator-max-microvolt = <5000000>;
60662e73f00SNeil Armstrong				regulator-state-mem {
60762e73f00SNeil Armstrong					regulator-off-in-suspend;
60862e73f00SNeil Armstrong				};
60962e73f00SNeil Armstrong			};
61062e73f00SNeil Armstrong		};
61162e73f00SNeil Armstrong	};
61262e73f00SNeil Armstrong};
61362e73f00SNeil Armstrong
61462e73f00SNeil Armstrong&clkc_audio {
61562e73f00SNeil Armstrong	status = "okay";
61662e73f00SNeil Armstrong};
61762e73f00SNeil Armstrong
61862e73f00SNeil Armstrong&eth_phy {
61962e73f00SNeil Armstrong	status = "disabled";
62062e73f00SNeil Armstrong};
62162e73f00SNeil Armstrong
62262e73f00SNeil Armstrong&frddr_a {
62362e73f00SNeil Armstrong	status = "okay";
62462e73f00SNeil Armstrong};
62562e73f00SNeil Armstrong
62662e73f00SNeil Armstrong&periphs_pinctrl {
62750e7d712SNeil Armstrong	keypad_gpio_pins: keypad-gpio-state {
62862e73f00SNeil Armstrong		mux {
62962e73f00SNeil Armstrong			groups = "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3",
63062e73f00SNeil Armstrong			         "GPIOX_4", "GPIOX_5", "GPIOX_6", "GPIOX_7",
63162e73f00SNeil Armstrong				 "GPIOX_8", "GPIOX_9", "GPIOX_10", "GPIOX_11",
63262e73f00SNeil Armstrong				 "GPIOX_12", "GPIOX_13", "GPIOX_14",  "GPIOX_15",
63362e73f00SNeil Armstrong				 "GPIOX_16", "GPIOX_17", "GPIOX_18",  "GPIOX_19";
63462e73f00SNeil Armstrong			function = "gpio_periphs";
63562e73f00SNeil Armstrong			bias-pull-up;
63662e73f00SNeil Armstrong			output-disable;
63762e73f00SNeil Armstrong		};
63862e73f00SNeil Armstrong	};
63962e73f00SNeil Armstrong};
64062e73f00SNeil Armstrong
64162e73f00SNeil Armstrong&saradc {
64262e73f00SNeil Armstrong	status = "okay";
64362e73f00SNeil Armstrong	vref-supply = <&vddio_ao1v8>;
64462e73f00SNeil Armstrong};
64562e73f00SNeil Armstrong
64662e73f00SNeil Armstrong/* SD card */
64762e73f00SNeil Armstrong&sd_emmc_b {
64862e73f00SNeil Armstrong	status = "okay";
64962e73f00SNeil Armstrong	pinctrl-0 = <&sdcard_c_pins>;
65062e73f00SNeil Armstrong	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
65162e73f00SNeil Armstrong	pinctrl-names = "default", "clk-gate";
65262e73f00SNeil Armstrong
65362e73f00SNeil Armstrong	bus-width = <4>;
65462e73f00SNeil Armstrong	cap-sd-highspeed;
65562e73f00SNeil Armstrong	max-frequency = <50000000>;
65662e73f00SNeil Armstrong	disable-wp;
65762e73f00SNeil Armstrong
65862e73f00SNeil Armstrong	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
65962e73f00SNeil Armstrong	vmmc-supply = <&vcc_sd>;
66062e73f00SNeil Armstrong	vqmmc-supply = <&vddio_c>;
66162e73f00SNeil Armstrong
66262e73f00SNeil Armstrong};
66362e73f00SNeil Armstrong
66462e73f00SNeil Armstrong/* eMMC */
66562e73f00SNeil Armstrong&sd_emmc_c {
66662e73f00SNeil Armstrong	status = "okay";
66762e73f00SNeil Armstrong	pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
66862e73f00SNeil Armstrong	pinctrl-1 = <&emmc_clk_gate_pins>;
66962e73f00SNeil Armstrong	pinctrl-names = "default", "clk-gate";
67062e73f00SNeil Armstrong
67162e73f00SNeil Armstrong	bus-width = <8>;
67262e73f00SNeil Armstrong	cap-mmc-highspeed;
67362e73f00SNeil Armstrong	mmc-ddr-1_8v;
67462e73f00SNeil Armstrong	mmc-hs200-1_8v;
67562e73f00SNeil Armstrong	max-frequency = <200000000>;
67662e73f00SNeil Armstrong	disable-wp;
67762e73f00SNeil Armstrong
67862e73f00SNeil Armstrong	mmc-pwrseq = <&emmc_pwrseq>;
67962e73f00SNeil Armstrong	vmmc-supply = <&vcc_sd>;
68062e73f00SNeil Armstrong	vqmmc-supply = <&vddio_ao1v8>;
68162e73f00SNeil Armstrong};
68262e73f00SNeil Armstrong
68362e73f00SNeil Armstrong
68462e73f00SNeil Armstrong&tdmif_b {
68562e73f00SNeil Armstrong	pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>, <&tdm_b_din1_pins>;
68662e73f00SNeil Armstrong	pinctrl-names = "default";
68762e73f00SNeil Armstrong	status = "okay";
68862e73f00SNeil Armstrong
68962e73f00SNeil Armstrong	assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
69062e73f00SNeil Armstrong			  <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
69162e73f00SNeil Armstrong	assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>,
69262e73f00SNeil Armstrong				 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
69362e73f00SNeil Armstrong	assigned-clock-rates = <0>, <0>;
69462e73f00SNeil Armstrong};
69562e73f00SNeil Armstrong
69662e73f00SNeil Armstrong&tdmin_b {
69762e73f00SNeil Armstrong	status = "okay";
69862e73f00SNeil Armstrong};
69962e73f00SNeil Armstrong
70062e73f00SNeil Armstrong&tdmout_b {
70162e73f00SNeil Armstrong	status = "okay";
70262e73f00SNeil Armstrong};
70362e73f00SNeil Armstrong
70462e73f00SNeil Armstrong&toddr_a {
70562e73f00SNeil Armstrong	status = "okay";
70662e73f00SNeil Armstrong};
70762e73f00SNeil Armstrong
70862e73f00SNeil Armstrong&uart_AO {
70962e73f00SNeil Armstrong	status = "okay";
71062e73f00SNeil Armstrong	pinctrl-0 = <&uart_ao_a_pins>;
71162e73f00SNeil Armstrong	pinctrl-names = "default";
71262e73f00SNeil Armstrong};
71362e73f00SNeil Armstrong
71462e73f00SNeil Armstrong&usb {
71562e73f00SNeil Armstrong	status = "okay";
71662e73f00SNeil Armstrong	dr_mode = "peripheral";
71762e73f00SNeil Armstrong};
71862e73f00SNeil Armstrong
71962e73f00SNeil Armstrong&usb2_phy0 {
72062e73f00SNeil Armstrong	status = "okay";
72162e73f00SNeil Armstrong};
72262e73f00SNeil Armstrong
72362e73f00SNeil Armstrong&usb2_phy1 {
72462e73f00SNeil Armstrong	status = "okay";
72562e73f00SNeil Armstrong	phy-supply = <&usb_host>;
72662e73f00SNeil Armstrong};
727