OMAP3 Move twl4030 power and led functions
authorTom Rix <Tom.Rix@windriver.com>
Sun, 28 Jun 2009 17:52:30 +0000 (12:52 -0500)
committerHeiko Schocher <hs@denx.de>
Wed, 29 Jul 2009 07:57:30 +0000 (09:57 +0200)
Because twl4030 now has its own device files, move exiting
omap3 power_init_r to a new location.

power_init_r is the only function in board/omap3/common.
It initializes the twl4030 power for the board and enables
the led.

The power part of the the function is moved to twl4030_power_init in
drivers/power/twl4030.c The power compilation is conditional on the
existing config variable CONFIG_TWL4030_POWER.

The led part is moved to twl4030_led_init in the new file
drivers/misc/twl4030_led.c  The led compilation is conditional on
the new config variable CONFIG_TWL4030_LED

The directory board/omap3/common was removed because power_init_r
was the only function in it.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
16 files changed:
board/omap3/beagle/beagle.c
board/omap3/common/Makefile [deleted file]
board/omap3/common/power.c [deleted file]
board/omap3/overo/overo.c
board/omap3/pandora/pandora.c
board/omap3/zoom1/zoom1.c
board/omap3/zoom2/zoom2.c
drivers/misc/Makefile
drivers/misc/twl4030_led.c [new file with mode: 0644]
drivers/power/twl4030.c
include/configs/omap3_beagle.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/twl4030.h

index d268e1870d2ea88d13754e9f65bf6bd8ee41377f..5423650df0e4fcf71b562cb6c0fe28eb70df9023 100644 (file)
@@ -30,6 +30,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <twl4030.h>
 #include <asm/io.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
@@ -105,7 +106,8 @@ int misc_init_r(void)
        gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
        gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
 
-       power_init_r();
+       twl4030_power_init();
+       twl4030_led_init();
 
        /* Configure GPIOs to output */
        writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);
