xref: /openbmc/linux/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts (revision cabbaed7198976cb1d7317830aa2fde935d0519c)
1f64f2e0fSJagan Teki// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*cabbaed7SClément Péron// Copyright (C) 2018 Amarula Solutions B.V.
3*cabbaed7SClément Péron// Author: Jagan Teki <jagan@amarulasolutions.com>
4f64f2e0fSJagan Teki
5f64f2e0fSJagan Teki/dts-v1/;
6f64f2e0fSJagan Teki
7f64f2e0fSJagan Teki#include "sun50i-a64.dtsi"
8f64f2e0fSJagan Teki
9f64f2e0fSJagan Teki#include <dt-bindings/gpio/gpio.h>
10f64f2e0fSJagan Teki
11f64f2e0fSJagan Teki/ {
12f64f2e0fSJagan Teki	model = "Amarula A64-Relic";
13f64f2e0fSJagan Teki	compatible = "amarula,a64-relic", "allwinner,sun50i-a64";
14f64f2e0fSJagan Teki
15f64f2e0fSJagan Teki	aliases {
16f64f2e0fSJagan Teki		serial0 = &uart0;
17f64f2e0fSJagan Teki	};
18f64f2e0fSJagan Teki
19f64f2e0fSJagan Teki	chosen {
20f64f2e0fSJagan Teki		stdout-path = "serial0:115200n8";
21f64f2e0fSJagan Teki	};
2233c3d4ebSJagan Teki
237cc399f2SJagan Teki	i2c {
247cc399f2SJagan Teki		compatible = "i2c-gpio";
257cc399f2SJagan Teki		sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>;
267cc399f2SJagan Teki		scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>;
277cc399f2SJagan Teki		i2c-gpio,delay-us = <5>;
287cc399f2SJagan Teki		#address-cells = <1>;
297cc399f2SJagan Teki		#size-cells = <0>;
307cc399f2SJagan Teki
317cc399f2SJagan Teki		ov5640: camera@3c {
327cc399f2SJagan Teki			compatible = "ovti,ov5640";
337cc399f2SJagan Teki			reg = <0x3c>;
347cc399f2SJagan Teki			pinctrl-names = "default";
357cc399f2SJagan Teki			pinctrl-0 = <&csi_mclk_pin>;
367cc399f2SJagan Teki			clocks = <&ccu CLK_CSI_MCLK>;
377cc399f2SJagan Teki			clock-names = "xclk";
387cc399f2SJagan Teki
397cc399f2SJagan Teki			AVDD-supply = <&reg_aldo1>;
407cc399f2SJagan Teki			DOVDD-supply = <&reg_dldo3>;
417cc399f2SJagan Teki			DVDD-supply = <&reg_eldo3>;
427cc399f2SJagan Teki			reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */
437cc399f2SJagan Teki			powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */
447cc399f2SJagan Teki
457cc399f2SJagan Teki			port {
467cc399f2SJagan Teki				ov5640_ep: endpoint {
477cc399f2SJagan Teki					remote-endpoint = <&csi_ep>;
487cc399f2SJagan Teki					bus-width = <8>;
497cc399f2SJagan Teki					hsync-active = <1>; /* Active high */
507cc399f2SJagan Teki					vsync-active = <0>; /* Active low */
517cc399f2SJagan Teki					data-active = <1>;  /* Active high */
527cc399f2SJagan Teki					pclk-sample = <1>;  /* Rising */
537cc399f2SJagan Teki				};
547cc399f2SJagan Teki			};
557cc399f2SJagan Teki		};
567cc399f2SJagan Teki	};
577cc399f2SJagan Teki
5833c3d4ebSJagan Teki	wifi_pwrseq: wifi-pwrseq {
5933c3d4ebSJagan Teki		compatible = "mmc-pwrseq-simple";
6033c3d4ebSJagan Teki		clocks = <&rtc 1>;
6133c3d4ebSJagan Teki		clock-names = "ext_clock";
6233c3d4ebSJagan Teki		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
6333c3d4ebSJagan Teki	};
64f64f2e0fSJagan Teki};
65f64f2e0fSJagan Teki
667cc399f2SJagan Teki&csi {
677cc399f2SJagan Teki	status = "okay";
687cc399f2SJagan Teki
697cc399f2SJagan Teki	port {
707cc399f2SJagan Teki		csi_ep: endpoint {
717cc399f2SJagan Teki			remote-endpoint = <&ov5640_ep>;
727cc399f2SJagan Teki			bus-width = <8>;
737cc399f2SJagan Teki			hsync-active = <1>; /* Active high */
747cc399f2SJagan Teki			vsync-active = <0>; /* Active low */
757cc399f2SJagan Teki			data-active = <1>;  /* Active high */
767cc399f2SJagan Teki			pclk-sample = <1>;  /* Rising */
777cc399f2SJagan Teki		};
787cc399f2SJagan Teki	};
797cc399f2SJagan Teki};
807cc399f2SJagan Teki
81f64f2e0fSJagan Teki&ehci0 {
82f64f2e0fSJagan Teki	status = "okay";
83f64f2e0fSJagan Teki};
84f64f2e0fSJagan Teki
85ea738c32SJagan Teki&i2c0 {
86ea738c32SJagan Teki	status = "okay";
87ea738c32SJagan Teki
88ea738c32SJagan Teki	sensor@48 {
89ea738c32SJagan Teki		compatible = "st,stlm75";
90ea738c32SJagan Teki		reg = <0x48>;
91ea738c32SJagan Teki	};
92ea738c32SJagan Teki};
93ea738c32SJagan Teki
94ea738c32SJagan Teki&i2c0_pins {
95ea738c32SJagan Teki	bias-pull-up;
96ea738c32SJagan Teki};
97ea738c32SJagan Teki
985aa45a24SJagan Teki&i2c1 {
995aa45a24SJagan Teki	status = "okay";
1005aa45a24SJagan Teki
1015aa45a24SJagan Teki	touchscreen@5d {
1025aa45a24SJagan Teki		compatible = "goodix,gt5663";
1035aa45a24SJagan Teki		reg = <0x5d>;
1045aa45a24SJagan Teki		AVDD28-supply = <&reg_ldo_io0>;			/* VCC-CTP: GPIO0-LDO */
1055aa45a24SJagan Teki		interrupt-parent = <&pio>;
1065aa45a24SJagan Teki		interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>;
1075aa45a24SJagan Teki		irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>;	/* CTP-INT: PH4 */
1085aa45a24SJagan Teki		reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>;	/* CTP-RST: PH8 */
1095aa45a24SJagan Teki		touchscreen-inverted-x;
1105aa45a24SJagan Teki		touchscreen-inverted-y;
1115aa45a24SJagan Teki	};
1125aa45a24SJagan Teki};
1135aa45a24SJagan Teki
11433c3d4ebSJagan Teki&mmc1 {
11533c3d4ebSJagan Teki	pinctrl-names = "default";
11633c3d4ebSJagan Teki	pinctrl-0 = <&mmc1_pins>;
11733c3d4ebSJagan Teki	vmmc-supply = <&reg_dcdc1>;
11833c3d4ebSJagan Teki	/*
11933c3d4ebSJagan Teki	 * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but
12033c3d4ebSJagan Teki	 * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with
12133c3d4ebSJagan Teki	 * 0Ohm register to vcc-io-wifi so eldo1 is used.
12233c3d4ebSJagan Teki	 */
12333c3d4ebSJagan Teki	vqmmc-supply = <&reg_eldo1>;
12433c3d4ebSJagan Teki	mmc-pwrseq = <&wifi_pwrseq>;
12533c3d4ebSJagan Teki	bus-width = <4>;
12633c3d4ebSJagan Teki	non-removable;
12733c3d4ebSJagan Teki	status = "okay";
12833c3d4ebSJagan Teki
12933c3d4ebSJagan Teki	brcmf: wifi@1 {
13033c3d4ebSJagan Teki		reg = <1>;
13133c3d4ebSJagan Teki		compatible = "brcm,bcm4329-fmac";
13233c3d4ebSJagan Teki		interrupt-parent = <&r_pio>;
13333c3d4ebSJagan Teki		interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;	/* WL-WAKE-AP: PL3 */
13433c3d4ebSJagan Teki		interrupt-names = "host-wake";
13533c3d4ebSJagan Teki	};
13633c3d4ebSJagan Teki};
13733c3d4ebSJagan Teki
138f64f2e0fSJagan Teki&mmc2 {
139f64f2e0fSJagan Teki	pinctrl-names = "default";
140f64f2e0fSJagan Teki	pinctrl-0 = <&mmc2_pins>;
141f64f2e0fSJagan Teki	vmmc-supply = <&reg_dcdc1>;
142f64f2e0fSJagan Teki	bus-width = <8>;
143f64f2e0fSJagan Teki	non-removable;
144f64f2e0fSJagan Teki	cap-mmc-hw-reset;
145f64f2e0fSJagan Teki	status = "okay";
146f64f2e0fSJagan Teki};
147f64f2e0fSJagan Teki
148f64f2e0fSJagan Teki&ohci0 {
149f64f2e0fSJagan Teki	status = "okay";
150f64f2e0fSJagan Teki};
151f64f2e0fSJagan Teki
152f64f2e0fSJagan Teki&r_rsb {
153f64f2e0fSJagan Teki	status = "okay";
154f64f2e0fSJagan Teki
155f64f2e0fSJagan Teki	axp803: pmic@3a3 {
156f64f2e0fSJagan Teki		compatible = "x-powers,axp803";
157f64f2e0fSJagan Teki		reg = <0x3a3>;
158f64f2e0fSJagan Teki		interrupt-parent = <&r_intc>;
159f64f2e0fSJagan Teki		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
160f64f2e0fSJagan Teki		x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
161f64f2e0fSJagan Teki	};
162f64f2e0fSJagan Teki};
163f64f2e0fSJagan Teki
164f64f2e0fSJagan Teki#include "axp803.dtsi"
165f64f2e0fSJagan Teki
166f64f2e0fSJagan Teki&reg_aldo1 {
167f64f2e0fSJagan Teki	regulator-always-on;
168f64f2e0fSJagan Teki	regulator-min-microvolt = <2800000>;
169f64f2e0fSJagan Teki	regulator-max-microvolt = <2800000>;
170f64f2e0fSJagan Teki	regulator-name = "avdd-csi";
171f64f2e0fSJagan Teki};
172f64f2e0fSJagan Teki
173f64f2e0fSJagan Teki&reg_aldo2 {
174f64f2e0fSJagan Teki	regulator-always-on;
175f64f2e0fSJagan Teki	regulator-min-microvolt = <1800000>;
176f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
177f64f2e0fSJagan Teki	regulator-name = "vcc-pl";
178f64f2e0fSJagan Teki};
179f64f2e0fSJagan Teki
180f64f2e0fSJagan Teki&reg_aldo3 {
181f64f2e0fSJagan Teki	regulator-always-on;
182f64f2e0fSJagan Teki	regulator-min-microvolt = <3000000>;
183f64f2e0fSJagan Teki	regulator-max-microvolt = <3000000>;
184f64f2e0fSJagan Teki	regulator-name = "vcc-pll-avcc";
185f64f2e0fSJagan Teki};
186f64f2e0fSJagan Teki
187f64f2e0fSJagan Teki&reg_dcdc1 {
188f64f2e0fSJagan Teki	regulator-always-on;
189f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
190f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
191f64f2e0fSJagan Teki	regulator-name = "vcc-3v3";
192f64f2e0fSJagan Teki};
193f64f2e0fSJagan Teki
194f64f2e0fSJagan Teki&reg_dcdc2 {
195f64f2e0fSJagan Teki	regulator-always-on;
196f64f2e0fSJagan Teki	regulator-min-microvolt = <1040000>;
197f64f2e0fSJagan Teki	regulator-max-microvolt = <1300000>;
198f64f2e0fSJagan Teki	regulator-name = "vdd-cpux";
199f64f2e0fSJagan Teki};
200f64f2e0fSJagan Teki
201f64f2e0fSJagan Teki/* DCDC3 is polyphased with DCDC2 */
202f64f2e0fSJagan Teki
203f64f2e0fSJagan Teki&reg_dcdc5 {
204f64f2e0fSJagan Teki	regulator-always-on;
205f64f2e0fSJagan Teki	regulator-min-microvolt = <1500000>;
206f64f2e0fSJagan Teki	regulator-max-microvolt = <1500000>;
207f64f2e0fSJagan Teki	regulator-name = "vcc-dram";
208f64f2e0fSJagan Teki};
209f64f2e0fSJagan Teki
210f64f2e0fSJagan Teki&reg_dcdc6 {
211f64f2e0fSJagan Teki	regulator-always-on;
212f64f2e0fSJagan Teki	regulator-min-microvolt = <1100000>;
213f64f2e0fSJagan Teki	regulator-max-microvolt = <1100000>;
214f64f2e0fSJagan Teki	regulator-name = "vdd-sys";
215f64f2e0fSJagan Teki};
216f64f2e0fSJagan Teki
217f64f2e0fSJagan Teki&reg_dldo1 {
218f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
219f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
220f64f2e0fSJagan Teki	regulator-name = "vcc-hdmi-dsi-sensor";
221f64f2e0fSJagan Teki};
222f64f2e0fSJagan Teki
223f64f2e0fSJagan Teki&reg_dldo2 {
224f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
225f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
226f64f2e0fSJagan Teki	regulator-name = "vcc-mipi";
227f64f2e0fSJagan Teki};
228f64f2e0fSJagan Teki
229f64f2e0fSJagan Teki&reg_dldo3 {
230f64f2e0fSJagan Teki	regulator-min-microvolt = <2800000>;
231f64f2e0fSJagan Teki	regulator-max-microvolt = <2800000>;
232f64f2e0fSJagan Teki	regulator-name = "dovdd-csi";
233f64f2e0fSJagan Teki};
234f64f2e0fSJagan Teki
235f64f2e0fSJagan Teki&reg_dldo4 {
236f64f2e0fSJagan Teki	regulator-min-microvolt = <3300000>;
237f64f2e0fSJagan Teki	regulator-max-microvolt = <3300000>;
238f64f2e0fSJagan Teki	regulator-name = "vcc-wifi-io";
239f64f2e0fSJagan Teki};
240f64f2e0fSJagan Teki
241f64f2e0fSJagan Teki&reg_drivevbus {
242f64f2e0fSJagan Teki	regulator-name = "usb0-vbus";
243f64f2e0fSJagan Teki	status = "okay";
244f64f2e0fSJagan Teki};
245f64f2e0fSJagan Teki
246f64f2e0fSJagan Teki&reg_eldo1 {
247f64f2e0fSJagan Teki	regulator-always-on;
248f64f2e0fSJagan Teki	regulator-min-microvolt = <1800000>;
249f64f2e0fSJagan Teki	regulator-max-microvolt = <1800000>;
250f64f2e0fSJagan Teki	regulator-name = "cpvdd";
251f64f2e0fSJagan Teki};
252f64f2e0fSJagan Teki
253f64f2e0fSJagan Teki&reg_eldo3 {
254f64f2e0fSJagan Teki	regulator-min-microvolt = <1800000>;
255f64f2e0fSJagan Teki	regulator-max-microvolt = <1800000>;
256f64f2e0fSJagan Teki	regulator-name = "dvdd-csi";
257f64f2e0fSJagan Teki};
258f64f2e0fSJagan Teki
259f64f2e0fSJagan Teki&reg_fldo1 {
260f64f2e0fSJagan Teki	regulator-min-microvolt = <1200000>;
261f64f2e0fSJagan Teki	regulator-max-microvolt = <1200000>;
262f64f2e0fSJagan Teki	regulator-name = "vcc-1v2-hsic";
263f64f2e0fSJagan Teki};
264f64f2e0fSJagan Teki
265f64f2e0fSJagan Teki/*
266f64f2e0fSJagan Teki * The A64 chip cannot work without this regulator off, although
267f64f2e0fSJagan Teki * it seems to be only driving the AR100 core.
268f64f2e0fSJagan Teki * Maybe we don't still know well about CPUs domain.
269f64f2e0fSJagan Teki */
270f64f2e0fSJagan Teki&reg_fldo2 {
271f64f2e0fSJagan Teki	regulator-always-on;
272f64f2e0fSJagan Teki	regulator-min-microvolt = <1100000>;
273f64f2e0fSJagan Teki	regulator-max-microvolt = <1100000>;
274f64f2e0fSJagan Teki	regulator-name = "vdd-cpus";
275f64f2e0fSJagan Teki};
276f64f2e0fSJagan Teki
2775aa45a24SJagan Teki&reg_ldo_io0 {
2785aa45a24SJagan Teki	regulator-min-microvolt = <2800000>;
2795aa45a24SJagan Teki	regulator-max-microvolt = <2800000>;
2805aa45a24SJagan Teki	regulator-name = "vcc-ctp";
2815aa45a24SJagan Teki	status = "okay";
2825aa45a24SJagan Teki};
2835aa45a24SJagan Teki
284f64f2e0fSJagan Teki&reg_rtc_ldo {
285f64f2e0fSJagan Teki	regulator-name = "vcc-rtc";
286f64f2e0fSJagan Teki};
287f64f2e0fSJagan Teki
288f64f2e0fSJagan Teki&uart0 {
289f64f2e0fSJagan Teki	pinctrl-names = "default";
290d91ebb95SChen-Yu Tsai	pinctrl-0 = <&uart0_pb_pins>;
291f64f2e0fSJagan Teki	status = "okay";
292f64f2e0fSJagan Teki};
293f64f2e0fSJagan Teki
294f64f2e0fSJagan Teki&usb_otg {
295f64f2e0fSJagan Teki	dr_mode = "otg";
296f64f2e0fSJagan Teki	status = "okay";
297f64f2e0fSJagan Teki};
298f64f2e0fSJagan Teki
299f64f2e0fSJagan Teki&usbphy {
300f64f2e0fSJagan Teki	usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
301f64f2e0fSJagan Teki	usb0_vbus-supply = <&reg_drivevbus>;
302f64f2e0fSJagan Teki	status = "okay";
303f64f2e0fSJagan Teki};
304