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/ {
1591f480d4SOndrej Jirman	aliases {
164fcf6f34SOndrej Jirman		ethernet0 = &rtl8723cs;
1791f480d4SOndrej Jirman		serial0 = &uart0;
1891f480d4SOndrej Jirman	};
1991f480d4SOndrej Jirman
20a6a22f82SIcenowy Zheng	backlight: backlight {
21a6a22f82SIcenowy Zheng		compatible = "pwm-backlight";
22a6a22f82SIcenowy Zheng		pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
23a6a22f82SIcenowy Zheng		enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
2486131fb9SMaxime Ripard		power-supply = <&reg_ps>;
25a6a22f82SIcenowy Zheng		/* Backlight configuration differs per PinePhone revision. */
26a6a22f82SIcenowy Zheng	};
27a6a22f82SIcenowy Zheng
2891f480d4SOndrej Jirman	chosen {
2991f480d4SOndrej Jirman		stdout-path = "serial0:115200n8";
3091f480d4SOndrej Jirman	};
3191f480d4SOndrej Jirman
3291f480d4SOndrej Jirman	leds {
3391f480d4SOndrej Jirman		compatible = "gpio-leds";
3491f480d4SOndrej Jirman
35e299e6ddSMaxime Ripard		led-0 {
3691f480d4SOndrej Jirman			function = LED_FUNCTION_INDICATOR;
3791f480d4SOndrej Jirman			color = <LED_COLOR_ID_BLUE>;
3891f480d4SOndrej Jirman			gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
3991f480d4SOndrej Jirman		};
4091f480d4SOndrej Jirman
41e299e6ddSMaxime Ripard		led-1 {
4291f480d4SOndrej Jirman			function = LED_FUNCTION_INDICATOR;
4391f480d4SOndrej Jirman			color = <LED_COLOR_ID_GREEN>;
4491f480d4SOndrej Jirman			gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
4591f480d4SOndrej Jirman		};
4691f480d4SOndrej Jirman
47e299e6ddSMaxime Ripard		led-2 {
4891f480d4SOndrej Jirman			function = LED_FUNCTION_INDICATOR;
4991f480d4SOndrej Jirman			color = <LED_COLOR_ID_RED>;
5091f480d4SOndrej Jirman			gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
5191f480d4SOndrej Jirman		};
5291f480d4SOndrej Jirman	};
5391f480d4SOndrej Jirman
5486131fb9SMaxime Ripard	reg_ps: ps-regulator {
5586131fb9SMaxime Ripard		compatible = "regulator-fixed";
5686131fb9SMaxime Ripard		regulator-name = "ps";
5786131fb9SMaxime Ripard		regulator-min-microvolt = <5000000>;
5886131fb9SMaxime Ripard		regulator-max-microvolt = <5000000>;
5986131fb9SMaxime Ripard		regulator-boot-on;
6086131fb9SMaxime Ripard	};
6186131fb9SMaxime Ripard
624fcf6f34SOndrej Jirman	reg_vbat_wifi: vbat-wifi {
634fcf6f34SOndrej Jirman		compatible = "regulator-fixed";
644fcf6f34SOndrej Jirman		regulator-min-microvolt = <3300000>;
654fcf6f34SOndrej Jirman		regulator-max-microvolt = <3300000>;
664fcf6f34SOndrej Jirman		regulator-name = "vbat-wifi";
674fcf6f34SOndrej Jirman	};
684fcf6f34SOndrej Jirman
69085d96b8SLuca Weiss	sgm3140: led-controller {
70085d96b8SLuca Weiss		compatible = "sgmicro,sgm3140";
71085d96b8SLuca Weiss		vin-supply = <&reg_dcdc1>;
72085d96b8SLuca Weiss
73085d96b8SLuca Weiss		sgm3140_flash: led {
74085d96b8SLuca Weiss			function = LED_FUNCTION_FLASH;
75085d96b8SLuca Weiss			color = <LED_COLOR_ID_WHITE>;
76085d96b8SLuca Weiss			flash-max-timeout-us = <250000>;
77085d96b8SLuca Weiss		};
78085d96b8SLuca Weiss	};
79085d96b8SLuca Weiss
8091f480d4SOndrej Jirman	speaker_amp: audio-amplifier {
8191f480d4SOndrej Jirman		compatible = "simple-audio-amplifier";
8291f480d4SOndrej Jirman		enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
8391f480d4SOndrej Jirman		sound-name-prefix = "Speaker Amp";
8491f480d4SOndrej Jirman	};
8591f480d4SOndrej Jirman
8691f480d4SOndrej Jirman	vibrator {
8791f480d4SOndrej Jirman		compatible = "gpio-vibrator";
8891f480d4SOndrej Jirman		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
8991f480d4SOndrej Jirman		vcc-supply = <&reg_dcdc1>;
9091f480d4SOndrej Jirman	};
9191f480d4SOndrej Jirman};
9291f480d4SOndrej Jirman
9391f480d4SOndrej Jirman&codec {
9491f480d4SOndrej Jirman	status = "okay";
9591f480d4SOndrej Jirman};
9691f480d4SOndrej Jirman
9791f480d4SOndrej Jirman&codec_analog {
9891f480d4SOndrej Jirman	cpvdd-supply = <&reg_eldo1>;
9991f480d4SOndrej Jirman	status = "okay";
10091f480d4SOndrej Jirman};
10191f480d4SOndrej Jirman
10291f480d4SOndrej Jirman&cpu0 {
10391f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
10491f480d4SOndrej Jirman};
10591f480d4SOndrej Jirman
10691f480d4SOndrej Jirman&cpu1 {
10791f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
10891f480d4SOndrej Jirman};
10991f480d4SOndrej Jirman
11091f480d4SOndrej Jirman&cpu2 {
11191f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
11291f480d4SOndrej Jirman};
11391f480d4SOndrej Jirman
11491f480d4SOndrej Jirman&cpu3 {
11591f480d4SOndrej Jirman	cpu-supply = <&reg_dcdc2>;
11691f480d4SOndrej Jirman};
11791f480d4SOndrej Jirman
11891f480d4SOndrej Jirman&dai {
11991f480d4SOndrej Jirman	status = "okay";
12091f480d4SOndrej Jirman};
12191f480d4SOndrej Jirman
122a6a22f82SIcenowy Zheng&de {
123a6a22f82SIcenowy Zheng	status = "okay";
124a6a22f82SIcenowy Zheng};
125a6a22f82SIcenowy Zheng
126a6a22f82SIcenowy Zheng&dphy {
127a6a22f82SIcenowy Zheng	status = "okay";
128a6a22f82SIcenowy Zheng};
129a6a22f82SIcenowy Zheng
130a6a22f82SIcenowy Zheng&dsi {
131a6a22f82SIcenowy Zheng	vcc-dsi-supply = <&reg_dldo1>;
132a6a22f82SIcenowy Zheng	status = "okay";
133a6a22f82SIcenowy Zheng
134a6a22f82SIcenowy Zheng	panel@0 {
135a6a22f82SIcenowy Zheng		compatible = "xingbangda,xbd599";
136a6a22f82SIcenowy Zheng		reg = <0>;
137a6a22f82SIcenowy Zheng		reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
138a6a22f82SIcenowy Zheng		iovcc-supply = <&reg_dldo2>;
139a6a22f82SIcenowy Zheng		vcc-supply = <&reg_ldo_io0>;
140a6a22f82SIcenowy Zheng		backlight = <&backlight>;
141a6a22f82SIcenowy Zheng	};
142a6a22f82SIcenowy Zheng};
143a6a22f82SIcenowy Zheng
14491f480d4SOndrej Jirman&ehci0 {
14591f480d4SOndrej Jirman	status = "okay";
14691f480d4SOndrej Jirman};
14791f480d4SOndrej Jirman
14891f480d4SOndrej Jirman&ehci1 {
14991f480d4SOndrej Jirman	status = "okay";
15091f480d4SOndrej Jirman};
15191f480d4SOndrej Jirman
15260f2de5fSOndrej Jirman&i2c0 {
15360f2de5fSOndrej Jirman	status = "okay";
15460f2de5fSOndrej Jirman
15560f2de5fSOndrej Jirman	touchscreen@5d {
15660f2de5fSOndrej Jirman		compatible = "goodix,gt917s";
15760f2de5fSOndrej Jirman		reg = <0x5d>;
15860f2de5fSOndrej Jirman		interrupt-parent = <&pio>;
15960f2de5fSOndrej Jirman		interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
16060f2de5fSOndrej Jirman		irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
16160f2de5fSOndrej Jirman		reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
16260f2de5fSOndrej Jirman		AVDD28-supply = <&reg_ldo_io0>;
16360f2de5fSOndrej Jirman		VDDIO-supply = <&reg_ldo_io0>;
16460f2de5fSOndrej Jirman		touchscreen-size-x = <720>;
16560f2de5fSOndrej Jirman		touchscreen-size-y = <1440>;
16660f2de5fSOndrej Jirman	};
16760f2de5fSOndrej Jirman};
16860f2de5fSOndrej Jirman
16991f480d4SOndrej Jirman&i2c1 {
17091f480d4SOndrej Jirman	status = "okay";
17191f480d4SOndrej Jirman
17291f480d4SOndrej Jirman	/* Magnetometer */
173030eea2aSSamuel Holland	lis3mdl: magnetometer@1e {
17491f480d4SOndrej Jirman		compatible = "st,lis3mdl-magn";
17591f480d4SOndrej Jirman		reg = <0x1e>;
17691f480d4SOndrej Jirman		vdd-supply = <&reg_dldo1>;
17791f480d4SOndrej Jirman		vddio-supply = <&reg_dldo1>;
17891f480d4SOndrej Jirman	};
17991f480d4SOndrej Jirman
180a966ef62SOndrej Jirman	/* Light/proximity sensor */
181030eea2aSSamuel Holland	light-sensor@48 {
182a966ef62SOndrej Jirman		compatible = "sensortek,stk3311";
183a966ef62SOndrej Jirman		reg = <0x48>;
184a966ef62SOndrej Jirman		interrupt-parent = <&pio>;
185a966ef62SOndrej Jirman		interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
186a966ef62SOndrej Jirman	};
187a966ef62SOndrej Jirman
18891f480d4SOndrej Jirman	/* Accelerometer/gyroscope */
189030eea2aSSamuel Holland	accelerometer@68 {
19091f480d4SOndrej Jirman		compatible = "invensense,mpu6050";
19191f480d4SOndrej Jirman		reg = <0x68>;
19291f480d4SOndrej Jirman		interrupt-parent = <&pio>;
19391f480d4SOndrej Jirman		interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
19491f480d4SOndrej Jirman		vdd-supply = <&reg_dldo1>;
19591f480d4SOndrej Jirman		vddio-supply = <&reg_dldo1>;
19691f480d4SOndrej Jirman	};
19791f480d4SOndrej Jirman};
19891f480d4SOndrej Jirman
19991f480d4SOndrej Jirman/* Connected to pogo pins (external spring based pinheader for user addons) */
20091f480d4SOndrej Jirman&i2c2 {
20191f480d4SOndrej Jirman	status = "okay";
20291f480d4SOndrej Jirman};
20391f480d4SOndrej Jirman
20491f480d4SOndrej Jirman&lradc {
20591f480d4SOndrej Jirman	vref-supply = <&reg_aldo3>;
2060b26926aSSamuel Holland	wakeup-source;
20791f480d4SOndrej Jirman	status = "okay";
20891f480d4SOndrej Jirman
20991f480d4SOndrej Jirman	button-200 {
21091f480d4SOndrej Jirman		label = "Volume Up";
21191f480d4SOndrej Jirman		linux,code = <KEY_VOLUMEUP>;
21291f480d4SOndrej Jirman		channel = <0>;
21391f480d4SOndrej Jirman		voltage = <200000>;
21491f480d4SOndrej Jirman	};
21591f480d4SOndrej Jirman
21691f480d4SOndrej Jirman	button-400 {
21791f480d4SOndrej Jirman		label = "Volume Down";
21891f480d4SOndrej Jirman		linux,code = <KEY_VOLUMEDOWN>;
21991f480d4SOndrej Jirman		channel = <0>;
22091f480d4SOndrej Jirman		voltage = <400000>;
22191f480d4SOndrej Jirman	};
22291f480d4SOndrej Jirman};
22391f480d4SOndrej Jirman
22491f480d4SOndrej Jirman&mmc0 {
22591f480d4SOndrej Jirman	pinctrl-names = "default";
22691f480d4SOndrej Jirman	pinctrl-0 = <&mmc0_pins>;
22791f480d4SOndrej Jirman	vmmc-supply = <&reg_dcdc1>;
22891f480d4SOndrej Jirman	vqmmc-supply = <&reg_dcdc1>;
22991f480d4SOndrej Jirman	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
23091f480d4SOndrej Jirman	disable-wp;
23191f480d4SOndrej Jirman	bus-width = <4>;
23291f480d4SOndrej Jirman	status = "okay";
23391f480d4SOndrej Jirman};
23491f480d4SOndrej Jirman
2354fcf6f34SOndrej Jirman&mmc1 {
2364fcf6f34SOndrej Jirman	pinctrl-names = "default";
2374fcf6f34SOndrej Jirman	pinctrl-0 = <&mmc1_pins>;
2384fcf6f34SOndrej Jirman	vmmc-supply = <&reg_vbat_wifi>;
2394fcf6f34SOndrej Jirman	vqmmc-supply = <&reg_dldo4>;
2404fcf6f34SOndrej Jirman	bus-width = <4>;
2414fcf6f34SOndrej Jirman	non-removable;
2424fcf6f34SOndrej Jirman	status = "okay";
2434fcf6f34SOndrej Jirman
2444fcf6f34SOndrej Jirman	rtl8723cs: wifi@1 {
2454fcf6f34SOndrej Jirman		reg = <1>;
2464fcf6f34SOndrej Jirman	};
2474fcf6f34SOndrej Jirman};
2484fcf6f34SOndrej Jirman
24991f480d4SOndrej Jirman&mmc2 {
25091f480d4SOndrej Jirman	pinctrl-names = "default";
25191f480d4SOndrej Jirman	pinctrl-0 = <&mmc2_pins>;
25291f480d4SOndrej Jirman	vmmc-supply = <&reg_dcdc1>;
25391f480d4SOndrej Jirman	vqmmc-supply = <&reg_dcdc1>;
25491f480d4SOndrej Jirman	bus-width = <8>;
25591f480d4SOndrej Jirman	non-removable;
25691f480d4SOndrej Jirman	cap-mmc-hw-reset;
25791f480d4SOndrej Jirman	status = "okay";
25891f480d4SOndrej Jirman};
25991f480d4SOndrej Jirman
26091f480d4SOndrej Jirman&ohci0 {
26191f480d4SOndrej Jirman	status = "okay";
26291f480d4SOndrej Jirman};
26391f480d4SOndrej Jirman
26491f480d4SOndrej Jirman&ohci1 {
26591f480d4SOndrej Jirman	status = "okay";
26691f480d4SOndrej Jirman};
26791f480d4SOndrej Jirman
26891f480d4SOndrej Jirman&pio {
26991f480d4SOndrej Jirman	vcc-pb-supply = <&reg_dcdc1>;
27091f480d4SOndrej Jirman	vcc-pc-supply = <&reg_dcdc1>;
27191f480d4SOndrej Jirman	vcc-pd-supply = <&reg_dcdc1>;
27291f480d4SOndrej Jirman	vcc-pe-supply = <&reg_aldo1>;
27391f480d4SOndrej Jirman	vcc-pf-supply = <&reg_dcdc1>;
27491f480d4SOndrej Jirman	vcc-pg-supply = <&reg_dldo4>;
27591f480d4SOndrej Jirman	vcc-ph-supply = <&reg_dcdc1>;
27691f480d4SOndrej Jirman};
27791f480d4SOndrej Jirman
27891f480d4SOndrej Jirman&r_pio {
27991f480d4SOndrej Jirman	/*
28091f480d4SOndrej Jirman	 * FIXME: We can't add that supply for now since it would
28191f480d4SOndrej Jirman	 * create a circular dependency between pinctrl, the regulator
28291f480d4SOndrej Jirman	 * and the RSB Bus.
28391f480d4SOndrej Jirman	 *
28491f480d4SOndrej Jirman	 * vcc-pl-supply = <&reg_aldo2>;
28591f480d4SOndrej Jirman	 */
28691f480d4SOndrej Jirman};
28791f480d4SOndrej Jirman
288a6a22f82SIcenowy Zheng&r_pwm {
289a6a22f82SIcenowy Zheng	status = "okay";
290a6a22f82SIcenowy Zheng};
291a6a22f82SIcenowy Zheng
29291f480d4SOndrej Jirman&r_rsb {
29391f480d4SOndrej Jirman	status = "okay";
29491f480d4SOndrej Jirman
29591f480d4SOndrej Jirman	axp803: pmic@3a3 {
29691f480d4SOndrej Jirman		compatible = "x-powers,axp803";
29791f480d4SOndrej Jirman		reg = <0x3a3>;
29891f480d4SOndrej Jirman		interrupt-parent = <&r_intc>;
299*73088dfeSSamuel Holland		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
30091f480d4SOndrej Jirman	};
30191f480d4SOndrej Jirman};
30291f480d4SOndrej Jirman
30391f480d4SOndrej Jirman#include "axp803.dtsi"
30491f480d4SOndrej Jirman
30591f480d4SOndrej Jirman&battery_power_supply {
30691f480d4SOndrej Jirman	status = "okay";
30791f480d4SOndrej Jirman};
30891f480d4SOndrej Jirman
30991f480d4SOndrej Jirman&reg_aldo1 {
31091f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
31191f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
31291f480d4SOndrej Jirman	regulator-name = "dovdd-csi";
31391f480d4SOndrej Jirman};
31491f480d4SOndrej Jirman
31591f480d4SOndrej Jirman&reg_aldo2 {
31691f480d4SOndrej Jirman	regulator-always-on;
31791f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
31891f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
31991f480d4SOndrej Jirman	regulator-name = "vcc-pl";
32091f480d4SOndrej Jirman};
32191f480d4SOndrej Jirman
32291f480d4SOndrej Jirman&reg_aldo3 {
32391f480d4SOndrej Jirman	regulator-always-on;
3243cf9bf3bSSamuel Holland	regulator-min-microvolt = <3000000>;
3253cf9bf3bSSamuel Holland	regulator-max-microvolt = <3000000>;
32691f480d4SOndrej Jirman	regulator-name = "vcc-pll-avcc";
32791f480d4SOndrej Jirman};
32891f480d4SOndrej Jirman
32991f480d4SOndrej Jirman&reg_dcdc1 {
33091f480d4SOndrej Jirman	regulator-always-on;
33191f480d4SOndrej Jirman	regulator-min-microvolt = <3300000>;
33291f480d4SOndrej Jirman	regulator-max-microvolt = <3300000>;
33391f480d4SOndrej Jirman	regulator-name = "vcc-3v3";
33491f480d4SOndrej Jirman};
33591f480d4SOndrej Jirman
33691f480d4SOndrej Jirman&reg_dcdc2 {
33791f480d4SOndrej Jirman	regulator-always-on;
33891f480d4SOndrej Jirman	regulator-min-microvolt = <1000000>;
33991f480d4SOndrej Jirman	regulator-max-microvolt = <1300000>;
34091f480d4SOndrej Jirman	regulator-name = "vdd-cpux";
34191f480d4SOndrej Jirman};
34291f480d4SOndrej Jirman
34391f480d4SOndrej Jirman/* DCDC3 is polyphased with DCDC2 */
34491f480d4SOndrej Jirman
34591f480d4SOndrej Jirman&reg_dcdc5 {
34691f480d4SOndrej Jirman	regulator-always-on;
34791f480d4SOndrej Jirman	regulator-min-microvolt = <1200000>;
34891f480d4SOndrej Jirman	regulator-max-microvolt = <1200000>;
34991f480d4SOndrej Jirman	regulator-name = "vcc-dram";
35091f480d4SOndrej Jirman};
35191f480d4SOndrej Jirman
35291f480d4SOndrej Jirman&reg_dcdc6 {
35391f480d4SOndrej Jirman	regulator-always-on;
35491f480d4SOndrej Jirman	regulator-min-microvolt = <1100000>;
35591f480d4SOndrej Jirman	regulator-max-microvolt = <1100000>;
35691f480d4SOndrej Jirman	regulator-name = "vdd-sys";
35791f480d4SOndrej Jirman};
35891f480d4SOndrej Jirman
35991f480d4SOndrej Jirman&reg_dldo1 {
36091f480d4SOndrej Jirman	regulator-min-microvolt = <3300000>;
36191f480d4SOndrej Jirman	regulator-max-microvolt = <3300000>;
36291f480d4SOndrej Jirman	regulator-name = "vcc-dsi-sensor";
36391f480d4SOndrej Jirman};
36491f480d4SOndrej Jirman
36591f480d4SOndrej Jirman&reg_dldo2 {
36691f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
36791f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
36891f480d4SOndrej Jirman	regulator-name = "vcc-mipi-io";
36991f480d4SOndrej Jirman};
37091f480d4SOndrej Jirman
37191f480d4SOndrej Jirman&reg_dldo3 {
37291f480d4SOndrej Jirman	regulator-min-microvolt = <2800000>;
37391f480d4SOndrej Jirman	regulator-max-microvolt = <2800000>;
37491f480d4SOndrej Jirman	regulator-name = "avdd-csi";
37591f480d4SOndrej Jirman};
37691f480d4SOndrej Jirman
37791f480d4SOndrej Jirman&reg_dldo4 {
37891f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
37986be5c78SOndrej Jirman	regulator-max-microvolt = <1800000>;
38091f480d4SOndrej Jirman	regulator-name = "vcc-wifi-io";
38191f480d4SOndrej Jirman};
38291f480d4SOndrej Jirman
38391f480d4SOndrej Jirman&reg_eldo1 {
38491f480d4SOndrej Jirman	regulator-always-on;
38591f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
38691f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
38791f480d4SOndrej Jirman	regulator-name = "vcc-lpddr";
38891f480d4SOndrej Jirman};
38991f480d4SOndrej Jirman
39091f480d4SOndrej Jirman&reg_eldo3 {
39191f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
39291f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
39391f480d4SOndrej Jirman	regulator-name = "dvdd-1v8-csi";
39491f480d4SOndrej Jirman};
39591f480d4SOndrej Jirman
39691f480d4SOndrej Jirman&reg_fldo1 {
39791f480d4SOndrej Jirman	regulator-min-microvolt = <1200000>;
39891f480d4SOndrej Jirman	regulator-max-microvolt = <1200000>;
39991f480d4SOndrej Jirman	regulator-name = "vcc-1v2-hsic";
40091f480d4SOndrej Jirman};
40191f480d4SOndrej Jirman
40291f480d4SOndrej Jirman&reg_fldo2 {
40391f480d4SOndrej Jirman	regulator-always-on;
40491f480d4SOndrej Jirman	regulator-min-microvolt = <1100000>;
40591f480d4SOndrej Jirman	regulator-max-microvolt = <1100000>;
40691f480d4SOndrej Jirman	regulator-name = "vdd-cpus";
40791f480d4SOndrej Jirman};
40891f480d4SOndrej Jirman
40991f480d4SOndrej Jirman&reg_ldo_io0 {
41091f480d4SOndrej Jirman	regulator-min-microvolt = <3300000>;
41191f480d4SOndrej Jirman	regulator-max-microvolt = <3300000>;
41291f480d4SOndrej Jirman	regulator-name = "vcc-lcd-ctp-stk";
41391f480d4SOndrej Jirman	status = "okay";
41491f480d4SOndrej Jirman};
41591f480d4SOndrej Jirman
41691f480d4SOndrej Jirman&reg_ldo_io1 {
41791f480d4SOndrej Jirman	regulator-min-microvolt = <1800000>;
41891f480d4SOndrej Jirman	regulator-max-microvolt = <1800000>;
41991f480d4SOndrej Jirman	regulator-name = "vcc-1v8-typec";
42091f480d4SOndrej Jirman	status = "okay";
42191f480d4SOndrej Jirman};
42291f480d4SOndrej Jirman
42391f480d4SOndrej Jirman&reg_rtc_ldo {
42491f480d4SOndrej Jirman	regulator-name = "vcc-rtc";
42591f480d4SOndrej Jirman};
42691f480d4SOndrej Jirman
42791f480d4SOndrej Jirman&sound {
42891f480d4SOndrej Jirman	status = "okay";
42991f480d4SOndrej Jirman	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
43091f480d4SOndrej Jirman	simple-audio-card,widgets = "Microphone", "Headset Microphone",
43191f480d4SOndrej Jirman				    "Microphone", "Internal Microphone",
43291f480d4SOndrej Jirman				    "Headphone", "Headphone Jack",
43391f480d4SOndrej Jirman				    "Speaker", "Internal Earpiece",
43491f480d4SOndrej Jirman				    "Speaker", "Internal Speaker";
43591f480d4SOndrej Jirman	simple-audio-card,routing =
43691f480d4SOndrej Jirman			"Headphone Jack", "HP",
43791f480d4SOndrej Jirman			"Internal Earpiece", "EARPIECE",
43891f480d4SOndrej Jirman			"Internal Speaker", "Speaker Amp OUTL",
43991f480d4SOndrej Jirman			"Internal Speaker", "Speaker Amp OUTR",
44091f480d4SOndrej Jirman			"Speaker Amp INL", "LINEOUT",
44191f480d4SOndrej Jirman			"Speaker Amp INR", "LINEOUT",
442631e6a35SSamuel Holland			"Left DAC", "DACL",
443631e6a35SSamuel Holland			"Right DAC", "DACR",
444631e6a35SSamuel Holland			"ADCL", "Left ADC",
445631e6a35SSamuel Holland			"ADCR", "Right ADC",
44691f480d4SOndrej Jirman			"Internal Microphone", "MBIAS",
44791f480d4SOndrej Jirman			"MIC1", "Internal Microphone",
44891f480d4SOndrej Jirman			"Headset Microphone", "HBIAS",
44991f480d4SOndrej Jirman			"MIC2", "Headset Microphone";
45091f480d4SOndrej Jirman};
45191f480d4SOndrej Jirman
45291f480d4SOndrej Jirman&uart0 {
45391f480d4SOndrej Jirman	pinctrl-names = "default";
45491f480d4SOndrej Jirman	pinctrl-0 = <&uart0_pb_pins>;
45591f480d4SOndrej Jirman	status = "okay";
45691f480d4SOndrej Jirman};
45791f480d4SOndrej Jirman
458976843d5SOndrej Jirman&uart1 {
459976843d5SOndrej Jirman	pinctrl-names = "default";
460976843d5SOndrej Jirman	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
461976843d5SOndrej Jirman	status = "okay";
462976843d5SOndrej Jirman
463976843d5SOndrej Jirman	bluetooth {
464976843d5SOndrej Jirman		compatible = "realtek,rtl8723cs-bt";
465976843d5SOndrej Jirman		device-wake-gpios = <&pio 7 6 GPIO_ACTIVE_LOW>; /* PH6 */
466976843d5SOndrej Jirman		enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
467976843d5SOndrej Jirman		host-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
468976843d5SOndrej Jirman	};
469976843d5SOndrej Jirman};
470976843d5SOndrej Jirman
47191f480d4SOndrej Jirman/* Connected to the modem (hardware flow control can't be used) */
47291f480d4SOndrej Jirman&uart3 {
47391f480d4SOndrej Jirman	pinctrl-names = "default";
47491f480d4SOndrej Jirman	pinctrl-0 = <&uart3_pins>;
47591f480d4SOndrej Jirman	status = "okay";
47691f480d4SOndrej Jirman};
47791f480d4SOndrej Jirman
47891f480d4SOndrej Jirman&usb_otg {
47991f480d4SOndrej Jirman	dr_mode = "peripheral";
48091f480d4SOndrej Jirman	status = "okay";
48191f480d4SOndrej Jirman};
48291f480d4SOndrej Jirman
48391f480d4SOndrej Jirman&usb_power_supply {
48491f480d4SOndrej Jirman	status = "okay";
48591f480d4SOndrej Jirman};
48691f480d4SOndrej Jirman
48791f480d4SOndrej Jirman&usbphy {
48891f480d4SOndrej Jirman	status = "okay";
48991f480d4SOndrej Jirman};
490