diff --git a/board/omap3/common/Makefile b/board/omap3/common/Makefile
deleted file mode 100644 (file)
index b8a0b14..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# (C) Copyright 2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
-endif
-
-LIB    = $(obj)lib$(VENDOR).a
-
-COBJS-$(CONFIG_OMAP3_BEAGLE) += power.o
-COBJS-$(CONFIG_OMAP3_OVERO) += power.o
-COBJS-$(CONFIG_OMAP3_PANDORA) += power.o
-COBJS-$(CONFIG_OMAP3_ZOOM1) += power.o
-COBJS-$(CONFIG_OMAP3_ZOOM2) += power.o
-
-COBJS  := $(COBJS-y)
-SRCS   := $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-
-all:   $(LIB)
-
-$(LIB):        $(obj).depend $(OBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/board/omap3/common/power.c b/board/omap3/common/power.c
deleted file mode 100644 (file)
index 4908e5b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * (C) Copyright 2004-2008
- * Texas Instruments, <www.ti.com>
- *
- * Author :
- *     Sunil Kumar <sunilsaini05@gmail.com>
- *     Shashi Ranjan <shashiranjanmca05@gmail.com>
- *
- * Derived from Beagle Board and 3430 SDP code by
- *     Richard Woodruff <r-woodruff2@ti.com>
- *     Syed Mohammed Khasim <khasim@ti.com>
- *
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-#include <common.h>
-#include <asm/arch/sys_proto.h>
-#include <i2c.h>
-
-/******************************************************************************
- * Routine: power_init_r
- * Description: Configure power supply
- *****************************************************************************/
-void power_init_r(void)
-{
-       unsigned char byte;
-
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
-
-       /*
-        * Configure OMAP3 supply voltages in power management
-        * companion chip.
-        */
-
-       /* set VAUX3 to 2.8V */
-       byte = DEV_GRP_P1;
-       i2c_write(PWRMGT_ADDR_ID4, VAUX3_DEV_GRP, 1, &byte, 1);
-       byte = VAUX3_VSEL_28;
-       i2c_write(PWRMGT_ADDR_ID4, VAUX3_DEDICATED, 1, &byte, 1);
-
-       /* set VPLL2 to 1.8V */
-       byte = DEV_GRP_ALL;
-       i2c_write(PWRMGT_ADDR_ID4, VPLL2_DEV_GRP, 1, &byte, 1);
-       byte = VPLL2_VSEL_18;
-       i2c_write(PWRMGT_ADDR_ID4, VPLL2_DEDICATED, 1, &byte, 1);
-
-       /* set VDAC to 1.8V */
-       byte = DEV_GRP_P1;
-       i2c_write(PWRMGT_ADDR_ID4, VDAC_DEV_GRP, 1, &byte, 1);
-       byte = VDAC_VSEL_18;
-       i2c_write(PWRMGT_ADDR_ID4, VDAC_DEDICATED, 1, &byte, 1);
-
-       /* enable LED */
-       byte = LEDBPWM | LEDAPWM | LEDBON | LEDAON;
-       i2c_write(PWRMGT_ADDR_ID3, LEDEN, 1, &byte, 1);
-}
index 809b77b642f1c836fa89ca45a28820627fc41135..dd6d28622d14ca4b8b4bfd0feeda85c1ebf3b65c 100644 (file)
@@ -29,6 +29,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <twl4030.h>
 #include <asm/io.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
@@ -58,7 +59,8 @@ int board_init(void)
  */
 int misc_init_r(void)
 {
-       power_init_r();
+       twl4030_power_init();
+       twl4030_led_init();
 
        dieid_num_r();
 
index c2f98ead6ad3ceea516b71790cf2f2cf9171defb..1538efbb222fb396db75e47737138dcd958118af 100644 (file)
@@ -30,6 +30,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <twl4030.h>
 #include <asm/io.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
@@ -64,7 +65,8 @@ int misc_init_r(void)
        gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
        gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
 
-       power_init_r();
+       twl4030_power_init();
+       twl4030_led_init();
 
        /* Configure GPIOs to output */
        writel(~(GPIO14 | GPIO15 | GPIO16 | GPIO23), &gpio1_base->oe);
index 94437d5be9bf9a1849af7bee3c0373055b0db476..f4d3754cacf8419a885ca48290589469fa40d8ce 100644 (file)
@@ -61,7 +61,8 @@ int board_init(void)
  */
 int misc_init_r(void)
 {
-       power_init_r();
+       twl4030_power_init();
+       twl4030_led_init();
        dieid_num_r();
 
        /*
index d0fd55bfe9c0bad8046207aec44c271a47cb5f93..94a985dcb3d2844578024fe0180f6b28e1a91af3 100644 (file)
@@ -155,7 +155,8 @@ int board_init (void)
 int misc_init_r(void)
 {
        zoom2_identify();
-       power_init_r();
+       twl4030_power_init();
+       twl4030_led_init();
        dieid_num_r();
 
        /*
index ea2bf87ec8e046a966060293eabc33fa7ae13aa0..f6df60faef9fd0688ab6f53c7203241de9a3b507 100644 (file)
@@ -30,6 +30,7 @@ COBJS-$(CONFIG_DS4510)  += ds4510.o
 COBJS-$(CONFIG_FSL_LAW) += fsl_law.o
 COBJS-$(CONFIG_NS87308) += ns87308.o
 COBJS-$(CONFIG_STATUS_LED) += status_led.o
+COBJS-$(CONFIG_TWL4030_LED) += twl4030_led.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/misc/twl4030_led.c b/drivers/misc/twl4030_led.c
new file mode 100644 (file)
index 0000000..bfdafef
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2009 Wind River Systems, Inc.
+ * Tom Rix <Tom.Rix at windriver.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ * twl4030_led_init is from cpu/omap3/common.c, power_init_r
+ *
+ * (C) Copyright 2004-2008
+ * Texas Instruments, <www.ti.com>
+ *
+ * Author :
+ *     Sunil Kumar <sunilsaini05 at gmail.com>
+ *     Shashi Ranjan <shashiranjanmca05 at gmail.com>
+ *
+ * Derived from Beagle Board and 3430 SDP code by
+ *     Richard Woodruff <r-woodruff2 at ti.com>
+ *     Syed Mohammed Khasim <khasim at ti.com>
+ *
+ */
+
+#include <twl4030.h>
+
+#define LEDAON                 (0x1 << 0)
+#define LEDBON                 (0x1 << 1)
+#define LEDAPWM                        (0x1 << 4)
+#define LEDBPWM                        (0x1 << 5)
+
+void twl4030_led_init(void)
+{
+       unsigned char byte;
+
+       /* enable LED */
+       byte = LEDBPWM | LEDAPWM | LEDBON | LEDAON;
+
+       twl4030_i2c_write_u8(TWL4030_CHIP_LED, byte,
+                            TWL4030_LED_LEDEN);
+
+}
index 70d4eeb9d1b382a635fc30ef260ec69e63356871..c93b51f695d16e57548b048b2c209405a1c63363 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  *
- * Derived from code on omapzoom, git://git.omapzoom.com/repo/u-boot.git
+ * twl4030_power_reset_init is derived from code on omapzoom,
+ * git://git.omapzoom.com/repo/u-boot.git
  *
  * Copyright (C) 2007-2009 Texas Instruments, Inc.
+ *
+ * twl4030_power_init is from cpu/omap3/common.c, power_init_r
+ *
+ * (C) Copyright 2004-2008
+ * Texas Instruments, <www.ti.com>
+ *
+ * Author :
+ *     Sunil Kumar <sunilsaini05 at gmail.com>
+ *     Shashi Ranjan <shashiranjanmca05 at gmail.com>
+ *
+ * Derived from Beagle Board and 3430 SDP code by
+ *     Richard Woodruff <r-woodruff2 at ti.com>
+ *     Syed Mohammed Khasim <khasim at ti.com>
+ *
  */
 
 #include <twl4030.h>
@@ -45,3 +60,41 @@ void twl4030_power_reset_init(void)
 }
 
 
+/*
+ * Power Init
+ */
+#define DEV_GRP_P1             0x20
+#define VAUX3_VSEL_28          0x03
+#define DEV_GRP_ALL            0xE0
+#define VPLL2_VSEL_18          0x05
+#define VDAC_VSEL_18           0x03
+
+void twl4030_power_init(void)
+{
+       unsigned char byte;
+
+       /* set VAUX3 to 2.8V */
+       byte = DEV_GRP_P1;
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
+                            TWL4030_PM_RECEIVER_VAUX3_DEV_GRP);
+       byte = VAUX3_VSEL_28;
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
+                            TWL4030_PM_RECEIVER_VAUX3_DEDICATED);
+
+       /* set VPLL2 to 1.8V */
+       byte = DEV_GRP_ALL;
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
+                            TWL4030_PM_RECEIVER_VPLL2_DEV_GRP);
+       byte = VPLL2_VSEL_18;
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
+                            TWL4030_PM_RECEIVER_VPLL2_DEDICATED);
+
+       /* set VDAC to 1.8V */
+       byte = DEV_GRP_P1;
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
+                            TWL4030_PM_RECEIVER_VDAC_DEV_GRP);
+       byte = VDAC_VSEL_18;
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
+                            TWL4030_PM_RECEIVER_VDAC_DEDICATED);
+}
+
index a1a849e292c25312b13e4b844397878b26cb6454..8fc6fb26c9482aef5f3dd35e99ef32679d763176 100644 (file)
 #define CONFIG_SYS_I2C_BUS_SELECT      1
 #define CONFIG_DRIVER_OMAP34XX_I2C     1
 
