xref: /freebsd/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a64-pinephone.dtsi (revision e67e85659c0de33e617e5fbf1028c6e8b49eee53)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c66ec88fSEmmanuel Vadot// Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
3c66ec88fSEmmanuel Vadot// Copyright (C) 2020 Martijn Braam <martijn@brixit.nl>
4c66ec88fSEmmanuel Vadot// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
5c66ec88fSEmmanuel Vadot
6c66ec88fSEmmanuel Vadot#include "sun50i-a64.dtsi"
7c66ec88fSEmmanuel Vadot#include "sun50i-a64-cpu-opp.dtsi"
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10c66ec88fSEmmanuel Vadot#include <dt-bindings/input/input.h>
11c66ec88fSEmmanuel Vadot#include <dt-bindings/leds/common.h>
12c66ec88fSEmmanuel Vadot#include <dt-bindings/pwm/pwm.h>
13c66ec88fSEmmanuel Vadot
14c66ec88fSEmmanuel Vadot/ {
15*e67e8565SEmmanuel Vadot	chassis-type = "handset";
16*e67e8565SEmmanuel Vadot
17c66ec88fSEmmanuel Vadot	aliases {
185def4c47SEmmanuel Vadot		ethernet0 = &rtl8723cs;
19c66ec88fSEmmanuel Vadot		serial0 = &uart0;
20c66ec88fSEmmanuel Vadot	};
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot	backlight: backlight {
23c66ec88fSEmmanuel Vadot		compatible = "pwm-backlight";
24c66ec88fSEmmanuel Vadot		pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
25c66ec88fSEmmanuel Vadot		enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
265def4c47SEmmanuel Vadot		power-supply = <&reg_ps>;
27c66ec88fSEmmanuel Vadot		/* Backlight configuration differs per PinePhone revision. */
28c66ec88fSEmmanuel Vadot	};
29c66ec88fSEmmanuel Vadot
305956d97fSEmmanuel Vadot	bt_sco_codec: bt-sco-codec {
315956d97fSEmmanuel Vadot		#sound-dai-cells = <1>;
325956d97fSEmmanuel Vadot		compatible = "linux,bt-sco";
335956d97fSEmmanuel Vadot	};
345956d97fSEmmanuel Vadot
35c66ec88fSEmmanuel Vadot	chosen {
36c66ec88fSEmmanuel Vadot		stdout-path = "serial0:115200n8";
37c66ec88fSEmmanuel Vadot	};
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot	leds {
40c66ec88fSEmmanuel Vadot		compatible = "gpio-leds";
41c66ec88fSEmmanuel Vadot
425def4c47SEmmanuel Vadot		led-0 {
43c66ec88fSEmmanuel Vadot			function = LED_FUNCTION_INDICATOR;
44c66ec88fSEmmanuel Vadot			color = <LED_COLOR_ID_BLUE>;
45c66ec88fSEmmanuel Vadot			gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
46c66ec88fSEmmanuel Vadot		};
47c66ec88fSEmmanuel Vadot
485def4c47SEmmanuel Vadot		led-1 {
49c66ec88fSEmmanuel Vadot			function = LED_FUNCTION_INDICATOR;
50c66ec88fSEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
51c66ec88fSEmmanuel Vadot			gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
52c66ec88fSEmmanuel Vadot		};
53c66ec88fSEmmanuel Vadot
545def4c47SEmmanuel Vadot		led-2 {
55c66ec88fSEmmanuel Vadot			function = LED_FUNCTION_INDICATOR;
56c66ec88fSEmmanuel Vadot			color = <LED_COLOR_ID_RED>;
57c66ec88fSEmmanuel Vadot			gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
58c66ec88fSEmmanuel Vadot		};
59c66ec88fSEmmanuel Vadot	};
60c66ec88fSEmmanuel Vadot
615def4c47SEmmanuel Vadot	reg_ps: ps-regulator {
625def4c47SEmmanuel Vadot		compatible = "regulator-fixed";
635def4c47SEmmanuel Vadot		regulator-name = "ps";
645def4c47SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
655def4c47SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
665def4c47SEmmanuel Vadot		regulator-boot-on;
675def4c47SEmmanuel Vadot	};
685def4c47SEmmanuel Vadot
695def4c47SEmmanuel Vadot	reg_vbat_wifi: vbat-wifi {
705def4c47SEmmanuel Vadot		compatible = "regulator-fixed";
715def4c47SEmmanuel Vadot		regulator-min-microvolt = <3300000>;
725def4c47SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
735def4c47SEmmanuel Vadot		regulator-name = "vbat-wifi";
745def4c47SEmmanuel Vadot	};
755def4c47SEmmanuel Vadot
765def4c47SEmmanuel Vadot	sgm3140: led-controller {
775def4c47SEmmanuel Vadot		compatible = "sgmicro,sgm3140";
785def4c47SEmmanuel Vadot		vin-supply = <&reg_dcdc1>;
795def4c47SEmmanuel Vadot
805def4c47SEmmanuel Vadot		sgm3140_flash: led {
815def4c47SEmmanuel Vadot			function = LED_FUNCTION_FLASH;
825def4c47SEmmanuel Vadot			color = <LED_COLOR_ID_WHITE>;
835def4c47SEmmanuel Vadot			flash-max-timeout-us = <250000>;
845def4c47SEmmanuel Vadot		};
855def4c47SEmmanuel Vadot	};
865def4c47SEmmanuel Vadot
87c66ec88fSEmmanuel Vadot	speaker_amp: audio-amplifier {
88c66ec88fSEmmanuel Vadot		compatible = "simple-audio-amplifier";
89c66ec88fSEmmanuel Vadot		enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
90c66ec88fSEmmanuel Vadot		sound-name-prefix = "Speaker Amp";
91c66ec88fSEmmanuel Vadot	};
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot	vibrator {
94c66ec88fSEmmanuel Vadot		compatible = "gpio-vibrator";
95c66ec88fSEmmanuel Vadot		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
96c66ec88fSEmmanuel Vadot		vcc-supply = <&reg_dcdc1>;
97c66ec88fSEmmanuel Vadot	};
98c66ec88fSEmmanuel Vadot};
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadot&codec {
1015956d97fSEmmanuel Vadot	pinctrl-names = "default";
1025956d97fSEmmanuel Vadot	pinctrl-0 = <&aif3_pins>;
103c66ec88fSEmmanuel Vadot	status = "okay";
104c66ec88fSEmmanuel Vadot};
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot&codec_analog {
107c66ec88fSEmmanuel Vadot	cpvdd-supply = <&reg_eldo1>;
108c66ec88fSEmmanuel Vadot	status = "okay";
109c66ec88fSEmmanuel Vadot};
110c66ec88fSEmmanuel Vadot
111c66ec88fSEmmanuel Vadot&cpu0 {
112c66ec88fSEmmanuel Vadot	cpu-supply = <&reg_dcdc2>;
113c66ec88fSEmmanuel Vadot};
114c66ec88fSEmmanuel Vadot
115c66ec88fSEmmanuel Vadot&cpu1 {
116c66ec88fSEmmanuel Vadot	cpu-supply = <&reg_dcdc2>;
117c66ec88fSEmmanuel Vadot};
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot&cpu2 {
120c66ec88fSEmmanuel Vadot	cpu-supply = <&reg_dcdc2>;
121c66ec88fSEmmanuel Vadot};
122c66ec88fSEmmanuel Vadot
123c66ec88fSEmmanuel Vadot&cpu3 {
124c66ec88fSEmmanuel Vadot	cpu-supply = <&reg_dcdc2>;
125c66ec88fSEmmanuel Vadot};
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel Vadot&dai {
128c66ec88fSEmmanuel Vadot	status = "okay";
129c66ec88fSEmmanuel Vadot};
130c66ec88fSEmmanuel Vadot
131c66ec88fSEmmanuel Vadot&de {
132c66ec88fSEmmanuel Vadot	status = "okay";
133c66ec88fSEmmanuel Vadot};
134c66ec88fSEmmanuel Vadot
135c66ec88fSEmmanuel Vadot&dphy {
136c66ec88fSEmmanuel Vadot	status = "okay";
137c66ec88fSEmmanuel Vadot};
138c66ec88fSEmmanuel Vadot
139c66ec88fSEmmanuel Vadot&dsi {
140c66ec88fSEmmanuel Vadot	vcc-dsi-supply = <&reg_dldo1>;
141c66ec88fSEmmanuel Vadot	status = "okay";
142c66ec88fSEmmanuel Vadot
143c66ec88fSEmmanuel Vadot	panel@0 {
144c66ec88fSEmmanuel Vadot		compatible = "xingbangda,xbd599";
145c66ec88fSEmmanuel Vadot		reg = <0>;
146c66ec88fSEmmanuel Vadot		reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
147c66ec88fSEmmanuel Vadot		iovcc-supply = <&reg_dldo2>;
148c66ec88fSEmmanuel Vadot		vcc-supply = <&reg_ldo_io0>;
149c66ec88fSEmmanuel Vadot		backlight = <&backlight>;
150c66ec88fSEmmanuel Vadot	};
151c66ec88fSEmmanuel Vadot};
152c66ec88fSEmmanuel Vadot
153c66ec88fSEmmanuel Vadot&ehci0 {
154c66ec88fSEmmanuel Vadot	status = "okay";
155c66ec88fSEmmanuel Vadot};
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel Vadot&ehci1 {
158c66ec88fSEmmanuel Vadot	status = "okay";
159c66ec88fSEmmanuel Vadot};
160c66ec88fSEmmanuel Vadot
161c66ec88fSEmmanuel Vadot&i2c0 {
162c66ec88fSEmmanuel Vadot	status = "okay";
163c66ec88fSEmmanuel Vadot
164c66ec88fSEmmanuel Vadot	touchscreen@5d {
165c66ec88fSEmmanuel Vadot		compatible = "goodix,gt917s";
166c66ec88fSEmmanuel Vadot		reg = <0x5d>;
167c66ec88fSEmmanuel Vadot		interrupt-parent = <&pio>;
168c66ec88fSEmmanuel Vadot		interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
169c66ec88fSEmmanuel Vadot		irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
170c66ec88fSEmmanuel Vadot		reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
171c66ec88fSEmmanuel Vadot		AVDD28-supply = <&reg_ldo_io0>;
172c66ec88fSEmmanuel Vadot		VDDIO-supply = <&reg_ldo_io0>;
173c66ec88fSEmmanuel Vadot		touchscreen-size-x = <720>;
174c66ec88fSEmmanuel Vadot		touchscreen-size-y = <1440>;
175c66ec88fSEmmanuel Vadot	};
176c66ec88fSEmmanuel Vadot};
177c66ec88fSEmmanuel Vadot
178c66ec88fSEmmanuel Vadot&i2c1 {
179c66ec88fSEmmanuel Vadot	status = "okay";
180c66ec88fSEmmanuel Vadot
181c66ec88fSEmmanuel Vadot	/* Magnetometer */
1825def4c47SEmmanuel Vadot	lis3mdl: magnetometer@1e {
183c66ec88fSEmmanuel Vadot		compatible = "st,lis3mdl-magn";
184c66ec88fSEmmanuel Vadot		reg = <0x1e>;
185c66ec88fSEmmanuel Vadot		vdd-supply = <&reg_dldo1>;
186c66ec88fSEmmanuel Vadot		vddio-supply = <&reg_dldo1>;
187c66ec88fSEmmanuel Vadot	};
188c66ec88fSEmmanuel Vadot
1895def4c47SEmmanuel Vadot	/* Light/proximity sensor */
1905def4c47SEmmanuel Vadot	light-sensor@48 {
1915def4c47SEmmanuel Vadot		compatible = "sensortek,stk3311";
1925def4c47SEmmanuel Vadot		reg = <0x48>;
1935def4c47SEmmanuel Vadot		interrupt-parent = <&pio>;
1945def4c47SEmmanuel Vadot		interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
1955def4c47SEmmanuel Vadot	};
1965def4c47SEmmanuel Vadot
197c66ec88fSEmmanuel Vadot	/* Accelerometer/gyroscope */
1985def4c47SEmmanuel Vadot	accelerometer@68 {
199c66ec88fSEmmanuel Vadot		compatible = "invensense,mpu6050";
200c66ec88fSEmmanuel Vadot		reg = <0x68>;
201c66ec88fSEmmanuel Vadot		interrupt-parent = <&pio>;
202c66ec88fSEmmanuel Vadot		interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
203c66ec88fSEmmanuel Vadot		vdd-supply = <&reg_dldo1>;
204c66ec88fSEmmanuel Vadot		vddio-supply = <&reg_dldo1>;
205c66ec88fSEmmanuel Vadot	};
206c66ec88fSEmmanuel Vadot};
207c66ec88fSEmmanuel Vadot
208c66ec88fSEmmanuel Vadot/* Connected to pogo pins (external spring based pinheader for user addons) */
209c66ec88fSEmmanuel Vadot&i2c2 {
210c66ec88fSEmmanuel Vadot	status = "okay";
211c66ec88fSEmmanuel Vadot};
212c66ec88fSEmmanuel Vadot
213c66ec88fSEmmanuel Vadot&lradc {
214c66ec88fSEmmanuel Vadot	vref-supply = <&reg_aldo3>;
2155def4c47SEmmanuel Vadot	wakeup-source;
216c66ec88fSEmmanuel Vadot	status = "okay";
217c66ec88fSEmmanuel Vadot
218c66ec88fSEmmanuel Vadot	button-200 {
219c66ec88fSEmmanuel Vadot		label = "Volume Up";
220c66ec88fSEmmanuel Vadot		linux,code = <KEY_VOLUMEUP>;
221c66ec88fSEmmanuel Vadot		channel = <0>;
222c66ec88fSEmmanuel Vadot		voltage = <200000>;
223c66ec88fSEmmanuel Vadot	};
224c66ec88fSEmmanuel Vadot
225c66ec88fSEmmanuel Vadot	button-400 {
226c66ec88fSEmmanuel Vadot		label = "Volume Down";
227c66ec88fSEmmanuel Vadot		linux,code = <KEY_VOLUMEDOWN>;
228c66ec88fSEmmanuel Vadot		channel = <0>;
229c66ec88fSEmmanuel Vadot		voltage = <400000>;
230c66ec88fSEmmanuel Vadot	};
231c66ec88fSEmmanuel Vadot};
232c66ec88fSEmmanuel Vadot
233c66ec88fSEmmanuel Vadot&mmc0 {
234c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
235c66ec88fSEmmanuel Vadot	pinctrl-0 = <&mmc0_pins>;
236c66ec88fSEmmanuel Vadot	vmmc-supply = <&reg_dcdc1>;
237c66ec88fSEmmanuel Vadot	vqmmc-supply = <&reg_dcdc1>;
238c66ec88fSEmmanuel Vadot	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
239c66ec88fSEmmanuel Vadot	disable-wp;
240c66ec88fSEmmanuel Vadot	bus-width = <4>;
241c66ec88fSEmmanuel Vadot	status = "okay";
242c66ec88fSEmmanuel Vadot};
243c66ec88fSEmmanuel Vadot
2445def4c47SEmmanuel Vadot&mmc1 {
2455def4c47SEmmanuel Vadot	pinctrl-names = "default";
2465def4c47SEmmanuel Vadot	pinctrl-0 = <&mmc1_pins>;
2475def4c47SEmmanuel Vadot	vmmc-supply = <&reg_vbat_wifi>;
2485def4c47SEmmanuel Vadot	vqmmc-supply = <&reg_dldo4>;
2495def4c47SEmmanuel Vadot	bus-width = <4>;
2505def4c47SEmmanuel Vadot	non-removable;
2515def4c47SEmmanuel Vadot	status = "okay";
2525def4c47SEmmanuel Vadot
2535def4c47SEmmanuel Vadot	rtl8723cs: wifi@1 {
2545def4c47SEmmanuel Vadot		reg = <1>;
2555def4c47SEmmanuel Vadot	};
2565def4c47SEmmanuel Vadot};
2575def4c47SEmmanuel Vadot
258c66ec88fSEmmanuel Vadot&mmc2 {
259c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
260c66ec88fSEmmanuel Vadot	pinctrl-0 = <&mmc2_pins>;
261c66ec88fSEmmanuel Vadot	vmmc-supply = <&reg_dcdc1>;
262c66ec88fSEmmanuel Vadot	vqmmc-supply = <&reg_dcdc1>;
263c66ec88fSEmmanuel Vadot	bus-width = <8>;
264c66ec88fSEmmanuel Vadot	non-removable;
265c66ec88fSEmmanuel Vadot	cap-mmc-hw-reset;
266c66ec88fSEmmanuel Vadot	status = "okay";
267c66ec88fSEmmanuel Vadot};
268c66ec88fSEmmanuel Vadot
269c66ec88fSEmmanuel Vadot&ohci0 {
270c66ec88fSEmmanuel Vadot	status = "okay";
271c66ec88fSEmmanuel Vadot};
272c66ec88fSEmmanuel Vadot
273c66ec88fSEmmanuel Vadot&ohci1 {
274c66ec88fSEmmanuel Vadot	status = "okay";
275c66ec88fSEmmanuel Vadot};
276c66ec88fSEmmanuel Vadot
277c66ec88fSEmmanuel Vadot&pio {
278c66ec88fSEmmanuel Vadot	vcc-pb-supply = <&reg_dcdc1>;
279c66ec88fSEmmanuel Vadot	vcc-pc-supply = <&reg_dcdc1>;
280c66ec88fSEmmanuel Vadot	vcc-pd-supply = <&reg_dcdc1>;
281c66ec88fSEmmanuel Vadot	vcc-pe-supply = <&reg_aldo1>;
282c66ec88fSEmmanuel Vadot	vcc-pf-supply = <&reg_dcdc1>;
283c66ec88fSEmmanuel Vadot	vcc-pg-supply = <&reg_dldo4>;
284c66ec88fSEmmanuel Vadot	vcc-ph-supply = <&reg_dcdc1>;
285c66ec88fSEmmanuel Vadot};
286c66ec88fSEmmanuel Vadot
287c66ec88fSEmmanuel Vadot&r_pio {
288c66ec88fSEmmanuel Vadot	/*
289c66ec88fSEmmanuel Vadot	 * FIXME: We can't add that supply for now since it would
290c66ec88fSEmmanuel Vadot	 * create a circular dependency between pinctrl, the regulator
291c66ec88fSEmmanuel Vadot	 * and the RSB Bus.
292c66ec88fSEmmanuel Vadot	 *
293c66ec88fSEmmanuel Vadot	 * vcc-pl-supply = <&reg_aldo2>;
294c66ec88fSEmmanuel Vadot	 */
295c66ec88fSEmmanuel Vadot};
296c66ec88fSEmmanuel Vadot
297c66ec88fSEmmanuel Vadot&r_pwm {
298c66ec88fSEmmanuel Vadot	status = "okay";
299c66ec88fSEmmanuel Vadot};
300c66ec88fSEmmanuel Vadot
301c66ec88fSEmmanuel Vadot&r_rsb {
302c66ec88fSEmmanuel Vadot	status = "okay";
303c66ec88fSEmmanuel Vadot
304c66ec88fSEmmanuel Vadot	axp803: pmic@3a3 {
305c66ec88fSEmmanuel Vadot		compatible = "x-powers,axp803";
306c66ec88fSEmmanuel Vadot		reg = <0x3a3>;
307c66ec88fSEmmanuel Vadot		interrupt-parent = <&r_intc>;
3082eb4d8dcSEmmanuel Vadot		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
309c66ec88fSEmmanuel Vadot	};
310c66ec88fSEmmanuel Vadot};
311c66ec88fSEmmanuel Vadot
312c66ec88fSEmmanuel Vadot#include "axp803.dtsi"
313c66ec88fSEmmanuel Vadot
314c66ec88fSEmmanuel Vadot&battery_power_supply {
315c66ec88fSEmmanuel Vadot	status = "okay";
316c66ec88fSEmmanuel Vadot};
317c66ec88fSEmmanuel Vadot
318c66ec88fSEmmanuel Vadot&reg_aldo1 {
319c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
320c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
321c66ec88fSEmmanuel Vadot	regulator-name = "dovdd-csi";
322c66ec88fSEmmanuel Vadot};
323c66ec88fSEmmanuel Vadot
324c66ec88fSEmmanuel Vadot&reg_aldo2 {
325c66ec88fSEmmanuel Vadot	regulator-always-on;
326c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
327c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
328c66ec88fSEmmanuel Vadot	regulator-name = "vcc-pl";
329c66ec88fSEmmanuel Vadot};
330c66ec88fSEmmanuel Vadot
331c66ec88fSEmmanuel Vadot&reg_aldo3 {
332c66ec88fSEmmanuel Vadot	regulator-always-on;
3335def4c47SEmmanuel Vadot	regulator-min-microvolt = <3000000>;
3345def4c47SEmmanuel Vadot	regulator-max-microvolt = <3000000>;
335c66ec88fSEmmanuel Vadot	regulator-name = "vcc-pll-avcc";
336c66ec88fSEmmanuel Vadot};
337c66ec88fSEmmanuel Vadot
338c66ec88fSEmmanuel Vadot&reg_dcdc1 {
339c66ec88fSEmmanuel Vadot	regulator-always-on;
340c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <3300000>;
341c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
342c66ec88fSEmmanuel Vadot	regulator-name = "vcc-3v3";
343c66ec88fSEmmanuel Vadot};
344c66ec88fSEmmanuel Vadot
345c66ec88fSEmmanuel Vadot&reg_dcdc2 {
346c66ec88fSEmmanuel Vadot	regulator-always-on;
347c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1000000>;
348c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1300000>;
349c66ec88fSEmmanuel Vadot	regulator-name = "vdd-cpux";
350c66ec88fSEmmanuel Vadot};
351c66ec88fSEmmanuel Vadot
352c66ec88fSEmmanuel Vadot/* DCDC3 is polyphased with DCDC2 */
353c66ec88fSEmmanuel Vadot
354c66ec88fSEmmanuel Vadot&reg_dcdc5 {
355c66ec88fSEmmanuel Vadot	regulator-always-on;
356c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1200000>;
357c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1200000>;
358c66ec88fSEmmanuel Vadot	regulator-name = "vcc-dram";
359c66ec88fSEmmanuel Vadot};
360c66ec88fSEmmanuel Vadot
361c66ec88fSEmmanuel Vadot&reg_dcdc6 {
362c66ec88fSEmmanuel Vadot	regulator-always-on;
363c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1100000>;
364c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1100000>;
365c66ec88fSEmmanuel Vadot	regulator-name = "vdd-sys";
366c66ec88fSEmmanuel Vadot};
367c66ec88fSEmmanuel Vadot
368c66ec88fSEmmanuel Vadot&reg_dldo1 {
369c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <3300000>;
370c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
371c66ec88fSEmmanuel Vadot	regulator-name = "vcc-dsi-sensor";
372c66ec88fSEmmanuel Vadot};
373c66ec88fSEmmanuel Vadot
374c66ec88fSEmmanuel Vadot&reg_dldo2 {
375c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
376c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
377c66ec88fSEmmanuel Vadot	regulator-name = "vcc-mipi-io";
378c66ec88fSEmmanuel Vadot};
379c66ec88fSEmmanuel Vadot
380c66ec88fSEmmanuel Vadot&reg_dldo3 {
381c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <2800000>;
382c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <2800000>;
383c66ec88fSEmmanuel Vadot	regulator-name = "avdd-csi";
384c66ec88fSEmmanuel Vadot};
385c66ec88fSEmmanuel Vadot
386c66ec88fSEmmanuel Vadot&reg_dldo4 {
387c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
388c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
389c66ec88fSEmmanuel Vadot	regulator-name = "vcc-wifi-io";
390c66ec88fSEmmanuel Vadot};
391c66ec88fSEmmanuel Vadot
392c66ec88fSEmmanuel Vadot&reg_eldo1 {
393c66ec88fSEmmanuel Vadot	regulator-always-on;
394c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
395c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
396c66ec88fSEmmanuel Vadot	regulator-name = "vcc-lpddr";
397c66ec88fSEmmanuel Vadot};
398c66ec88fSEmmanuel Vadot
399c66ec88fSEmmanuel Vadot&reg_eldo3 {
400c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
401c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
402c66ec88fSEmmanuel Vadot	regulator-name = "dvdd-1v8-csi";
403c66ec88fSEmmanuel Vadot};
404c66ec88fSEmmanuel Vadot
405c66ec88fSEmmanuel Vadot&reg_fldo1 {
406c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1200000>;
407c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1200000>;
408c66ec88fSEmmanuel Vadot	regulator-name = "vcc-1v2-hsic";
409c66ec88fSEmmanuel Vadot};
410c66ec88fSEmmanuel Vadot
411c66ec88fSEmmanuel Vadot&reg_fldo2 {
412c66ec88fSEmmanuel Vadot	regulator-always-on;
413c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1100000>;
414c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1100000>;
415c66ec88fSEmmanuel Vadot	regulator-name = "vdd-cpus";
416c66ec88fSEmmanuel Vadot};
417c66ec88fSEmmanuel Vadot
418c66ec88fSEmmanuel Vadot&reg_ldo_io0 {
419c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <3300000>;
420c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
421c66ec88fSEmmanuel Vadot	regulator-name = "vcc-lcd-ctp-stk";
422c66ec88fSEmmanuel Vadot	status = "okay";
423c66ec88fSEmmanuel Vadot};
424c66ec88fSEmmanuel Vadot
425c66ec88fSEmmanuel Vadot&reg_ldo_io1 {
426c66ec88fSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
427c66ec88fSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
428c66ec88fSEmmanuel Vadot	regulator-name = "vcc-1v8-typec";
429c66ec88fSEmmanuel Vadot	status = "okay";
430c66ec88fSEmmanuel Vadot};
431c66ec88fSEmmanuel Vadot
432c66ec88fSEmmanuel Vadot&reg_rtc_ldo {
433c66ec88fSEmmanuel Vadot	regulator-name = "vcc-rtc";
434c66ec88fSEmmanuel Vadot};
435c66ec88fSEmmanuel Vadot
436c66ec88fSEmmanuel Vadot&sound {
437c66ec88fSEmmanuel Vadot	status = "okay";
4385956d97fSEmmanuel Vadot	simple-audio-card,name = "PinePhone";
439c66ec88fSEmmanuel Vadot	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
440c66ec88fSEmmanuel Vadot	simple-audio-card,widgets = "Microphone", "Headset Microphone",
441c66ec88fSEmmanuel Vadot				    "Microphone", "Internal Microphone",
442c66ec88fSEmmanuel Vadot				    "Headphone", "Headphone Jack",
443c66ec88fSEmmanuel Vadot				    "Speaker", "Internal Earpiece",
444c66ec88fSEmmanuel Vadot				    "Speaker", "Internal Speaker";
445c66ec88fSEmmanuel Vadot	simple-audio-card,routing =
446c66ec88fSEmmanuel Vadot			"Headphone Jack", "HP",
447c66ec88fSEmmanuel Vadot			"Internal Earpiece", "EARPIECE",
448c66ec88fSEmmanuel Vadot			"Internal Speaker", "Speaker Amp OUTL",
449c66ec88fSEmmanuel Vadot			"Internal Speaker", "Speaker Amp OUTR",
450c66ec88fSEmmanuel Vadot			"Speaker Amp INL", "LINEOUT",
451c66ec88fSEmmanuel Vadot			"Speaker Amp INR", "LINEOUT",
4526be33864SEmmanuel Vadot			"Left DAC", "DACL",
4536be33864SEmmanuel Vadot			"Right DAC", "DACR",
4546be33864SEmmanuel Vadot			"ADCL", "Left ADC",
4556be33864SEmmanuel Vadot			"ADCR", "Right ADC",
456c66ec88fSEmmanuel Vadot			"Internal Microphone", "MBIAS",
457c66ec88fSEmmanuel Vadot			"MIC1", "Internal Microphone",
458c66ec88fSEmmanuel Vadot			"Headset Microphone", "HBIAS",
459c66ec88fSEmmanuel Vadot			"MIC2", "Headset Microphone";
4605956d97fSEmmanuel Vadot
4615956d97fSEmmanuel Vadot	simple-audio-card,dai-link@2 {
4625956d97fSEmmanuel Vadot		format = "dsp_a";
4635956d97fSEmmanuel Vadot		frame-master = <&link2_codec>;
4645956d97fSEmmanuel Vadot		bitclock-master = <&link2_codec>;
4655956d97fSEmmanuel Vadot		bitclock-inversion;
4665956d97fSEmmanuel Vadot
4675956d97fSEmmanuel Vadot		link2_cpu: cpu {
4685956d97fSEmmanuel Vadot			sound-dai = <&bt_sco_codec 0>;
4695956d97fSEmmanuel Vadot		};
4705956d97fSEmmanuel Vadot
4715956d97fSEmmanuel Vadot		link2_codec: codec {
4725956d97fSEmmanuel Vadot			sound-dai = <&codec 2>;
4735956d97fSEmmanuel Vadot			dai-tdm-slot-num = <1>;
4745956d97fSEmmanuel Vadot			dai-tdm-slot-width = <32>;
4755956d97fSEmmanuel Vadot		};
4765956d97fSEmmanuel Vadot	};
477c66ec88fSEmmanuel Vadot};
478c66ec88fSEmmanuel Vadot
479c66ec88fSEmmanuel Vadot&uart0 {
480c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
481c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart0_pb_pins>;
482c66ec88fSEmmanuel Vadot	status = "okay";
483c66ec88fSEmmanuel Vadot};
484c66ec88fSEmmanuel Vadot
4855def4c47SEmmanuel Vadot&uart1 {
4865def4c47SEmmanuel Vadot	pinctrl-names = "default";
4875def4c47SEmmanuel Vadot	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
4885def4c47SEmmanuel Vadot	status = "okay";
4895def4c47SEmmanuel Vadot
4905def4c47SEmmanuel Vadot	bluetooth {
4915def4c47SEmmanuel Vadot		compatible = "realtek,rtl8723cs-bt";
4925def4c47SEmmanuel Vadot		device-wake-gpios = <&pio 7 6 GPIO_ACTIVE_LOW>; /* PH6 */
4935def4c47SEmmanuel Vadot		enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
4945def4c47SEmmanuel Vadot		host-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
4955def4c47SEmmanuel Vadot	};
4965def4c47SEmmanuel Vadot};
4975def4c47SEmmanuel Vadot
498c66ec88fSEmmanuel Vadot/* Connected to the modem (hardware flow control can't be used) */
499c66ec88fSEmmanuel Vadot&uart3 {
500c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
501c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart3_pins>;
502c66ec88fSEmmanuel Vadot	status = "okay";
503c66ec88fSEmmanuel Vadot};
504c66ec88fSEmmanuel Vadot
505c66ec88fSEmmanuel Vadot&usb_otg {
506c66ec88fSEmmanuel Vadot	dr_mode = "peripheral";
507c66ec88fSEmmanuel Vadot	status = "okay";
508c66ec88fSEmmanuel Vadot};
509c66ec88fSEmmanuel Vadot
510c66ec88fSEmmanuel Vadot&usb_power_supply {
511c66ec88fSEmmanuel Vadot	status = "okay";
512c66ec88fSEmmanuel Vadot};
513c66ec88fSEmmanuel Vadot
514c66ec88fSEmmanuel Vadot&usbphy {
515c66ec88fSEmmanuel Vadot	status = "okay";
516c66ec88fSEmmanuel Vadot};
517