diff --git a/board/nm/hancock/da9063.c b/board/nm/hancock/da9063.c index 092ebb074c..efa6eb1c4c 100644 --- a/board/nm/hancock/da9063.c +++ b/board/nm/hancock/da9063.c @@ -35,7 +35,11 @@ int da9063_get_reg(int reg, u8* val) /* TODO: Use CONFIG_PMIC_I2C_ADDR+1 if reg > 0xFF */ *val = 0; - ret = i2c_read(CONFIG_PMIC_I2C_ADDR, reg, 1, &temp, 1); + if (reg < 0x100) { + ret = i2c_read(CONFIG_PMIC_I2C_ADDR, reg & 0xFF, 1, &temp, 1); + } else { + ret = i2c_read(CONFIG_PMIC_I2C_ADDR+1, reg & 0xFF, 1, &temp, 1); + } if (ret == 0) *val = temp; diff --git a/board/nm/hancock/da9063.h b/board/nm/hancock/da9063.h index 3bc257c8d4..7ea30416c8 100644 --- a/board/nm/hancock/da9063.h +++ b/board/nm/hancock/da9063.h @@ -31,6 +31,8 @@ #define PMIC_REG_BUCK_ILIM_B 0x9B #define PMIC_REG_BUCK_ILIM_C 0x9C +#define PMIC_REG_CONFIG_ID 0x184 /* OTP Config ID */ + extern void da9063_init(int i2c_bus); extern int da9063_get_reg(int reg, u8* val);