Skip to content

Commit bb004c4

Browse files
arm64: dts: qcom: msm8916-samsung-a2015: Add PMIC and charger
The phones listed below have Richtek RT5033 PMIC and charger. Add them to the device trees. - Samsung Galaxy A3/A5 2015 - Samsung Galaxy E5/E7 - Samsung Galaxy Grand Max Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
1 parent 5835808 commit bb004c4

File tree

7 files changed

+94
-1
lines changed

7 files changed

+94
-1
lines changed

arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
};
2929
};
3030

31+
battery: battery {
32+
compatible = "simple-battery";
33+
precharge-current-microamp = <450000>;
34+
precharge-upper-limit-microvolt = <3500000>;
35+
};
36+
3137
clk_pwm: pwm {
3238
compatible = "clk-pwm";
3339
#pwm-cells = <2>;
@@ -128,6 +134,12 @@
128134

129135
pinctrl-names = "default";
130136
pinctrl-0 = <&muic_int_default>;
137+
138+
usb_con: connector {
139+
compatible = "usb-b-connector";
140+
label = "micro-USB";
141+
type = "micro";
142+
};
131143
};
132144
};
133145

@@ -239,14 +251,52 @@
239251
&blsp_i2c4 {
240252
status = "okay";
241253

242-
battery@35 {
254+
fuel-gauge@35 {
243255
compatible = "richtek,rt5033-battery";
244256
reg = <0x35>;
245257
interrupt-parent = <&tlmm>;
246258
interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
247259

248260
pinctrl-names = "default";
249261
pinctrl-0 = <&fg_alert_default>;
262+
263+
power-supplies = <&charger>;
264+
};
265+
};
266+
267+
&blsp_i2c6 {
268+
status = "okay";
269+
270+
pmic@34 {
271+
compatible = "richtek,rt5033";
272+
reg = <0x34>;
273+
274+
interrupts-extended = <&tlmm 62 IRQ_TYPE_EDGE_FALLING>;
275+
276+
pinctrl-0 = <&pmic_int_default>;
277+
pinctrl-names = "default";
278+
279+
regulators {
280+
rt5033_reg_safe_ldo: SAFE_LDO {
281+
regulator-min-microvolt = <4900000>;
282+
regulator-max-microvolt = <4900000>;
283+
regulator-always-on;
284+
};
285+
286+
/*
287+
* Needed for camera, but not used yet.
288+
* Define empty nodes to allow disabling the unused
289+
* regulators.
290+
*/
291+
LDO {};
292+
BUCK {};
293+
};
294+
295+
charger: charger {
296+
compatible = "richtek,rt5033-charger";
297+
monitored-battery = <&battery>;
298+
richtek,usb-connector = <&usb_con>;
299+
};
250300
};
251301
};
252302

@@ -488,6 +538,13 @@
488538
bias-disable;
489539
};
490540

541+
pmic_int_default: pmic-int-default-state {
542+
pins = "gpio62";
543+
function = "gpio";
544+
drive-strength = <2>;
545+
bias-disable;
546+
};
547+
491548
sdc2_cd_default: sdc2-cd-default-state {
492549
pins = "gpio38";
493550
function = "gpio";

arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
"0", "0", "1";
5656
};
5757

58+
&battery {
59+
charge-term-current-microamp = <150000>;
60+
constant-charge-current-max-microamp = <1000000>;
61+
constant-charge-voltage-max-microvolt = <4350000>;
62+
};
63+
5864
&blsp_i2c5 {
5965
status = "okay";
6066

arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@
5353
"0", "0", "1";
5454
};
5555

56+
&battery {
57+
charge-term-current-microamp = <200000>;
58+
constant-charge-current-max-microamp = <1500000>;
59+
constant-charge-voltage-max-microvolt = <4350000>;
60+
};
61+
5662
&blsp_i2c5 {
5763
status = "okay";
5864

arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323

2424
pinctrl-names = "default";
2525
pinctrl-0 = <&muic_int_default>;
26+
27+
usb_con: connector {
28+
compatible = "usb-b-connector";
29+
label = "micro-USB";
30+
type = "micro";
31+
};
2632
};
2733
};
2834

arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
chassis-type = "handset";
2424
};
2525

26+
&battery {
27+
charge-term-current-microamp = <200000>;
28+
constant-charge-current-max-microamp = <1500000>;
29+
constant-charge-voltage-max-microvolt = <4350000>;
30+
};
31+
2632
&blsp_i2c5 {
2733
status = "okay";
2834

arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
};
6161
};
6262

63+
&battery {
64+
charge-term-current-microamp = <200000>;
65+
constant-charge-current-max-microamp = <1500000>;
66+
constant-charge-voltage-max-microvolt = <4350000>;
67+
};
68+
6369
&blsp_i2c5 {
6470
status = "okay";
6571

arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
};
8181
};
8282

83+
&battery {
84+
charge-term-current-microamp = <150000>;
85+
constant-charge-current-max-microamp = <1000000>;
86+
constant-charge-voltage-max-microvolt = <4400000>;
87+
};
88+
8389
&blsp_i2c5 {
8490
status = "okay";
8591

0 commit comments

Comments
 (0)