]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: imx6q/dlsabreauto: Add PMIC Pfuze100 support
authorYe.Li <B37916@freescale.com>
Thu, 6 Nov 2014 08:29:02 +0000 (16:29 +0800)
committerStefano Babic <sbabic@denx.de>
Thu, 20 Nov 2014 09:52:32 +0000 (10:52 +0100)
Add the pfuze100 initialization in power_init_board for imx6q/dl
sabreauto board.

Signed-off-by: Ye.Li <B37916@freescale.com>
board/freescale/mx6qsabreauto/mx6qsabreauto.c
include/configs/mx6qsabreauto.h

index b36b70de05c4554b1460345b6f799f43addd9e5f..59387ffaaa7e7960e625f3b8e0833f7f297dee23 100644 (file)
@@ -28,6 +28,8 @@
 #include <asm/imx-common/video.h>
 #include <asm/arch/crm_regs.h>
 #include <pca953x.h>
+#include <power/pmic.h>
+#include "../common/pfuze.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -57,6 +59,8 @@ DECLARE_GLOBAL_DATA_PTR;
        PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |               \
        PAD_CTL_DSE_40ohm   | PAD_CTL_SRE_FAST)
 
+#define I2C_PMIC       1
+
 int dram_init(void)
 {
        gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -508,6 +512,17 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
 }
 #endif
 
+int power_init_board(void)
+{
+       struct pmic *p;
+
+       p = pfuze_common_init(I2C_PMIC);
+       if (!p)
+               return -ENODEV;
+
+       return 0;
+}
+
 #ifdef CONFIG_CMD_BMODE
 static const struct boot_mode board_boot_modes[] = {
        /* 4 bit bus width */
index 559937a71226fb5cdabd58264cb9a75e494c7047..51042ca72e54b7b8e2e1084ac2e96ed9da9615ff 100644 (file)
 #define CONFIG_APBH_DMA_BURST
 #define CONFIG_APBH_DMA_BURST8
 
+/* PMIC */
+#define CONFIG_POWER
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_PFUZE100
+#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
+
 #endif                         /* __MX6QSABREAUTO_CONFIG_H */