1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
3 // Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com>
7 #include "sun50i-a64.dtsi"
8 #include "sun50i-a64-cpu-opp.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/gpio-keys.h>
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/pwm/pwm.h>
17 compatible = "pine64,pinebook", "allwinner,sun50i-a64";
21 ethernet0 = &rtl8723cs;
25 compatible = "regulator-fixed";
26 regulator-name = "bl-3v3";
27 regulator-min-microvolt = <3300000>;
28 regulator-max-microvolt = <3300000>;
29 gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
33 backlight: backlight {
34 compatible = "pwm-backlight";
35 pwms = <&pwm 0 50000 0>;
36 brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>;
37 default-brightness-level = <2>;
38 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
39 power-supply = <&vdd_bl>;
43 stdout-path = "serial0:115200n8";
46 panel-supply = <®_dc1sw>;
47 dvdd25-supply = <®_dldo2>;
48 dvdd12-supply = <®_fldo1>;
53 compatible = "gpio-keys";
57 gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */
58 linux,input-type = <EV_SW>;
59 linux,code = <SW_LID>;
62 wakeup-event-action = <EV_ACT_DEASSERTED>;
66 wifi_pwrseq: wifi_pwrseq {
67 compatible = "mmc-pwrseq-simple";
68 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
71 speaker_amp: audio-amplifier {
72 compatible = "simple-audio-amplifier";
74 * TODO This is actually a fixed regulator controlled by
75 * the GPIO line on the PMIC. This should be corrected
76 * once GPIO support is added for this PMIC.
78 VCC-supply = <®_ldo_io0>;
79 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
80 sound-name-prefix = "Speaker Amp";
90 cpvdd-supply = <®_eldo1>;
95 cpu-supply = <®_dcdc2>;
99 cpu-supply = <®_dcdc2>;
103 cpu-supply = <®_dcdc2>;
107 cpu-supply = <®_dcdc2>;
125 pinctrl-names = "default";
126 pinctrl-0 = <&mmc0_pins>;
127 vmmc-supply = <®_dcdc1>;
128 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
135 pinctrl-names = "default";
136 pinctrl-0 = <&mmc1_pins>;
137 vmmc-supply = <®_dldo4>;
138 vqmmc-supply = <®_eldo1>;
139 mmc-pwrseq = <&wifi_pwrseq>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
152 vmmc-supply = <®_dcdc1>;
153 vqmmc-supply = <®_eldo1>;
175 /* The ANX6345 eDP-bridge is on r_i2c */
177 clock-frequency = <100000>;
178 pinctrl-names = "default";
179 pinctrl-0 = <&r_i2c_pl89_pins>;
187 compatible = "x-powers,axp803";
189 interrupt-parent = <&r_intc>;
190 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
194 #include "axp803.dtsi"
200 &battery_power_supply {
205 regulator-min-microvolt = <2800000>;
206 regulator-max-microvolt = <2800000>;
207 regulator-name = "vcc-csi";
212 regulator-min-microvolt = <1800000>;
213 regulator-max-microvolt = <3300000>;
214 regulator-name = "vcc-pl";
219 regulator-min-microvolt = <2700000>;
220 regulator-max-microvolt = <3300000>;
221 regulator-name = "vcc-pll-avcc";
225 regulator-name = "vcc-lcd";
230 regulator-min-microvolt = <3300000>;
231 regulator-max-microvolt = <3300000>;
232 regulator-name = "vcc-3v3";
237 regulator-min-microvolt = <1000000>;
238 regulator-max-microvolt = <1300000>;
239 regulator-name = "vdd-cpux";
242 /* DCDC3 is polyphased with DCDC2 */
246 regulator-min-microvolt = <1200000>;
247 regulator-max-microvolt = <1200000>;
248 regulator-name = "vcc-dram";
253 regulator-min-microvolt = <1100000>;
254 regulator-max-microvolt = <1100000>;
255 regulator-name = "vdd-sys";
259 regulator-min-microvolt = <3300000>;
260 regulator-max-microvolt = <3300000>;
261 regulator-name = "vcc-hdmi";
265 regulator-min-microvolt = <2500000>;
266 regulator-max-microvolt = <2500000>;
267 regulator-name = "vcc-edp";
271 regulator-min-microvolt = <3300000>;
272 regulator-max-microvolt = <3300000>;
273 regulator-name = "avdd-csi";
277 regulator-min-microvolt = <3300000>;
278 regulator-max-microvolt = <3300000>;
279 regulator-name = "vcc-wifi";
284 regulator-min-microvolt = <1800000>;
285 regulator-max-microvolt = <1800000>;
286 regulator-name = "cpvdd";
290 regulator-min-microvolt = <1800000>;
291 regulator-max-microvolt = <1800000>;
292 regulator-name = "vdd-1v8-csi";
296 regulator-min-microvolt = <1200000>;
297 regulator-max-microvolt = <1200000>;
298 regulator-name = "vcc-1v2-hsic";
303 regulator-min-microvolt = <1100000>;
304 regulator-max-microvolt = <1100000>;
305 regulator-name = "vdd-cpus";
309 regulator-min-microvolt = <3300000>;
310 regulator-max-microvolt = <3300000>;
311 regulator-name = "vcc-usb";
316 regulator-name = "vcc-rtc";
320 vcc-hdmi-supply = <®_dldo1>;
325 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
326 simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
327 "Microphone", "Internal Microphone Right",
328 "Headphone", "Headphone Jack",
329 "Speaker", "Internal Speaker";
330 simple-audio-card,routing =
331 "Left DAC", "AIF1 Slot 0 Left",
332 "Right DAC", "AIF1 Slot 0 Right",
333 "Speaker Amp INL", "LINEOUT",
334 "Speaker Amp INR", "LINEOUT",
335 "Internal Speaker", "Speaker Amp OUTL",
336 "Internal Speaker", "Speaker Amp OUTR",
337 "Headphone Jack", "HP",
338 "AIF1 Slot 0 Left ADC", "Left ADC",
339 "AIF1 Slot 0 Right ADC", "Right ADC",
340 "Internal Microphone Left", "MBIAS",
341 "MIC1", "Internal Microphone Left",
342 "Internal Microphone Right", "HBIAS",
343 "MIC2", "Internal Microphone Right";
347 pinctrl-names = "default";
348 pinctrl-0 = <&uart0_pb_pins>;
357 usb0_vbus-supply = <®_ldo_io0>;
358 usb1_vbus-supply = <®_ldo_io0>;