Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-samsung-a2015: Add PMIC and charger
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
wonderfulShrineMaidenOfParadise authored and stephan-gh committed Dec 3, 2023
1 parent cbf3565 commit f22defe
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 1 deletion.
59 changes: 58 additions & 1 deletion arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
};
};

battery: battery {
compatible = "simple-battery";
precharge-current-microamp = <450000>;
precharge-upper-limit-microvolt = <3500000>;
};

clk_pwm: pwm {
compatible = "clk-pwm";
#pwm-cells = <2>;
Expand Down Expand Up @@ -128,6 +134,12 @@

pinctrl-names = "default";
pinctrl-0 = <&muic_int_default>;

usb_con: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};
};

Expand Down Expand Up @@ -239,14 +251,52 @@
&blsp_i2c4 {
status = "okay";

battery@35 {
fuel-gauge@35 {
compatible = "richtek,rt5033-battery";
reg = <0x35>;
interrupt-parent = <&tlmm>;
interrupts = <121 IRQ_TYPE_EDGE_BOTH>;

pinctrl-names = "default";
pinctrl-0 = <&fg_alert_default>;

power-supplies = <&charger>;
};
};

&blsp_i2c6 {
status = "okay";

pmic@34 {
compatible = "richtek,rt5033";
reg = <0x34>;

interrupts-extended = <&tlmm 62 IRQ_TYPE_EDGE_FALLING>;

pinctrl-0 = <&pmic_int_default>;
pinctrl-names = "default";

regulators {
rt5033_reg_safe_ldo: SAFE_LDO {
regulator-min-microvolt = <4900000>;
regulator-max-microvolt = <4900000>;
regulator-always-on;
};

/*
* Needed for camera, but not used yet.
* Define empty nodes to allow disabling the unused
* regulators.
*/
LDO {};
BUCK {};
};

charger: charger {
compatible = "richtek,rt5033-charger";
monitored-battery = <&battery>;
richtek,usb-connector = <&usb_con>;
};
};
};

Expand Down Expand Up @@ -488,6 +538,13 @@
bias-disable;
};

pmic_int_default: pmic-int-default-state {
pins = "gpio62";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

sdc2_cd_default: sdc2-cd-default-state {
pins = "gpio38";
function = "gpio";
Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
"0", "0", "1";
};

&battery {
charge-term-current-microamp = <150000>;
constant-charge-current-max-microamp = <1000000>;
constant-charge-voltage-max-microvolt = <4350000>;
};

&blsp_i2c5 {
status = "okay";

Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
"0", "0", "1";
};

&battery {
charge-term-current-microamp = <200000>;
constant-charge-current-max-microamp = <1500000>;
constant-charge-voltage-max-microvolt = <4350000>;
};

&blsp_i2c5 {
status = "okay";

Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@

pinctrl-names = "default";
pinctrl-0 = <&muic_int_default>;

usb_con: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};
};

Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
chassis-type = "handset";
};

&battery {
charge-term-current-microamp = <200000>;
constant-charge-current-max-microamp = <1500000>;
constant-charge-voltage-max-microvolt = <4350000>;
};

&blsp_i2c5 {
status = "okay";

Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
};
};

&battery {
charge-term-current-microamp = <200000>;
constant-charge-current-max-microamp = <1500000>;
constant-charge-voltage-max-microvolt = <4350000>;
};

&blsp_i2c5 {
status = "okay";

Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
};
};

&battery {
charge-term-current-microamp = <150000>;
constant-charge-current-max-microamp = <1000000>;
constant-charge-voltage-max-microvolt = <4400000>;
};

&blsp_i2c5 {
status = "okay";

Expand Down

0 comments on commit f22defe

Please sign in to comment.