Re: [PATCH] power: supply: mt6360_charger: Set the input voltage limit in CHG_CTRL6
From: AngeloGioacchino Del Regno
Date: Wed Nov 18 2026 - 11:23:45 EST
On 11/7/26 12:09, Rui Cao via B4 Relay wrote:
From: Rui Cao <i@xxxxxxxx>
mt6360_charger_set_mivr() updates the MIVR field (bits 7:1) of
CHG_CTRL3, but MIVR lives in CHG_CTRL6, where mt6360_charger_get_mivr()
reads it and MediaTek's own MT6360 charger driver writes it. CHG_CTRL3
holds the input current limit (AICR, bits 7:2) instead.
Writing input_voltage_limit therefore never changed the voltage limit
and replaced the input current limit with the MIVR selector: 4.5 V, for
example, set AICR to 250 mA.
Write the MIVR field of CHG_CTRL6.
Tested on a Redmi Note 13 5G (MT6833 with an MT6360): with this change,
writing 4.6 V to input_voltage_limit only moves CHG_CTRL6 from 0x0d to
0x0f and reads back as 4.6 V, while CHG_CTRL3 stays at 0x72 and
input_current_limit at 1.5 A.
Fixes: 0402e8ebb8b8 ("power: supply: mt6360_charger: add MT6360 charger support")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Rui Cao <i@xxxxxxxx>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>