arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / arm64 / boot / dts / allwinner / sun50i-a64-pinebook.dts
blob64b1c54f87c0a7a4c79a81626deecc7b77f3b458
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>
5 /dts-v1/;
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>
15 / {
16         model = "Pinebook";
17         compatible = "pine64,pinebook", "allwinner,sun50i-a64";
19         aliases {
20                 serial0 = &uart0;
21                 ethernet0 = &rtl8723cs;
22         };
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 = <&reg_vbklt>;
31         };
33         chosen {
34                 stdout-path = "serial0:115200n8";
35         };
37         gpio_keys {
38                 compatible = "gpio-keys";
40                 lid_switch {
41                         label = "Lid Switch";
42                         gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */
43                         linux,input-type = <EV_SW>;
44                         linux,code = <SW_LID>;
45                         linux,can-disable;
46                         wakeup-source;
47                         wakeup-event-action = <EV_ACT_DEASSERTED>;
48                 };
49         };
51         panel_edp: panel-edp {
52                 compatible = "neweast,wjfh116008a";
53                 backlight = <&backlight>;
54                 power-supply = <&reg_dc1sw>;
56                 port {
57                         panel_edp_in: endpoint {
58                                 remote-endpoint = <&anx6345_out_edp>;
59                         };
60                 };
61         };
63         reg_vbklt: vbklt {
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 */
69                 enable-active-high;
70         };
72         reg_vcc5v0: vcc5v0 {
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>;
78                 enable-active-high;
79         };
81         wifi_pwrseq: wifi_pwrseq {
82                 compatible = "mmc-pwrseq-simple";
83                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
84         };
86         speaker_amp: audio-amplifier {
87                 compatible = "simple-audio-amplifier";
88                 VCC-supply = <&reg_vcc5v0>;
89                 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
90                 sound-name-prefix = "Speaker Amp";
91         };
95 &codec {
96         status = "okay";
99 &codec_analog {
100         cpvdd-supply = <&reg_eldo1>;
101         status = "okay";
104 &cpu0 {
105         cpu-supply = <&reg_dcdc2>;
108 &cpu1 {
109         cpu-supply = <&reg_dcdc2>;
112 &cpu2 {
113         cpu-supply = <&reg_dcdc2>;
116 &cpu3 {
117         cpu-supply = <&reg_dcdc2>;
120 &dai {
121         status = "okay";
124 &de {
125         status = "okay";
128 &ehci0 {
129         phys = <&usbphy 0>;
130         phy-names = "usb";
131         status = "okay";
134 &ehci1 {
135         status = "okay";
138 &mixer0 {
139         status = "okay";
142 &mmc0 {
143         pinctrl-names = "default";
144         pinctrl-0 = <&mmc0_pins>;
145         vmmc-supply = <&reg_dcdc1>;
146         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
147         disable-wp;
148         bus-width = <4>;
149         status = "okay";
152 &mmc1 {
153         pinctrl-names = "default";
154         pinctrl-0 = <&mmc1_pins>;
155         vmmc-supply = <&reg_dldo4>;
156         vqmmc-supply = <&reg_eldo1>;
157         mmc-pwrseq = <&wifi_pwrseq>;
158         bus-width = <4>;
159         non-removable;
160         status = "okay";
162         rtl8723cs: wifi@1 {
163                 reg = <1>;
164         };
167 &mmc2 {
168         pinctrl-names = "default";
169         pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
170         vmmc-supply = <&reg_dcdc1>;
171         vqmmc-supply = <&reg_eldo1>;
172         bus-width = <8>;
173         non-removable;
174         cap-mmc-hw-reset;
175         mmc-hs200-1_8v;
176         status = "okay";
179 &ohci0 {
180         phys = <&usbphy 0>;
181         phy-names = "usb";
182         status = "okay";
185 &ohci1 {
186         status = "okay";
189 &pio {
190         vcc-pc-supply = <&reg_eldo1>;
191         vcc-pd-supply = <&reg_dcdc1>;
192         vcc-pe-supply = <&reg_aldo1>;
193         vcc-pg-supply = <&reg_eldo1>;
196 &pwm {
197         status = "okay";
200 &r_i2c {
201         clock-frequency = <100000>;
202         pinctrl-names = "default";
203         pinctrl-0 = <&r_i2c_pl89_pins>;
204         status = "okay";
206         anx6345: anx6345@38 {
207                 compatible = "analogix,anx6345";
208                 reg = <0x38>;
209                 reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
210                 dvdd25-supply = <&reg_dldo2>;
211                 dvdd12-supply = <&reg_fldo1>;
213                 ports {
214                         #address-cells = <1>;
215                         #size-cells = <0>;
217                         anx6345_in: port@0 {
218                                 reg = <0>;
219                                 anx6345_in_tcon0: endpoint {
220                                         remote-endpoint = <&tcon0_out_anx6345>;
221                                 };
222                         };
224                         anx6345_out: port@1 {
225                                 reg = <1>;
226                                 anx6345_out_edp: endpoint {
227                                         remote-endpoint = <&panel_edp_in>;
228                                 };
229                         };
230                 };
231         };
234 &r_pio {
235         /*
236          * FIXME: We can't add that supply for now since it would
237          * create a circular dependency between pinctrl, the regulator
238          * and the RSB Bus.
239          *
240          * vcc-pl-supply = <&reg_aldo2>;
241          */
244 &r_rsb {
245         status = "okay";
247         axp803: pmic@3a3 {
248                 compatible = "x-powers,axp803";
249                 reg = <0x3a3>;
250                 interrupt-parent = <&r_intc>;
251                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
252         };
255 #include "axp803.dtsi"
257 &ac_power_supply {
258         status = "okay";
261 &battery_power_supply {
262         status = "okay";
265 &reg_aldo1 {
266         regulator-name = "vcc-pe";
269 &reg_aldo2 {
270         regulator-always-on;
271         regulator-min-microvolt = <1800000>;
272         regulator-max-microvolt = <3300000>;
273         regulator-name = "vcc-pl";
276 &reg_aldo3 {
277         regulator-always-on;
278         regulator-min-microvolt = <2700000>;
279         regulator-max-microvolt = <3300000>;
280         regulator-name = "vcc-pll-avcc";
283 &reg_dc1sw {
284         regulator-name = "vcc-lcd";
287 &reg_dcdc1 {
288         regulator-always-on;
289         regulator-min-microvolt = <3300000>;
290         regulator-max-microvolt = <3300000>;
291         regulator-name = "vcc-3v3";
294 &reg_dcdc2 {
295         regulator-always-on;
296         regulator-min-microvolt = <1000000>;
297         regulator-max-microvolt = <1300000>;
298         regulator-name = "vdd-cpux";
301 /* DCDC3 is polyphased with DCDC2 */
303 &reg_dcdc5 {
304         regulator-always-on;
305         regulator-min-microvolt = <1200000>;
306         regulator-max-microvolt = <1200000>;
307         regulator-name = "vcc-dram";
310 &reg_dcdc6 {
311         regulator-always-on;
312         regulator-min-microvolt = <1100000>;
313         regulator-max-microvolt = <1100000>;
314         regulator-name = "vdd-sys";
317 &reg_dldo1 {
318         regulator-min-microvolt = <3300000>;
319         regulator-max-microvolt = <3300000>;
320         regulator-name = "vcc-hdmi";
323 &reg_dldo2 {
324         regulator-min-microvolt = <2500000>;
325         regulator-max-microvolt = <2500000>;
326         regulator-name = "vcc-edp";
329 &reg_dldo4 {
330         regulator-min-microvolt = <3300000>;
331         regulator-max-microvolt = <3300000>;
332         regulator-name = "vcc-wifi";
335 &reg_eldo1 {
336         regulator-always-on;
337         regulator-min-microvolt = <1800000>;
338         regulator-max-microvolt = <1800000>;
339         regulator-name = "cpvdd";
342 &reg_fldo1 {
343         regulator-min-microvolt = <1200000>;
344         regulator-max-microvolt = <1200000>;
345         regulator-name = "vcc-1v2-hsic";
348 &reg_fldo2 {
349         regulator-always-on;
350         regulator-min-microvolt = <1100000>;
351         regulator-max-microvolt = <1100000>;
352         regulator-name = "vdd-cpus";
355 &reg_rtc_ldo {
356         regulator-name = "vcc-rtc";
359 &simplefb_lcd {
360         panel-supply = <&reg_dc1sw>;
361         dvdd25-supply = <&reg_dldo2>;
362         dvdd12-supply = <&reg_fldo1>;
365 &simplefb_hdmi {
366         vcc-hdmi-supply = <&reg_dldo1>;
369 &sound {
370         status = "okay";
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 =
377                         "Left DAC", "AIF1 Slot 0 Left",
378                         "Right DAC", "AIF1 Slot 0 Right",
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",
384                         "AIF1 Slot 0 Left ADC", "Left ADC",
385                         "AIF1 Slot 0 Right ADC", "Right ADC",
386                         "Internal Microphone Left", "MBIAS",
387                         "MIC1", "Internal Microphone Left",
388                         "Internal Microphone Right", "HBIAS",
389                         "MIC2", "Internal Microphone Right";
392 &tcon0 {
393         pinctrl-names = "default";
394         pinctrl-0 = <&lcd_rgb666_pins>;
396         status = "okay";
399 &tcon0_out {
400         tcon0_out_anx6345: endpoint {
401                 remote-endpoint = <&anx6345_in_tcon0>;
402         };
405 &uart0 {
406         pinctrl-names = "default";
407         pinctrl-0 = <&uart0_pb_pins>;
408         status = "okay";
411 &usb_otg {
412         dr_mode = "host";
415 &usbphy {
416         usb0_vbus-supply = <&reg_vcc5v0>;
417         usb1_vbus-supply = <&reg_vcc5v0>;
418         status = "okay";