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>
16 ethernet0 = &rtl8723cs;
20 backlight: backlight {
21 compatible = "pwm-backlight";
22 pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
23 enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
24 power-supply = <®_ps>;
25 /* Backlight configuration differs per PinePhone revision. */
29 stdout-path = "serial0:115200n8";
33 compatible = "gpio-leds";
36 function = LED_FUNCTION_INDICATOR;
37 color = <LED_COLOR_ID_BLUE>;
38 gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
42 function = LED_FUNCTION_INDICATOR;
43 color = <LED_COLOR_ID_GREEN>;
44 gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
48 function = LED_FUNCTION_INDICATOR;
49 color = <LED_COLOR_ID_RED>;
50 gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
54 reg_ps: ps-regulator {
55 compatible = "regulator-fixed";
56 regulator-name = "ps";
57 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>;
62 reg_vbat_wifi: vbat-wifi {
63 compatible = "regulator-fixed";
64 regulator-min-microvolt = <3300000>;
65 regulator-max-microvolt = <3300000>;
66 regulator-name = "vbat-wifi";
69 sgm3140: led-controller {
70 compatible = "sgmicro,sgm3140";
71 vin-supply = <®_dcdc1>;
74 function = LED_FUNCTION_FLASH;
75 color = <LED_COLOR_ID_WHITE>;
76 flash-max-timeout-us = <250000>;
80 speaker_amp: audio-amplifier {
81 compatible = "simple-audio-amplifier";
82 enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
83 sound-name-prefix = "Speaker Amp";
87 compatible = "gpio-vibrator";
88 enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
89 vcc-supply = <®_dcdc1>;
98 cpvdd-supply = <®_eldo1>;
103 cpu-supply = <®_dcdc2>;
107 cpu-supply = <®_dcdc2>;
111 cpu-supply = <®_dcdc2>;
115 cpu-supply = <®_dcdc2>;
131 vcc-dsi-supply = <®_dldo1>;
135 compatible = "xingbangda,xbd599";
137 reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
138 iovcc-supply = <®_dldo2>;
139 vcc-supply = <®_ldo_io0>;
140 backlight = <&backlight>;
156 compatible = "goodix,gt917s";
158 interrupt-parent = <&pio>;
159 interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
160 irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
161 reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
162 AVDD28-supply = <®_ldo_io0>;
163 VDDIO-supply = <®_ldo_io0>;
164 touchscreen-size-x = <720>;
165 touchscreen-size-y = <1440>;
173 lis3mdl: magnetometer@1e {
174 compatible = "st,lis3mdl-magn";
176 vdd-supply = <®_dldo1>;
177 vddio-supply = <®_dldo1>;
180 /* Light/proximity sensor */
182 compatible = "sensortek,stk3311";
184 interrupt-parent = <&pio>;
185 interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
188 /* Accelerometer/gyroscope */
190 compatible = "invensense,mpu6050";
192 interrupt-parent = <&pio>;
193 interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
194 vdd-supply = <®_dldo1>;
195 vddio-supply = <®_dldo1>;
199 /* Connected to pogo pins (external spring based pinheader for user addons) */
205 vref-supply = <®_aldo3>;
211 linux,code = <KEY_VOLUMEUP>;
217 label = "Volume Down";
218 linux,code = <KEY_VOLUMEDOWN>;
225 pinctrl-names = "default";
226 pinctrl-0 = <&mmc0_pins>;
227 vmmc-supply = <®_dcdc1>;
228 vqmmc-supply = <®_dcdc1>;
229 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
236 pinctrl-names = "default";
237 pinctrl-0 = <&mmc1_pins>;
238 vmmc-supply = <®_vbat_wifi>;
239 vqmmc-supply = <®_dldo4>;
250 pinctrl-names = "default";
251 pinctrl-0 = <&mmc2_pins>;
252 vmmc-supply = <®_dcdc1>;
253 vqmmc-supply = <®_dcdc1>;
269 vcc-pb-supply = <®_dcdc1>;
270 vcc-pc-supply = <®_dcdc1>;
271 vcc-pd-supply = <®_dcdc1>;
272 vcc-pe-supply = <®_aldo1>;
273 vcc-pf-supply = <®_dcdc1>;
274 vcc-pg-supply = <®_dldo4>;
275 vcc-ph-supply = <®_dcdc1>;
280 * FIXME: We can't add that supply for now since it would
281 * create a circular dependency between pinctrl, the regulator
284 * vcc-pl-supply = <®_aldo2>;
296 compatible = "x-powers,axp803";
298 interrupt-parent = <&r_intc>;
299 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
303 #include "axp803.dtsi"
305 &battery_power_supply {
310 regulator-min-microvolt = <1800000>;
311 regulator-max-microvolt = <1800000>;
312 regulator-name = "dovdd-csi";
317 regulator-min-microvolt = <1800000>;
318 regulator-max-microvolt = <1800000>;
319 regulator-name = "vcc-pl";
324 regulator-min-microvolt = <3000000>;
325 regulator-max-microvolt = <3000000>;
326 regulator-name = "vcc-pll-avcc";
331 regulator-min-microvolt = <3300000>;
332 regulator-max-microvolt = <3300000>;
333 regulator-name = "vcc-3v3";
338 regulator-min-microvolt = <1000000>;
339 regulator-max-microvolt = <1300000>;
340 regulator-name = "vdd-cpux";
343 /* DCDC3 is polyphased with DCDC2 */
347 regulator-min-microvolt = <1200000>;
348 regulator-max-microvolt = <1200000>;
349 regulator-name = "vcc-dram";
354 regulator-min-microvolt = <1100000>;
355 regulator-max-microvolt = <1100000>;
356 regulator-name = "vdd-sys";
360 regulator-min-microvolt = <3300000>;
361 regulator-max-microvolt = <3300000>;
362 regulator-name = "vcc-dsi-sensor";
366 regulator-min-microvolt = <1800000>;
367 regulator-max-microvolt = <1800000>;
368 regulator-name = "vcc-mipi-io";
372 regulator-min-microvolt = <2800000>;
373 regulator-max-microvolt = <2800000>;
374 regulator-name = "avdd-csi";
378 regulator-min-microvolt = <1800000>;
379 regulator-max-microvolt = <1800000>;
380 regulator-name = "vcc-wifi-io";
385 regulator-min-microvolt = <1800000>;
386 regulator-max-microvolt = <1800000>;
387 regulator-name = "vcc-lpddr";
391 regulator-min-microvolt = <1800000>;
392 regulator-max-microvolt = <1800000>;
393 regulator-name = "dvdd-1v8-csi";
397 regulator-min-microvolt = <1200000>;
398 regulator-max-microvolt = <1200000>;
399 regulator-name = "vcc-1v2-hsic";
404 regulator-min-microvolt = <1100000>;
405 regulator-max-microvolt = <1100000>;
406 regulator-name = "vdd-cpus";
410 regulator-min-microvolt = <3300000>;
411 regulator-max-microvolt = <3300000>;
412 regulator-name = "vcc-lcd-ctp-stk";
417 regulator-min-microvolt = <1800000>;
418 regulator-max-microvolt = <1800000>;
419 regulator-name = "vcc-1v8-typec";
424 regulator-name = "vcc-rtc";
429 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
430 simple-audio-card,widgets = "Microphone", "Headset Microphone",
431 "Microphone", "Internal Microphone",
432 "Headphone", "Headphone Jack",
433 "Speaker", "Internal Earpiece",
434 "Speaker", "Internal Speaker";
435 simple-audio-card,routing =
436 "Headphone Jack", "HP",
437 "Internal Earpiece", "EARPIECE",
438 "Internal Speaker", "Speaker Amp OUTL",
439 "Internal Speaker", "Speaker Amp OUTR",
440 "Speaker Amp INL", "LINEOUT",
441 "Speaker Amp INR", "LINEOUT",
446 "Internal Microphone", "MBIAS",
447 "MIC1", "Internal Microphone",
448 "Headset Microphone", "HBIAS",
449 "MIC2", "Headset Microphone";
453 pinctrl-names = "default";
454 pinctrl-0 = <&uart0_pb_pins>;
459 pinctrl-names = "default";
460 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
464 compatible = "realtek,rtl8723cs-bt";
465 device-wake-gpios = <&pio 7 6 GPIO_ACTIVE_LOW>; /* PH6 */
466 enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
467 host-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
471 /* Connected to the modem (hardware flow control can't be used) */
473 pinctrl-names = "default";
474 pinctrl-0 = <&uart3_pins>;
479 dr_mode = "peripheral";