xref: /openbmc/linux/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts (revision d91ebb95b96c8840932dc3a10c9f243712555467)
1f64f2e0fSJagan Teki// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2f64f2e0fSJagan Teki/*
3f64f2e0fSJagan Teki * Copyright (C) 2018 Amarula Solutions B.V.
4f64f2e0fSJagan Teki * Author: Jagan Teki <jagan@amarulasolutions.com>
5f64f2e0fSJagan Teki */
6f64f2e0fSJagan Teki
7f64f2e0fSJagan Teki/dts-v1/;
8f64f2e0fSJagan Teki
9f64f2e0fSJagan Teki#include "sun50i-a64.dtsi"
10f64f2e0fSJagan Teki
11f64f2e0fSJagan Teki#include <dt-bindings/gpio/gpio.h>
12f64f2e0fSJagan Teki
13f64f2e0fSJagan Teki/ {
14f64f2e0fSJagan Teki	model = "Amarula A64-Relic";
15f64f2e0fSJagan Teki	compatible = "amarula,a64-relic", "allwinner,sun50i-a64";
16f64f2e0fSJagan Teki
17f64f2e0fSJagan Teki	aliases {
18f64f2e0fSJagan Teki		serial0 = &uart0;
19f64f2e0fSJagan Teki	};
20f64f2e0fSJagan Teki
21f64f2e0fSJagan Teki	chosen {
22f64f2e0fSJagan Teki		stdout-path = "serial0:115200n8";
23f64f2e0fSJagan Teki	};
2433c3d4ebSJagan Teki
2533c3d4ebSJagan Teki	wifi_pwrseq: wifi-pwrseq {
2633c3d4ebSJagan Teki		compatible = "mmc-pwrseq-simple";
2733c3d4ebSJagan Teki		clocks = <&rtc 1>;
2833c3d4ebSJagan Teki		clock-names = "ext_clock";
2933c3d4ebSJagan Teki		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
3033c3d4ebSJagan Teki	};
31f64f2e0fSJagan Teki};
32f64f2e0fSJagan Teki
33f64f2e0fSJagan Teki&ehci0 {
34f64f2e0fSJagan Teki	status = "okay";
35f64f2e0fSJagan Teki};
36f64f2e0fSJagan Teki
3733c3d4ebSJagan Teki&mmc1 {
3833c3d4ebSJagan Teki	pinctrl-names = "default";
3933c3d4ebSJagan Teki	pinctrl-0 = <&mmc1_pins>;
4033c3d4ebSJagan Teki	vmmc-supply = <&reg_dcdc1>;
4133c3d4ebSJagan Teki	/*
4233c3d4ebSJagan Teki	 * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but
4333c3d4ebSJagan Teki	 * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with
4433c3d4ebSJagan Teki	 * 0Ohm register to vcc-io-wifi so eldo1 is used.
4533c3d4ebSJagan Teki	 */
4633c3d4ebSJagan Teki	vqmmc-supply = <&reg_eldo1>;
4733c3d4ebSJagan Teki	mmc-pwrseq = <&wifi_pwrseq>;
4833c3d4ebSJagan Teki	bus-width = <4>;
4933c3d4ebSJagan Teki	non-removable;
5033c3d4ebSJagan Teki	status = "okay";
5133c3d4ebSJagan Teki
5233c3d4ebSJagan Teki	brcmf: wifi@1 {
5333c3d4ebSJagan Teki		reg = <1>;
5433c3d4ebSJagan Teki		compatible = "brcm,bcm4329-fmac";
5533c3d4ebSJagan Teki		interrupt-parent = <&r_pio>;
5633c3d4ebSJagan Teki		interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;	/* WL-WAKE-AP: PL3 */
5733c3d4ebSJagan Teki		interrupt-names = "host-wake";
5833c3d4ebSJagan Teki	};
5933c3d4ebSJagan Teki};
6033c3d4ebSJagan Teki
61f64f2e0fSJagan Teki&mmc2 {
62f64f2e0fSJagan Teki	pinctrl-names = "default";
63f64f2e0fSJagan Teki	pinctrl-0 = <&mmc2_pins>;
64f64f2e0fSJagan Teki	vmmc-supply = <&reg_dcdc1>;
65f64f2e0fSJagan Teki	bus-width = <8>;
66f64f2e0fSJagan Teki	non-removable;
67f64f2e0fSJagan Teki	cap-mmc-hw-reset;
68f64f2e0fSJagan Teki	status = "okay";
69f64f2e0fSJagan Teki};
70f64f2e0fSJagan Teki
71f64f2e0fSJagan Teki&ohci0 {
72f64f2e0fSJagan Teki	status = "okay";
73f64f2e0fSJagan Teki};
74f64f2e0fSJagan Teki
75f64f2e0fSJagan Teki&r_rsb {
76f64f2e0fSJagan Teki	status = "okay";
77f64f2e0fSJagan Teki
78f64f2e0fSJagan Teki	axp803: pmic@3a3 {
79f64f2e0fSJagan Teki		compatible = "x-powers,axp803";
80f64f2e0fSJagan Teki		reg = <0x3a3>;
81f64f2e0fSJagan Teki		interrupt-parent = <&r_intc>;
82f64f2e0fSJagan Teki		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
83f64f2e0fSJagan Teki		x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
84f64f2e0fSJagan Teki	};
85f64f2e0fSJagan Teki};
86f64f2e0fSJagan Teki
87f64f2e0fSJagan Teki#include "axp803.dtsi"
88f64f2e0fSJagan Teki
89f64f2e0fSJagan Teki&reg_aldo1 {
90f64f2e0fSJagan Teki	regulator-always-on;
91f64f2e0fSJagan Teki	regulator-min-microvolt = <2800000>;
92f64f2e0fSJagan Teki	regulator-max-microvolt = <2800000>;
93f64f2e0fSJagan Teki	regulator-name = "avdd-csi";
94f64f2e0fSJagan Teki};
95f64f2e0fSJagan Teki
96f64f2e0fSJagan Teki&reg_aldo2 {
97f64f2e0fSJagan Teki	regulator-always-on;
98f64f2e0fSJagan Teki	regulator-min-microvolt = <1800000>;
99f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
100f64f2e0fSJagan Teki	regulator-name = "vcc-pl";
101f64f2e0fSJagan Teki};
102f64f2e0fSJagan Teki
103f64f2e0fSJagan Teki&reg_aldo3 {
104f64f2e0fSJagan Teki	regulator-always-on;
105f64f2e0fSJagan Teki	regulator-min-microvolt = <3000000>;
106f64f2e0fSJagan Teki	regulator-max-microvolt = <3000000>;
107f64f2e0fSJagan Teki	regulator-name = "vcc-pll-avcc";
108f64f2e0fSJagan Teki};
109f64f2e0fSJagan Teki
110f64f2e0fSJagan Teki&reg_dcdc1 {
111f64f2e0fSJagan Teki	regulator-always-on;
112f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
113f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
114f64f2e0fSJagan Teki	regulator-name = "vcc-3v3";
115f64f2e0fSJagan Teki};
116f64f2e0fSJagan Teki
117f64f2e0fSJagan Teki&reg_dcdc2 {
118f64f2e0fSJagan Teki	regulator-always-on;
119f64f2e0fSJagan Teki	regulator-min-microvolt = <1040000>;
120f64f2e0fSJagan Teki	regulator-max-microvolt = <1300000>;
121f64f2e0fSJagan Teki	regulator-name = "vdd-cpux";
122f64f2e0fSJagan Teki};
123f64f2e0fSJagan Teki
124f64f2e0fSJagan Teki/* DCDC3 is polyphased with DCDC2 */
125f64f2e0fSJagan Teki
126f64f2e0fSJagan Teki&reg_dcdc5 {
127f64f2e0fSJagan Teki	regulator-always-on;
128f64f2e0fSJagan Teki	regulator-min-microvolt = <1500000>;
129f64f2e0fSJagan Teki	regulator-max-microvolt = <1500000>;
130f64f2e0fSJagan Teki	regulator-name = "vcc-dram";
131f64f2e0fSJagan Teki};
132f64f2e0fSJagan Teki
133f64f2e0fSJagan Teki&reg_dcdc6 {
134f64f2e0fSJagan Teki	regulator-always-on;
135f64f2e0fSJagan Teki	regulator-min-microvolt = <1100000>;
136f64f2e0fSJagan Teki	regulator-max-microvolt = <1100000>;
137f64f2e0fSJagan Teki	regulator-name = "vdd-sys";
138f64f2e0fSJagan Teki};
139f64f2e0fSJagan Teki
140f64f2e0fSJagan Teki&reg_dldo1 {
141f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
142f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
143f64f2e0fSJagan Teki	regulator-name = "vcc-hdmi-dsi-sensor";
144f64f2e0fSJagan Teki};
145f64f2e0fSJagan Teki
146f64f2e0fSJagan Teki&reg_dldo2 {
147f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
148f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
149f64f2e0fSJagan Teki	regulator-name = "vcc-mipi";
150f64f2e0fSJagan Teki};
151f64f2e0fSJagan Teki
152f64f2e0fSJagan Teki&reg_dldo3 {
153f64f2e0fSJagan Teki	regulator-min-microvolt = <2800000>;
154f64f2e0fSJagan Teki	regulator-max-microvolt = <2800000>;
155f64f2e0fSJagan Teki	regulator-name = "dovdd-csi";
156f64f2e0fSJagan Teki};
157f64f2e0fSJagan Teki
158f64f2e0fSJagan Teki&reg_dldo4 {
159f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
160f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
161f64f2e0fSJagan Teki	regulator-name = "vcc-wifi-io";
162f64f2e0fSJagan Teki};
163f64f2e0fSJagan Teki
164f64f2e0fSJagan Teki&reg_drivevbus {
165f64f2e0fSJagan Teki	regulator-name = "usb0-vbus";
166f64f2e0fSJagan Teki	status = "okay";
167f64f2e0fSJagan Teki};
168f64f2e0fSJagan Teki
169f64f2e0fSJagan Teki&reg_eldo1 {
170f64f2e0fSJagan Teki	regulator-always-on;
171f64f2e0fSJagan Teki	regulator-min-microvolt = <1800000>;
172f64f2e0fSJagan Teki	regulator-max-microvolt = <1800000>;
173f64f2e0fSJagan Teki	regulator-name = "cpvdd";
174f64f2e0fSJagan Teki};
175f64f2e0fSJagan Teki
176f64f2e0fSJagan Teki&reg_eldo3 {
177f64f2e0fSJagan Teki	regulator-min-microvolt = <1800000>;
178f64f2e0fSJagan Teki	regulator-max-microvolt = <1800000>;
179f64f2e0fSJagan Teki	regulator-name = "dvdd-csi";
180f64f2e0fSJagan Teki};
181f64f2e0fSJagan Teki
182f64f2e0fSJagan Teki&reg_fldo1 {
183f64f2e0fSJagan Teki	regulator-min-microvolt = <1200000>;
184f64f2e0fSJagan Teki	regulator-max-microvolt = <1200000>;
185f64f2e0fSJagan Teki	regulator-name = "vcc-1v2-hsic";
186f64f2e0fSJagan Teki};
187f64f2e0fSJagan Teki
188f64f2e0fSJagan Teki/*
189f64f2e0fSJagan Teki * The A64 chip cannot work without this regulator off, although
190f64f2e0fSJagan Teki * it seems to be only driving the AR100 core.
191f64f2e0fSJagan Teki * Maybe we don't still know well about CPUs domain.
192f64f2e0fSJagan Teki */
193f64f2e0fSJagan Teki&reg_fldo2 {
194f64f2e0fSJagan Teki	regulator-always-on;
195f64f2e0fSJagan Teki	regulator-min-microvolt = <1100000>;
196f64f2e0fSJagan Teki	regulator-max-microvolt = <1100000>;
197f64f2e0fSJagan Teki	regulator-name = "vdd-cpus";
198f64f2e0fSJagan Teki};
199f64f2e0fSJagan Teki
200f64f2e0fSJagan Teki&reg_rtc_ldo {
201f64f2e0fSJagan Teki	regulator-name = "vcc-rtc";
202f64f2e0fSJagan Teki};
203f64f2e0fSJagan Teki
204f64f2e0fSJagan Teki&uart0 {
205f64f2e0fSJagan Teki	pinctrl-names = "default";
206*d91ebb95SChen-Yu Tsai	pinctrl-0 = <&uart0_pb_pins>;
207f64f2e0fSJagan Teki	status = "okay";
208f64f2e0fSJagan Teki};
209f64f2e0fSJagan Teki
210f64f2e0fSJagan Teki&usb_otg {
211f64f2e0fSJagan Teki	dr_mode = "otg";
212f64f2e0fSJagan Teki	status = "okay";
213f64f2e0fSJagan Teki};
214f64f2e0fSJagan Teki
215f64f2e0fSJagan Teki&usbphy {
216f64f2e0fSJagan Teki	usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
217f64f2e0fSJagan Teki	usb0_vbus-supply = <&reg_drivevbus>;
218f64f2e0fSJagan Teki	status = "okay";
219f64f2e0fSJagan Teki};
220