]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: ventana: put PFUZ100 regulators in continuous mode
authorTim Harvey <tharvey@gateworks.com>
Fri, 11 Jun 2021 19:46:23 +0000 (12:46 -0700)
committerStefano Babic <sbabic@denx.de>
Sat, 10 Jul 2021 14:53:33 +0000 (16:53 +0200)
In the default 'auto' mode regulators that are very lightly loaded
can be put in PFM mode and fail to regulator properly. Switching them
to always use continuous PWM mode has a neglibable affect on system
power and garuntees proper regulation under lightly loaded circumstances.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/gw_ventana/common.c

index 9f5f20f781f330b7071936f87c90d43ba8b0714a..b5a0162c5ecfd84c3d0c8931d070798e8519694d 100644 (file)
@@ -1596,6 +1596,32 @@ void setup_pmic(void)
                                pmic_reg_write(p, PFUZE100_VGEN6VOL, reg);
                        }
                }
+
+               /* put all switchers in continuous mode */
+               pmic_reg_read(p, PFUZE100_SW1ABMODE, &reg);
+               reg &= ~(SW_MODE_MASK);
+               reg |= PWM_PWM;
+               pmic_reg_write(p, PFUZE100_SW1ABMODE, reg);
+
+               pmic_reg_read(p, PFUZE100_SW2MODE, &reg);
+               reg &= ~(SW_MODE_MASK);
+               reg |= PWM_PWM;
+               pmic_reg_write(p, PFUZE100_SW2MODE, reg);
+
+               pmic_reg_read(p, PFUZE100_SW3AMODE, &reg);
+               reg &= ~(SW_MODE_MASK);
+               reg |= PWM_PWM;
+               pmic_reg_write(p, PFUZE100_SW3AMODE, reg);
+
+               pmic_reg_read(p, PFUZE100_SW3BMODE, &reg);
+               reg &= ~(SW_MODE_MASK);
+               reg |= PWM_PWM;
+               pmic_reg_write(p, PFUZE100_SW3BMODE, reg);
+
+               pmic_reg_read(p, PFUZE100_SW4MODE, &reg);
+               reg &= ~(SW_MODE_MASK);
+               reg |= PWM_PWM;
+               pmic_reg_write(p, PFUZE100_SW4MODE, reg);
        }
 
        /* configure LTC3676 PMIC */