+/*
+ * TWL4030
+ */
+#define CONFIG_TWL4030_POWER           1
+#define CONFIG_TWL4030_LED             1
+
 /*
  * Board NAND Info.
  */
index 3bf798a4009df2f92fa488213d994c5b9705a10f..c359c60b18444a38eca98789c236809d894759b3 100644 (file)
 #define CONFIG_SYS_I2C_BUS_SELECT      1
 #define CONFIG_DRIVER_OMAP34XX_I2C     1
 
+/*
+ * TWL4030
+ */
+#define CONFIG_TWL4030_POWER           1
+#define CONFIG_TWL4030_LED             1
+
 /*
  * Board NAND Info.
  */
index d7e0ea1c447a3e8313c8853d1d9b7d4fdf733cd3..d7b1cc1895e170df0afe5fb950e9aa6d1a99dc38 100644 (file)
 #define CONFIG_SYS_I2C_BUS_SELECT      1
 #define CONFIG_DRIVER_OMAP34XX_I2C     1
 
+/*
+ * TWL4030
+ */
+#define CONFIG_TWL4030_POWER           1
+#define CONFIG_TWL4030_LED             1
+
 /*
  * Board NAND Info.
  */
index a4eb7fdf627b46b26fb5c944a0ff54f02857bd8d..676b425473b37d5284377af0309cbdc3dbfddd73 100644 (file)
  * TWL4030
  */
 #define CONFIG_TWL4030_POWER           1
