]> git.sur5r.net Git - u-boot/commitdiff
colibri_imx7: setup PMIC sleep mode configuration
authorStefan Agner <stefan.agner@toradex.com>
Fri, 10 Mar 2017 01:17:53 +0000 (17:17 -0800)
committerStefano Babic <sbabic@denx.de>
Sun, 19 Mar 2017 16:29:24 +0000 (17:29 +0100)
Disable 3.3V Ethernet and ARM rail when entering sleep mode.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
board/toradex/colibri_imx7/colibri_imx7.c

index c03bde168a8287b0b7a9a38c01831a11a65aa7a7..a106b3bed3f808de9a866a0a04ca75e1cddbf39c 100644 (file)
@@ -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;
 }