diff options
author | Robin Gong <b38343@freescale.com> | 2014-09-17 14:46:13 +0800 |
---|---|---|
committer | Robin Gong <b38343@freescale.com> | 2014-09-30 11:55:43 +0800 |
commit | e28661b64230b913978ea1090d7d744cc34ea1a7 (patch) | |
tree | 67f9e259e945b2228121154457a4397078fac3c9 /board | |
parent | 54ce83204fc1d52819dc5fc6b2c7d3e050df6158 (diff) | |
download | u-boot-imx-e28661b64230b913978ea1090d7d744cc34ea1a7.zip u-boot-imx-e28661b64230b913978ea1090d7d744cc34ea1a7.tar.gz u-boot-imx-e28661b64230b913978ea1090d7d744cc34ea1a7.tar.bz2 |
MLK-9640 ARM: imx6sx: enable ldo-bypass on mx6sxsabresd board
enable ldo-bypass check on all mx6sxsabresd boards.
Signed-off-by: Robin Gong <b38343@freescale.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c | 41 | ||||
-rw-r--r-- | board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c | 41 | ||||
-rw-r--r-- | board/freescale/mx6sxsabresd/mx6sxsabresd.c | 41 |
3 files changed, 108 insertions, 15 deletions
diff --git a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c index d1fdafc..cbb632a 100644 --- a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c +++ b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c @@ -715,32 +715,63 @@ static int setup_pmic_voltages(void) void ldo_mode_set(int ldo_bypass) { unsigned char value; + int is_400M; + u32 vddarm; /* swith to ldo_bypass mode */ if (ldo_bypass) { - /* decrease VDDARM to 1.15V */ + prep_anatop_bypass(); + /* decrease VDDARM to 1.275V */ if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { printf("Read SW1AB error!\n"); return; } value &= ~0x3f; - value |= PFUZE100_SW1ABC_SETP(11500); + value |= PFUZE100_SW1ABC_SETP(12750); if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { printf("Set SW1AB error!\n"); return; } - /* increase VDDSOC to 1.15V */ + /* decrease VDDSOC to 1.3V */ if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { printf("Read SW1C error!\n"); return; } value &= ~0x3f; - value |= PFUZE100_SW1ABC_SETP(11500); + value |= PFUZE100_SW1ABC_SETP(13000); if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { printf("Set SW1C error!\n"); return; } - set_anatop_bypass(1); + is_400M = set_anatop_bypass(1); + if (is_400M) + vddarm = PFUZE100_SW1ABC_SETP(10750); + else + vddarm = PFUZE100_SW1ABC_SETP(11750); + + if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { + printf("Read SW1AB error!\n"); + return; + } + value &= ~0x3f; + value |= vddarm; + if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { + printf("Set SW1AB error!\n"); + return; + } + + if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { + printf("Read SW1C error!\n"); + return; + } + value &= ~0x3f; + value |= PFUZE100_SW1ABC_SETP(11750); + if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { + printf("Set SW1C error!\n"); + return; + } + + finish_anatop_bypass(); printf("switch to ldo_bypass mode!\n"); } diff --git a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c index 2d5c8fc..1ad19a2 100644 --- a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c +++ b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c @@ -759,32 +759,63 @@ static int setup_pmic_voltages(void) void ldo_mode_set(int ldo_bypass) { unsigned char value; + int is_400M; + u32 vddarm; /* swith to ldo_bypass mode */ if (ldo_bypass) { - /* decrease VDDARM to 1.15V */ + prep_anatop_bypass(); + /* decrease VDDARM to 1.275V */ if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { printf("Read SW1AB error!\n"); return; } value &= ~0x3f; - value |= PFUZE100_SW1ABC_SETP(11500); + value |= PFUZE100_SW1ABC_SETP(12750); if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { printf("Set SW1AB error!\n"); return; } - /* increase VDDSOC to 1.15V */ + /* decrease VDDSOC to 1.3V */ if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { printf("Read SW1C error!\n"); return; } value &= ~0x3f; - value |= PFUZE100_SW1ABC_SETP(11500); + value |= PFUZE100_SW1ABC_SETP(13000); if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { printf("Set SW1C error!\n"); return; } - set_anatop_bypass(1); + is_400M = set_anatop_bypass(1); + if (is_400M) + vddarm = PFUZE100_SW1ABC_SETP(10750); + else + vddarm = PFUZE100_SW1ABC_SETP(11750); + + if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { + printf("Read SW1AB error!\n"); + return; + } + value &= ~0x3f; + value |= vddarm; + if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { + printf("Set SW1AB error!\n"); + return; + } + + if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { + printf("Read SW1C error!\n"); + return; + } + value &= ~0x3f; + value |= PFUZE100_SW1ABC_SETP(11750); + if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { + printf("Set SW1C error!\n"); + return; + } + + finish_anatop_bypass(); printf("switch to ldo_bypass mode!\n"); } diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index a6552de..5d9a225 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -776,32 +776,63 @@ static int setup_pmic_voltages(void) void ldo_mode_set(int ldo_bypass) { unsigned char value; + int is_400M; + u32 vddarm; /* switch to ldo_bypass mode */ if (ldo_bypass) { - /* decrease VDDARM to 1.15V */ + prep_anatop_bypass(); + /* decrease VDDARM to 1.275V */ if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { printf("Read SW1AB error!\n"); return; } value &= ~0x3f; - value |= PFUZE100_SW1ABC_SETP(11500); + value |= PFUZE100_SW1ABC_SETP(12750); if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { printf("Set SW1AB error!\n"); return; } - /* increase VDDSOC to 1.15V */ + /* decrease VDDSOC to 1.3V */ if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { printf("Read SW1C error!\n"); return; } value &= ~0x3f; - value |= PFUZE100_SW1ABC_SETP(11500); + value |= PFUZE100_SW1ABC_SETP(13000); if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { printf("Set SW1C error!\n"); return; } - set_anatop_bypass(1); + is_400M = set_anatop_bypass(1); + if (is_400M) + vddarm = PFUZE100_SW1ABC_SETP(10750); + else + vddarm = PFUZE100_SW1ABC_SETP(11750); + + if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { + printf("Read SW1AB error!\n"); + return; + } + value &= ~0x3f; + value |= vddarm; + if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1ABVOL, 1, &value, 1)) { + printf("Set SW1AB error!\n"); + return; + } + + if (i2c_read(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { + printf("Read SW1C error!\n"); + return; + } + value &= ~0x3f; + value |= PFUZE100_SW1ABC_SETP(11750); + if (i2c_write(CONFIG_PMIC_I2C_SLAVE, PFUZE100_SW1CVOL, 1, &value, 1)) { + printf("Set SW1C error!\n"); + return; + } + + finish_anatop_bypass(); printf("switch to ldo_bypass mode!\n"); } |