+#define CONFIG_TWL4030_LED             1
 
 /*
  * Board NAND Info.
index 534eecdfe3afd0e092b2adcab7c4e2dcee0fa66e..3f6f5451a320540904559e0040209547bf8913fc 100644 (file)
  * TWL4030
  */
 #define CONFIG_TWL4030_POWER           1
+#define CONFIG_TWL4030_LED             1
 
 /*
  * Board NAND Info.
index e7c90b689f93970b4001a4f5368a3e5ea1007892..eb27ec5b2ad71ecb5e7748b3ac78a64fd0f85eb3 100644 (file)
 #define TWL4030_PM_MASTER_SW_EVENTS_DEVOFF             (1 << 0)
 
 /* Power Managment Receiver */
+#define TWL4030_PM_RECEIVER_SC_CONFIG                  0x5B
+#define TWL4030_PM_RECEIVER_SC_DETECT1                 0x5C
+#define TWL4030_PM_RECEIVER_SC_DETECT2                 0x5D
+#define TWL4030_PM_RECEIVER_WATCHDOG_CFG               0x5E
+#define TWL4030_PM_RECEIVER_IT_CHECK_CFG               0x5F
+#define TWL4030_PM_RECEIVER_VIBRATOR_CFG               0x5F
+#define TWL4030_PM_RECEIVER_DC_TO_DC_CFG               0x61
+#define TWL4030_PM_RECEIVER_VDD1_TRIM1                 0x62
+#define TWL4030_PM_RECEIVER_VDD1_TRIM2                 0x63
+#define TWL4030_PM_RECEIVER_VDD2_TRIM1                 0x64
+#define TWL4030_PM_RECEIVER_VDD2_TRIM2                 0x65
+#define TWL4030_PM_RECEIVER_VIO_TRIM1                  0x66
+#define TWL4030_PM_RECEIVER_VIO_TRIM2                  0x67
+#define TWL4030_PM_RECEIVER_MISC_CFG                   0x68
+#define TWL4030_PM_RECEIVER_LS_TST_A                   0x69
+#define TWL4030_PM_RECEIVER_LS_TST_B                   0x6A
+#define TWL4030_PM_RECEIVER_LS_TST_C                   0x6B
+#define TWL4030_PM_RECEIVER_LS_TST_D                   0x6C
+#define TWL4030_PM_RECEIVER_BB_CFG                     0x6D
+#define TWL4030_PM_RECEIVER_MISC_TST                   0x6E
+#define TWL4030_PM_RECEIVER_TRIM1                      0x6F
+#define TWL4030_PM_RECEIVER_TRIM2                      0x70
+#define TWL4030_PM_RECEIVER_DC_DC_TIMEOUT              0x71
+#define TWL4030_PM_RECEIVER_VAUX1_DEV_GRP              0x72
+#define TWL4030_PM_RECEIVER_VAUX1_TYPE                 0x73
+#define TWL4030_PM_RECEIVER_VAUX1_REMAP                        0x74
+#define TWL4030_PM_RECEIVER_VAUX1_DEDICATED            0x75
+#define TWL4030_PM_RECEIVER_VAUX2_DEV_GRP              0x76
+#define TWL4030_PM_RECEIVER_VAUX2_TYPE                 0x77
+#define TWL4030_PM_RECEIVER_VAUX2_REMAP                        0x78
+#define TWL4030_PM_RECEIVER_VAUX2_DEDICATED            0x79
+#define TWL4030_PM_RECEIVER_VAUX3_DEV_GRP              0x7A
+#define TWL4030_PM_RECEIVER_VAUX3_TYPE                 0x7B
+#define TWL4030_PM_RECEIVER_VAUX3_REMAP                        0x7C
+#define TWL4030_PM_RECEIVER_VAUX3_DEDICATED            0x7D
+#define TWL4030_PM_RECEIVER_VAUX4_DEV_GRP              0x7E
+#define TWL4030_PM_RECEIVER_VAUX4_TYPE                 0x7F
+#define TWL4030_PM_RECEIVER_VAUX4_REMAP                        0x80
+#define TWL4030_PM_RECEIVER_VAUX4_DEDICATED            0x81
+#define TWL4030_PM_RECEIVER_VMMC1_DEV_GRP              0x82
+#define TWL4030_PM_RECEIVER_VMMC1_TYPE                 0x83
+#define TWL4030_PM_RECEIVER_VMMC1_REMAP                        0x84
+#define TWL4030_PM_RECEIVER_VMMC1_DEDICATED            0x85
+#define TWL4030_PM_RECEIVER_VMMC2_DEV_GRP              0x86
+#define TWL4030_PM_RECEIVER_VMMC2_TYPE                 0x87
+#define TWL4030_PM_RECEIVER_VMMC2_REMAP                        0x88
+#define TWL4030_PM_RECEIVER_VMMC2_DEDICATED            0x89
+#define TWL4030_PM_RECEIVER_VPLL1_DEV_GRP              0x8A
+#define TWL4030_PM_RECEIVER_VPLL1_TYPE                 0x8B
+#define TWL4030_PM_RECEIVER_VPLL1_REMAP                        0x8C
+#define TWL4030_PM_RECEIVER_VPLL1_DEDICATED            0x8D
+#define TWL4030_PM_RECEIVER_VPLL2_DEV_GRP              0x8E
+#define TWL4030_PM_RECEIVER_VPLL2_TYPE                 0x8F
+#define TWL4030_PM_RECEIVER_VPLL2_REMAP                        0x90
+#define TWL4030_PM_RECEIVER_VPLL2_DEDICATED            0x91
+#define TWL4030_PM_RECEIVER_VSIM_DEV_GRP               0x92
+#define TWL4030_PM_RECEIVER_VSIM_TYPE                  0x93
+#define TWL4030_PM_RECEIVER_VSIM_REMAP                 0x94
+#define TWL4030_PM_RECEIVER_VSIM_DEDICATED             0x95
+#define TWL4030_PM_RECEIVER_VDAC_DEV_GRP               0x96
+#define TWL4030_PM_RECEIVER_VDAC_TYPE                  0x97
+#define TWL4030_PM_RECEIVER_VDAC_REMAP                 0x98
+#define TWL4030_PM_RECEIVER_VDAC_DEDICATED             0x99
+#define TWL4030_PM_RECEIVER_VINTANA1_DEV_GRP           0x9A
+#define TWL4030_PM_RECEIVER_VINTANA1_TYP               0x9B
+#define TWL4030_PM_RECEIVER_VINTANA1_REMAP             0x9C
+#define TWL4030_PM_RECEIVER_VINTANA1_DEDICATED         0x9D
+#define TWL4030_PM_RECEIVER_VINTANA2_DEV_GRP           0x9E
+#define TWL4030_PM_RECEIVER_VINTANA2_TYPE              0x9F
+#define TWL4030_PM_RECEIVER_VINTANA2_REMAP             0xA0
+#define TWL4030_PM_RECEIVER_VINTANA2_DEDICATED         0xA1
+#define TWL4030_PM_RECEIVER_VINTDIG_DEV_GRP            0xA2
+#define TWL4030_PM_RECEIVER_VINTDIG_TYPE               0xA3
+#define TWL4030_PM_RECEIVER_VINTDIG_REMAP              0xA4
+#define TWL4030_PM_RECEIVER_VINTDIG_DEDICATED          0xA5
+#define TWL4030_PM_RECEIVER_VIO_DEV_GRP                        0xA6
+#define TWL4030_PM_RECEIVER_VIO_TYPE                   0xA7
+#define TWL4030_PM_RECEIVER_VIO_REMAP                  0xA8
+#define TWL4030_PM_RECEIVER_VIO_CFG                    0xA9
+#define TWL4030_PM_RECEIVER_VIO_MISC_CFG               0xAA
+#define TWL4030_PM_RECEIVER_VIO_TEST1                  0xAB
+#define TWL4030_PM_RECEIVER_VIO_TEST2                  0xAC
+#define TWL4030_PM_RECEIVER_VIO_OSC                    0xAD
+#define TWL4030_PM_RECEIVER_VIO_RESERVED               0xAE
+#define TWL4030_PM_RECEIVER_VIO_VSEL                   0xAF
+#define TWL4030_PM_RECEIVER_VDD1_DEV_GRP               0xB0
+#define TWL4030_PM_RECEIVER_VDD1_TYPE                  0xB1
+#define TWL4030_PM_RECEIVER_VDD1_REMAP                 0xB2
+#define TWL4030_PM_RECEIVER_VDD1_CFG                   0xB3
+#define TWL4030_PM_RECEIVER_VDD1_MISC_CFG              0xB4
+#define TWL4030_PM_RECEIVER_VDD1_TEST1                 0xB5
+#define TWL4030_PM_RECEIVER_VDD1_TEST2                 0xB6
+#define TWL4030_PM_RECEIVER_VDD1_OSC                   0xB7
+#define TWL4030_PM_RECEIVER_VDD1_RESERVED              0xB8
+#define TWL4030_PM_RECEIVER_VDD1_VSEL                  0xB9
+#define TWL4030_PM_RECEIVER_VDD1_VMODE_CFG             0xBA
+#define TWL4030_PM_RECEIVER_VDD1_VFLOOR                        0xBB
+#define TWL4030_PM_RECEIVER_VDD1_VROOF                 0xBC
+#define TWL4030_PM_RECEIVER_VDD1_STEP                  0xBD
+#define TWL4030_PM_RECEIVER_VDD2_DEV_GRP               0xBE
+#define TWL4030_PM_RECEIVER_VDD2_TYPE                  0xBF
+#define TWL4030_PM_RECEIVER_VDD2_REMAP                 0xC0
+#define TWL4030_PM_RECEIVER_VDD2_CFG                   0xC1
+#define TWL4030_PM_RECEIVER_VDD2_MISC_CFG              0xC2
+#define TWL4030_PM_RECEIVER_VDD2_TEST1                 0xC3
+#define TWL4030_PM_RECEIVER_VDD2_TEST2                 0xC4
+#define TWL4030_PM_RECEIVER_VDD2_OSC                   0xC5
+#define TWL4030_PM_RECEIVER_VDD2_RESERVED              0xC6
+#define TWL4030_PM_RECEIVER_VDD2_VSEL                  0xC7
+#define TWL4030_PM_RECEIVER_VDD2_VMODE_CFG             0xC8
+#define TWL4030_PM_RECEIVER_VDD2_VFLOOR                        0xC9
+#define TWL4030_PM_RECEIVER_VDD2_VROOF                 0xCA
+#define TWL4030_PM_RECEIVER_VDD2_STEP                  0xCB
 #define TWL4030_PM_RECEIVER_VUSB1V5_DEV_GRP            0xCC
 #define TWL4030_PM_RECEIVER_VUSB1V5_TYPE               0xCD
 #define TWL4030_PM_RECEIVER_VUSB1V5_REMAP              0xCE
 #define TWL4030_PM_RECEIVER_VUSB3V1_TYPE               0xD3
 #define TWL4030_PM_RECEIVER_VUSB3V1_REMAP              0xD4
 #define TWL4030_PM_RECEIVER_VUSBCP_DEV_GRP             0xD5
