1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 // Copyright (C) Harald Geyer <harald@ccbib.org>
3 // based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.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/input.h>
12 #include <dt-bindings/pwm/pwm.h>
15 model = "Olimex A64 Teres-I";
16 compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64";
17 chassis-type = "laptop";
23 backlight: backlight {
24 compatible = "pwm-backlight";
25 pwms = <&pwm 0 50000 0>;
26 power-supply = <®_dcdc1>;
27 brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>;
28 default-brightness-level = <5>;
29 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
33 stdout-path = "serial0:115200n8";
36 eDP25-supply = <®_dldo2>;
37 eDP12-supply = <®_dldo3>;
42 compatible = "gpio-keys";
46 gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
47 linux,input-type = <EV_SW>;
48 linux,code = <SW_LID>;
54 compatible = "gpio-leds";
57 label = "teres-i:green:capslock";
58 gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
62 label = "teres-i:green:numlock";
63 gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
67 reg_usb1_vbus: usb1-vbus {
68 compatible = "regulator-fixed";
69 regulator-name = "usb1-vbus";
70 regulator-min-microvolt = <5000000>;
71 regulator-max-microvolt = <5000000>;
73 gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
77 wifi_pwrseq: wifi_pwrseq {
78 compatible = "mmc-pwrseq-simple";
79 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
82 speaker_amp: audio-amplifier {
83 compatible = "simple-audio-amplifier";
84 enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
85 sound-name-prefix = "Speaker Amp";
94 cpvdd-supply = <®_eldo1>;
107 cpu-supply = <®_dcdc2>;
111 cpu-supply = <®_dcdc2>;
115 cpu-supply = <®_dcdc2>;
119 cpu-supply = <®_dcdc2>;
128 clock-frequency = <100000>;
131 anx6345: anx6345@38 {
132 compatible = "analogix,anx6345";
134 reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
135 dvdd25-supply = <®_dldo2>;
136 dvdd12-supply = <®_dldo3>;
139 #address-cells = <1>;
145 anx6345_in: endpoint {
146 remote-endpoint = <&tcon0_out_anx6345>;
158 pinctrl-names = "default";
159 pinctrl-0 = <&mmc0_pins>;
160 vmmc-supply = <®_dcdc1>;
161 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
168 pinctrl-names = "default";
169 pinctrl-0 = <&mmc1_pins>;
170 vmmc-supply = <®_aldo2>;
171 vqmmc-supply = <®_dldo4>;
172 mmc-pwrseq = <&wifi_pwrseq>;
179 interrupt-parent = <&r_pio>;
180 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
181 interrupt-names = "host-wake";
186 pinctrl-names = "default";
187 pinctrl-0 = <&mmc2_pins>;
188 vmmc-supply = <®_dcdc1>;
189 vqmmc-supply = <®_dcdc1>;
201 vcc-pc-supply = <®_dcdc1>;
202 vcc-pd-supply = <®_dldo2>;
203 vcc-pe-supply = <®_aldo1>;
204 vcc-pf-supply = <®_dcdc1>; /* No dedicated supply-pin for this */
205 vcc-pg-supply = <®_aldo2>;
216 compatible = "x-powers,axp803";
218 interrupt-parent = <&r_intc>;
219 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
223 #include "axp803.dtsi"
229 &battery_power_supply {
235 regulator-min-microvolt = <2800000>;
236 regulator-max-microvolt = <2800000>;
237 regulator-name = "vcc-pe";
242 regulator-min-microvolt = <3300000>;
243 regulator-max-microvolt = <3300000>;
244 regulator-name = "vcc-pl";
249 regulator-min-microvolt = <3000000>;
250 regulator-max-microvolt = <3000000>;
251 regulator-name = "vcc-pll-avcc";
256 regulator-min-microvolt = <3300000>;
257 regulator-max-microvolt = <3300000>;
258 regulator-name = "vcc-3v3";
263 regulator-min-microvolt = <1040000>;
264 regulator-max-microvolt = <1300000>;
265 regulator-name = "vdd-cpux";
268 /* DCDC3 is polyphased with DCDC2 */
272 regulator-min-microvolt = <1500000>;
273 regulator-max-microvolt = <1500000>;
274 regulator-name = "vcc-ddr3";
279 regulator-min-microvolt = <1100000>;
280 regulator-max-microvolt = <1100000>;
281 regulator-name = "vdd-sys";
285 regulator-min-microvolt = <3300000>;
286 regulator-max-microvolt = <3300000>;
287 regulator-name = "vcc-hdmi";
291 regulator-min-microvolt = <2500000>;
292 regulator-max-microvolt = <2500000>;
293 regulator-name = "vcc-pd";
297 regulator-min-microvolt = <1200000>;
298 regulator-max-microvolt = <1200000>;
299 regulator-name = "vdd-edp";
303 regulator-min-microvolt = <3300000>;
304 regulator-max-microvolt = <3300000>;
305 regulator-name = "vcc-wifi-io";
309 regulator-min-microvolt = <1800000>;
310 regulator-max-microvolt = <1800000>;
311 regulator-name = "cpvdd";
315 regulator-min-microvolt = <1800000>;
316 regulator-max-microvolt = <1800000>;
317 regulator-name = "vcc-dvdd-csi";
321 regulator-min-microvolt = <1200000>;
322 regulator-max-microvolt = <1200000>;
323 regulator-name = "vcc-1v2-hsic";
327 * The A64 chip cannot work with this regulator off, although
328 * it seems to be only driving the AR100 core.
329 * Maybe we don't still know well about CPUs domain.
333 regulator-min-microvolt = <1100000>;
334 regulator-max-microvolt = <1100000>;
335 regulator-name = "vdd-cpus";
339 regulator-name = "vcc-rtc";
343 vcc-hdmi-supply = <®_dldo1>;
347 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
348 simple-audio-card,widgets = "Headphone", "Headphone Jack",
349 "Microphone", "Headset Microphone",
350 "Microphone", "Internal Microphone",
351 "Speaker", "Internal Speaker";
352 simple-audio-card,routing =
357 "Headphone Jack", "HP",
358 "Speaker Amp INL", "LINEOUT",
359 "Speaker Amp INR", "LINEOUT",
360 "Internal Speaker", "Speaker Amp OUTL",
361 "Internal Speaker", "Speaker Amp OUTR",
362 "Internal Microphone", "MBIAS",
363 "MIC1", "Internal Microphone",
364 "Headset Microphone", "HBIAS",
365 "MIC2", "Headset Microphone";
370 pinctrl-names = "default";
371 pinctrl-0 = <&lcd_rgb666_pins>;
377 tcon0_out_anx6345: endpoint@0 {
379 remote-endpoint = <&anx6345_in>;
384 pinctrl-names = "default";
385 pinctrl-0 = <&uart0_pb_pins>;
390 usb1_vbus-supply = <®_usb1_vbus>;