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>;
143 pinctrl-names = "default";
144 pinctrl-0 = <&mmc0_pins>;
145 vmmc-supply = <®_dcdc1>;
146 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
153 pinctrl-names = "default";
154 pinctrl-0 = <&mmc1_pins>;
155 vmmc-supply = <®_dldo4>;
156 vqmmc-supply = <®_eldo1>;
157 mmc-pwrseq = <&wifi_pwrseq>;
168 pinctrl-names = "default";
169 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
170 vmmc-supply = <®_dcdc1>;
171 vqmmc-supply = <®_eldo1>;
190 vcc-pc-supply = <®_eldo1>;
191 vcc-pd-supply = <®_dcdc1>;
192 vcc-pe-supply = <®_aldo1>;
193 vcc-pg-supply = <®_eldo1>;
201 clock-frequency = <100000>;
202 pinctrl-names = "default";
203 pinctrl-0 = <&r_i2c_pl89_pins>;
206 anx6345: anx6345@38 {
207 compatible = "analogix,anx6345";
209 reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
210 dvdd25-supply = <®_dldo2>;
211 dvdd12-supply = <®_fldo1>;
214 #address-cells = <1>;
219 anx6345_in_tcon0: endpoint {
220 remote-endpoint = <&tcon0_out_anx6345>;
224 anx6345_out: port@1 {
226 anx6345_out_edp: endpoint {
227 remote-endpoint = <&panel_edp_in>;
236 * FIXME: We can't add that supply for now since it would
237 * create a circular dependency between pinctrl, the regulator
240 * vcc-pl-supply = <®_aldo2>;
248 compatible = "x-powers,axp803";
250 interrupt-parent = <&r_intc>;
251 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
255 #include "axp803.dtsi"
261 &battery_power_supply {
266 regulator-name = "vcc-pe";
271 regulator-min-microvolt = <1800000>;
272 regulator-max-microvolt = <3300000>;
273 regulator-name = "vcc-pl";
278 regulator-min-microvolt = <2700000>;
279 regulator-max-microvolt = <3300000>;
280 regulator-name = "vcc-pll-avcc";
284 regulator-name = "vcc-lcd";
289 regulator-min-microvolt = <3300000>;
290 regulator-max-microvolt = <3300000>;
291 regulator-name = "vcc-3v3";
296 regulator-min-microvolt = <1000000>;
297 regulator-max-microvolt = <1300000>;
298 regulator-name = "vdd-cpux";
301 /* DCDC3 is polyphased with DCDC2 */
305 regulator-min-microvolt = <1200000>;
306 regulator-max-microvolt = <1200000>;
307 regulator-name = "vcc-dram";
312 regulator-min-microvolt = <1100000>;
313 regulator-max-microvolt = <1100000>;
314 regulator-name = "vdd-sys";
318 regulator-min-microvolt = <3300000>;
319 regulator-max-microvolt = <3300000>;
320 regulator-name = "vcc-hdmi";
324 regulator-min-microvolt = <2500000>;
325 regulator-max-microvolt = <2500000>;
326 regulator-name = "vcc-edp";
330 regulator-min-microvolt = <3300000>;
331 regulator-max-microvolt = <3300000>;
332 regulator-name = "vcc-wifi";
337 regulator-min-microvolt = <1800000>;
338 regulator-max-microvolt = <1800000>;
339 regulator-name = "cpvdd";
343 regulator-min-microvolt = <1200000>;
344 regulator-max-microvolt = <1200000>;
345 regulator-name = "vcc-1v2-hsic";
350 regulator-min-microvolt = <1100000>;
351 regulator-max-microvolt = <1100000>;
352 regulator-name = "vdd-cpus";
356 regulator-name = "vcc-rtc";
360 panel-supply = <®_dc1sw>;
361 dvdd25-supply = <®_dldo2>;
362 dvdd12-supply = <®_fldo1>;
366 vcc-hdmi-supply = <®_dldo1>;
371 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
372 simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
373 "Microphone", "Internal Microphone Right",
374 "Headphone", "Headphone Jack",
375 "Speaker", "Internal Speaker";
376 simple-audio-card,routing =
379 "Speaker Amp INL", "LINEOUT",
380 "Speaker Amp INR", "LINEOUT",
381 "Internal Speaker", "Speaker Amp OUTL",
382 "Internal Speaker", "Speaker Amp OUTR",
383 "Headphone Jack", "HP",
386 "Internal Microphone Left", "MBIAS",
387 "MIC1", "Internal Microphone Left",
388 "Internal Microphone Right", "HBIAS",
389 "MIC2", "Internal Microphone Right";
393 pinctrl-names = "default";
394 pinctrl-0 = <&lcd_rgb666_pins>;
400 tcon0_out_anx6345: endpoint {
401 remote-endpoint = <&anx6345_in_tcon0>;
406 pinctrl-names = "default";
407 pinctrl-0 = <&uart0_pb_pins>;
416 usb0_vbus-supply = <®_vcc5v0>;
417 usb1_vbus-supply = <®_vcc5v0>;