diff mbox series

[06/11] imx: ventana: put PFUZ100 regulators in continuous mode

Message ID 20210611194628.5572-6-tharvey@gateworks.com
State Accepted
Commit 722d22813e1b79231451059a823d777e2c0867e7
Delegated to: Stefano Babic
Headers show
Series [01/11] imx: ventana: remove USB_KEYBOARD support | expand

Commit Message

Tim Harvey June 11, 2021, 7:46 p.m. UTC
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 | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Comments

Stefano Babic July 10, 2021, 3:53 p.m. UTC | #1
> 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
Stefano Babic July 10, 2021, 7:36 p.m. UTC | #2
> 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 9f5f20f781..b5a0162c5e 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -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 */