Skip to content

Commit d7c5f68

Browse files
wensmripard
authored andcommitted
ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes
This patch adds device nodes for all the regulators of the AXP813 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 2730766 commit d7c5f68

File tree

1 file changed

+132
-9
lines changed

1 file changed

+132
-9
lines changed

arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

Lines changed: 132 additions & 9 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

@@ -59,6 +58,16 @@
5958
chosen {
6059
stdout-path = "serial0:115200n8";
6160
};
61+
62+
reg_usb1_vbus: reg-usb1-vbus {
63+
compatible = "regulator-fixed";
64+
regulator-name = "usb1-vbus";
65+
regulator-min-microvolt = <5000000>;
66+
regulator-max-microvolt = <5000000>;
67+
regulator-boot-on;
68+
enable-active-high;
69+
gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
70+
};
6271
};
6372

6473
&ehci0 {
@@ -71,7 +80,7 @@
7180
&mmc0 {
7281
pinctrl-names = "default";
7382
pinctrl-0 = <&mmc0_pins>;
74-
vmmc-supply = <&reg_vcc3v3>;
83+
vmmc-supply = <&reg_dcdc1>;
7584
bus-width = <4>;
7685
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
7786
cd-inverted;
@@ -81,7 +90,8 @@
8190
&mmc2 {
8291
pinctrl-names = "default";
8392
pinctrl-0 = <&mmc2_8bit_emmc_pins>;
84-
vmmc-supply = <&reg_vcc3v3>;
93+
vmmc-supply = <&reg_dcdc1>;
94+
vqmmc-supply = <&reg_dcdc1>;
8595
bus-width = <8>;
8696
non-removable;
8797
cap-mmc-hw-reset;
@@ -96,6 +106,10 @@
96106
reg = <0x3a3>;
97107
interrupt-parent = <&r_intc>;
98108
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
109+
eldoin-supply = <&reg_dcdc1>;
110+
fldoin-supply = <&reg_dcdc5>;
111+
swin-supply = <&reg_dcdc1>;
112+
x-powers,drive-vbus-en;
99113
};
100114

101115
ac100: codec@e89 {
@@ -123,17 +137,126 @@
123137
};
124138
};
125139

126-
&reg_usb1_vbus {
127-
gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
140+
#include "axp81x.dtsi"
141+
142+
&reg_aldo1 {
143+
regulator-always-on;
144+
regulator-min-microvolt = <1800000>;
145+
regulator-max-microvolt = <1800000>;
146+
regulator-name = "vcc-1v8";
147+
};
148+
149+
&reg_aldo2 {
150+
regulator-always-on;
151+
regulator-min-microvolt = <1800000>;
152+
regulator-max-microvolt = <1800000>;
153+
regulator-name = "dram-pll";
154+
};
155+
156+
&reg_aldo3 {
157+
regulator-always-on;
158+
regulator-min-microvolt = <3000000>;
159+
regulator-max-microvolt = <3000000>;
160+
regulator-name = "avcc";
161+
};
162+
163+
&reg_dcdc1 {
164+
/* schematics says 3.1V but FEX file says 3.3V */
165+
regulator-always-on;
166+
regulator-min-microvolt = <3300000>;
167+
regulator-max-microvolt = <3300000>;
168+
regulator-name = "vcc-3v3";
169+
};
170+
171+
&reg_dcdc2 {
172+
regulator-always-on;
173+
regulator-min-microvolt = <700000>;
174+
regulator-max-microvolt = <1100000>;
175+
regulator-name = "vdd-cpua";
176+
};
177+
178+
&reg_dcdc3 {
179+
regulator-always-on;
180+
regulator-min-microvolt = <700000>;
181+
regulator-max-microvolt = <1100000>;
182+
regulator-name = "vdd-cpub";
183+
};
184+
185+
&reg_dcdc4 {
186+
regulator-min-microvolt = <700000>;
187+
regulator-max-microvolt = <1100000>;
188+
regulator-name = "vdd-gpu";
189+
};
190+
191+
&reg_dcdc5 {
192+
regulator-always-on;
193+
regulator-min-microvolt = <1200000>;
194+
regulator-max-microvolt = <1200000>;
195+
regulator-name = "vcc-dram";
196+
};
197+
198+
&reg_dcdc6 {
199+
regulator-always-on;
200+
regulator-min-microvolt = <900000>;
201+
regulator-max-microvolt = <900000>;
202+
regulator-name = "vdd-sys";
203+
};
204+
205+
&reg_dldo1 {
206+
/*
207+
* This powers both the WiFi/BT module's main power, I/O supply,
208+
* and external pull-ups on all the data lines. It should be set
209+
* to the same voltage as the I/O supply (DCDC1 in this case) to
210+
* avoid any leakage or mismatch.
211+
*/
212+
regulator-min-microvolt = <3300000>;
213+
regulator-max-microvolt = <3300000>;
214+
regulator-name = "vcc-wifi";
215+
};
216+
217+
&reg_dldo3 {
218+
regulator-always-on;
219+
regulator-min-microvolt = <2500000>;
220+
regulator-max-microvolt = <2500000>;
221+
regulator-name = "vcc-pd";
222+
};
223+
224+
&reg_drivevbus {
225+
regulator-name = "usb0-vbus";
128226
status = "okay";
129227
};
130228

131-
&reg_vcc3v0 {
132-
status = "disabled";
229+
&reg_fldo1 {
230+
regulator-min-microvolt = <1080000>;
231+
regulator-max-microvolt = <1320000>;
232+
regulator-name = "vdd12-hsic";
233+
};
234+
235+
&reg_fldo2 {
236+
/*
237+
* Despite the embedded CPUs core not being used in any way,
238+
* this must remain on or the system will hang.
239+
*/
240+
regulator-always-on;
241+
regulator-min-microvolt = <700000>;
242+
regulator-max-microvolt = <1100000>;
243+
regulator-name = "vdd-cpus";
244+
};
245+
246+
&reg_rtc_ldo {
247+
regulator-name = "vcc-rtc";
133248
};
134249

135-
&reg_vcc5v0 {
136-
status = "disabled";
250+
&reg_sw {
251+
/*
252+
* The PHY requires 20ms after all voltages
253+
* are applied until core logic is ready and
254+
* 30ms after the reset pin is de-asserted.
255+
* Set a 100ms delay to account for PMIC
256+
* ramp time and board traces.
257+
*/
258+
regulator-enable-ramp-delay = <100000>;
259+
regulator-name = "vcc-ephy";
137260
};
138261

139262
&uart0 {

0 commit comments

Comments
 (0)