From: Markus Niebel <markus.nie...@tq-group.com> Support for the PMIC on the TQMa6 modules is added.
Signed-off-by: Markus Niebel <markus.nie...@tq-group.com> --- - changes for v2: - add missing int power_init_board(void) to tqma6.c board/tqc/tqma6/tqma6.c | 18 ++++++++++++++++++ include/configs/tqma6.h | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 556a70d..ba8ff07 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -22,6 +22,8 @@ #include <libfdt.h> #include <i2c.h> #include <mmc.h> +#include <power/pfuze100_pmic.h> +#include <power/pmic.h> #include "tqma6_bb.h" @@ -169,6 +171,22 @@ static void tqma6_setup_i2c(void) setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &tqma6_i2c3_pads); } +/* setup board specific PMIC */ +int power_init_board(void) +{ + struct pmic *p; + u32 reg; + + /* configure PFUZE100 PMIC */ + power_pfuze100_init(2); + p = pmic_get("PFUZE100_PMIC"); + if (p && !pmic_probe(p)) { + pmic_reg_read(p, PFUZE100_DEVICEID, ®); + printf("PMIC: PFUZE100 ID=0x%02x\n", reg); + } + return 0; +} + int board_early_init_f(void) { return tqma6_bb_board_early_init_f(); diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index df7395d..b33a9fb 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -88,6 +88,11 @@ #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 #define CONFIG_CMD_EEPROM +#define CONFIG_POWER +#define CONFIG_POWER_I2C +#define CONFIG_POWER_PFUZE100 +#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 + /* MMC Configs */ #define CONFIG_FSL_ESDHC #define CONFIG_FSL_USDHC -- 1.7.9.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot