blob: f3f8e177ab610352846905ec7a4edffb8341c2df [file] [log] [blame]
Samuel Hollande210ec02020-10-24 10:21:55 -05001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
Jagan Teki585bf8a2017-08-12 18:18:58 +05303
4/dts-v1/;
5
6#include "sun50i-a64.dtsi"
Samuel Hollande210ec02020-10-24 10:21:55 -05007#include "sun50i-a64-cpu-opp.dtsi"
Jagan Teki585bf8a2017-08-12 18:18:58 +05308
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12 model = "Olimex A64-Olinuxino";
13 compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
14
15 aliases {
Andre Przywara1b39a182018-10-29 00:56:47 +000016 ethernet0 = &emac;
Jagan Teki585bf8a2017-08-12 18:18:58 +053017 serial0 = &uart0;
18 };
19
20 chosen {
21 stdout-path = "serial0:115200n8";
22 };
23
Andre Przywara1b39a182018-10-29 00:56:47 +000024 hdmi-connector {
25 compatible = "hdmi-connector";
26 type = "a";
27
28 port {
29 hdmi_con_in: endpoint {
30 remote-endpoint = <&hdmi_out_con>;
31 };
32 };
33 };
34
Samuel Hollande210ec02020-10-24 10:21:55 -050035 leds {
36 compatible = "gpio-leds";
37
38 led-0 {
39 label = "a64-olinuxino:red:user";
40 gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
41 };
42 };
43
Andre Przywara1b39a182018-10-29 00:56:47 +000044 reg_usb1_vbus: usb1-vbus {
45 compatible = "regulator-fixed";
46 regulator-name = "usb1-vbus";
47 regulator-min-microvolt = <5000000>;
48 regulator-max-microvolt = <5000000>;
49 regulator-boot-on;
50 enable-active-high;
51 gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
52 status = "okay";
53 };
54
Andre Przywara68dd17c2018-07-04 14:16:35 +010055 wifi_pwrseq: wifi_pwrseq {
56 compatible = "mmc-pwrseq-simple";
57 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
Jagan Teki585bf8a2017-08-12 18:18:58 +053058 };
59};
60
Samuel Hollande210ec02020-10-24 10:21:55 -050061&cpu0 {
62 cpu-supply = <&reg_dcdc2>;
63};
64
65&cpu1 {
66 cpu-supply = <&reg_dcdc2>;
67};
68
69&cpu2 {
70 cpu-supply = <&reg_dcdc2>;
71};
72
73&cpu3 {
74 cpu-supply = <&reg_dcdc2>;
75};
76
Andre Przywara1b39a182018-10-29 00:56:47 +000077&de {
78 status = "okay";
79};
80
81&ehci0 {
82 status = "okay";
83};
84
85&ehci1 {
86 status = "okay";
87};
88
89&emac {
90 pinctrl-names = "default";
91 pinctrl-0 = <&rgmii_pins>;
92 phy-mode = "rgmii";
93 phy-handle = <&ext_rgmii_phy>;
94 phy-supply = <&reg_dcdc1>;
95 allwinner,tx-delay-ps = <600>;
96 status = "okay";
97};
98
99&hdmi {
100 hvcc-supply = <&reg_dldo1>;
101 status = "okay";
102};
103
104&hdmi_out {
105 hdmi_out_con: endpoint {
106 remote-endpoint = <&hdmi_con_in>;
107 };
108};
109
110&mdio {
111 ext_rgmii_phy: ethernet-phy@1 {
112 compatible = "ethernet-phy-ieee802.3-c22";
113 reg = <1>;
114 };
115};
116
Jagan Teki585bf8a2017-08-12 18:18:58 +0530117&mmc0 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&mmc0_pins>;
Andre Przywara68dd17c2018-07-04 14:16:35 +0100120 vmmc-supply = <&reg_dcdc1>;
121 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
Jagan Teki585bf8a2017-08-12 18:18:58 +0530122 disable-wp;
123 bus-width = <4>;
124 status = "okay";
125};
126
Andre Przywara68dd17c2018-07-04 14:16:35 +0100127&mmc1 {
128 pinctrl-names = "default";
129 pinctrl-0 = <&mmc1_pins>;
Samuel Hollande210ec02020-10-24 10:21:55 -0500130 vmmc-supply = <&reg_dcdc1>;
Andre Przywara68dd17c2018-07-04 14:16:35 +0100131 vqmmc-supply = <&reg_dldo4>;
132 mmc-pwrseq = <&wifi_pwrseq>;
133 bus-width = <4>;
134 non-removable;
135 status = "okay";
136
137 rtl8723bs: wifi@1 {
138 reg = <1>;
139 interrupt-parent = <&r_pio>;
140 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
141 interrupt-names = "host-wake";
142 };
143};
144
Andre Przywara1b39a182018-10-29 00:56:47 +0000145&ohci0 {
146 status = "okay";
147};
148
149&ohci1 {
150 status = "okay";
151};
152
Samuel Hollande210ec02020-10-24 10:21:55 -0500153&pio {
154 vcc-pc-supply = <&reg_dcdc1>;
155 vcc-pd-supply = <&reg_dcdc1>;
156 vcc-pe-supply = <&reg_aldo1>;
157 vcc-pg-supply = <&reg_dldo4>;
158};
159
160&r_pio {
161 /*
162 * FIXME: We can't add that supply for now since it would
163 * create a circular dependency between pinctrl, the regulator
164 * and the RSB Bus.
165 *
166 * vcc-pl-supply = <&reg_aldo2>;
167 */
168};
169
170&pio {
171 vcc-pa-supply = <&reg_dcdc1>;
172 vcc-pb-supply = <&reg_dcdc1>;
173 vcc-pc-supply = <&reg_dcdc1>;
174 vcc-pd-supply = <&reg_dcdc1>;
175 vcc-pe-supply = <&reg_aldo1>;
176 vcc-pf-supply = <&reg_dcdc1>;
177 vcc-pg-supply = <&reg_dldo4>;
178 vcc-ph-supply = <&reg_dcdc1>;
179};
180
Andre Przywara68dd17c2018-07-04 14:16:35 +0100181&r_rsb {
182 status = "okay";
183
184 axp803: pmic@3a3 {
185 compatible = "x-powers,axp803";
186 reg = <0x3a3>;
187 interrupt-parent = <&r_intc>;
188 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
Andre Przywara1b39a182018-10-29 00:56:47 +0000189 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
Andre Przywara68dd17c2018-07-04 14:16:35 +0100190 };
191};
192
Samuel Hollande210ec02020-10-24 10:21:55 -0500193/* VCC-PL is powered by aldo2 but we cannot add it as the RSB */
194/* interface used to talk to the PMIC in on the PL pins */
195/* &r_pio { */
196/* vcc-pl-supply = <&reg_aldo2>; */
197/* }; */
198
Andre Przywara68dd17c2018-07-04 14:16:35 +0100199#include "axp803.dtsi"
200
Samuel Hollande210ec02020-10-24 10:21:55 -0500201&ac_power_supply {
202 status = "okay";
203};
204
205&battery_power_supply {
206 status = "okay";
207};
208
Andre Przywara68dd17c2018-07-04 14:16:35 +0100209&reg_aldo1 {
210 regulator-always-on;
211 regulator-min-microvolt = <2800000>;
212 regulator-max-microvolt = <2800000>;
213 regulator-name = "vcc-pe";
214};
215
216&reg_aldo2 {
217 regulator-always-on;
218 regulator-min-microvolt = <3300000>;
219 regulator-max-microvolt = <3300000>;
220 regulator-name = "vcc-pl";
221};
222
223&reg_aldo3 {
224 regulator-always-on;
225 regulator-min-microvolt = <3000000>;
226 regulator-max-microvolt = <3000000>;
227 regulator-name = "vcc-pll-avcc";
228};
229
230&reg_dcdc1 {
231 regulator-always-on;
232 regulator-min-microvolt = <3300000>;
233 regulator-max-microvolt = <3300000>;
234 regulator-name = "vcc-3v3";
235};
236
237&reg_dcdc2 {
238 regulator-always-on;
239 regulator-min-microvolt = <1040000>;
240 regulator-max-microvolt = <1300000>;
241 regulator-name = "vdd-cpux";
242};
243
244/* DCDC3 is polyphased with DCDC2 */
245
Andre Przywara1b39a182018-10-29 00:56:47 +0000246/*
247 * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
248 * 1.35V that the PMIC can drive.
249 */
Andre Przywara68dd17c2018-07-04 14:16:35 +0100250&reg_dcdc5 {
251 regulator-always-on;
Andre Przywara1b39a182018-10-29 00:56:47 +0000252 regulator-min-microvolt = <1360000>;
253 regulator-max-microvolt = <1360000>;
Andre Przywara68dd17c2018-07-04 14:16:35 +0100254 regulator-name = "vcc-ddr3";
255};
256
257&reg_dcdc6 {
258 regulator-always-on;
259 regulator-min-microvolt = <1100000>;
260 regulator-max-microvolt = <1100000>;
261 regulator-name = "vdd-sys";
262};
263
264&reg_dldo1 {
265 regulator-min-microvolt = <3300000>;
266 regulator-max-microvolt = <3300000>;
267 regulator-name = "vcc-hdmi";
268};
269
270&reg_dldo2 {
271 regulator-min-microvolt = <3300000>;
272 regulator-max-microvolt = <3300000>;
273 regulator-name = "vcc-mipi";
274};
275
276&reg_dldo3 {
277 regulator-min-microvolt = <2800000>;
278 regulator-max-microvolt = <2800000>;
279 regulator-name = "vcc-avdd-csi";
280};
281
282&reg_dldo4 {
283 regulator-min-microvolt = <3300000>;
284 regulator-max-microvolt = <3300000>;
285 regulator-name = "vcc-wifi-io";
286};
287
Andre Przywara1b39a182018-10-29 00:56:47 +0000288&reg_drivevbus {
289 regulator-name = "usb0-vbus";
290 status = "okay";
291};
292
Andre Przywara68dd17c2018-07-04 14:16:35 +0100293&reg_eldo1 {
294 regulator-min-microvolt = <1800000>;
295 regulator-max-microvolt = <1800000>;
296 regulator-name = "cpvdd";
297};
298
299&reg_eldo2 {
300 regulator-min-microvolt = <1800000>;
301 regulator-max-microvolt = <1800000>;
302 regulator-name = "vcc-dvdd-csi";
303};
304
305&reg_fldo1 {
306 regulator-min-microvolt = <1200000>;
307 regulator-max-microvolt = <1200000>;
308 regulator-name = "vcc-1v2-hsic";
309};
310
311/*
312 * The A64 chip cannot work without this regulator off, although
313 * it seems to be only driving the AR100 core.
314 * Maybe we don't still know well about CPUs domain.
315 */
316&reg_fldo2 {
317 regulator-always-on;
318 regulator-min-microvolt = <1100000>;
319 regulator-max-microvolt = <1100000>;
320 regulator-name = "vdd-cpus";
321};
322
323&reg_rtc_ldo {
324 regulator-name = "vcc-rtc";
325};
326
Andre Przywara1b39a182018-10-29 00:56:47 +0000327&simplefb_hdmi {
328 vcc-hdmi-supply = <&reg_dldo1>;
329};
330
Jagan Teki585bf8a2017-08-12 18:18:58 +0530331&uart0 {
332 pinctrl-names = "default";
Andre Przywara1b39a182018-10-29 00:56:47 +0000333 pinctrl-0 = <&uart0_pb_pins>;
Jagan Teki585bf8a2017-08-12 18:18:58 +0530334 status = "okay";
335};
Andre Przywara1b39a182018-10-29 00:56:47 +0000336
337&usb_otg {
338 dr_mode = "otg";
339 status = "okay";
340};
341
342&usbphy {
343 status = "okay";
344 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
345 usb0_vbus-supply = <&reg_drivevbus>;
346 usb1_vbus-supply = <&reg_usb1_vbus>;
347};