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 /* Backlight configuration differs per PinePhone revision. */
28 stdout-path = "serial0:115200n8";
32 compatible = "gpio-leds";
35 function = LED_FUNCTION_INDICATOR;
36 color = <LED_COLOR_ID_BLUE>;
37 gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
41 function = LED_FUNCTION_INDICATOR;
42 color = <LED_COLOR_ID_GREEN>;
43 gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
47 function = LED_FUNCTION_INDICATOR;
48 color = <LED_COLOR_ID_RED>;
49 gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
53 reg_vbat_wifi: vbat-wifi {
54 compatible = "regulator-fixed";
55 regulator-min-microvolt = <3300000>;
56 regulator-max-microvolt = <3300000>;
57 regulator-name = "vbat-wifi";
60 sgm3140: led-controller {
61 compatible = "sgmicro,sgm3140";
62 vin-supply = <®_dcdc1>;
65 function = LED_FUNCTION_FLASH;
66 color = <LED_COLOR_ID_WHITE>;
67 flash-max-timeout-us = <250000>;
71 speaker_amp: audio-amplifier {
72 compatible = "simple-audio-amplifier";
73 enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
74 sound-name-prefix = "Speaker Amp";
78 compatible = "gpio-vibrator";
79 enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
80 vcc-supply = <®_dcdc1>;
89 cpvdd-supply = <®_eldo1>;
94 cpu-supply = <®_dcdc2>;
98 cpu-supply = <®_dcdc2>;
102 cpu-supply = <®_dcdc2>;
106 cpu-supply = <®_dcdc2>;
122 vcc-dsi-supply = <®_dldo1>;
126 compatible = "xingbangda,xbd599";
128 reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
129 iovcc-supply = <®_dldo2>;
130 vcc-supply = <®_ldo_io0>;
131 backlight = <&backlight>;
147 compatible = "goodix,gt917s";
149 interrupt-parent = <&pio>;
150 interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
151 irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
152 reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
153 AVDD28-supply = <®_ldo_io0>;
154 VDDIO-supply = <®_ldo_io0>;
155 touchscreen-size-x = <720>;
156 touchscreen-size-y = <1440>;
164 lis3mdl: magnetometer@1e {
165 compatible = "st,lis3mdl-magn";
167 vdd-supply = <®_dldo1>;
168 vddio-supply = <®_dldo1>;
171 /* Light/proximity sensor */
173 compatible = "sensortek,stk3311";
175 interrupt-parent = <&pio>;
176 interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
177 vdd-supply = <®_ldo_io0>;
178 leda-supply = <®_dldo1>;
181 /* Accelerometer/gyroscope */
183 compatible = "invensense,mpu6050";
185 interrupt-parent = <&pio>;
186 interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
187 vdd-supply = <®_dldo1>;
188 vddio-supply = <®_dldo1>;
192 /* Connected to pogo pins (external spring based pinheader for user addons) */
198 vref-supply = <®_aldo3>;
203 linux,code = <KEY_VOLUMEUP>;
209 label = "Volume Down";
210 linux,code = <KEY_VOLUMEDOWN>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&mmc0_pins>;
219 vmmc-supply = <®_dcdc1>;
220 vqmmc-supply = <®_dcdc1>;
221 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
228 pinctrl-names = "default";
229 pinctrl-0 = <&mmc1_pins>;
230 vmmc-supply = <®_vbat_wifi>;
231 vqmmc-supply = <®_dldo4>;
242 pinctrl-names = "default";
243 pinctrl-0 = <&mmc2_pins>;
244 vmmc-supply = <®_dcdc1>;
245 vqmmc-supply = <®_dcdc1>;
261 vcc-pb-supply = <®_dcdc1>;
262 vcc-pc-supply = <®_dcdc1>;
263 vcc-pd-supply = <®_dcdc1>;
264 vcc-pe-supply = <®_aldo1>;
265 vcc-pf-supply = <®_dcdc1>;
266 vcc-pg-supply = <®_dldo4>;
267 vcc-ph-supply = <®_dcdc1>;
272 * FIXME: We can't add that supply for now since it would
273 * create a circular dependency between pinctrl, the regulator
276 * vcc-pl-supply = <®_aldo2>;
288 compatible = "x-powers,axp803";
290 interrupt-parent = <&r_intc>;
291 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
295 #include "axp803.dtsi"
297 &battery_power_supply {
302 regulator-min-microvolt = <1800000>;
303 regulator-max-microvolt = <1800000>;
304 regulator-name = "dovdd-csi";
309 regulator-min-microvolt = <1800000>;
310 regulator-max-microvolt = <1800000>;
311 regulator-name = "vcc-pl";
316 regulator-min-microvolt = <3000000>;
317 regulator-max-microvolt = <3000000>;
318 regulator-name = "vcc-pll-avcc";
323 regulator-min-microvolt = <3300000>;
324 regulator-max-microvolt = <3300000>;
325 regulator-name = "vcc-3v3";
330 regulator-min-microvolt = <1000000>;
331 regulator-max-microvolt = <1300000>;
332 regulator-name = "vdd-cpux";
335 /* DCDC3 is polyphased with DCDC2 */
339 regulator-min-microvolt = <1200000>;
340 regulator-max-microvolt = <1200000>;
341 regulator-name = "vcc-dram";
346 regulator-min-microvolt = <1100000>;
347 regulator-max-microvolt = <1100000>;
348 regulator-name = "vdd-sys";
352 regulator-min-microvolt = <3300000>;
353 regulator-max-microvolt = <3300000>;
354 regulator-name = "vcc-dsi-sensor";
358 regulator-min-microvolt = <1800000>;
359 regulator-max-microvolt = <1800000>;
360 regulator-name = "vcc-mipi-io";
364 regulator-min-microvolt = <2800000>;
365 regulator-max-microvolt = <2800000>;
366 regulator-name = "avdd-csi";
370 regulator-min-microvolt = <1800000>;
371 regulator-max-microvolt = <1800000>;
372 regulator-name = "vcc-wifi-io";
377 regulator-min-microvolt = <1800000>;
378 regulator-max-microvolt = <1800000>;
379 regulator-name = "vcc-lpddr";
383 regulator-min-microvolt = <1800000>;
384 regulator-max-microvolt = <1800000>;
385 regulator-name = "dvdd-1v8-csi";
389 regulator-min-microvolt = <1200000>;
390 regulator-max-microvolt = <1200000>;
391 regulator-name = "vcc-1v2-hsic";
396 regulator-min-microvolt = <1100000>;
397 regulator-max-microvolt = <1100000>;
398 regulator-name = "vdd-cpus";
402 regulator-min-microvolt = <3300000>;
403 regulator-max-microvolt = <3300000>;
404 regulator-name = "vcc-lcd-ctp-stk";
409 regulator-min-microvolt = <1800000>;
410 regulator-max-microvolt = <1800000>;
411 regulator-name = "vcc-1v8-typec";
416 regulator-name = "vcc-rtc";
421 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
422 simple-audio-card,widgets = "Microphone", "Headset Microphone",
423 "Microphone", "Internal Microphone",
424 "Headphone", "Headphone Jack",
425 "Speaker", "Internal Earpiece",
426 "Speaker", "Internal Speaker";
427 simple-audio-card,routing =
428 "Headphone Jack", "HP",
429 "Internal Earpiece", "EARPIECE",
430 "Internal Speaker", "Speaker Amp OUTL",
431 "Internal Speaker", "Speaker Amp OUTR",
432 "Speaker Amp INL", "LINEOUT",
433 "Speaker Amp INR", "LINEOUT",
438 "Internal Microphone", "MBIAS",
439 "MIC1", "Internal Microphone",
440 "Headset Microphone", "HBIAS",
441 "MIC2", "Headset Microphone";
445 pinctrl-names = "default";
446 pinctrl-0 = <&uart0_pb_pins>;
451 pinctrl-names = "default";
452 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
456 compatible = "realtek,rtl8723cs-bt";
457 device-wake-gpios = <&pio 7 6 GPIO_ACTIVE_LOW>; /* PH6 */
458 enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
459 host-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
463 /* Connected to the modem (hardware flow control can't be used) */
465 pinctrl-names = "default";
466 pinctrl-0 = <&uart3_pins>;
471 dr_mode = "peripheral";