[PATCH] power: supply: mt6360_charger: Set the input voltage limit in CHG_CTRL6
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Wed Nov 18 08:23:24 PST 2026
On 11/7/26 12:09, Rui Cao via B4 Relay wrote:
> From: Rui Cao <i at udp0.com>
>
> 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 at vger.kernel.org
> Signed-off-by: Rui Cao <i at udp0.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
More information about the Linux-mediatek
mailing list