1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 // Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
3 // Copyright (C) 2020 Martijn Braam <martijn@brixit.nl>
4 // Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
6 #include "sun50i-a64.dtsi"
7 #include "sun50i-a64-cpu-opp.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/pwm/pwm.h>
19 backlight: backlight {
20 compatible = "pwm-backlight";
21 pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
22 enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
23 /* Backlight configuration differs per PinePhone revision. */
27 stdout-path = "serial0:115200n8";
31 compatible = "gpio-leds";
34 function = LED_FUNCTION_INDICATOR;
35 color = <LED_COLOR_ID_BLUE>;
36 gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
40 function = LED_FUNCTION_INDICATOR;
41 color = <LED_COLOR_ID_GREEN>;
42 gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
46 function = LED_FUNCTION_INDICATOR;
47 color = <LED_COLOR_ID_RED>;
48 gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
52 speaker_amp: audio-amplifier {
53 compatible = "simple-audio-amplifier";
54 enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
55 sound-name-prefix = "Speaker Amp";
59 compatible = "gpio-vibrator";
60 enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
61 vcc-supply = <®_dcdc1>;
70 cpvdd-supply = <®_eldo1>;
75 cpu-supply = <®_dcdc2>;
79 cpu-supply = <®_dcdc2>;
83 cpu-supply = <®_dcdc2>;
87 cpu-supply = <®_dcdc2>;
103 vcc-dsi-supply = <®_dldo1>;
107 compatible = "xingbangda,xbd599";
109 reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
110 iovcc-supply = <®_dldo2>;
111 vcc-supply = <®_ldo_io0>;
112 backlight = <&backlight>;
128 compatible = "goodix,gt917s";
130 interrupt-parent = <&pio>;
131 interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
132 irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
133 reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
134 AVDD28-supply = <®_ldo_io0>;
135 VDDIO-supply = <®_ldo_io0>;
136 touchscreen-size-x = <720>;
137 touchscreen-size-y = <1440>;
145 lis3mdl: lis3mdl@1e {
146 compatible = "st,lis3mdl-magn";
148 vdd-supply = <®_dldo1>;
149 vddio-supply = <®_dldo1>;
152 /* Accelerometer/gyroscope */
154 compatible = "invensense,mpu6050";
156 interrupt-parent = <&pio>;
157 interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
158 vdd-supply = <®_dldo1>;
159 vddio-supply = <®_dldo1>;
163 /* Connected to pogo pins (external spring based pinheader for user addons) */
169 vref-supply = <®_aldo3>;
174 linux,code = <KEY_VOLUMEUP>;
180 label = "Volume Down";
181 linux,code = <KEY_VOLUMEDOWN>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&mmc0_pins>;
190 vmmc-supply = <®_dcdc1>;
191 vqmmc-supply = <®_dcdc1>;
192 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
199 pinctrl-names = "default";
200 pinctrl-0 = <&mmc2_pins>;
201 vmmc-supply = <®_dcdc1>;
202 vqmmc-supply = <®_dcdc1>;
218 vcc-pb-supply = <®_dcdc1>;
219 vcc-pc-supply = <®_dcdc1>;
220 vcc-pd-supply = <®_dcdc1>;
221 vcc-pe-supply = <®_aldo1>;
222 vcc-pf-supply = <®_dcdc1>;
223 vcc-pg-supply = <®_dldo4>;
224 vcc-ph-supply = <®_dcdc1>;
229 * FIXME: We can't add that supply for now since it would
230 * create a circular dependency between pinctrl, the regulator
233 * vcc-pl-supply = <®_aldo2>;
245 compatible = "x-powers,axp803";
247 interrupt-parent = <&r_intc>;
248 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
252 #include "axp803.dtsi"
258 &battery_power_supply {
263 regulator-min-microvolt = <1800000>;
264 regulator-max-microvolt = <1800000>;
265 regulator-name = "dovdd-csi";
270 regulator-min-microvolt = <1800000>;
271 regulator-max-microvolt = <1800000>;
272 regulator-name = "vcc-pl";
277 regulator-min-microvolt = <2700000>;
278 regulator-max-microvolt = <3300000>;
279 regulator-name = "vcc-pll-avcc";
284 regulator-min-microvolt = <3300000>;
285 regulator-max-microvolt = <3300000>;
286 regulator-name = "vcc-3v3";
291 regulator-min-microvolt = <1000000>;
292 regulator-max-microvolt = <1300000>;
293 regulator-name = "vdd-cpux";
296 /* DCDC3 is polyphased with DCDC2 */
300 regulator-min-microvolt = <1200000>;
301 regulator-max-microvolt = <1200000>;
302 regulator-name = "vcc-dram";
307 regulator-min-microvolt = <1100000>;
308 regulator-max-microvolt = <1100000>;
309 regulator-name = "vdd-sys";
313 regulator-min-microvolt = <3300000>;
314 regulator-max-microvolt = <3300000>;
315 regulator-name = "vcc-dsi-sensor";
319 regulator-min-microvolt = <1800000>;
320 regulator-max-microvolt = <1800000>;
321 regulator-name = "vcc-mipi-io";
325 regulator-min-microvolt = <2800000>;
326 regulator-max-microvolt = <2800000>;
327 regulator-name = "avdd-csi";
331 regulator-min-microvolt = <1800000>;
332 regulator-max-microvolt = <1800000>;
333 regulator-name = "vcc-wifi-io";
338 regulator-min-microvolt = <1800000>;
339 regulator-max-microvolt = <1800000>;
340 regulator-name = "vcc-lpddr";
344 regulator-min-microvolt = <1800000>;
345 regulator-max-microvolt = <1800000>;
346 regulator-name = "dvdd-1v8-csi";
350 regulator-min-microvolt = <1200000>;
351 regulator-max-microvolt = <1200000>;
352 regulator-name = "vcc-1v2-hsic";
357 regulator-min-microvolt = <1100000>;
358 regulator-max-microvolt = <1100000>;
359 regulator-name = "vdd-cpus";
363 regulator-min-microvolt = <3300000>;
364 regulator-max-microvolt = <3300000>;
365 regulator-name = "vcc-lcd-ctp-stk";
370 regulator-min-microvolt = <1800000>;
371 regulator-max-microvolt = <1800000>;
372 regulator-name = "vcc-1v8-typec";
377 regulator-name = "vcc-rtc";
382 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
383 simple-audio-card,widgets = "Microphone", "Headset Microphone",
384 "Microphone", "Internal Microphone",
385 "Headphone", "Headphone Jack",
386 "Speaker", "Internal Earpiece",
387 "Speaker", "Internal Speaker";
388 simple-audio-card,routing =
389 "Headphone Jack", "HP",
390 "Internal Earpiece", "EARPIECE",
391 "Internal Speaker", "Speaker Amp OUTL",
392 "Internal Speaker", "Speaker Amp OUTR",
393 "Speaker Amp INL", "LINEOUT",
394 "Speaker Amp INR", "LINEOUT",
395 "Left DAC", "AIF1 Slot 0 Left",
396 "Right DAC", "AIF1 Slot 0 Right",
397 "AIF1 Slot 0 Left ADC", "Left ADC",
398 "AIF1 Slot 0 Right ADC", "Right ADC",
399 "Internal Microphone", "MBIAS",
400 "MIC1", "Internal Microphone",
401 "Headset Microphone", "HBIAS",
402 "MIC2", "Headset Microphone";
406 pinctrl-names = "default";
407 pinctrl-0 = <&uart0_pb_pins>;
411 /* Connected to the modem (hardware flow control can't be used) */
413 pinctrl-names = "default";
414 pinctrl-0 = <&uart3_pins>;
419 dr_mode = "peripheral";