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>;
67 compatible = "regulator-fixed";
68 regulator-name = "vcc3v3";
69 regulator-min-microvolt = <3300000>;
70 regulator-max-microvolt = <3300000>;
73 wifi_pwrseq: wifi_pwrseq {
74 compatible = "mmc-pwrseq-simple";
75 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
78 speaker_amp: audio-amplifier {
79 compatible = "simple-audio-amplifier";
81 * TODO This is actually a fixed regulator controlled by
82 * the GPIO line on the PMIC. This should be corrected
83 * once GPIO support is added for this PMIC.
85 VCC-supply = <®_ldo_io0>;
86 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
87 sound-name-prefix = "Speaker Amp";
97 cpvdd-supply = <®_eldo1>;
102 cpu-supply = <®_dcdc2>;
106 cpu-supply = <®_dcdc2>;
110 cpu-supply = <®_dcdc2>;
114 cpu-supply = <®_dcdc2>;
132 pinctrl-names = "default";
133 pinctrl-0 = <&mmc0_pins>;
134 vmmc-supply = <®_dcdc1>;
135 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
142 pinctrl-names = "default";
143 pinctrl-0 = <&mmc1_pins>;
144 vmmc-supply = <®_dldo4>;
145 vqmmc-supply = <®_eldo1>;
146 mmc-pwrseq = <&wifi_pwrseq>;
157 pinctrl-names = "default";
158 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
159 vmmc-supply = <®_dcdc1>;
160 vqmmc-supply = <®_eldo1>;
186 compatible = "x-powers,axp803";
188 interrupt-parent = <&r_intc>;
189 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
193 /* The ANX6345 eDP-bridge is on r_i2c */
195 clock-frequency = <100000>;
196 pinctrl-names = "default";
197 pinctrl-0 = <&r_i2c_pl89_pins>;
201 #include "axp803.dtsi"
207 &battery_power_supply {
212 regulator-min-microvolt = <2800000>;
213 regulator-max-microvolt = <2800000>;
214 regulator-name = "vcc-csi";
219 regulator-min-microvolt = <1800000>;
220 regulator-max-microvolt = <3300000>;
221 regulator-name = "vcc-pl";
226 regulator-min-microvolt = <2700000>;
227 regulator-max-microvolt = <3300000>;
228 regulator-name = "vcc-pll-avcc";
232 regulator-name = "vcc-lcd";
237 regulator-min-microvolt = <3300000>;
238 regulator-max-microvolt = <3300000>;
239 regulator-name = "vcc-3v3";
244 regulator-min-microvolt = <1000000>;
245 regulator-max-microvolt = <1300000>;
246 regulator-name = "vdd-cpux";
249 /* DCDC3 is polyphased with DCDC2 */
253 regulator-min-microvolt = <1200000>;
254 regulator-max-microvolt = <1200000>;
255 regulator-name = "vcc-dram";
260 regulator-min-microvolt = <1100000>;
261 regulator-max-microvolt = <1100000>;
262 regulator-name = "vdd-sys";
266 regulator-min-microvolt = <3300000>;
267 regulator-max-microvolt = <3300000>;
268 regulator-name = "vcc-hdmi";
272 regulator-min-microvolt = <2500000>;
273 regulator-max-microvolt = <2500000>;
274 regulator-name = "vcc-edp";
278 regulator-min-microvolt = <3300000>;
279 regulator-max-microvolt = <3300000>;
280 regulator-name = "avdd-csi";
284 regulator-min-microvolt = <3300000>;
285 regulator-max-microvolt = <3300000>;
286 regulator-name = "vcc-wifi";
291 regulator-min-microvolt = <1800000>;
292 regulator-max-microvolt = <1800000>;
293 regulator-name = "cpvdd";
297 regulator-min-microvolt = <1800000>;
298 regulator-max-microvolt = <1800000>;
299 regulator-name = "vdd-1v8-csi";
303 regulator-min-microvolt = <1200000>;
304 regulator-max-microvolt = <1200000>;
305 regulator-name = "vcc-1v2-hsic";
310 regulator-min-microvolt = <1100000>;
311 regulator-max-microvolt = <1100000>;
312 regulator-name = "vdd-cpus";
316 regulator-min-microvolt = <3300000>;
317 regulator-max-microvolt = <3300000>;
318 regulator-name = "vcc-usb";
323 regulator-name = "vcc-rtc";
327 vcc-hdmi-supply = <®_dldo1>;
332 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
333 simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
334 "Microphone", "Internal Microphone Right",
335 "Headphone", "Headphone Jack",
336 "Speaker", "Internal Speaker";
337 simple-audio-card,routing =
338 "Left DAC", "AIF1 Slot 0 Left",
339 "Right DAC", "AIF1 Slot 0 Right",
340 "Speaker Amp INL", "LINEOUT",
341 "Speaker Amp INR", "LINEOUT",
342 "Internal Speaker", "Speaker Amp OUTL",
343 "Internal Speaker", "Speaker Amp OUTR",
344 "Headphone Jack", "HP",
345 "AIF1 Slot 0 Left ADC", "Left ADC",
346 "AIF1 Slot 0 Right ADC", "Right ADC",
347 "Internal Microphone Left", "MBIAS",
348 "MIC1", "Internal Microphone Left",
349 "Internal Microphone Right", "HBIAS",
350 "MIC2", "Internal Microphone Right";
354 pinctrl-names = "default";
355 pinctrl-0 = <&uart0_pb_pins>;
364 usb0_vbus-supply = <®_ldo_io0>;
365 usb1_vbus-supply = <®_ldo_io0>;