xref: /linux/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (c) 2016 ARM Ltd.
3
4/dts-v1/;
5
6#include "sun50i-a64.dtsi"
7#include "sun50i-a64-cpu-opp.dtsi"
8
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12	model = "Pine64 PINE A64";
13	compatible = "pine64,pine64", "allwinner,sun50i-a64";
14
15	aliases {
16		ethernet0 = &emac;
17		serial0 = &uart0;
18		serial1 = &uart1;
19		serial2 = &uart2;
20		serial3 = &uart3;
21		serial4 = &uart4;
22	};
23
24	chosen {
25		stdout-path = "serial0:115200n8";
26	};
27
28	hdmi-connector {
29		compatible = "hdmi-connector";
30		type = "a";
31
32		port {
33			hdmi_con_in: endpoint {
34				remote-endpoint = <&hdmi_out_con>;
35			};
36		};
37	};
38};
39
40&codec {
41	status = "okay";
42};
43
44&codec_analog {
45	cpvdd-supply = <&reg_eldo1>;
46	status = "okay";
47};
48
49&cpu0 {
50	cpu-supply = <&reg_dcdc2>;
51};
52
53&cpu1 {
54	cpu-supply = <&reg_dcdc2>;
55};
56
57&cpu2 {
58	cpu-supply = <&reg_dcdc2>;
59};
60
61&cpu3 {
62	cpu-supply = <&reg_dcdc2>;
63};
64
65&dai {
66	status = "okay";
67};
68
69&de {
70	status = "okay";
71};
72
73&ehci0 {
74	status = "okay";
75};
76
77&ehci1 {
78	status = "okay";
79};
80
81&emac {
82	pinctrl-names = "default";
83	pinctrl-0 = <&rmii_pins>;
84	phy-mode = "rmii";
85	phy-handle = <&ext_rmii_phy1>;
86	phy-supply = <&reg_dc1sw>;
87	status = "okay";
88
89};
90
91&hdmi {
92	hvcc-supply = <&reg_dldo1>;
93	status = "okay";
94};
95
96&hdmi_out {
97	hdmi_out_con: endpoint {
98		remote-endpoint = <&hdmi_con_in>;
99	};
100};
101
102&i2c1 {
103	status = "okay";
104};
105
106&i2c1_pins {
107	bias-pull-up;
108};
109
110&mdio {
111	ext_rmii_phy1: ethernet-phy@1 {
112		compatible = "ethernet-phy-ieee802.3-c22";
113		reg = <1>;
114	};
115};
116
117&mmc0 {
118	pinctrl-names = "default";
119	pinctrl-0 = <&mmc0_pins>;
120	vmmc-supply = <&reg_dcdc1>;
121	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
122	disable-wp;
123	bus-width = <4>;
124	status = "okay";
125};
126
127/* On Wifi/BT connector */
128&mmc1 {
129	pinctrl-names = "default";
130	pinctrl-0 = <&mmc1_pins>;
131	vmmc-supply = <&reg_dldo4>;
132	vqmmc-supply = <&reg_eldo1>;
133	bus-width = <4>;
134	non-removable;
135	status = "disabled";
136};
137
138&ohci0 {
139	status = "okay";
140};
141
142&ohci1 {
143	status = "okay";
144};
145
146&r_rsb {
147	status = "okay";
148
149	axp803: pmic@3a3 {
150		compatible = "x-powers,axp803";
151		reg = <0x3a3>;
152		interrupt-parent = <&r_intc>;
153		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
154	};
155};
156
157#include "axp803.dtsi"
158
159&ac_power_supply {
160	status = "okay";
161};
162
163&battery_power_supply {
164	status = "okay";
165};
166
167&reg_aldo2 {
168	regulator-always-on;
169	regulator-min-microvolt = <1800000>;
170	regulator-max-microvolt = <3300000>;
171	regulator-name = "vcc-pl";
172};
173
174&reg_aldo3 {
175	regulator-always-on;
176	regulator-min-microvolt = <3000000>;
177	regulator-max-microvolt = <3000000>;
178	regulator-name = "vcc-pll-avcc";
179};
180
181&reg_dc1sw {
182	regulator-name = "vcc-phy";
183};
184
185&reg_dcdc1 {
186	regulator-always-on;
187	regulator-min-microvolt = <3300000>;
188	regulator-max-microvolt = <3300000>;
189	regulator-name = "vcc-3v3";
190};
191
192&reg_dcdc2 {
193	regulator-always-on;
194	regulator-min-microvolt = <1040000>;
195	regulator-max-microvolt = <1300000>;
196	regulator-name = "vdd-cpux";
197};
198
199/* DCDC3 is polyphased with DCDC2 */
200
201/*
202 * The DRAM chips used by Pine64 boards are DDR3L-compatible, so they can
203 * work at 1.35V with less power consumption.
204 * As AXP803 DCDC5 cannot reach 1.35V accurately, use 1.36V instead.
205 */
206&reg_dcdc5 {
207	regulator-always-on;
208	regulator-min-microvolt = <1360000>;
209	regulator-max-microvolt = <1360000>;
210	regulator-name = "vcc-dram";
211};
212
213&reg_dcdc6 {
214	regulator-always-on;
215	regulator-min-microvolt = <1100000>;
216	regulator-max-microvolt = <1100000>;
217	regulator-name = "vdd-sys";
218};
219
220&reg_dldo1 {
221	regulator-min-microvolt = <3300000>;
222	regulator-max-microvolt = <3300000>;
223	regulator-name = "vcc-hdmi";
224};
225
226&reg_dldo2 {
227	regulator-min-microvolt = <3300000>;
228	regulator-max-microvolt = <3300000>;
229	regulator-name = "vcc-mipi";
230};
231
232&reg_dldo4 {
233	regulator-min-microvolt = <3300000>;
234	regulator-max-microvolt = <3300000>;
235	regulator-name = "vcc-wifi";
236};
237
238&reg_eldo1 {
239	regulator-min-microvolt = <1800000>;
240	regulator-max-microvolt = <1800000>;
241	regulator-name = "cpvdd";
242};
243
244&reg_fldo1 {
245	regulator-min-microvolt = <1200000>;
246	regulator-max-microvolt = <1200000>;
247	regulator-name = "vcc-1v2-hsic";
248};
249
250/*
251 * The A64 chip cannot work without this regulator off, although
252 * it seems to be only driving the AR100 core.
253 * Maybe we don't still know well about CPUs domain.
254 */
255&reg_fldo2 {
256	regulator-always-on;
257	regulator-min-microvolt = <1100000>;
258	regulator-max-microvolt = <1100000>;
259	regulator-name = "vdd-cpus";
260};
261
262&reg_rtc_ldo {
263	regulator-name = "vcc-rtc";
264};
265
266&simplefb_hdmi {
267	vcc-hdmi-supply = <&reg_dldo1>;
268};
269
270&sound {
271	simple-audio-card,aux-devs = <&codec_analog>;
272	simple-audio-card,widgets = "Microphone", "Microphone Jack",
273				    "Headphone", "Headphone Jack";
274	simple-audio-card,routing =
275			"Left DAC", "DACL",
276			"Right DAC", "DACR",
277			"Headphone Jack", "HP",
278			"ADCL", "Left ADC",
279			"ADCR", "Right ADC",
280			"MIC2", "Microphone Jack";
281	status = "okay";
282};
283
284/* On Euler connector */
285&spdif {
286	status = "disabled";
287};
288
289/* On Exp and Euler connectors */
290&uart0 {
291	pinctrl-names = "default";
292	pinctrl-0 = <&uart0_pb_pins>;
293	status = "okay";
294};
295
296/* On Wifi/BT connector, with RTS/CTS */
297&uart1 {
298	pinctrl-names = "default";
299	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
300	uart-has-rtscts;
301	status = "disabled";
302};
303
304/* On Pi-2 connector */
305&uart2 {
306	pinctrl-names = "default";
307	pinctrl-0 = <&uart2_pins>;
308	status = "disabled";
309};
310
311/* On Euler connector */
312&uart3 {
313	pinctrl-names = "default";
314	pinctrl-0 = <&uart3_pins>;
315	status = "disabled";
316};
317
318/* On Euler connector, RTS/CTS optional */
319&uart4 {
320	pinctrl-names = "default";
321	pinctrl-0 = <&uart4_pins>;
322	status = "disabled";
323};
324
325&usb_otg {
326	dr_mode = "host";
327	status = "okay";
328};
329
330&usbphy {
331	status = "okay";
332};
333