From 05ed964d755ee1967640e63f8bef63e345725d05 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 9 Mar 2017 17:17:53 -0800 Subject: [PATCH] colibri_imx7: setup PMIC sleep mode configuration Disable 3.3V Ethernet and ARM rail when entering sleep mode. Signed-off-by: Stefan Agner --- board/toradex/colibri_imx7/colibri_imx7.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index c03bde168a..a106b3bed3 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -373,6 +373,22 @@ int power_init_board(void) /* set judge and press timer of N_OE to minimal values */ pmic_clrsetbits(dev, RN5T567_NOETIMSETCNT, 0x7, 0); + /* configure sleep slot for 3.3V Ethernet */ + reg = pmic_reg_read(dev, RN5T567_LDO1_SLOT); + reg = (reg & 0xf0) | reg >> 4; + pmic_reg_write(dev, RN5T567_LDO1_SLOT, reg); + + /* disable DCDC2 discharge to avoid backfeeding through VFB2 */ + pmic_clrsetbits(dev, RN5T567_DC2CTL, 0x2, 0); + + /* configure sleep slot for ARM rail */ + reg = pmic_reg_read(dev, RN5T567_DC2_SLOT); + reg = (reg & 0xf0) | reg >> 4; + pmic_reg_write(dev, RN5T567_DC2_SLOT, reg); + + /* disable LDO2 discharge to avoid backfeeding from +V3.3_SD */ + pmic_clrsetbits(dev, RN5T567_LDODIS1, 0x2, 0); + return 0; } -- 2.39.5