Skip to content

Commit 2730766

Browse files
wensmripard
authored andcommitted
ARM: dts: sun8i: a83t: cubietruck-plus: Add AXP818 regulator nodes
This patch adds device nodes for all the regulators of the AXP818 PMIC. Sunxi common regulators are removed, and USB VBUS regulators are added. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
1 parent 11a5176 commit 2730766

File tree

1 file changed

+155
-12
lines changed

1 file changed

+155
-12
lines changed

arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts

Lines changed: 155 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
/dts-v1/;
4646
#include "sun8i-a83t.dtsi"
47-
#include "sunxi-common-regulators.dtsi"
4847

4948
#include <dt-bindings/gpio/gpio.h>
5049

@@ -95,6 +94,26 @@
9594
refclk-frequency = <19200000>;
9695
};
9796

97+
reg_usb1_vbus: reg-usb1-vbus {
98+
compatible = "regulator-fixed";
99+
regulator-name = "usb1-vbus";
100+
regulator-min-microvolt = <5000000>;
101+
regulator-max-microvolt = <5000000>;
102+
regulator-boot-on;
103+
enable-active-high;
104+
gpio = <&pio 3 29 GPIO_ACTIVE_HIGH>; /* PD29 */
105+
};
106+
107+
reg_usb2_vbus: reg-usb2-vbus {
108+
compatible = "regulator-fixed";
109+
regulator-name = "usb2-vbus";
110+
regulator-min-microvolt = <5000000>;
111+
regulator-max-microvolt = <5000000>;
112+
regulator-boot-on;
113+
enable-active-high;
114+
gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
115+
};
116+
98117
sound {
99118
compatible = "simple-audio-card";
100119
simple-audio-card,name = "On-board SPDIF";
@@ -127,7 +146,7 @@
127146
&mmc0 {
128147
pinctrl-names = "default";
129148
pinctrl-0 = <&mmc0_pins>;
130-
vmmc-supply = <&reg_vcc3v3>;
149+
vmmc-supply = <&reg_dcdc1>;
131150
bus-width = <4>;
132151
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
133152
cd-inverted;
@@ -137,7 +156,7 @@
137156
&mmc2 {
138157
pinctrl-names = "default";
139158
pinctrl-0 = <&mmc2_8bit_emmc_pins>;
140-
vmmc-supply = <&reg_vcc3v3>;
159+
vmmc-supply = <&reg_dcdc1>;
141160
bus-width = <8>;
142161
non-removable;
143162
cap-mmc-hw-reset;
@@ -152,6 +171,9 @@
152171
reg = <0x3a3>;
153172
interrupt-parent = <&r_intc>;
154173
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
174+
eldoin-supply = <&reg_dcdc1>;
175+
swin-supply = <&reg_dcdc1>;
176+
x-powers,drive-vbus-en;
155177
};
156178

157179
ac100: codec@e89 {
@@ -179,22 +201,143 @@
179201
};
180202
};
181203

182-
&reg_usb1_vbus {
183-
gpio = <&pio 3 29 GPIO_ACTIVE_HIGH>; /* PD29 */
184-
status = "okay";
204+
#include "axp81x.dtsi"
205+
206+
&reg_aldo1 {
207+
regulator-always-on;
208+
regulator-min-microvolt = <1800000>;
209+
regulator-max-microvolt = <1800000>;
210+
regulator-name = "vcc-1v8";
211+
};
212+
213+
&reg_aldo2 {
214+
regulator-always-on;
215+
regulator-min-microvolt = <1800000>;
216+
regulator-max-microvolt = <1800000>;
217+
regulator-name = "dram-pll";
218+
};
219+
220+
&reg_aldo3 {
221+
regulator-always-on;
222+
regulator-min-microvolt = <3000000>;
223+
regulator-max-microvolt = <3000000>;
224+
regulator-name = "avcc";
225+
};
226+
227+
&reg_dcdc1 {
228+
/*
229+
* The schematics say this should be 3.3V, but the FEX file says
230+
* it should be 3V. The latter makes sense, as the WiFi module's
231+
* I/O is indirectly powered from DCDC1, through SW. It is rated
232+
* at 2.98V maximum.
233+
*/
234+
regulator-always-on;
235+
regulator-min-microvolt = <3000000>;
236+
regulator-max-microvolt = <3000000>;
237+
regulator-name = "vcc-3v";
238+
};
239+
240+
&reg_dcdc2 {
241+
regulator-always-on;
242+
regulator-min-microvolt = <700000>;
243+
regulator-max-microvolt = <1100000>;
244+
regulator-name = "vdd-cpua";
245+
};
246+
247+
&reg_dcdc3 {
248+
regulator-always-on;
249+
regulator-min-microvolt = <700000>;
250+
regulator-max-microvolt = <1100000>;
251+
regulator-name = "vdd-cpub";
252+
};
253+
254+
&reg_dcdc4 {
255+
regulator-min-microvolt = <700000>;
256+
regulator-max-microvolt = <1100000>;
257+
regulator-name = "vdd-gpu";
185258
};
186259

187-
&reg_usb2_vbus {
188-
gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
260+
&reg_dcdc5 {
261+
regulator-always-on;
262+
regulator-min-microvolt = <1500000>;
263+
regulator-max-microvolt = <1500000>;
264+
regulator-name = "vcc-dram";
265+
};
266+
267+
&reg_dcdc6 {
268+
regulator-always-on;
269+
regulator-min-microvolt = <900000>;
270+
regulator-max-microvolt = <900000>;
271+
regulator-name = "vdd-sys";
272+
};
273+
274+
&reg_dldo2 {
275+
regulator-min-microvolt = <3300000>;
276+
regulator-max-microvolt = <3300000>;
277+
regulator-name = "dp-pwr";
278+
};
279+
280+
&reg_dldo3 {
281+
regulator-always-on;
282+
regulator-min-microvolt = <2500000>;
283+
regulator-max-microvolt = <2500000>;
284+
regulator-name = "ephy-io";
285+
};
286+
287+
&reg_dldo4 {
288+
/*
289+
* The PHY requires 20ms after all voltages are applied until core
290+
* logic is ready and 30ms after the reset pin is de-asserted.
291+
* Set a 100ms delay to account for PMIC ramp time and board traces.
292+
*/
293+
regulator-enable-ramp-delay = <100000>;
294+
regulator-min-microvolt = <3300000>;
295+
regulator-max-microvolt = <3300000>;
296+
regulator-name = "ephy";
297+
};
298+
299+
&reg_drivevbus {
300+
regulator-name = "usb0-vbus";
189301
status = "okay";
190302
};
191303

192-
&reg_vcc3v0 {
193-
status = "disabled";
304+
&reg_eldo1 {
305+
regulator-min-microvolt = <1200000>;
306+
regulator-max-microvolt = <1200000>;
307+
regulator-name = "dp-bridge-1";
308+
};
309+
310+
&reg_eldo2 {
311+
regulator-min-microvolt = <1200000>;
312+
regulator-max-microvolt = <1200000>;
313+
regulator-name = "dp-bridge-2";
314+
};
315+
316+
&reg_fldo1 {
317+
/* TODO should be handled by USB PHY */
318+
regulator-always-on;
319+
regulator-min-microvolt = <1080000>;
320+
regulator-max-microvolt = <1320000>;
321+
regulator-name = "vdd12-hsic";
322+
};
323+
324+
&reg_fldo2 {
325+
/*
326+
* Despite the embedded CPUs core not being used in any way,
327+
* this must remain on or the system will hang.
328+
*/
329+
regulator-always-on;
330+
regulator-min-microvolt = <700000>;
331+
regulator-max-microvolt = <1100000>;
332+
regulator-name = "vdd-cpus";
333+
};
334+
335+
&reg_rtc_ldo {
336+
regulator-name = "vcc-rtc";
194337
};
195338

196-
&reg_vcc5v0 {
197-
status = "disabled";
339+
&reg_sw {
340+
regulator-name = "vcc-wifi-io";
198341
};
199342

200343
&spdif {

0 commit comments

Comments
 (0)