191f480d4SOndrej Jirman// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
291f480d4SOndrej Jirman// Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
391f480d4SOndrej Jirman// Copyright (C) 2020 Martijn Braam <martijn@brixit.nl>
491f480d4SOndrej Jirman// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
591f480d4SOndrej Jirman
691f480d4SOndrej Jirman#include "sun50i-a64.dtsi"
791f480d4SOndrej Jirman#include "sun50i-a64-cpu-opp.dtsi"
891f480d4SOndrej Jirman
991f480d4SOndrej Jirman#include <dt-bindings/gpio/gpio.h>
1091f480d4SOndrej Jirman#include <dt-bindings/input/input.h>
1191f480d4SOndrej Jirman#include <dt-bindings/leds/common.h>
1291f480d4SOndrej Jirman#include <dt-bindings/pwm/pwm.h>
1391f480d4SOndrej Jirman
1491f480d4SOndrej Jirman/ {
15*d900a1cdSArnaud Ferraris	chassis-type = "handset";
16*d900a1cdSArnaud Ferraris
1791f480d4SOndrej Jirman	aliases {
184fcf6f34SOndrej Jirman		ethernet0 = &rtl8723cs;
1991f480d4SOndrej Jirman		serial0 = &uart0;
2091f480d4SOndrej Jirman	};
2191f480d4SOndrej Jirman
22a6a22f82SIcenowy Zheng	backlight: backlight {
23a6a22f82SIcenowy Zheng		compatible = "pwm-backlight";
24a6a22f82SIcenowy Zheng		pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
25a6a22f82SIcenowy Zheng		enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
2686131fb9SMaxime Ripard		power-supply = <&reg_ps>;
27a6a22f82SIcenowy Zheng		/* Backlight configuration differs per PinePhone revision. */
28a6a22f82SIcenowy Zheng	};
29a6a22f82SIcenowy Zheng
3036777d96SSamuel Holland	bt_sco_codec: bt-sco-codec {
3136777d96SSamuel Holland		#sound-dai-cells = <1>;
3236777d96SSamuel Holland		compatible = "linux,bt-sco";
3336777d96SSamuel Holland	};
3436777d96SSamuel Holland
3591f480d4SOndrej Jirman	chosen {
3691f480d4SOndrej Jirman		stdout-path = "serial0:115200n8";
3791f480d4SOndrej Jirman	};
3891f480d4SOndrej Jirman
3991f480d4SOndrej Jirman	leds {
4091f480d4SOndrej Jirman		compatible = "gpio-leds";
4191f480d4SOndrej Jirman
42e299e6ddSMaxime Ripard		led-0 {
4391f480d4SOndrej Jirman			function = LED_FUNCTION_INDICATOR;
4491f480d4SOndrej Jirman			color = <LED_COLOR_ID_BLUE>;
4591f480d4SOndrej Jirman			gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
4691f480d4SOndrej Jirman		};
4791f480d4SOndrej Jirman
48e299e6ddSMaxime Ripard		led-1 {
4991f480d4SOndrej Jirman			function = LED_FUNCTION_INDICATOR;
5091f480d4SOndrej Jirman			color = <LED_COLOR_ID_GREEN>;
5191f480d4SOndrej Jirman			gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
5291f480d4SOndrej Jirman		};
5391f480d4SOndrej Jirman
54e299e6ddSMaxime Ripard		led-2 {
5591f480d4SOndrej Jirman			function = LED_FUNCTION_INDICATOR;
5691f480d4SOndrej Jirman			color = <LED_COLOR_ID_RED>;
5791f480d4SOndrej Jirman			gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
5891f480d4SOndrej Jirman		};
5991f480d4SOndrej Jirman	};
6091f480d4SOndrej Jirman
6186131fb9SMaxime Ripard	reg_ps: ps-regulator {
6286131fb9SMaxime Ripard		compatible = "regulator-fixed";
6386131fb9SMaxime Ripard		regulator-name = "ps";
6486131fb9SMaxime Ripard		regulator-min-microvolt = <5000000>;
6586131fb9SMaxime Ripard		regulator-max-microvolt = <5000000>;
6686131fb9SMaxime Ripard		regulator-boot-on;
6786131fb9SMaxime Ripard	};
6886131fb9SMaxime Ripard
694fcf6f34SOndrej Jirman	reg_vbat_wifi: vbat-wifi {
704fcf6f34SOndrej Jirman		compatible = "regulator-fixed";
714fcf6f34SOndrej Jirman		regulator-min-microvolt = <3300000>;
724fcf6f34SOndrej Jirman		regulator-max-microvolt = <3300000>;
734fcf6f34SOndrej Jirman		regulator-name = "vbat-wifi";
744fcf6f34SOndrej Jirman	};
754fcf6f34SOndrej Jirman
76085d96b8SLuca Weiss	sgm3140: led-controller {
77085d96b8SLuca Weiss		compatible = "sgmicro,sgm3140";
78085d96b8SLuca Weiss		vin-supply = <&reg_dcdc1>;
79085d96b8SLuca Weiss
80085d96b8SLuca Weiss		sgm3140_flash: led {
81085d96b8SLuca Weiss			function = LED_FUNCTION_FLASH;
82085d96b8SLuca Weiss			color = <LED_COLOR_ID_WHITE>;
83085d96b8SLuca Weiss			flash-max-timeout-us = <250000>;
84085d96b8SLuca Weiss		};
85085d96b8SLuca Weiss	};
86085d96b8SLuca Weiss
8791f480d4SOndrej Jirman	speaker_amp: audio-amplifier {
8891f480d4SOndrej Jirman		compatible = "simple-audio-amplifier";
8991f480d4SOndrej Jirman		enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
9091f480d4SOndrej Jirman		sound-name-prefix = "Speaker Amp";
9191f480d4SOndrej Jirman	};
9291f480d4SOndrej Jirman
9391f480d4SOndrej Jirman	vibrator {
9491f480d4SOndrej Jirman		compatible = "gpio-vibrator";
9591f480d4SOndrej Jirman		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
9691f480d4SOndrej Jirman		vcc-supply = <&reg_dcdc1>;
9791f480d4SOndrej Jirman	};
9891f480d4SOndrej Jirman};
9991f480d4SOndrej Jirman
10091f480d4SOndrej Jirman&codec {
10136777d96SSamuel Holland	pinctrl-names = "default";
10236777d96SSamuel Holland	pinctrl-0 = <&aif3_pins>;
10391f480d4SOndrej Jirman	status = "okay";
10491f480d4SOndrej Jirman};
10591f480d4SOndrej Jirman
10691f480d4SOndrej Jirman&codec_analog {
10791f480d4SOndrej Jirman	cpvdd-supply = <&reg_eldo1>;
10891f480d4SOndrej Jirman	status = "okay";
10991f480d4SOndrej Jirman};
11091f480d4SOndrej Jirman
11191f480d4SOndrej Jirman&cpu0 {
11291f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
11391f480d4SOndrej Jirman};
11491f480d4SOndrej Jirman
11591f480d4SOndrej Jirman&cpu1 {
11691f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
11791f480d4SOndrej Jirman};
11891f480d4SOndrej Jirman
11991f480d4SOndrej Jirman&cpu2 {
12091f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
12191f480d4SOndrej Jirman};
12291f480d4SOndrej Jirman
12391f480d4SOndrej Jirman&cpu3 {
12491f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
12591f480d4SOndrej Jirman};
12691f480d4SOndrej Jirman
12791f480d4SOndrej Jirman&dai {
12891f480d4SOndrej Jirman	status = "okay";
12991f480d4SOndrej Jirman};
13091f480d4SOndrej Jirman
131a6a22f82SIcenowy Zheng&de {
132a6a22f82SIcenowy Zheng	status = "okay";
133a6a22f82SIcenowy Zheng};
134a6a22f82SIcenowy Zheng
135a6a22f82SIcenowy Zheng&dphy {
136a6a22f82SIcenowy Zheng	status = "okay";
137a6a22f82SIcenowy Zheng};
138a6a22f82SIcenowy Zheng
139a6a22f82SIcenowy Zheng&dsi {
140a6a22f82SIcenowy Zheng	vcc-dsi-supply = <&reg_dldo1>;
141a6a22f82SIcenowy Zheng	status = "okay";
142a6a22f82SIcenowy Zheng
143a6a22f82SIcenowy Zheng	panel@0 {
144a6a22f82SIcenowy Zheng		compatible = "xingbangda,xbd599";
145a6a22f82SIcenowy Zheng		reg = <0>;
146a6a22f82SIcenowy Zheng		reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
147a6a22f82SIcenowy Zheng		iovcc-supply = <&reg_dldo2>;
148a6a22f82SIcenowy Zheng		vcc-supply = <&reg_ldo_io0>;
149a6a22f82SIcenowy Zheng		backlight = <&backlight>;
150a6a22f82SIcenowy Zheng	};
151a6a22f82SIcenowy Zheng};
152a6a22f82SIcenowy Zheng
15391f480d4SOndrej Jirman&ehci0 {
15491f480d4SOndrej Jirman	status = "okay";
15591f480d4SOndrej Jirman};
15691f480d4SOndrej Jirman
15791f480d4SOndrej Jirman&ehci1 {
15891f480d4SOndrej Jirman	status = "okay";
15991f480d4SOndrej Jirman};
16091f480d4SOndrej Jirman
16160f2de5fSOndrej Jirman&i2c0 {
16260f2de5fSOndrej Jirman	status = "okay";
16360f2de5fSOndrej Jirman
16460f2de5fSOndrej Jirman	touchscreen@5d {
16560f2de5fSOndrej Jirman		compatible = "goodix,gt917s";
16660f2de5fSOndrej Jirman		reg = <0x5d>;
16760f2de5fSOndrej Jirman		interrupt-parent = <&pio>;
16860f2de5fSOndrej Jirman		interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
16960f2de5fSOndrej Jirman		irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
17060f2de5fSOndrej Jirman		reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
17160f2de5fSOndrej Jirman		AVDD28-supply = <&reg_ldo_io0>;
17260f2de5fSOndrej Jirman		VDDIO-supply = <&reg_ldo_io0>;
17360f2de5fSOndrej Jirman		touchscreen-size-x = <720>;
17460f2de5fSOndrej Jirman		touchscreen-size-y = <1440>;
17560f2de5fSOndrej Jirman	};
17660f2de5fSOndrej Jirman};
17760f2de5fSOndrej Jirman
17891f480d4SOndrej Jirman&i2c1 {
17991f480d4SOndrej Jirman	status = "okay";
18091f480d4SOndrej Jirman
18191f480d4SOndrej Jirman	/* Magnetometer */
182030eea2aSSamuel Holland	lis3mdl: magnetometer@1e {
18391f480d4SOndrej Jirman		compatible = "st,lis3mdl-magn";
18491f480d4SOndrej Jirman		reg = <0x1e>;
18591f480d4SOndrej Jirman		vdd-supply = <&reg_dldo1>;
18691f480d4SOndrej Jirman		vddio-supply = <&reg_dldo1>;
18791f480d4SOndrej Jirman	};
18891f480d4SOndrej Jirman
189a966ef62SOndrej Jirman	/* Light/proximity sensor */
190030eea2aSSamuel Holland	light-sensor@48 {
191a966ef62SOndrej Jirman		compatible = "sensortek,stk3311";
192a966ef62SOndrej Jirman		reg = <0x48>;
193a966ef62SOndrej Jirman		interrupt-parent = <&pio>;
194a966ef62SOndrej Jirman		interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
195a966ef62SOndrej Jirman	};
196a966ef62SOndrej Jirman
19791f480d4SOndrej Jirman	/* Accelerometer/gyroscope */
198030eea2aSSamuel Holland	accelerometer@68 {
19991f480d4SOndrej Jirman		compatible = "invensense,mpu6050";
20091f480d4SOndrej Jirman		reg = <0x68>;
20191f480d4SOndrej Jirman		interrupt-parent = <&pio>;
20291f480d4SOndrej Jirman		interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
20391f480d4SOndrej Jirman		vdd-supply = <&reg_dldo1>;
20491f480d4SOndrej Jirman		vddio-supply = <&reg_dldo1>;
20591f480d4SOndrej Jirman	};
20691f480d4SOndrej Jirman};
20791f480d4SOndrej Jirman
20891f480d4SOndrej Jirman/* Connected to pogo pins (external spring based pinheader for user addons) */
20991f480d4SOndrej Jirman&i2c2 {
21091f480d4SOndrej Jirman	status = "okay";
21191f480d4SOndrej Jirman};
21291f480d4SOndrej Jirman
21391f480d4SOndrej Jirman&lradc {
21491f480d4SOndrej Jirman	vref-supply = <&reg_aldo3>;
2150b26926aSSamuel Holland	wakeup-source;
21691f480d4SOndrej Jirman	status = "okay";
21791f480d4SOndrej Jirman
21891f480d4SOndrej Jirman	button-200 {
21991f480d4SOndrej Jirman		label = "Volume Up";
22091f480d4SOndrej Jirman		linux,code = <KEY_VOLUMEUP>;
22191f480d4SOndrej Jirman		channel = <0>;
22291f480d4SOndrej Jirman		voltage = <200000>;
22391f480d4SOndrej Jirman	};
22491f480d4SOndrej Jirman
22591f480d4SOndrej Jirman	button-400 {
22691f480d4SOndrej Jirman		label = "Volume Down";
22791f480d4SOndrej Jirman		linux,code = <KEY_VOLUMEDOWN>;
22891f480d4SOndrej Jirman		channel = <0>;
22991f480d4SOndrej Jirman		voltage = <400000>;
23091f480d4SOndrej Jirman	};
23191f480d4SOndrej Jirman};
23291f480d4SOndrej Jirman
23391f480d4SOndrej Jirman&mmc0 {
23491f480d4SOndrej Jirman	pinctrl-names = "default";
23591f480d4SOndrej Jirman	pinctrl-0 = <&mmc0_pins>;
23691f480d4SOndrej Jirman	vmmc-supply = <&reg_dcdc1>;
23791f480d4SOndrej Jirman	vqmmc-supply = <&reg_dcdc1>;
23891f480d4SOndrej Jirman	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
23991f480d4SOndrej Jirman	disable-wp;
24091f480d4SOndrej Jirman	bus-width = <4>;
24191f480d4SOndrej Jirman	status = "okay";
24291f480d4SOndrej Jirman};
24391f480d4SOndrej Jirman
2444fcf6f34SOndrej Jirman&mmc1 {
2454fcf6f34SOndrej Jirman	pinctrl-names = "default";
2464fcf6f34SOndrej Jirman	pinctrl-0 = <&mmc1_pins>;
2474fcf6f34SOndrej Jirman	vmmc-supply = <&reg_vbat_wifi>;
2484fcf6f34SOndrej Jirman	vqmmc-supply = <&reg_dldo4>;
2494fcf6f34SOndrej Jirman	bus-width = <4>;
2504fcf6f34SOndrej Jirman	non-removable;
2514fcf6f34SOndrej Jirman	status = "okay";
2524fcf6f34SOndrej Jirman
2534fcf6f34SOndrej Jirman	rtl8723cs: wifi@1 {
2544fcf6f34SOndrej Jirman		reg = <1>;
2554fcf6f34SOndrej Jirman	};
2564fcf6f34SOndrej Jirman};
2574fcf6f34SOndrej Jirman
25891f480d4SOndrej Jirman&mmc2 {
25991f480d4SOndrej Jirman	pinctrl-names = "default";
26091f480d4SOndrej Jirman	pinctrl-0 = <&mmc2_pins>;
26191f480d4SOndrej Jirman	vmmc-supply = <&reg_dcdc1>;
26291f480d4SOndrej Jirman	vqmmc-supply = <&reg_dcdc1>;
26391f480d4SOndrej Jirman	bus-width = <8>;
26491f480d4SOndrej Jirman	non-removable;
26591f480d4SOndrej Jirman	cap-mmc-hw-reset;
26691f480d4SOndrej Jirman	status = "okay";
26791f480d4SOndrej Jirman};
26891f480d4SOndrej Jirman
26991f480d4SOndrej Jirman&ohci0 {
27091f480d4SOndrej Jirman	status = "okay";
27191f480d4SOndrej Jirman};
27291f480d4SOndrej Jirman
27391f480d4SOndrej Jirman&ohci1 {
27491f480d4SOndrej Jirman	status = "okay";
27591f480d4SOndrej Jirman};
27691f480d4SOndrej Jirman
27791f480d4SOndrej Jirman&pio {
27891f480d4SOndrej Jirman	vcc-pb-supply = <&reg_dcdc1>;
27991f480d4SOndrej Jirman	vcc-pc-supply = <&reg_dcdc1>;
28091f480d4SOndrej Jirman	vcc-pd-supply = <&reg_dcdc1>;
28191f480d4SOndrej Jirman	vcc-pe-supply = <&reg_aldo1>;
28291f480d4SOndrej Jirman	vcc-pf-supply = <&reg_dcdc1>;
28391f480d4SOndrej Jirman	vcc-pg-supply = <&reg_dldo4>;
28491f480d4SOndrej Jirman	vcc-ph-supply = <&reg_dcdc1>;
28591f480d4SOndrej Jirman};
28691f480d4SOndrej Jirman
28791f480d4SOndrej Jirman&r_pio {
28891f480d4SOndrej Jirman	/*
28991f480d4SOndrej Jirman	 * FIXME: We can't add that supply for now since it would
29091f480d4SOndrej Jirman	 * create a circular dependency between pinctrl, the regulator
29191f480d4SOndrej Jirman	 * and the RSB Bus.
29291f480d4SOndrej Jirman	 *
29391f480d4SOndrej Jirman	 * vcc-pl-supply = <&reg_aldo2>;
29491f480d4SOndrej Jirman	 */
29591f480d4SOndrej Jirman};
29691f480d4SOndrej Jirman
297a6a22f82SIcenowy Zheng&r_pwm {
298a6a22f82SIcenowy Zheng	status = "okay";
299a6a22f82SIcenowy Zheng};
300a6a22f82SIcenowy Zheng
30191f480d4SOndrej Jirman&r_rsb {
30291f480d4SOndrej Jirman	status = "okay";
30391f480d4SOndrej Jirman
30491f480d4SOndrej Jirman	axp803: pmic@3a3 {
30591f480d4SOndrej Jirman		compatible = "x-powers,axp803";
30691f480d4SOndrej Jirman		reg = <0x3a3>;
30791f480d4SOndrej Jirman		interrupt-parent = <&r_intc>;
30873088dfeSSamuel Holland		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
30991f480d4SOndrej Jirman	};
31091f480d4SOndrej Jirman};
31191f480d4SOndrej Jirman
31291f480d4SOndrej Jirman#include "axp803.dtsi"
31391f480d4SOndrej Jirman
31491f480d4SOndrej Jirman&battery_power_supply {
31591f480d4SOndrej Jirman	status = "okay";
31691f480d4SOndrej Jirman};
31791f480d4SOndrej Jirman
31891f480d4SOndrej Jirman&reg_aldo1 {
31991f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
32091f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
32191f480d4SOndrej Jirman	regulator-name = "dovdd-csi";
32291f480d4SOndrej Jirman};
32391f480d4SOndrej Jirman
32491f480d4SOndrej Jirman&reg_aldo2 {
32591f480d4SOndrej Jirman	regulator-always-on;
32691f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
32791f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
32891f480d4SOndrej Jirman	regulator-name = "vcc-pl";
32991f480d4SOndrej Jirman};
33091f480d4SOndrej Jirman
33191f480d4SOndrej Jirman&reg_aldo3 {
33291f480d4SOndrej Jirman	regulator-always-on;
3333cf9bf3bSSamuel Holland	regulator-min-microvolt = <3000000>;
3343cf9bf3bSSamuel Holland	regulator-max-microvolt = <3000000>;
33591f480d4SOndrej Jirman	regulator-name = "vcc-pll-avcc";
33691f480d4SOndrej Jirman};
33791f480d4SOndrej Jirman
33891f480d4SOndrej Jirman&reg_dcdc1 {
33991f480d4SOndrej Jirman	regulator-always-on;
34091f480d4SOndrej Jirman	regulator-min-microvolt = <3300000>;
34191f480d4SOndrej Jirman	regulator-max-microvolt = <3300000>;
34291f480d4SOndrej Jirman	regulator-name = "vcc-3v3";
34391f480d4SOndrej Jirman};
34491f480d4SOndrej Jirman
34591f480d4SOndrej Jirman&reg_dcdc2 {
34691f480d4SOndrej Jirman	regulator-always-on;
34791f480d4SOndrej Jirman	regulator-min-microvolt = <1000000>;
34891f480d4SOndrej Jirman	regulator-max-microvolt = <1300000>;
34991f480d4SOndrej Jirman	regulator-name = "vdd-cpux";
35091f480d4SOndrej Jirman};
35191f480d4SOndrej Jirman
35291f480d4SOndrej Jirman/* DCDC3 is polyphased with DCDC2 */
35391f480d4SOndrej Jirman
35491f480d4SOndrej Jirman&reg_dcdc5 {
35591f480d4SOndrej Jirman	regulator-always-on;
35691f480d4SOndrej Jirman	regulator-min-microvolt = <1200000>;
35791f480d4SOndrej Jirman	regulator-max-microvolt = <1200000>;
35891f480d4SOndrej Jirman	regulator-name = "vcc-dram";
35991f480d4SOndrej Jirman};
36091f480d4SOndrej Jirman
36191f480d4SOndrej Jirman&reg_dcdc6 {
36291f480d4SOndrej Jirman	regulator-always-on;
36391f480d4SOndrej Jirman	regulator-min-microvolt = <1100000>;
36491f480d4SOndrej Jirman	regulator-max-microvolt = <1100000>;
36591f480d4SOndrej Jirman	regulator-name = "vdd-sys";
36691f480d4SOndrej Jirman};
36791f480d4SOndrej Jirman
36891f480d4SOndrej Jirman&reg_dldo1 {
36991f480d4SOndrej Jirman	regulator-min-microvolt = <3300000>;
37091f480d4SOndrej Jirman	regulator-max-microvolt = <3300000>;
37191f480d4SOndrej Jirman	regulator-name = "vcc-dsi-sensor";
37291f480d4SOndrej Jirman};
37391f480d4SOndrej Jirman
37491f480d4SOndrej Jirman&reg_dldo2 {
37591f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
37691f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
37791f480d4SOndrej Jirman	regulator-name = "vcc-mipi-io";
37891f480d4SOndrej Jirman};
37991f480d4SOndrej Jirman
38091f480d4SOndrej Jirman&reg_dldo3 {
38191f480d4SOndrej Jirman	regulator-min-microvolt = <2800000>;
38291f480d4SOndrej Jirman	regulator-max-microvolt = <2800000>;
38391f480d4SOndrej Jirman	regulator-name = "avdd-csi";
38491f480d4SOndrej Jirman};
38591f480d4SOndrej Jirman
38691f480d4SOndrej Jirman&reg_dldo4 {
38791f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
38886be5c78SOndrej Jirman	regulator-max-microvolt = <1800000>;
38991f480d4SOndrej Jirman	regulator-name = "vcc-wifi-io";
39091f480d4SOndrej Jirman};
39191f480d4SOndrej Jirman
39291f480d4SOndrej Jirman&reg_eldo1 {
39391f480d4SOndrej Jirman	regulator-always-on;
39491f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
39591f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
39691f480d4SOndrej Jirman	regulator-name = "vcc-lpddr";
39791f480d4SOndrej Jirman};
39891f480d4SOndrej Jirman
39991f480d4SOndrej Jirman&reg_eldo3 {
40091f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
40191f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
40291f480d4SOndrej Jirman	regulator-name = "dvdd-1v8-csi";
40391f480d4SOndrej Jirman};
40491f480d4SOndrej Jirman
40591f480d4SOndrej Jirman&reg_fldo1 {
40691f480d4SOndrej Jirman	regulator-min-microvolt = <1200000>;
40791f480d4SOndrej Jirman	regulator-max-microvolt = <1200000>;
40891f480d4SOndrej Jirman	regulator-name = "vcc-1v2-hsic";
40991f480d4SOndrej Jirman};
41091f480d4SOndrej Jirman
41191f480d4SOndrej Jirman&reg_fldo2 {
41291f480d4SOndrej Jirman	regulator-always-on;
41391f480d4SOndrej Jirman	regulator-min-microvolt = <1100000>;
41491f480d4SOndrej Jirman	regulator-max-microvolt = <1100000>;
41591f480d4SOndrej Jirman	regulator-name = "vdd-cpus";
41691f480d4SOndrej Jirman};
41791f480d4SOndrej Jirman
41891f480d4SOndrej Jirman&reg_ldo_io0 {
41991f480d4SOndrej Jirman	regulator-min-microvolt = <3300000>;
42091f480d4SOndrej Jirman	regulator-max-microvolt = <3300000>;
42191f480d4SOndrej Jirman	regulator-name = "vcc-lcd-ctp-stk";
42291f480d4SOndrej Jirman	status = "okay";
42391f480d4SOndrej Jirman};
42491f480d4SOndrej Jirman
42591f480d4SOndrej Jirman&reg_ldo_io1 {
42691f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
42791f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
42891f480d4SOndrej Jirman	regulator-name = "vcc-1v8-typec";
42991f480d4SOndrej Jirman	status = "okay";
43091f480d4SOndrej Jirman};
43191f480d4SOndrej Jirman
43291f480d4SOndrej Jirman&reg_rtc_ldo {
43391f480d4SOndrej Jirman	regulator-name = "vcc-rtc";
43491f480d4SOndrej Jirman};
43591f480d4SOndrej Jirman
43691f480d4SOndrej Jirman&sound {
43791f480d4SOndrej Jirman	status = "okay";
438091d5db0SArnaud Ferraris	simple-audio-card,name = "PinePhone";
43991f480d4SOndrej Jirman	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
44091f480d4SOndrej Jirman	simple-audio-card,widgets = "Microphone", "Headset Microphone",
44191f480d4SOndrej Jirman				    "Microphone", "Internal Microphone",
44291f480d4SOndrej Jirman				    "Headphone", "Headphone Jack",
44391f480d4SOndrej Jirman				    "Speaker", "Internal Earpiece",
44491f480d4SOndrej Jirman				    "Speaker", "Internal Speaker";
44591f480d4SOndrej Jirman	simple-audio-card,routing =
44691f480d4SOndrej Jirman			"Headphone Jack", "HP",
44791f480d4SOndrej Jirman			"Internal Earpiece", "EARPIECE",
44891f480d4SOndrej Jirman			"Internal Speaker", "Speaker Amp OUTL",
44991f480d4SOndrej Jirman			"Internal Speaker", "Speaker Amp OUTR",
45091f480d4SOndrej Jirman			"Speaker Amp INL", "LINEOUT",
45191f480d4SOndrej Jirman			"Speaker Amp INR", "LINEOUT",
452631e6a35SSamuel Holland			"Left DAC", "DACL",
453631e6a35SSamuel Holland			"Right DAC", "DACR",
454631e6a35SSamuel Holland			"ADCL", "Left ADC",
455631e6a35SSamuel Holland			"ADCR", "Right ADC",
45691f480d4SOndrej Jirman			"Internal Microphone", "MBIAS",
45791f480d4SOndrej Jirman			"MIC1", "Internal Microphone",
45891f480d4SOndrej Jirman			"Headset Microphone", "HBIAS",
45991f480d4SOndrej Jirman			"MIC2", "Headset Microphone";
46036777d96SSamuel Holland
46136777d96SSamuel Holland	simple-audio-card,dai-link@2 {
46236777d96SSamuel Holland		format = "dsp_a";
46336777d96SSamuel Holland		frame-master = <&link2_codec>;
46436777d96SSamuel Holland		bitclock-master = <&link2_codec>;
46536777d96SSamuel Holland		bitclock-inversion;
46636777d96SSamuel Holland
46736777d96SSamuel Holland		link2_cpu: cpu {
46836777d96SSamuel Holland			sound-dai = <&bt_sco_codec 0>;
46936777d96SSamuel Holland		};
47036777d96SSamuel Holland
47136777d96SSamuel Holland		link2_codec: codec {
47236777d96SSamuel Holland			sound-dai = <&codec 2>;
47336777d96SSamuel Holland			dai-tdm-slot-num = <1>;
47436777d96SSamuel Holland			dai-tdm-slot-width = <32>;
47536777d96SSamuel Holland		};
47636777d96SSamuel Holland	};
47791f480d4SOndrej Jirman};
47891f480d4SOndrej Jirman
47991f480d4SOndrej Jirman&uart0 {
48091f480d4SOndrej Jirman	pinctrl-names = "default";
48191f480d4SOndrej Jirman	pinctrl-0 = <&uart0_pb_pins>;
48291f480d4SOndrej Jirman	status = "okay";
48391f480d4SOndrej Jirman};
48491f480d4SOndrej Jirman
485976843d5SOndrej Jirman&uart1 {
486976843d5SOndrej Jirman	pinctrl-names = "default";
487976843d5SOndrej Jirman	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
488976843d5SOndrej Jirman	status = "okay";
489976843d5SOndrej Jirman
490976843d5SOndrej Jirman	bluetooth {
491976843d5SOndrej Jirman		compatible = "realtek,rtl8723cs-bt";
492976843d5SOndrej Jirman		device-wake-gpios = <&pio 7 6 GPIO_ACTIVE_LOW>; /* PH6 */
493976843d5SOndrej Jirman		enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
494976843d5SOndrej Jirman		host-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
495976843d5SOndrej Jirman	};
496976843d5SOndrej Jirman};
497976843d5SOndrej Jirman
49891f480d4SOndrej Jirman/* Connected to the modem (hardware flow control can't be used) */
49991f480d4SOndrej Jirman&uart3 {
50091f480d4SOndrej Jirman	pinctrl-names = "default";
50191f480d4SOndrej Jirman	pinctrl-0 = <&uart3_pins>;
50291f480d4SOndrej Jirman	status = "okay";
50391f480d4SOndrej Jirman};
50491f480d4SOndrej Jirman
50591f480d4SOndrej Jirman&usb_otg {
50691f480d4SOndrej Jirman	dr_mode = "peripheral";
50791f480d4SOndrej Jirman	status = "okay";
50891f480d4SOndrej Jirman};
50991f480d4SOndrej Jirman
51091f480d4SOndrej Jirman&usb_power_supply {
51191f480d4SOndrej Jirman	status = "okay";
51291f480d4SOndrej Jirman};
51391f480d4SOndrej Jirman
51491f480d4SOndrej Jirman&usbphy {
51591f480d4SOndrej Jirman	status = "okay";
51691f480d4SOndrej Jirman};
517