set ACIN current limit
Signed-off-by: August <mingxin.android@gmail.com>
This commit is contained in:
parent
e75b08e946
commit
555ca787b7
8 changed files with 20 additions and 1 deletions
|
@ -53,6 +53,24 @@ int pwrok_restart_enable(void)
|
|||
static int axp_probe(void)
|
||||
{
|
||||
u8 pmu_type;
|
||||
u8 acin_path;
|
||||
|
||||
/* bpi, set VBUS current limit from 1500mA to 3500mA */
|
||||
if(axp_i2c_read(AXP81X_ADDR, BOOT_POWER81X_ACIN_PATH, &acin_path))
|
||||
{
|
||||
printf("axp read error\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("[BPI] set ac cur limit to 3500mA\n");
|
||||
|
||||
acin_path &= 0xf8;
|
||||
acin_path |= 0x04;
|
||||
if(axp_i2c_write(AXP81X_ADDR, BOOT_POWER81X_ACIN_PATH, acin_path))
|
||||
{
|
||||
printf("axp write error\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(axp_i2c_read(AXP81X_ADDR, 0x3, &pmu_type))
|
||||
{
|
||||
|
|
|
@ -225,7 +225,7 @@ static int sunxi_probe_power_state(void)
|
|||
|
||||
if (pmu_bat_unused || (__bat_exist <= 0))
|
||||
{
|
||||
pr_notice("no battery exist\n");
|
||||
printf("no battery exist, boot normal\n");
|
||||
return SUNXI_STATE_NORMAL_BOOT;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#define BOOT_POWER81X_CHARGE1 (0x33)
|
||||
#define BOOT_POWER81X_CHARGE2 (0x34)
|
||||
#define BOOT_POWER81X_CHARGE3 (0x35)
|
||||
#define BOOT_POWER81X_ACIN_PATH (0x3A)
|
||||
|
||||
#define BOOT_POWER81X_BAT_AVERVOL_H8 (0x50)//----------
|
||||
#define BOOT_POWER81X_BAT_AVERVOL_L4 (0x51)//-----------
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue