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";
22 backlight: backlight {
23 compatible = "pwm-backlight";
24 pwms = <&pwm 0 50000 0>;
25 power-supply = <®_dcdc1>;
26 brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>;
27 default-brightness-level = <5>;
28 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
32 stdout-path = "serial0:115200n8";
35 eDP25-supply = <®_dldo2>;
36 eDP12-supply = <®_dldo3>;
41 compatible = "gpio-keys";
45 gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
46 linux,input-type = <EV_SW>;
47 linux,code = <SW_LID>;
53 compatible = "gpio-leds";
56 label = "teres-i:green:capslock";
57 gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
61 label = "teres-i:green:numlock";
62 gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
66 reg_usb1_vbus: usb1-vbus {
67 compatible = "regulator-fixed";
68 regulator-name = "usb1-vbus";
69 regulator-min-microvolt = <5000000>;
70 regulator-max-microvolt = <5000000>;
72 gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
76 wifi_pwrseq: wifi_pwrseq {
77 compatible = "mmc-pwrseq-simple";
78 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
81 speaker_amp: audio-amplifier {
82 compatible = "simple-audio-amplifier";
83 enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
84 sound-name-prefix = "Speaker Amp";
93 cpvdd-supply = <®_eldo1>;
106 cpu-supply = <®_dcdc2>;
110 cpu-supply = <®_dcdc2>;
114 cpu-supply = <®_dcdc2>;
118 cpu-supply = <®_dcdc2>;
127 clock-frequency = <100000>;
130 anx6345: anx6345@38 {
131 compatible = "analogix,anx6345";
133 reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
134 dvdd25-supply = <®_dldo2>;
135 dvdd12-supply = <®_dldo3>;
138 #address-cells = <1>;
142 anx6345_in: endpoint {
143 remote-endpoint = <&tcon0_out_anx6345>;
155 pinctrl-names = "default";
156 pinctrl-0 = <&mmc0_pins>;
157 vmmc-supply = <®_dcdc1>;
158 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
165 pinctrl-names = "default";
166 pinctrl-0 = <&mmc1_pins>;
167 vmmc-supply = <®_aldo2>;
168 vqmmc-supply = <®_dldo4>;
169 mmc-pwrseq = <&wifi_pwrseq>;
176 interrupt-parent = <&r_pio>;
177 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
178 interrupt-names = "host-wake";
183 pinctrl-names = "default";
184 pinctrl-0 = <&mmc2_pins>;
185 vmmc-supply = <®_dcdc1>;
186 vqmmc-supply = <®_dcdc1>;
205 compatible = "x-powers,axp803";
207 interrupt-parent = <&r_intc>;
208 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
213 #include "axp803.dtsi"
219 &battery_power_supply {
225 regulator-min-microvolt = <2800000>;
226 regulator-max-microvolt = <2800000>;
227 regulator-name = "vcc-pe";
232 regulator-min-microvolt = <3300000>;
233 regulator-max-microvolt = <3300000>;
234 regulator-name = "vcc-pl";
239 regulator-min-microvolt = <3000000>;
240 regulator-max-microvolt = <3000000>;
241 regulator-name = "vcc-pll-avcc";
246 regulator-min-microvolt = <3300000>;
247 regulator-max-microvolt = <3300000>;
248 regulator-name = "vcc-3v3";
253 regulator-min-microvolt = <1040000>;
254 regulator-max-microvolt = <1300000>;
255 regulator-name = "vdd-cpux";
258 /* DCDC3 is polyphased with DCDC2 */
262 regulator-min-microvolt = <1500000>;
263 regulator-max-microvolt = <1500000>;
264 regulator-name = "vcc-ddr3";
269 regulator-min-microvolt = <1100000>;
270 regulator-max-microvolt = <1100000>;
271 regulator-name = "vdd-sys";
275 regulator-min-microvolt = <3300000>;
276 regulator-max-microvolt = <3300000>;
277 regulator-name = "vcc-hdmi";
281 regulator-min-microvolt = <2500000>;
282 regulator-max-microvolt = <2500000>;
283 regulator-name = "vcc-pd";
287 regulator-min-microvolt = <1200000>;
288 regulator-max-microvolt = <1200000>;
289 regulator-name = "vdd-edp";
293 regulator-min-microvolt = <3300000>;
294 regulator-max-microvolt = <3300000>;
295 regulator-name = "vcc-wifi-io";
299 regulator-min-microvolt = <1800000>;
300 regulator-max-microvolt = <1800000>;
301 regulator-name = "cpvdd";
305 regulator-min-microvolt = <1800000>;
306 regulator-max-microvolt = <1800000>;
307 regulator-name = "vcc-dvdd-csi";
311 regulator-min-microvolt = <1200000>;
312 regulator-max-microvolt = <1200000>;
313 regulator-name = "vcc-1v2-hsic";
317 * The A64 chip cannot work with this regulator off, although
318 * it seems to be only driving the AR100 core.
319 * Maybe we don't still know well about CPUs domain.
323 regulator-min-microvolt = <1100000>;
324 regulator-max-microvolt = <1100000>;
325 regulator-name = "vdd-cpus";
329 regulator-name = "vcc-rtc";
333 vcc-hdmi-supply = <®_dldo1>;
337 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
338 simple-audio-card,widgets = "Headphone", "Headphone Jack",
339 "Microphone", "Headset Microphone",
340 "Microphone", "Internal Microphone",
341 "Speaker", "Internal Speaker";
342 simple-audio-card,routing =
343 "Left DAC", "AIF1 Slot 0 Left",
344 "Right DAC", "AIF1 Slot 0 Right",
345 "AIF1 Slot 0 Left ADC", "Left ADC",
346 "AIF1 Slot 0 Right ADC", "Right ADC",
347 "Headphone Jack", "HP",
348 "Speaker Amp INL", "LINEOUT",
349 "Speaker Amp INR", "LINEOUT",
350 "Internal Speaker", "Speaker Amp OUTL",
351 "Internal Speaker", "Speaker Amp OUTR",
352 "Internal Microphone", "MBIAS",
353 "MIC1", "Internal Microphone",
354 "Headset Microphone", "HBIAS",
355 "MIC2", "Headset Microphone";
360 pinctrl-names = "default";
361 pinctrl-0 = <&lcd_rgb666_pins>;
367 tcon0_out_anx6345: endpoint@0 {
369 remote-endpoint = <&anx6345_in>;
374 pinctrl-names = "default";
375 pinctrl-0 = <&uart0_pb_pins>;
380 usb1_vbus-supply = <®_usb1_vbus>;