* [PATCH] regulator: mt6358: fix MT6366 VDRAM2 vosel_mask
@ 2026-11-25 23:48 Ilia Snezhkov via B4 Relay
2026-11-26 6:18 ` Chen-Yu Tsai
0 siblings, 1 reply; 2+ messages in thread
From: Ilia Snezhkov via B4 Relay @ 2026-11-25 23:48 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, matthias.bgg, angelogioacchino.delregno,
linux-mediatek, linux-arm-kernel, linux-kernel
From: Ilia Snezhkov <iasnezhkov@gmail.com>
mt6366_regulators[] declares VDRAM2 with vosel_mask = 0x10 (a single
bit, bit 4) on MT6358_LDO_VDRAM2_ELR0, even though vdram2_selectors[]
uses values { 0, 12 } (0x0 and 0xc) which live in bits 3:0.
MT6358 in the same file (mt6358_regulators[]) and MediaTek's downstream
MT6358/MT6366 regulator driver both use vosel_mask = 0xf on
MT6358_LDO_VDRAM2_ELR0.
Change MT6366 VDRAM2 vosel_mask from 0x10 to 0xf.
Found and drafted with an AI coding assistant while auditing MT6366.
Fixes: f0e3c6261af1 ("regulator: mt6366: Add support for MT6366 regulator")
Signed-off-by: Ilia Snezhkov <iasnezhkov@gmail.com>
---
drivers/regulator/mt6358-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index d6a0ec4..1d62c25 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -604,7 +604,7 @@ static const struct mt6358_regulator_info mt6366_regulators[] = {
MT6366_REG_FIXED("vrf18", VRF18, "vs1-ldo1", MT6358_LDO_VRF18_CON0, 0, 1800000),
MT6366_REG_FIXED("vaud28", VAUD28, "vsys-ldo1", MT6358_LDO_VAUD28_CON0, 0, 2800000),
MT6366_LDO("vdram2", VDRAM2, vdram2, "vs2-ldo1",
- MT6358_LDO_VDRAM2_CON0, 0, MT6358_LDO_VDRAM2_ELR0, 0x10),
+ MT6358_LDO_VDRAM2_CON0, 0, MT6358_LDO_VDRAM2_ELR0, 0xf),
MT6366_LDO("vsim1", VSIM1, vsim, "vsys-ldo1",
MT6358_LDO_VSIM1_CON0, 0, MT6358_VSIM1_ANA_CON0, 0xf00),
MT6366_LDO("vibr", VIBR, vibr, "vsys-ldo3",
--
2.54.0 (Apple Git-157)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] regulator: mt6358: fix MT6366 VDRAM2 vosel_mask
2026-11-25 23:48 [PATCH] regulator: mt6358: fix MT6366 VDRAM2 vosel_mask Ilia Snezhkov via B4 Relay
@ 2026-11-26 6:18 ` Chen-Yu Tsai
0 siblings, 0 replies; 2+ messages in thread
From: Chen-Yu Tsai @ 2026-11-26 6:18 UTC (permalink / raw)
To: iasnezhkov
Cc: broonie, lgirdwood, matthias.bgg, angelogioacchino.delregno,
linux-mediatek, linux-arm-kernel, linux-kernel
On Thu, Nov 26, 2026 at 7:48 AM Ilia Snezhkov via B4 Relay
<devnull+iasnezhkov.gmail.com@kernel.org> wrote:
>
> From: Ilia Snezhkov <iasnezhkov@gmail.com>
>
> mt6366_regulators[] declares VDRAM2 with vosel_mask = 0x10 (a single
> bit, bit 4) on MT6358_LDO_VDRAM2_ELR0, even though vdram2_selectors[]
> uses values { 0, 12 } (0x0 and 0xc) which live in bits 3:0.
>
> MT6358 in the same file (mt6358_regulators[]) and MediaTek's downstream
> MT6358/MT6366 regulator driver both use vosel_mask = 0xf on
> MT6358_LDO_VDRAM2_ELR0.
>
> Change MT6366 VDRAM2 vosel_mask from 0x10 to 0xf.
>
> Found and drafted with an AI coding assistant while auditing MT6366.
>
> Fixes: f0e3c6261af1 ("regulator: mt6366: Add support for MT6366 regulator")
> Signed-off-by: Ilia Snezhkov <iasnezhkov@gmail.com>
Unfortunately the datasheet does not include these registers, but I think
it makes sense that the mask should match that for the MT6358.
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> drivers/regulator/mt6358-regulator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
> index d6a0ec4..1d62c25 100644
> --- a/drivers/regulator/mt6358-regulator.c
> +++ b/drivers/regulator/mt6358-regulator.c
> @@ -604,7 +604,7 @@ static const struct mt6358_regulator_info mt6366_regulators[] = {
> MT6366_REG_FIXED("vrf18", VRF18, "vs1-ldo1", MT6358_LDO_VRF18_CON0, 0, 1800000),
> MT6366_REG_FIXED("vaud28", VAUD28, "vsys-ldo1", MT6358_LDO_VAUD28_CON0, 0, 2800000),
> MT6366_LDO("vdram2", VDRAM2, vdram2, "vs2-ldo1",
> - MT6358_LDO_VDRAM2_CON0, 0, MT6358_LDO_VDRAM2_ELR0, 0x10),
> + MT6358_LDO_VDRAM2_CON0, 0, MT6358_LDO_VDRAM2_ELR0, 0xf),
> MT6366_LDO("vsim1", VSIM1, vsim, "vsys-ldo1",
> MT6358_LDO_VSIM1_CON0, 0, MT6358_VSIM1_ANA_CON0, 0xf00),
> MT6366_LDO("vibr", VIBR, vibr, "vsys-ldo3",
> --
> 2.54.0 (Apple Git-157)
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-26 6:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 23:48 [PATCH] regulator: mt6358: fix MT6366 VDRAM2 vosel_mask Ilia Snezhkov via B4 Relay
2026-11-26 6:18 ` Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox