WIP FPC-III support
[linux/fpc-iii.git] / arch / arm64 / boot / dts / allwinner / sun50i-a64-amarula-relic.dts
blobc7bd73f35ed89e917e2060d61aefd8b1603721c3
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 // Copyright (C) 2018 Amarula Solutions B.V.
3 // Author: Jagan Teki <jagan@amarulasolutions.com>
5 /dts-v1/;
7 #include "sun50i-a64.dtsi"
8 #include "sun50i-a64-cpu-opp.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
12 / {
13         model = "Amarula A64-Relic";
14         compatible = "amarula,a64-relic", "allwinner,sun50i-a64";
16         aliases {
17                 serial0 = &uart0;
18         };
20         chosen {
21                 stdout-path = "serial0:115200n8";
22         };
24         i2c {
25                 compatible = "i2c-gpio";
26                 sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>;
27                 scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>;
28                 i2c-gpio,delay-us = <5>;
29                 #address-cells = <1>;
30                 #size-cells = <0>;
32                 ov5640: camera@3c {
33                         compatible = "ovti,ov5640";
34                         reg = <0x3c>;
35                         pinctrl-names = "default";
36                         pinctrl-0 = <&csi_mclk_pin>;
37                         clocks = <&ccu CLK_CSI_MCLK>;
38                         clock-names = "xclk";
40                         AVDD-supply = <&reg_aldo1>;
41                         DOVDD-supply = <&reg_dldo3>;
42                         DVDD-supply = <&reg_eldo3>;
43                         reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */
44                         powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */
46                         port {
47                                 ov5640_ep: endpoint {
48                                         remote-endpoint = <&csi_ep>;
49                                         bus-width = <8>;
50                                         hsync-active = <1>; /* Active high */
51                                         vsync-active = <0>; /* Active low */
52                                         data-active = <1>;  /* Active high */
53                                         pclk-sample = <1>;  /* Rising */
54                                 };
55                         };
56                 };
57         };
59         wifi_pwrseq: wifi-pwrseq {
60                 compatible = "mmc-pwrseq-simple";
61                 clocks = <&rtc 1>;
62                 clock-names = "ext_clock";
63                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
64         };
67 &cpu0 {
68         cpu-supply = <&reg_dcdc2>;
71 &cpu1 {
72         cpu-supply = <&reg_dcdc2>;
75 &cpu2 {
76         cpu-supply = <&reg_dcdc2>;
79 &cpu3 {
80         cpu-supply = <&reg_dcdc2>;
83 &csi {
84         status = "okay";
86         port {
87                 csi_ep: endpoint {
88                         remote-endpoint = <&ov5640_ep>;
89                         bus-width = <8>;
90                         hsync-active = <1>; /* Active high */
91                         vsync-active = <0>; /* Active low */
92                         data-active = <1>;  /* Active high */
93                         pclk-sample = <1>;  /* Rising */
94                 };
95         };
98 &ehci0 {
99         status = "okay";
102 &i2c0 {
103         status = "okay";
105         sensor@48 {
106                 compatible = "st,stlm75";
107                 reg = <0x48>;
108         };
111 &i2c0_pins {
112         bias-pull-up;
115 &i2c1 {
116         status = "okay";
118         touchscreen@5d {
119                 compatible = "goodix,gt5663";
120                 reg = <0x5d>;
121                 AVDD28-supply = <&reg_ldo_io0>;                 /* VCC-CTP: GPIO0-LDO */
122                 interrupt-parent = <&pio>;
123                 interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>;
124                 irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>;        /* CTP-INT: PH4 */
125                 reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>;      /* CTP-RST: PH8 */
126                 touchscreen-inverted-x;
127                 touchscreen-inverted-y;
128         };
131 &mmc1 {
132         pinctrl-names = "default";
133         pinctrl-0 = <&mmc1_pins>;
134         vmmc-supply = <&reg_dcdc1>;
135         /*
136          * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but
137          * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with
138          * 0Ohm register to vcc-io-wifi so eldo1 is used.
139          */
140         vqmmc-supply = <&reg_eldo1>;
141         mmc-pwrseq = <&wifi_pwrseq>;
142         bus-width = <4>;
143         non-removable;
144         status = "okay";
146         brcmf: wifi@1 {
147                 reg = <1>;
148                 compatible = "brcm,bcm4329-fmac";
149                 interrupt-parent = <&r_pio>;
150                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;  /* WL-WAKE-AP: PL3 */
151                 interrupt-names = "host-wake";
152         };
155 &mmc2 {
156         pinctrl-names = "default";
157         pinctrl-0 = <&mmc2_pins>;
158         vmmc-supply = <&reg_dcdc1>;
159         bus-width = <8>;
160         non-removable;
161         cap-mmc-hw-reset;
162         status = "okay";
165 &ohci0 {
166         status = "okay";
169 &r_rsb {
170         status = "okay";
172         axp803: pmic@3a3 {
173                 compatible = "x-powers,axp803";
174                 reg = <0x3a3>;
175                 interrupt-parent = <&r_intc>;
176                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
177                 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
178         };
181 #include "axp803.dtsi"
183 &reg_aldo1 {
184         regulator-always-on;
185         regulator-min-microvolt = <2800000>;
186         regulator-max-microvolt = <2800000>;
187         regulator-name = "avdd-csi";
190 &reg_aldo2 {
191         regulator-always-on;
192         regulator-min-microvolt = <1800000>;
193         regulator-max-microvolt = <3300000>;
194         regulator-name = "vcc-pl";
197 &reg_aldo3 {
198         regulator-always-on;
199         regulator-min-microvolt = <3000000>;
200         regulator-max-microvolt = <3000000>;
201         regulator-name = "vcc-pll-avcc";
204 &reg_dcdc1 {
205         regulator-always-on;
206         regulator-min-microvolt = <3300000>;
207         regulator-max-microvolt = <3300000>;
208         regulator-name = "vcc-3v3";
211 &reg_dcdc2 {
212         regulator-always-on;
213         regulator-min-microvolt = <1040000>;
214         regulator-max-microvolt = <1300000>;
215         regulator-name = "vdd-cpux";
218 /* DCDC3 is polyphased with DCDC2 */
220 &reg_dcdc5 {
221         regulator-always-on;
222         regulator-min-microvolt = <1500000>;
223         regulator-max-microvolt = <1500000>;
224         regulator-name = "vcc-dram";
227 &reg_dcdc6 {
228         regulator-always-on;
229         regulator-min-microvolt = <1100000>;
230         regulator-max-microvolt = <1100000>;
231         regulator-name = "vdd-sys";
234 &reg_dldo1 {
235         regulator-min-microvolt = <3300000>;
236         regulator-max-microvolt = <3300000>;
237         regulator-name = "vcc-hdmi-dsi-sensor";
240 &reg_dldo2 {
241         regulator-min-microvolt = <3300000>;
242         regulator-max-microvolt = <3300000>;
243         regulator-name = "vcc-mipi";
246 &reg_dldo3 {
247         regulator-min-microvolt = <2800000>;
248         regulator-max-microvolt = <2800000>;
249         regulator-name = "dovdd-csi";
252 &reg_dldo4 {
253         regulator-min-microvolt = <3300000>;
254         regulator-max-microvolt = <3300000>;
255         regulator-name = "vcc-wifi-io";
258 &reg_drivevbus {
259         regulator-name = "usb0-vbus";
260         status = "okay";
263 &reg_eldo1 {
264         regulator-always-on;
265         regulator-min-microvolt = <1800000>;
266         regulator-max-microvolt = <1800000>;
267         regulator-name = "cpvdd";
270 &reg_eldo3 {
271         regulator-min-microvolt = <1800000>;
272         regulator-max-microvolt = <1800000>;
273         regulator-name = "dvdd-csi";
276 &reg_fldo1 {
277         regulator-min-microvolt = <1200000>;
278         regulator-max-microvolt = <1200000>;
279         regulator-name = "vcc-1v2-hsic";
283  * The A64 chip cannot work without this regulator off, although
284  * it seems to be only driving the AR100 core.
285  * Maybe we don't still know well about CPUs domain.
286  */
287 &reg_fldo2 {
288         regulator-always-on;
289         regulator-min-microvolt = <1100000>;
290         regulator-max-microvolt = <1100000>;
291         regulator-name = "vdd-cpus";
294 &reg_ldo_io0 {
295         regulator-min-microvolt = <2800000>;
296         regulator-max-microvolt = <2800000>;
297         regulator-name = "vcc-ctp";
298         status = "okay";
301 &reg_rtc_ldo {
302         regulator-name = "vcc-rtc";
305 &uart0 {
306         pinctrl-names = "default";
307         pinctrl-0 = <&uart0_pb_pins>;
308         status = "okay";
311 &usb_otg {
312         dr_mode = "otg";
313         status = "okay";
316 &usbphy {
317         usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
318         usb0_vbus-supply = <&reg_drivevbus>;
319         status = "okay";