xref: /linux/scripts/dtc/include-prefixes/riscv/allwinner/sun20i-d1-clockworkpi-v3.14.dts (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1*0ce1d346SSamuel Holland// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2*0ce1d346SSamuel Holland// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
3*0ce1d346SSamuel Holland
4*0ce1d346SSamuel Holland#include <dt-bindings/gpio/gpio.h>
5*0ce1d346SSamuel Holland
6*0ce1d346SSamuel Holland/dts-v1/;
7*0ce1d346SSamuel Holland
8*0ce1d346SSamuel Holland#include "sun20i-d1.dtsi"
9*0ce1d346SSamuel Holland#include "sun20i-common-regulators.dtsi"
10*0ce1d346SSamuel Holland
11*0ce1d346SSamuel Holland/ {
12*0ce1d346SSamuel Holland	model = "ClockworkPi v3.14 (R-01)";
13*0ce1d346SSamuel Holland	compatible = "clockwork,r-01-clockworkpi-v3.14", "allwinner,sun20i-d1";
14*0ce1d346SSamuel Holland
15*0ce1d346SSamuel Holland	aliases {
16*0ce1d346SSamuel Holland		ethernet0 = &ap6256;
17*0ce1d346SSamuel Holland		serial0 = &uart0;
18*0ce1d346SSamuel Holland	};
19*0ce1d346SSamuel Holland
20*0ce1d346SSamuel Holland	chosen {
21*0ce1d346SSamuel Holland		stdout-path = "serial0:115200n8";
22*0ce1d346SSamuel Holland	};
23*0ce1d346SSamuel Holland
24*0ce1d346SSamuel Holland	/*
25*0ce1d346SSamuel Holland	 * This regulator is PWM-controlled, but the PWM controller is not
26*0ce1d346SSamuel Holland	 * yet supported, so fix the regulator to its default voltage.
27*0ce1d346SSamuel Holland	 */
28*0ce1d346SSamuel Holland	reg_vdd_cpu: vdd-cpu {
29*0ce1d346SSamuel Holland		compatible = "regulator-fixed";
30*0ce1d346SSamuel Holland		regulator-name = "vdd-cpu";
31*0ce1d346SSamuel Holland		regulator-min-microvolt = <1100000>;
32*0ce1d346SSamuel Holland		regulator-max-microvolt = <1100000>;
33*0ce1d346SSamuel Holland		vin-supply = <&reg_vcc>;
34*0ce1d346SSamuel Holland	};
35*0ce1d346SSamuel Holland
36*0ce1d346SSamuel Holland	wifi_pwrseq: wifi-pwrseq {
37*0ce1d346SSamuel Holland		compatible = "mmc-pwrseq-simple";
38*0ce1d346SSamuel Holland		reset-gpios = <&pio 6 11 GPIO_ACTIVE_LOW>; /* PG11/GPIO3 */
39*0ce1d346SSamuel Holland	};
40*0ce1d346SSamuel Holland};
41*0ce1d346SSamuel Holland
42*0ce1d346SSamuel Holland&cpu0 {
43*0ce1d346SSamuel Holland	cpu-supply = <&reg_vdd_cpu>;
44*0ce1d346SSamuel Holland};
45*0ce1d346SSamuel Holland
46*0ce1d346SSamuel Holland&dcxo {
47*0ce1d346SSamuel Holland	clock-frequency = <24000000>;
48*0ce1d346SSamuel Holland};
49*0ce1d346SSamuel Holland
50*0ce1d346SSamuel Holland&ehci1 {
51*0ce1d346SSamuel Holland	status = "okay";
52*0ce1d346SSamuel Holland};
53*0ce1d346SSamuel Holland
54*0ce1d346SSamuel Holland&i2c0 {
55*0ce1d346SSamuel Holland	pinctrl-0 = <&i2c0_pb10_pins>;
56*0ce1d346SSamuel Holland	pinctrl-names = "default";
57*0ce1d346SSamuel Holland	status = "okay";
58*0ce1d346SSamuel Holland
59*0ce1d346SSamuel Holland	axp221: pmic@34 {
60*0ce1d346SSamuel Holland		compatible = "x-powers,axp228", "x-powers,axp221";
61*0ce1d346SSamuel Holland		reg = <0x34>;
62*0ce1d346SSamuel Holland		interrupt-parent = <&pio>;
63*0ce1d346SSamuel Holland		interrupts = <4 9 IRQ_TYPE_LEVEL_LOW>; /* PE9/GPIO2 */
64*0ce1d346SSamuel Holland		interrupt-controller;
65*0ce1d346SSamuel Holland		#interrupt-cells = <1>;
66*0ce1d346SSamuel Holland
67*0ce1d346SSamuel Holland		ac_power_supply: ac-power {
68*0ce1d346SSamuel Holland			compatible = "x-powers,axp221-ac-power-supply";
69*0ce1d346SSamuel Holland		};
70*0ce1d346SSamuel Holland
71*0ce1d346SSamuel Holland		axp_adc: adc {
72*0ce1d346SSamuel Holland			compatible = "x-powers,axp221-adc";
73*0ce1d346SSamuel Holland			#io-channel-cells = <1>;
74*0ce1d346SSamuel Holland		};
75*0ce1d346SSamuel Holland
76*0ce1d346SSamuel Holland		battery_power_supply: battery-power {
77*0ce1d346SSamuel Holland			compatible = "x-powers,axp221-battery-power-supply";
78*0ce1d346SSamuel Holland		};
79*0ce1d346SSamuel Holland
80*0ce1d346SSamuel Holland		axp_gpio: gpio {
81*0ce1d346SSamuel Holland			compatible = "x-powers,axp221-gpio";
82*0ce1d346SSamuel Holland			gpio-controller;
83*0ce1d346SSamuel Holland			#gpio-cells = <2>;
84*0ce1d346SSamuel Holland		};
85*0ce1d346SSamuel Holland
86*0ce1d346SSamuel Holland		regulators {
87*0ce1d346SSamuel Holland			x-powers,dcdc-freq = <3000>;
88*0ce1d346SSamuel Holland
89*0ce1d346SSamuel Holland			reg_dcdc1: dcdc1 {
90*0ce1d346SSamuel Holland				regulator-name = "sys-3v3";
91*0ce1d346SSamuel Holland				regulator-always-on;
92*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
93*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
94*0ce1d346SSamuel Holland			};
95*0ce1d346SSamuel Holland
96*0ce1d346SSamuel Holland			reg_dcdc3: dcdc3 {
97*0ce1d346SSamuel Holland				regulator-name = "sys-1v8";
98*0ce1d346SSamuel Holland				regulator-always-on;
99*0ce1d346SSamuel Holland				regulator-min-microvolt = <1800000>;
100*0ce1d346SSamuel Holland				regulator-max-microvolt = <1800000>;
101*0ce1d346SSamuel Holland			};
102*0ce1d346SSamuel Holland
103*0ce1d346SSamuel Holland			reg_aldo1: aldo1 {
104*0ce1d346SSamuel Holland				regulator-name = "aud-3v3";
105*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
106*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
107*0ce1d346SSamuel Holland			};
108*0ce1d346SSamuel Holland
109*0ce1d346SSamuel Holland			reg_aldo2: aldo2 {
110*0ce1d346SSamuel Holland				regulator-name = "disp-3v3";
111*0ce1d346SSamuel Holland				regulator-always-on;
112*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
113*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
114*0ce1d346SSamuel Holland			};
115*0ce1d346SSamuel Holland
116*0ce1d346SSamuel Holland			reg_aldo3: aldo3 {
117*0ce1d346SSamuel Holland				regulator-name = "vdd-wifi";
118*0ce1d346SSamuel Holland				regulator-min-microvolt = <1800000>;
119*0ce1d346SSamuel Holland				regulator-max-microvolt = <1800000>;
120*0ce1d346SSamuel Holland			};
121*0ce1d346SSamuel Holland
122*0ce1d346SSamuel Holland			/* DLDO1 and ELDO1-3 are connected in parallel. */
123*0ce1d346SSamuel Holland			reg_dldo1: dldo1 {
124*0ce1d346SSamuel Holland				regulator-name = "vbat-wifi-a";
125*0ce1d346SSamuel Holland				regulator-always-on;
126*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
127*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
128*0ce1d346SSamuel Holland			};
129*0ce1d346SSamuel Holland
130*0ce1d346SSamuel Holland			/* DLDO2-DLDO4 are connected in parallel. */
131*0ce1d346SSamuel Holland			reg_dldo2: dldo2 {
132*0ce1d346SSamuel Holland				regulator-name = "vcc-3v3-ext-a";
133*0ce1d346SSamuel Holland				regulator-always-on;
134*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
135*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
136*0ce1d346SSamuel Holland			};
137*0ce1d346SSamuel Holland
138*0ce1d346SSamuel Holland			reg_dldo3: dldo3 {
139*0ce1d346SSamuel Holland				regulator-name = "vcc-3v3-ext-b";
140*0ce1d346SSamuel Holland				regulator-always-on;
141*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
142*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
143*0ce1d346SSamuel Holland			};
144*0ce1d346SSamuel Holland
145*0ce1d346SSamuel Holland			reg_dldo4: dldo4 {
146*0ce1d346SSamuel Holland				regulator-name = "vcc-3v3-ext-c";
147*0ce1d346SSamuel Holland				regulator-always-on;
148*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
149*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
150*0ce1d346SSamuel Holland			};
151*0ce1d346SSamuel Holland
152*0ce1d346SSamuel Holland			reg_eldo1: eldo1 {
153*0ce1d346SSamuel Holland				regulator-name = "vbat-wifi-b";
154*0ce1d346SSamuel Holland				regulator-always-on;
155*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
156*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
157*0ce1d346SSamuel Holland			};
158*0ce1d346SSamuel Holland
159*0ce1d346SSamuel Holland			reg_eldo2: eldo2 {
160*0ce1d346SSamuel Holland				regulator-name = "vbat-wifi-c";
161*0ce1d346SSamuel Holland				regulator-always-on;
162*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
163*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
164*0ce1d346SSamuel Holland			};
165*0ce1d346SSamuel Holland
166*0ce1d346SSamuel Holland			reg_eldo3: eldo3 {
167*0ce1d346SSamuel Holland				regulator-name = "vbat-wifi-d";
168*0ce1d346SSamuel Holland				regulator-always-on;
169*0ce1d346SSamuel Holland				regulator-min-microvolt = <3300000>;
170*0ce1d346SSamuel Holland				regulator-max-microvolt = <3300000>;
171*0ce1d346SSamuel Holland			};
172*0ce1d346SSamuel Holland		};
173*0ce1d346SSamuel Holland
174*0ce1d346SSamuel Holland		usb_power_supply: usb-power {
175*0ce1d346SSamuel Holland			compatible = "x-powers,axp221-usb-power-supply";
176*0ce1d346SSamuel Holland			status = "disabled";
177*0ce1d346SSamuel Holland		};
178*0ce1d346SSamuel Holland	};
179*0ce1d346SSamuel Holland};
180*0ce1d346SSamuel Holland
181*0ce1d346SSamuel Holland&mmc0 {
182*0ce1d346SSamuel Holland	broken-cd;
183*0ce1d346SSamuel Holland	bus-width = <4>;
184*0ce1d346SSamuel Holland	disable-wp;
185*0ce1d346SSamuel Holland	vmmc-supply = <&reg_dcdc1>;
186*0ce1d346SSamuel Holland	vqmmc-supply = <&reg_vcc_3v3>;
187*0ce1d346SSamuel Holland	pinctrl-0 = <&mmc0_pins>;
188*0ce1d346SSamuel Holland	pinctrl-names = "default";
189*0ce1d346SSamuel Holland	status = "okay";
190*0ce1d346SSamuel Holland};
191*0ce1d346SSamuel Holland
192*0ce1d346SSamuel Holland&mmc1 {
193*0ce1d346SSamuel Holland	bus-width = <4>;
194*0ce1d346SSamuel Holland	mmc-pwrseq = <&wifi_pwrseq>;
195*0ce1d346SSamuel Holland	non-removable;
196*0ce1d346SSamuel Holland	vmmc-supply = <&reg_dldo1>;
197*0ce1d346SSamuel Holland	vqmmc-supply = <&reg_aldo3>;
198*0ce1d346SSamuel Holland	pinctrl-0 = <&mmc1_pins>;
199*0ce1d346SSamuel Holland	pinctrl-names = "default";
200*0ce1d346SSamuel Holland	status = "okay";
201*0ce1d346SSamuel Holland
202*0ce1d346SSamuel Holland	ap6256: wifi@1 {
203*0ce1d346SSamuel Holland		compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac";
204*0ce1d346SSamuel Holland		reg = <1>;
205*0ce1d346SSamuel Holland		interrupt-parent = <&pio>;
206*0ce1d346SSamuel Holland		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10/GPIO4 */
207*0ce1d346SSamuel Holland		interrupt-names = "host-wake";
208*0ce1d346SSamuel Holland	};
209*0ce1d346SSamuel Holland};
210*0ce1d346SSamuel Holland
211*0ce1d346SSamuel Holland&ohci1 {
212*0ce1d346SSamuel Holland	status = "okay";
213*0ce1d346SSamuel Holland};
214*0ce1d346SSamuel Holland
215*0ce1d346SSamuel Holland&pio {
216*0ce1d346SSamuel Holland	vcc-pg-supply = <&reg_ldoa>;
217*0ce1d346SSamuel Holland};
218*0ce1d346SSamuel Holland
219*0ce1d346SSamuel Holland&uart0 {
220*0ce1d346SSamuel Holland	pinctrl-0 = <&uart0_pb8_pins>;
221*0ce1d346SSamuel Holland	pinctrl-names = "default";
222*0ce1d346SSamuel Holland	status = "okay";
223*0ce1d346SSamuel Holland};
224*0ce1d346SSamuel Holland
225*0ce1d346SSamuel Holland&uart1 {
226*0ce1d346SSamuel Holland	uart-has-rtscts;
227*0ce1d346SSamuel Holland	pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
228*0ce1d346SSamuel Holland	pinctrl-names = "default";
229*0ce1d346SSamuel Holland	status = "okay";
230*0ce1d346SSamuel Holland
231*0ce1d346SSamuel Holland	bluetooth {
232*0ce1d346SSamuel Holland		compatible = "brcm,bcm4345c5";
233*0ce1d346SSamuel Holland		interrupt-parent = <&pio>;
234*0ce1d346SSamuel Holland		interrupts = <6 17 IRQ_TYPE_LEVEL_HIGH>; /* PG17/GPIO6 */
235*0ce1d346SSamuel Holland		device-wakeup-gpios = <&pio 6 16 GPIO_ACTIVE_HIGH>; /* PG16/GPIO7 */
236*0ce1d346SSamuel Holland		shutdown-gpios = <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18/GPIO5 */
237*0ce1d346SSamuel Holland		max-speed = <1500000>;
238*0ce1d346SSamuel Holland		vbat-supply = <&reg_dldo1>;
239*0ce1d346SSamuel Holland		vddio-supply = <&reg_aldo3>;
240*0ce1d346SSamuel Holland	};
241*0ce1d346SSamuel Holland};
242*0ce1d346SSamuel Holland
243*0ce1d346SSamuel Holland&usb_otg {
244*0ce1d346SSamuel Holland	dr_mode = "peripheral";
245*0ce1d346SSamuel Holland	status = "okay";
246*0ce1d346SSamuel Holland};
247*0ce1d346SSamuel Holland
248*0ce1d346SSamuel Holland&usbphy {
249*0ce1d346SSamuel Holland	usb0_vbus_power-supply = <&ac_power_supply>;
250*0ce1d346SSamuel Holland	usb1_vbus-supply = <&reg_vcc>;
251*0ce1d346SSamuel Holland	status = "okay";
252*0ce1d346SSamuel Holland};
253