-#define TWL4030_PM_RECEIVER_VUSBCP_DEV_TYPE            0xD6
-#define TWL4030_PM_RECEIVER_VUSBCP_DEV_REMAP           0xD7
+#define TWL4030_PM_RECEIVER_VUSBCP_TYPE                        0xD6
+#define TWL4030_PM_RECEIVER_VUSBCP_REMAP               0xD7
 #define TWL4030_PM_RECEIVER_VUSB_DEDICATED1            0xD8
 #define TWL4030_PM_RECEIVER_VUSB_DEDICATED2            0xD9
+#define TWL4030_PM_RECEIVER_REGEN_DEV_GRP              0xDA
+#define TWL4030_PM_RECEIVER_REGEN_TYPE                 0xDB
+#define TWL4030_PM_RECEIVER_REGEN_REMAP                        0xDC
+#define TWL4030_PM_RECEIVER_NRESPWRON_DEV_GRP          0xDD
+#define TWL4030_PM_RECEIVER_NRESPWRON_TYPE             0xDE
+#define TWL4030_PM_RECEIVER_NRESPWRON_REMAP            0xDF
+#define TWL4030_PM_RECEIVER_CLKEN_DEV_GRP              0xE0
+#define TWL4030_PM_RECEIVER_CLKEN_TYPE                 0xE1
+#define TWL4030_PM_RECEIVER_CLKEN_REMAP                        0xE2
+#define TWL4030_PM_RECEIVER_SYSEN_DEV_GRP              0xE3
+#define TWL4030_PM_RECEIVER_SYSEN_TYPE                 0xE4
+#define TWL4030_PM_RECEIVER_SYSEN_REMAP                        0xE5
+#define TWL4030_PM_RECEIVER_HFCLKOUT_DEV_GRP           0xE6
+#define TWL4030_PM_RECEIVER_HFCLKOUT_TYPE              0xE7
+#define TWL4030_PM_RECEIVER_HFCLKOUT_REMAP             0xE8
+#define TWL4030_PM_RECEIVER_32KCLKOUT_DEV_GRP          0xE9
+#define TWL4030_PM_RECEIVER_32KCLKOUT_TYPE             0xEA
+#define TWL4030_PM_RECEIVER_32KCLKOUT_REMAP            0xEB
+#define TWL4030_PM_RECEIVER_TRITON_RESET_DEV_GRP       0xEC
+#define TWL4030_PM_RECEIVER_TRITON_RESET_TYPE          0xED
+#define TWL4030_PM_RECEIVER_TRITON_RESET_REMAP         0xEE
+#define TWL4030_PM_RECEIVER_MAINREF_DEV_GRP            0xEF
+#define TWL4030_PM_RECEIVER_MAINREF_TYPE               0xF0
+#define TWL4030_PM_RECEIVER_MAINREF_REMAP              0xF1
+
+/* LED */
+#define TWL4030_LED_LEDEN                              0xEE
 
 /* Keypad */
 #define TWL4030_KEYPAD_KEYP_CTRL_REG                   0xD2
@@ -242,7 +382,17 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
        return i2c_read(chip_no, reg, 1, val, 1);
 }
 
+/*
+ * Power
+ */
+
 /* For hardware resetting */
 void twl4030_power_reset_init(void);
+/* For initializing power device */
+void twl4030_power_init(void);
+/*
+ * LED
+ */
+void twl4030_led_init(void);
 
 #endif /* TWL4030_H */