ARM: DRA7xx: power Add support for tps659038 PMIC
TPS659038 is the power IC used in DRA7XX boards.
Adding support for this and also adding pmic data
for DRA7XX boards.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c
index 6c8e063..eda3451 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
@@ -30,6 +30,7 @@
* MA 02111-1307 USA
*/
#include <common.h>
+#include <i2c.h>
#include <asm/omap_common.h>
#include <asm/gpio.h>
#include <asm/arch/clock.h>
@@ -487,6 +488,9 @@
u32 offset = volt_mv;
int ret = 0;
+ if (!volt_mv)
+ return;
+
pmic->pmic_bus_init();
/* See if we can first get the GPIO if needed */
if (pmic->gpio_en)
@@ -543,6 +547,15 @@
do_scale_vcore(vcores->mm.addr, vcores->mm.value,
vcores->mm.pmic);
+ do_scale_vcore(vcores->gpu.addr, vcores->gpu.value,
+ vcores->gpu.pmic);
+
+ do_scale_vcore(vcores->eve.addr, vcores->eve.value,
+ vcores->eve.pmic);
+
+ do_scale_vcore(vcores->iva.addr, vcores->iva.value,
+ vcores->iva.pmic);
+
if (emif_sdram_type() == EMIF_SDRAM_TYPE_DDR3) {
/* Configure LDO SRAM "magic" bits */
writel(2, (*prcm)->prm_sldo_core_setup);
@@ -732,3 +745,13 @@
if (OMAP_INIT_CONTEXT_SPL != omap_hw_init_context())
enable_basic_uboot_clocks();
}
+
+void gpi2c_init(void)
+{
+ static int gpi2c = 1;
+
+ if (gpi2c) {
+ i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+ gpi2c = 0;
+ }
+}