1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
9 #include "sun50i-a64.dtsi"
10 #include "sun50i-a64-cpu-opp.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/input/input.h>
14 #include <dt-bindings/pwm/pwm.h>
17 model = "PineTab, Development Sample";
18 compatible = "pine64,pinetab", "allwinner,sun50i-a64";
19 chassis-type = "tablet";
23 ethernet0 = &rtl8723cs;
26 backlight: backlight {
27 compatible = "pwm-backlight";
28 pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
29 brightness-levels = <0 16 18 20 22 24 26 29 32 35 38 42 46 51 56 62 68 75 83 91 100>;
30 default-brightness-level = <15>;
31 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
32 power-supply = <&vdd_bl>;
36 stdout-path = "serial0:115200n8";
40 compatible = "hdmi-connector";
44 hdmi_con_in: endpoint {
45 remote-endpoint = <&hdmi_out_con>;
51 compatible = "i2c-gpio";
52 sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */
53 scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* PE12 */
54 i2c-gpio,delay-us = <5>;
60 compatible = "ovti,ov5640";
62 pinctrl-names = "default";
63 pinctrl-0 = <&csi_mclk_pin>;
64 clocks = <&ccu CLK_CSI_MCLK>;
67 AVDD-supply = <®_dldo3>;
68 DOVDD-supply = <®_aldo1>;
69 DVDD-supply = <®_eldo3>;
70 reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* PE14 */
71 powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
75 remote-endpoint = <&csi_ep>;
77 hsync-active = <1>; /* Active high */
78 vsync-active = <0>; /* Active low */
79 data-active = <1>; /* Active high */
80 pclk-sample = <1>; /* Rising */
86 speaker_amp: audio-amplifier {
87 compatible = "simple-audio-amplifier";
88 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
89 sound-name-prefix = "Speaker Amp";
93 compatible = "regulator-fixed";
94 regulator-name = "bl-3v3";
95 regulator-min-microvolt = <3300000>;
96 regulator-max-microvolt = <3300000>;
97 gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
101 wifi_pwrseq: wifi_pwrseq {
102 compatible = "mmc-pwrseq-simple";
103 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
104 post-power-on-delay-ms = <200>;
113 cpvdd-supply = <®_eldo1>;
118 cpu-supply = <®_dcdc2>;
122 cpu-supply = <®_dcdc2>;
126 cpu-supply = <®_dcdc2>;
130 cpu-supply = <®_dcdc2>;
138 remote-endpoint = <&ov5640_ep>;
140 hsync-active = <1>; /* Active high */
141 vsync-active = <0>; /* Active low */
142 data-active = <1>; /* Active high */
143 pclk-sample = <1>; /* Rising */
161 vcc-dsi-supply = <®_dldo1>;
165 compatible = "feixin,k101-im2ba02";
167 avdd-supply = <®_dc1sw>;
168 dvdd-supply = <®_dc1sw>;
169 cvdd-supply = <®_ldo_io1>;
170 reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
171 backlight = <&backlight>;
187 compatible = "goodix,gt9271";
189 interrupt-parent = <&pio>;
190 interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
191 irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
192 reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
193 AVDD28-supply = <®_ldo_io1>;
204 /* TODO: add Bochs BMA223 accelerometer here */
208 vref-supply = <®_aldo3>;
213 linux,code = <KEY_VOLUMEUP>;
219 label = "Volume Down";
220 linux,code = <KEY_VOLUMEDOWN>;
231 pinctrl-names = "default";
232 pinctrl-0 = <&mmc0_pins>;
233 vmmc-supply = <®_dcdc1>;
234 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
241 pinctrl-names = "default";
242 pinctrl-0 = <&mmc1_pins>;
243 vmmc-supply = <®_dldo4>;
244 vqmmc-supply = <®_eldo1>;
245 mmc-pwrseq = <&wifi_pwrseq>;
256 pinctrl-names = "default";
257 pinctrl-0 = <&mmc2_pins>;
258 vmmc-supply = <®_dcdc1>;
259 vqmmc-supply = <®_dcdc1>;
278 compatible = "x-powers,axp803";
280 interrupt-parent = <&r_intc>;
281 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
282 x-powers,drive-vbus-en;
286 #include "axp803.dtsi"
292 &battery_power_supply {
297 regulator-min-microvolt = <2800000>;
298 regulator-max-microvolt = <2800000>;
299 regulator-name = "dovdd-csi";
304 regulator-min-microvolt = <1800000>;
305 regulator-max-microvolt = <3300000>;
306 regulator-name = "vcc-pl";
311 regulator-min-microvolt = <2700000>;
312 regulator-max-microvolt = <3300000>;
313 regulator-name = "vcc-pll-avcc";
317 regulator-name = "vcc-lcd";
322 regulator-min-microvolt = <3300000>;
323 regulator-max-microvolt = <3300000>;
324 regulator-name = "vcc-3v3";
329 regulator-min-microvolt = <1000000>;
330 regulator-max-microvolt = <1300000>;
331 regulator-name = "vdd-cpux";
334 /* DCDC3 is polyphased with DCDC2 */
338 regulator-min-microvolt = <1200000>;
339 regulator-max-microvolt = <1200000>;
340 regulator-name = "vcc-dram";
345 regulator-min-microvolt = <1100000>;
346 regulator-max-microvolt = <1100000>;
347 regulator-name = "vdd-sys";
352 regulator-min-microvolt = <3300000>;
353 regulator-max-microvolt = <3300000>;
354 regulator-name = "vcc-hdmi-dsi-sensor";
358 regulator-min-microvolt = <2800000>;
359 regulator-max-microvolt = <2800000>;
360 regulator-name = "avdd-csi";
364 regulator-min-microvolt = <3300000>;
365 regulator-max-microvolt = <3300000>;
366 regulator-name = "vcc-wifi";
370 regulator-name = "usb0-vbus";
376 regulator-min-microvolt = <1800000>;
377 regulator-max-microvolt = <1800000>;
378 regulator-name = "cpvdd";
382 regulator-min-microvolt = <1800000>;
383 regulator-max-microvolt = <1800000>;
384 regulator-name = "vcca-1v8";
388 regulator-min-microvolt = <1800000>;
389 regulator-max-microvolt = <1800000>;
390 regulator-name = "dvdd-1v8-csi";
394 regulator-min-microvolt = <1200000>;
395 regulator-max-microvolt = <1200000>;
396 regulator-name = "vcc-1v2-hsic";
401 regulator-min-microvolt = <1100000>;
402 regulator-max-microvolt = <1100000>;
403 regulator-name = "vdd-cpus";
407 regulator-min-microvolt = <3300000>;
408 regulator-max-microvolt = <3300000>;
409 regulator-name = "vcc-usb";
414 regulator-min-microvolt = <3300000>;
415 regulator-max-microvolt = <3300000>;
416 regulator-enable-ramp-delay = <3500000>;
417 regulator-name = "vcc-touchscreen";
422 regulator-name = "vcc-rtc";
426 vcc-hdmi-supply = <®_dldo1>;
430 hvcc-supply = <®_dldo1>;
435 hdmi_out_con: endpoint {
436 remote-endpoint = <&hdmi_con_in>;
442 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
443 simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
444 "Microphone", "Internal Microphone Right",
445 "Headphone", "Headphone Jack",
446 "Speaker", "Internal Speaker";
447 simple-audio-card,routing =
450 "Speaker Amp INL", "LINEOUT",
451 "Speaker Amp INR", "LINEOUT",
452 "Internal Speaker", "Speaker Amp OUTL",
453 "Internal Speaker", "Speaker Amp OUTR",
454 "Headphone Jack", "HP",
457 "Internal Microphone Left", "MBIAS",
458 "MIC1", "Internal Microphone Left",
459 "Internal Microphone Right", "HBIAS",
460 "MIC2", "Internal Microphone Right";
464 pinctrl-names = "default";
465 pinctrl-0 = <&uart0_pb_pins>;
479 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
480 usb0_vbus_power-supply = <&usb_power_supply>;
481 usb0_vbus-supply = <®_drivevbus>;
482 usb1_vbus-supply = <®_ldo_io0>;