Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-samsung-fortuna: 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 Ace 4
- Samsung Galaxy Core Prime LTE
- Samsung Galaxy Grand Prime

Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
  • Loading branch information
wonderfulShrineMaidenOfParadise authored and stephan-gh committed Sep 18, 2023
1 parent b139dbe commit 638ccf5
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 1 deletion.
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-cprime-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
pinctrl-0 = <&muic_int_default>;
pinctrl-names = "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-cprime.dts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
chassis-type = "handset";
};

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

&blsp_i2c5 {
status = "okay";

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

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

&mpss_mem {
reg = <0x0 0x86800000 0x0 0x5000000>;
};
Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
};
};

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

/* On fortunaltezt backlight is controlled with MIPI DCS commands */
&clk_pwm {
status = "disabled";
Expand Down
59 changes: 58 additions & 1 deletion arch/arm64/boot/dts/qcom/msm8916-samsung-gprime-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
};
};

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

clk_pwm_backlight: backlight {
compatible = "pwm-backlight";
pwms = <&clk_pwm 0 100000>;
Expand Down Expand Up @@ -158,6 +164,12 @@
interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
pinctrl-0 = <&muic_int_default>;
pinctrl-names = "default";

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

Expand Down Expand Up @@ -237,7 +249,7 @@
&blsp_i2c4 {
status = "okay";

battery@35 {
fuel-gauge@35 {
compatible = "richtek,rt5033-battery";
reg = <0x35>;

Expand All @@ -246,6 +258,8 @@

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

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

Expand All @@ -272,6 +286,42 @@
};
};

&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>;
};
};
};

&blsp_uart2 {
status = "okay";
};
Expand Down Expand Up @@ -485,6 +535,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
45 changes: 45 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@
};
};

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

&blsp_i2c6 {
status = "okay";

/* pmic@34 is on i2c_nfc instead */
/delete-node/ pmic@34;

nfc@27 {
compatible = "samsung,s3fwrn5-i2c";
reg = <0x27>;
Expand All @@ -46,6 +55,42 @@
status = "okay";
};

&i2c_nfc {
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>;
};
};
};

&mpss_mem {
reg = <0x0 0x86800000 0x0 0x5400000>;
};
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
chassis-type = "handset";
};

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

&mpss_mem {
reg = <0x0 0x86800000 0x0 0x5000000>;
};
Expand Down

0 comments on commit 638ccf5

Please sign in to comment.