Commit 593243d3a2aed5a05ead6dc6369b1bd08010d8bc
Committed by
Stefano Babic
1 parent
1f98e31bc0
Exists in
v2017.01-smarct4x
and in
37 other branches
imx: imx6q/dlsabreauto: Add PMIC Pfuze100 support
Add the pfuze100 initialization in power_init_board for imx6q/dl sabreauto board. Signed-off-by: Ye.Li <B37916@freescale.com>
Showing 2 changed files with 21 additions and 0 deletions Side-by-side Diff
board/freescale/mx6qsabreauto/mx6qsabreauto.c
... | ... | @@ -28,6 +28,8 @@ |
28 | 28 | #include <asm/imx-common/video.h> |
29 | 29 | #include <asm/arch/crm_regs.h> |
30 | 30 | #include <pca953x.h> |
31 | +#include <power/pmic.h> | |
32 | +#include "../common/pfuze.h" | |
31 | 33 | |
32 | 34 | DECLARE_GLOBAL_DATA_PTR; |
33 | 35 | |
... | ... | @@ -57,6 +59,8 @@ |
57 | 59 | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ |
58 | 60 | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) |
59 | 61 | |
62 | +#define I2C_PMIC 1 | |
63 | + | |
60 | 64 | int dram_init(void) |
61 | 65 | { |
62 | 66 | gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); |
... | ... | @@ -507,6 +511,17 @@ |
507 | 511 | return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(4, 9)) : -1; |
508 | 512 | } |
509 | 513 | #endif |
514 | + | |
515 | +int power_init_board(void) | |
516 | +{ | |
517 | + struct pmic *p; | |
518 | + | |
519 | + p = pfuze_common_init(I2C_PMIC); | |
520 | + if (!p) | |
521 | + return -ENODEV; | |
522 | + | |
523 | + return 0; | |
524 | +} | |
510 | 525 | |
511 | 526 | #ifdef CONFIG_CMD_BMODE |
512 | 527 | static const struct boot_mode board_boot_modes[] = { |
include/configs/mx6qsabreauto.h
... | ... | @@ -74,5 +74,11 @@ |
74 | 74 | #define CONFIG_APBH_DMA_BURST |
75 | 75 | #define CONFIG_APBH_DMA_BURST8 |
76 | 76 | |
77 | +/* PMIC */ | |
78 | +#define CONFIG_POWER | |
79 | +#define CONFIG_POWER_I2C | |
80 | +#define CONFIG_POWER_PFUZE100 | |
81 | +#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 | |
82 | + | |
77 | 83 | #endif /* __MX6QSABREAUTO_CONFIG_H */ |