The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
PMIC, enable the fuelgauge and charger for now.
Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
.../boot/dts/qcom/sm8450-samsung-r0q.dts | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index 7bf56564dfc6..c1b0b21c0ec5 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -14,6 +14,16 @@ / {
compatible = "samsung,r0q", "qcom,sm8450";
chassis-type = "handset";
+ battery: battery {
+ compatible = "simple-battery";
+
+ constant-charge-current-max-microamp = <2150000>;
+ charge-full-design-microamp-hours = <3700000>;
+ over-voltage-threshold-microvolt = <4500000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4350000>;
+ };
+
chosen {
#address-cells = <2>;
#size-cells = <2>;
@@ -186,6 +196,26 @@ vreg_l11c_3p0: ldo11 {
};
};
+&i2c5 {
+ status = "okay";
+
+ max77705_charger: charger@69 {
+ compatible = "maxim,max77705-charger";
+ reg = <0x69>;
+ monitored-battery = <&battery>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ fuel-gauge@36 {
+ reg = <0x36>;
+ compatible = "maxim,max77705-battery";
+ power-supplies = <&max77705_charger>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
&pm8350_gpios {
vol_up_n: vol-up-n-state {
pins = "gpio6";
@@ -345,3 +375,7 @@ &usb_1_hsphy {
status = "okay";
};
+
+&qupv3_id_0 {
+ status = "okay";
+};
--
2.51.0
On 9/20/25 3:46 AM, Eric Gonçalves wrote:
> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
> PMIC, enable the fuelgauge and charger for now.
>
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
[...]
> +&i2c5 {
> + status = "okay";
> +
> + max77705_charger: charger@69 {
> + compatible = "maxim,max77705-charger";
> + reg = <0x69>;
Please use tabs consistently
> + monitored-battery = <&battery>;
> + interrupt-parent = <&tlmm>;
> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
interrupts-extended = <&tlmm 5 IRQ...>, here and below
> + };
> +
> + fuel-gauge@36 {
> + reg = <0x36>;
sorting by unit address is welcome
> + compatible = "maxim,max77705-battery";
> + power-supplies = <&max77705_charger>;
> + interrupt-parent = <&tlmm>;
> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> + };
These nodes should be children of "maxim,max77705"
(see drivers/mfd/max77705.c)
Konrad
On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>> PMIC, enable the fuelgauge and charger for now.
>>
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>
>[...]
>
>> +&i2c5 {
>> + status = "okay";
>> +
>> + max77705_charger: charger@69 {
>> + compatible = "maxim,max77705-charger";
>> + reg = <0x69>;
>
>Please use tabs consistently
Sure
>
>> + monitored-battery = <&battery>;
>> + interrupt-parent = <&tlmm>;
>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>
>interrupts-extended = <&tlmm 5 IRQ...>, here and below
why extended?
>
>> + };
>> +
>> + fuel-gauge@36 {
>> + reg = <0x36>;
>
>sorting by unit address is welcome
Sure
>
>> + compatible = "maxim,max77705-battery";
>> + power-supplies = <&max77705_charger>;
>> + interrupt-parent = <&tlmm>;
>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>> + };
>
>These nodes should be children of "maxim,max77705"
>(see drivers/mfd/max77705.c)
What do you mean by this? I looked at the driver,
should I add the pmic@66 node and put
the units inside of it? Because starqltechn doesn't do that and
places them outside. Also, by adding the
pmic@66
node it expects to have led/haptics nodes as well.
>
>Konrad
On 9/26/25 4:19 AM, Eric Gonçalves wrote:
>
>
> On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>>> PMIC, enable the fuelgauge and charger for now.
>>>
>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>> ---
>>
>> [...]
>>
>>> +&i2c5 {
>>> + status = "okay";
>>> +
>>> + max77705_charger: charger@69 {
>>> + compatible = "maxim,max77705-charger";
>>> + reg = <0x69>;
>>
>> Please use tabs consistently
> Sure
>>
>>> + monitored-battery = <&battery>;
>>> + interrupt-parent = <&tlmm>;
>>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>
>> interrupts-extended = <&tlmm 5 IRQ...>, here and below
> why extended?
>>
>>> + };
>>> +
>>> + fuel-gauge@36 {
>>> + reg = <0x36>;
>>
>> sorting by unit address is welcome
> Sure
>>
>>> + compatible = "maxim,max77705-battery";
>>> + power-supplies = <&max77705_charger>;
>>> + interrupt-parent = <&tlmm>;
>>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>> + };
>>
>> These nodes should be children of "maxim,max77705"
>> (see drivers/mfd/max77705.c)
> What do you mean by this? I looked at the driver,
> should I add the pmic@66 node and put
> the units inside of it? Because starqltechn doesn't do that and
> places them outside. Also, by adding the
> pmic@66
> node it expects to have led/haptics nodes as well.
Well, the chip comes as a single package, so this only makes sense
and the bindings (mfd/maxim,max77705.yaml) corroborate that.
Just looking at the YAML, you should be able to omit the LED part
if it's not connected anywhere
Konrad
On October 8, 2025 5:34:00 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/26/25 4:19 AM, Eric Gonçalves wrote:
>>
>>
>> On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>>>> PMIC, enable the fuelgauge and charger for now.
>>>>
>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>> ---
>>>
>>> [...]
>>>
>>>> +&i2c5 {
>>>> + status = "okay";
>>>> +
>>>> + max77705_charger: charger@69 {
>>>> + compatible = "maxim,max77705-charger";
>>>> + reg = <0x69>;
>>>
>>> Please use tabs consistently
>> Sure
>>>
>>>> + monitored-battery = <&battery>;
>>>> + interrupt-parent = <&tlmm>;
>>>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>
>>> interrupts-extended = <&tlmm 5 IRQ...>, here and below
>> why extended?
>>>
>>>> + };
>>>> +
>>>> + fuel-gauge@36 {
>>>> + reg = <0x36>;
>>>
>>> sorting by unit address is welcome
>> Sure
>>>
>>>> + compatible = "maxim,max77705-battery";
>>>> + power-supplies = <&max77705_charger>;
>>>> + interrupt-parent = <&tlmm>;
>>>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>> + };
>>>
>>> These nodes should be children of "maxim,max77705"
>>> (see drivers/mfd/max77705.c)
>> What do you mean by this? I looked at the driver,
>> should I add the pmic@66 node and put
>> the units inside of it? Because starqltechn doesn't do that and
>> places them outside. Also, by adding the
>> pmic@66
>> node it expects to have led/haptics nodes as well.
>
>Well, the chip comes as a single package, so this only makes sense
>and the bindings (mfd/maxim,max77705.yaml) corroborate that.
>
>Just looking at the YAML, you should be able to omit the LED part
>if it's not connected anywhere
Well, looking at power/supply/maxim,max77705.yaml shows
that this is how it's meant to be defined, (outside the
maxim,max77705 node), no?
>
>Konrad
On 10/9/25 10:31 PM, Eric Gonçalves wrote:
>
>
> On October 8, 2025 5:34:00 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/26/25 4:19 AM, Eric Gonçalves wrote:
>>>
>>>
>>> On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>>>>> PMIC, enable the fuelgauge and charger for now.
>>>>>
>>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>>> ---
>>>>
>>>> [...]
>>>>
>>>>> +&i2c5 {
>>>>> + status = "okay";
>>>>> +
>>>>> + max77705_charger: charger@69 {
>>>>> + compatible = "maxim,max77705-charger";
>>>>> + reg = <0x69>;
>>>>
>>>> Please use tabs consistently
>>> Sure
>>>>
>>>>> + monitored-battery = <&battery>;
>>>>> + interrupt-parent = <&tlmm>;
>>>>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>>
>>>> interrupts-extended = <&tlmm 5 IRQ...>, here and below
>>> why extended?
>>>>
>>>>> + };
>>>>> +
>>>>> + fuel-gauge@36 {
>>>>> + reg = <0x36>;
>>>>
>>>> sorting by unit address is welcome
>>> Sure
>>>>
>>>>> + compatible = "maxim,max77705-battery";
>>>>> + power-supplies = <&max77705_charger>;
>>>>> + interrupt-parent = <&tlmm>;
>>>>> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>>> + };
>>>>
>>>> These nodes should be children of "maxim,max77705"
>>>> (see drivers/mfd/max77705.c)
>>> What do you mean by this? I looked at the driver,
>>> should I add the pmic@66 node and put
>>> the units inside of it? Because starqltechn doesn't do that and
>>> places them outside. Also, by adding the
>>> pmic@66
>>> node it expects to have led/haptics nodes as well.
>>
>> Well, the chip comes as a single package, so this only makes sense
>> and the bindings (mfd/maxim,max77705.yaml) corroborate that.
>>
>> Just looking at the YAML, you should be able to omit the LED part
>> if it's not connected anywhere
> Well, looking at power/supply/maxim,max77705.yaml shows
> that this is how it's meant to be defined, (outside the
> maxim,max77705 node), no?
If you grep for maxim,max77705-charger, you'll notice that the MFD
driver defines a MFD_CELL_OF
So it's reasonable to assume the bindings example is simply not making
this obvious
Konrad
© 2016 - 2026 Red Hat, Inc.