regulator: mt6358: fix MT6366 VDRAM2 vosel_mask
Subsystems (2)
PATCH 1/1 regulator: mt6358: fix MT6366 VDRAM2 vosel_mask
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.
--- drivers/regulator/mt6358-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/mt6358-regulator.c +1 -1
@@ -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",
Signature · 1 line
2.54.0 (Apple Git-157)
Quoted 11 lines · On Thu, Nov 26, 2026 at 7:48 AM Ilia Snezhkov via B4 Relay…
From: Ilia Snezhkov <[email protected]>
mt6366_regulators[] declares VDRAM2 with
vosel_mask=0x10(a single bit, bit 4) onMT6358_LDO_VDRAM2_ELR0, even though vdram2_selectors[] uses values { 0, 12 } (0x0and0xc) 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=0xfonMT6358_LDO_VDRAM2_ELR0.
Quoted 6 lines
Change MT6366 VDRAM2
vosel_maskfrom0x10to0xf.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 <[email protected]>
Unfortunately the datasheet does not include these registers, but I think it makes sense that the mask should match that for the MT6358.
Quoted 23 lines
--- drivers/regulator/mt6358-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/regulator/mt6358-regulator.c +1
-2@@ -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)