mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
imx: mx6sxsabresd: Use the pfuze common init function
Modify the pfuze init for mx6sxsabresd to use the shared "pfuze_common_init" function. And move this initialization to power_init_board. Signed-off-by: Ye.Li <B37916@freescale.com>
This commit is contained in:
parent
f0fabb7945
commit
1f98e31bc0
1 changed files with 7 additions and 41 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
#include <power/pmic.h>
|
#include <power/pmic.h>
|
||||||
#include <power/pfuze100_pmic.h>
|
#include <power/pfuze100_pmic.h>
|
||||||
|
#include "../common/pfuze.h"
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -193,52 +194,19 @@ static struct i2c_pads_info i2c_pad_info1 = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int pfuze_init(void)
|
int power_init_board(void)
|
||||||
{
|
{
|
||||||
struct pmic *p;
|
struct pmic *p;
|
||||||
int ret;
|
|
||||||
unsigned int reg;
|
unsigned int reg;
|
||||||
|
|
||||||
ret = power_pfuze100_init(I2C_PMIC);
|
p = pfuze_common_init(I2C_PMIC);
|
||||||
if (ret)
|
if (!p)
|
||||||
return ret;
|
return -ENODEV;
|
||||||
|
|
||||||
p = pmic_get("PFUZE100");
|
|
||||||
ret = pmic_probe(p);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
pmic_reg_read(p, PFUZE100_DEVICEID, ®);
|
|
||||||
printf("PMIC: PFUZE100 ID=0x%02x\n", reg);
|
|
||||||
|
|
||||||
/* Set SW1AB standby voltage to 0.975V */
|
|
||||||
pmic_reg_read(p, PFUZE100_SW1ABSTBY, ®);
|
|
||||||
reg &= ~0x3f;
|
|
||||||
reg |= 0x1b;
|
|
||||||
pmic_reg_write(p, PFUZE100_SW1ABSTBY, reg);
|
|
||||||
|
|
||||||
/* Set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
|
|
||||||
pmic_reg_read(p, PUZE_100_SW1ABCONF, ®);
|
|
||||||
reg &= ~0xc0;
|
|
||||||
reg |= 0x40;
|
|
||||||
pmic_reg_write(p, PUZE_100_SW1ABCONF, reg);
|
|
||||||
|
|
||||||
/* Set SW1C standby voltage to 0.975V */
|
|
||||||
pmic_reg_read(p, PFUZE100_SW1CSTBY, ®);
|
|
||||||
reg &= ~0x3f;
|
|
||||||
reg |= 0x1b;
|
|
||||||
pmic_reg_write(p, PFUZE100_SW1CSTBY, reg);
|
|
||||||
|
|
||||||
/* Set SW1C/VDDSOC step ramp up time from 16us to 4us/25mV */
|
|
||||||
pmic_reg_read(p, PFUZE100_SW1CCONF, ®);
|
|
||||||
reg &= ~0xc0;
|
|
||||||
reg |= 0x40;
|
|
||||||
pmic_reg_write(p, PFUZE100_SW1CCONF, reg);
|
|
||||||
|
|
||||||
/* Enable power of VGEN5 3V3, needed for SD3 */
|
/* Enable power of VGEN5 3V3, needed for SD3 */
|
||||||
pmic_reg_read(p, PFUZE100_VGEN5VOL, ®);
|
pmic_reg_read(p, PFUZE100_VGEN5VOL, ®);
|
||||||
reg &= ~0x1F;
|
reg &= ~LDO_VOL_MASK;
|
||||||
reg |= 0x1F;
|
reg |= (LDOB_3_30V | (1 << LDO_EN));
|
||||||
pmic_reg_write(p, PFUZE100_VGEN5VOL, reg);
|
pmic_reg_write(p, PFUZE100_VGEN5VOL, reg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -369,8 +337,6 @@ int board_init(void)
|
||||||
|
|
||||||
int board_late_init(void)
|
int board_late_init(void)
|
||||||
{
|
{
|
||||||
pfuze_init();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue