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;
24 backlight: backlight {
25 compatible = "pwm-backlight";
26 pwms = <&pwm 0 50000 0>;
27 brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>;
28 default-brightness-level = <2>;
29 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
30 power-supply = <®_vbklt>;
34 stdout-path = "serial0:115200n8";
38 compatible = "gpio-keys";
42 gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */
43 linux,input-type = <EV_SW>;
44 linux,code = <SW_LID>;
47 wakeup-event-action = <EV_ACT_DEASSERTED>;
51 panel_edp: panel-edp {
52 compatible = "neweast,wjfh116008a";
53 backlight = <&backlight>;
54 power-supply = <®_dc1sw>;
57 panel_edp_in: endpoint {
58 remote-endpoint = <&anx6345_out_edp>;
64 compatible = "regulator-fixed";
65 regulator-name = "vbklt";
66 regulator-min-microvolt = <18000000>;
67 regulator-max-microvolt = <18000000>;
68 gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
73 compatible = "regulator-fixed";
74 regulator-name = "vcc5v0";
75 regulator-min-microvolt = <5000000>;
76 regulator-max-microvolt = <5000000>;
77 gpio = <&axp_gpio 0 GPIO_ACTIVE_HIGH>;
81 wifi_pwrseq: wifi_pwrseq {
82 compatible = "mmc-pwrseq-simple";
83 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
86 speaker_amp: audio-amplifier {
87 compatible = "simple-audio-amplifier";
88 VCC-supply = <®_vcc5v0>;
89 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
90 sound-name-prefix = "Speaker Amp";
100 cpvdd-supply = <®_eldo1>;
105 cpu-supply = <®_dcdc2>;
109 cpu-supply = <®_dcdc2>;
113 cpu-supply = <®_dcdc2>;
117 cpu-supply = <®_dcdc2>;
141 pinctrl-names = "default";
142 pinctrl-0 = <&mmc0_pins>;
143 vmmc-supply = <®_dcdc1>;
144 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
151 pinctrl-names = "default";
152 pinctrl-0 = <&mmc1_pins>;
153 vmmc-supply = <®_dldo4>;
154 vqmmc-supply = <®_eldo1>;
155 mmc-pwrseq = <&wifi_pwrseq>;
166 pinctrl-names = "default";
167 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
168 vmmc-supply = <®_dcdc1>;
169 vqmmc-supply = <®_eldo1>;
170 max-frequency = <200000000>;
187 vcc-pc-supply = <®_eldo1>;
188 vcc-pd-supply = <®_dcdc1>;
189 vcc-pe-supply = <®_aldo1>;
190 vcc-pg-supply = <®_eldo1>;
198 clock-frequency = <100000>;
199 pinctrl-names = "default";
200 pinctrl-0 = <&r_i2c_pl89_pins>;
203 anx6345: anx6345@38 {
204 compatible = "analogix,anx6345";
206 reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
207 dvdd25-supply = <®_dldo2>;
208 dvdd12-supply = <®_fldo1>;
211 #address-cells = <1>;
216 anx6345_in_tcon0: endpoint {
217 remote-endpoint = <&tcon0_out_anx6345>;
221 anx6345_out: port@1 {
223 anx6345_out_edp: endpoint {
224 remote-endpoint = <&panel_edp_in>;
233 * FIXME: We can't add that supply for now since it would
234 * create a circular dependency between pinctrl, the regulator
237 * vcc-pl-supply = <®_aldo2>;
245 compatible = "x-powers,axp803";
247 interrupt-parent = <&r_intc>;
248 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
252 #include "axp803.dtsi"
258 &battery_power_supply {
263 regulator-name = "vcc-pe";
268 regulator-min-microvolt = <1800000>;
269 regulator-max-microvolt = <3300000>;
270 regulator-name = "vcc-pl";
275 regulator-min-microvolt = <2700000>;
276 regulator-max-microvolt = <3300000>;
277 regulator-name = "vcc-pll-avcc";
281 regulator-name = "vcc-lcd";
286 regulator-min-microvolt = <3300000>;
287 regulator-max-microvolt = <3300000>;
288 regulator-name = "vcc-3v3";
293 regulator-min-microvolt = <1000000>;
294 regulator-max-microvolt = <1300000>;
295 regulator-name = "vdd-cpux";
298 /* DCDC3 is polyphased with DCDC2 */
302 regulator-min-microvolt = <1200000>;
303 regulator-max-microvolt = <1200000>;
304 regulator-name = "vcc-dram";
309 regulator-min-microvolt = <1100000>;
310 regulator-max-microvolt = <1100000>;
311 regulator-name = "vdd-sys";
315 regulator-min-microvolt = <3300000>;
316 regulator-max-microvolt = <3300000>;
317 regulator-name = "vcc-hdmi";
321 regulator-min-microvolt = <2500000>;
322 regulator-max-microvolt = <2500000>;
323 regulator-name = "vcc-edp";
327 regulator-min-microvolt = <3300000>;
328 regulator-max-microvolt = <3300000>;
329 regulator-name = "vcc-wifi";
334 regulator-min-microvolt = <1800000>;
335 regulator-max-microvolt = <1800000>;
336 regulator-name = "cpvdd";
340 regulator-min-microvolt = <1200000>;
341 regulator-max-microvolt = <1200000>;
342 regulator-name = "vcc-1v2-hsic";
347 regulator-min-microvolt = <1100000>;
348 regulator-max-microvolt = <1100000>;
349 regulator-name = "vdd-cpus";
353 regulator-name = "vcc-rtc";
357 panel-supply = <®_dc1sw>;
358 dvdd25-supply = <®_dldo2>;
359 dvdd12-supply = <®_fldo1>;
363 vcc-hdmi-supply = <®_dldo1>;
368 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
369 simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
370 "Microphone", "Internal Microphone Right",
371 "Headphone", "Headphone Jack",
372 "Speaker", "Internal Speaker";
373 simple-audio-card,routing =
376 "Speaker Amp INL", "LINEOUT",
377 "Speaker Amp INR", "LINEOUT",
378 "Internal Speaker", "Speaker Amp OUTL",
379 "Internal Speaker", "Speaker Amp OUTR",
380 "Headphone Jack", "HP",
383 "Internal Microphone Left", "MBIAS",
384 "MIC1", "Internal Microphone Left",
385 "Internal Microphone Right", "HBIAS",
386 "MIC2", "Internal Microphone Right";
390 pinctrl-names = "default";
391 pinctrl-0 = <&lcd_rgb666_pins>;
397 tcon0_out_anx6345: endpoint {
398 remote-endpoint = <&anx6345_in_tcon0>;
403 pinctrl-names = "default";
404 pinctrl-0 = <&uart0_pb_pins>;
413 usb0_vbus-supply = <®_vcc5v0>;
414 usb1_vbus-supply = <®_vcc5v0>;