diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-03-02 13:45:10 -0800 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-03-21 13:45:30 -0700 |
commit | cedf55d098b4b0af2815c92ee40576a4c899fcfb (patch) | |
tree | 8eec804c7ce3e885f22011b32384e342cfe139fb | |
parent | c77a50386f672d6846df1a20295129fb66044779 (diff) |
colibri_imx7: setup PMIC sleep mode configuration
Disable 3.3V Ethernet and ARM rail when entering sleep mode.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | board/toradex/colibri_imx7/colibri_imx7.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 7ac376e4e31..9f831671e04 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -372,6 +372,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; } |