blob: 70e31743f0bacbcd5cf1b9e384f2a8319bae80a8 [file] [log] [blame]
Samuel Holland26bc4e72020-10-24 10:21:55 -05001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
3// Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org>
Jagan Tekic91b53f2017-06-13 15:14:42 +05304
5/dts-v1/;
6
7#include "sun50i-a64.dtsi"
Samuel Holland26bc4e72020-10-24 10:21:55 -05008#include "sun50i-a64-cpu-opp.dtsi"
Jagan Tekic91b53f2017-06-13 15:14:42 +05309
10#include <dt-bindings/gpio/gpio.h>
11
12/ {
13 model = "OrangePi Win/Win Plus";
14 compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
15
16 aliases {
Andre Przywara9607c052018-10-29 00:56:47 +000017 ethernet0 = &emac;
Jagan Tekic91b53f2017-06-13 15:14:42 +053018 serial0 = &uart0;
Andre Przywara9607c052018-10-29 00:56:47 +000019 serial1 = &uart1;
20 serial2 = &uart2;
21 serial3 = &uart3;
22 serial4 = &uart4;
Jagan Tekic91b53f2017-06-13 15:14:42 +053023 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
Andre Przywara9607c052018-10-29 00:56:47 +000028
29 hdmi-connector {
30 compatible = "hdmi-connector";
31 type = "a";
32
33 port {
34 hdmi_con_in: endpoint {
35 remote-endpoint = <&hdmi_out_con>;
36 };
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 status {
44 label = "orangepi:green:status";
45 gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
46 };
47 };
48
49 reg_gmac_3v3: gmac-3v3 {
50 compatible = "regulator-fixed";
51 regulator-name = "gmac-3v3";
52 regulator-min-microvolt = <3300000>;
53 regulator-max-microvolt = <3300000>;
54 regulator-boot-on;
55 enable-active-high;
56 gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */
57 status = "okay";
58 };
59
60 reg_usb1_vbus: usb1-vbus {
61 compatible = "regulator-fixed";
62 regulator-name = "usb1-vbus";
63 regulator-min-microvolt = <5000000>;
64 regulator-max-microvolt = <5000000>;
65 regulator-boot-on;
66 enable-active-high;
67 gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */
68 status = "okay";
69 };
70
71 wifi_pwrseq: wifi_pwrseq {
72 compatible = "mmc-pwrseq-simple";
73 reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
Samuel Holland26bc4e72020-10-24 10:21:55 -050074 clocks = <&rtc 1>;
75 clock-names = "ext_clock";
Andre Przywara9607c052018-10-29 00:56:47 +000076 };
77};
78
Samuel Holland26bc4e72020-10-24 10:21:55 -050079&codec {
80 status = "okay";
81};
82
83&codec_analog {
84 cpvdd-supply = <&reg_eldo1>;
85 status = "okay";
86};
87
88&cpu0 {
89 cpu-supply = <&reg_dcdc2>;
90};
91
92&cpu1 {
93 cpu-supply = <&reg_dcdc2>;
94};
95
96&cpu2 {
97 cpu-supply = <&reg_dcdc2>;
98};
99
100&cpu3 {
101 cpu-supply = <&reg_dcdc2>;
102};
103
104&dai {
105 status = "okay";
106};
107
Andre Przywara9607c052018-10-29 00:56:47 +0000108&de {
109 status = "okay";
110};
111
112&ehci0 {
113 status = "okay";
Jagan Tekic91b53f2017-06-13 15:14:42 +0530114};
115
116&ehci1 {
Andre Przywara0fcb8302018-07-04 14:16:35 +0100117 status = "okay";
Jagan Tekic91b53f2017-06-13 15:14:42 +0530118};
119
Andre Przywara9607c052018-10-29 00:56:47 +0000120&emac {
121 pinctrl-names = "default";
122 pinctrl-0 = <&rgmii_pins>;
Andre Przywarafb675472021-04-17 22:55:19 +0100123 phy-mode = "rgmii-id";
Andre Przywara9607c052018-10-29 00:56:47 +0000124 phy-handle = <&ext_rgmii_phy>;
125 phy-supply = <&reg_gmac_3v3>;
126 status = "okay";
127};
128
129&hdmi {
130 hvcc-supply = <&reg_dldo1>;
131 status = "okay";
132};
133
134&hdmi_out {
135 hdmi_out_con: endpoint {
136 remote-endpoint = <&hdmi_con_in>;
137 };
138};
139
140&mdio {
141 ext_rgmii_phy: ethernet-phy@1 {
142 compatible = "ethernet-phy-ieee802.3-c22";
143 reg = <1>;
144 };
145};
146
Jagan Tekic91b53f2017-06-13 15:14:42 +0530147&mmc0 {
148 pinctrl-names = "default";
149 pinctrl-0 = <&mmc0_pins>;
Andre Przywara0fcb8302018-07-04 14:16:35 +0100150 vmmc-supply = <&reg_dcdc1>;
Andre Przywara9607c052018-10-29 00:56:47 +0000151 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
152 disable-wp;
153 bus-width = <4>;
154 status = "okay";
155};
156
157&mmc1 {
158 pinctrl-names = "default";
159 pinctrl-0 = <&mmc1_pins>;
160 vmmc-supply = <&reg_dldo2>;
161 vqmmc-supply = <&reg_dldo4>;
162 mmc-pwrseq = <&wifi_pwrseq>;
163 bus-width = <4>;
164 non-removable;
165 status = "okay";
Samuel Holland26bc4e72020-10-24 10:21:55 -0500166
167 brcmf: wifi@1 {
168 reg = <1>;
169 compatible = "brcm,bcm4329-fmac";
170 interrupt-parent = <&r_pio>;
171 interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */
172 interrupt-names = "host-wake";
173 };
Andre Przywara9607c052018-10-29 00:56:47 +0000174};
175
176&ohci0 {
Jagan Tekic91b53f2017-06-13 15:14:42 +0530177 status = "okay";
178};
179
180&ohci1 {
Andre Przywara0fcb8302018-07-04 14:16:35 +0100181 status = "okay";
182};
183
Samuel Holland26bc4e72020-10-24 10:21:55 -0500184&r_ir {
185 status = "okay";
186};
187
Andre Przywara0fcb8302018-07-04 14:16:35 +0100188&r_rsb {
189 status = "okay";
190
191 axp803: pmic@3a3 {
192 compatible = "x-powers,axp803";
193 reg = <0x3a3>;
194 interrupt-parent = <&r_intc>;
195 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
Samuel Holland26bc4e72020-10-24 10:21:55 -0500196 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
Andre Przywara0fcb8302018-07-04 14:16:35 +0100197 };
198};
199
200#include "axp803.dtsi"
201
Samuel Holland26bc4e72020-10-24 10:21:55 -0500202&ac_power_supply {
203 status = "okay";
204};
205
206&battery_power_supply {
207 status = "okay";
208};
209
Andre Przywara0fcb8302018-07-04 14:16:35 +0100210&reg_aldo1 {
Andre Przywara9607c052018-10-29 00:56:47 +0000211 regulator-min-microvolt = <2800000>;
212 regulator-max-microvolt = <2800000>;
Andre Przywara0fcb8302018-07-04 14:16:35 +0100213 regulator-name = "afvcc-csi";
214};
215
216&reg_aldo2 {
217 regulator-always-on;
218 regulator-min-microvolt = <1800000>;
219 regulator-max-microvolt = <3300000>;
220 regulator-name = "vcc-pl";
Jagan Tekic91b53f2017-06-13 15:14:42 +0530221};
222
Andre Przywara0fcb8302018-07-04 14:16:35 +0100223&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
246&reg_dcdc5 {
247 regulator-always-on;
248 regulator-min-microvolt = <1500000>;
249 regulator-max-microvolt = <1500000>;
250 regulator-name = "vcc-dram";
251};
252
253&reg_dcdc6 {
254 regulator-always-on;
255 regulator-min-microvolt = <1100000>;
256 regulator-max-microvolt = <1100000>;
257 regulator-name = "vdd-sys";
258};
259
260&reg_dldo1 {
261 regulator-min-microvolt = <3300000>;
262 regulator-max-microvolt = <3300000>;
263 regulator-name = "vcc-hdmi-dsi";
264};
265
266&reg_dldo2 {
267 regulator-min-microvolt = <3300000>;
268 regulator-max-microvolt = <3300000>;
269 regulator-name = "vcc-wifi";
270};
271
272&reg_dldo3 {
273 regulator-min-microvolt = <3300000>;
274 regulator-max-microvolt = <3300000>;
275 regulator-name = "avdd-csi";
276};
277
278&reg_dldo4 {
279 regulator-min-microvolt = <3300000>;
280 regulator-max-microvolt = <3300000>;
281 regulator-name = "vcc-wifi-io";
282};
283
Andre Przywara9607c052018-10-29 00:56:47 +0000284&reg_drivevbus {
285 regulator-name = "usb0-vbus";
286 status = "okay";
287};
288
Andre Przywara0fcb8302018-07-04 14:16:35 +0100289&reg_eldo1 {
290 regulator-min-microvolt = <1800000>;
291 regulator-max-microvolt = <1800000>;
292 regulator-name = "cpvdd";
293};
294
Andre Przywara9607c052018-10-29 00:56:47 +0000295&reg_eldo3 {
296 regulator-min-microvolt = <1500000>;
297 regulator-max-microvolt = <1800000>;
298 regulator-name = "dvdd-csi";
299};
300
Andre Przywara0fcb8302018-07-04 14:16:35 +0100301&reg_fldo1 {
302 regulator-min-microvolt = <1200000>;
303 regulator-max-microvolt = <1200000>;
304 regulator-name = "vcc-1v2-hsic";
305};
306
307/*
308 * The A64 chip cannot work without this regulator off, although
309 * it seems to be only driving the AR100 core.
310 * Maybe we don't still know well about CPUs domain.
311 */
312&reg_fldo2 {
313 regulator-always-on;
314 regulator-min-microvolt = <1100000>;
315 regulator-max-microvolt = <1100000>;
316 regulator-name = "vdd-cpus";
317};
318
319&reg_rtc_ldo {
320 regulator-name = "vcc-rtc";
321};
322
Andre Przywara9607c052018-10-29 00:56:47 +0000323&simplefb_hdmi {
324 vcc-hdmi-supply = <&reg_dldo1>;
325};
326
Samuel Holland26bc4e72020-10-24 10:21:55 -0500327&sound {
328 status = "okay";
329 simple-audio-card,widgets = "Headphone", "Headphone Jack",
330 "Microphone", "Microphone Jack",
331 "Microphone", "Onboard Microphone";
332 simple-audio-card,routing =
Andre Przywarafb675472021-04-17 22:55:19 +0100333 "Left DAC", "DACL",
334 "Right DAC", "DACR",
335 "ADCL", "Left ADC",
336 "ADCR", "Right ADC",
Samuel Holland26bc4e72020-10-24 10:21:55 -0500337 "Headphone Jack", "HP",
338 "MIC2", "Microphone Jack",
339 "Onboard Microphone", "MBIAS",
340 "MIC1", "Onboard Microphone";
341};
342
Andre Przywara9607c052018-10-29 00:56:47 +0000343&spi0 {
344 status = "okay";
345
346 spi-flash@0 {
347 compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
348 reg = <0>;
349 spi-max-frequency = <80000000>;
350 m25p,fast-read;
351 status = "okay";
352 };
353};
354
355/* On debug connector */
Jagan Tekic91b53f2017-06-13 15:14:42 +0530356&uart0 {
357 pinctrl-names = "default";
Andre Przywara9607c052018-10-29 00:56:47 +0000358 pinctrl-0 = <&uart0_pb_pins>;
Jagan Tekic91b53f2017-06-13 15:14:42 +0530359 status = "okay";
360};
361
Andre Przywara9607c052018-10-29 00:56:47 +0000362/* Bluetooth */
363&uart1 {
364 pinctrl-names = "default";
365 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
Samuel Holland26bc4e72020-10-24 10:21:55 -0500366 uart-has-rtscts;
Andre Przywara9607c052018-10-29 00:56:47 +0000367 status = "okay";
Samuel Holland26bc4e72020-10-24 10:21:55 -0500368
369 bluetooth {
370 compatible = "brcm,bcm43438-bt";
371 max-speed = <1500000>;
372 clocks = <&rtc 1>;
373 clock-names = "lpo";
374 vbat-supply = <&reg_dldo2>;
375 vddio-supply = <&reg_dldo4>;
376 device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
377 host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
378 shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
379 };
Andre Przywara9607c052018-10-29 00:56:47 +0000380};
381
382/* On Pi-2 connector, RTS/CTS optional */
383&uart2 {
384 pinctrl-names = "default";
385 pinctrl-0 = <&uart2_pins>;
386 status = "disabled";
387};
388
389/* On Pi-2 connector, RTS/CTS optional */
390&uart3 {
391 pinctrl-names = "default";
392 pinctrl-0 = <&uart3_pins>;
393 status = "disabled";
394};
395
396/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
397&uart4 {
398 pinctrl-names = "default";
399 pinctrl-0 = <&uart4_pins>;
400 status = "disabled";
401};
402
403&usb_otg {
404 dr_mode = "otg";
Andre Przywara0fcb8302018-07-04 14:16:35 +0100405 status = "okay";
Jagan Tekic91b53f2017-06-13 15:14:42 +0530406};
Andre Przywara0fcb8302018-07-04 14:16:35 +0100407
Andre Przywara9607c052018-10-29 00:56:47 +0000408&usbphy {
409 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
410 usb0_vbus-supply = <&reg_drivevbus>;
411 usb1_vbus-supply = <&reg_usb1_vbus>;
412 status = "okay";
413};