* [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27
@ 2011-04-14 12:27 Lesly A M
2011-04-14 12:27 ` [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence Lesly A M
` (9 more replies)
0 siblings, 10 replies; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Patch series for TWL4030 power scripts and workaround for TWL erratum 27.
Changes for implementing TWL4030 power scripts recommended by hardware team.
Introduced a new TWL4030 power script file, which can be used by different
OMAP3 board with the power companion chip TWL4030.
Updated the changes for TWL4030 errata 27 & 28, and modified
the TWL4030 power script.
Workaround for TWL4030 erratum 27 is required for Si version less than or
equal to TWL5030 ES1.1.
TWL4030 script changes re-based on Kevin's PM tree in pm branch.
Changes in v7:
changes to fix Nishanth Menon's comments
i) Added the workaround for TWL4030 Erratum 27
split the first patch in v6
i) fix for twl4030 script load
ii) correct the warning print during script loading
Added new patch files
i) changing sys_off signal polarity
Changes in v8:
updated the change logs
moving the TWL IDCODE checking to twl-core.c
Changes in V9:
changes to fix David Derrick's comments
i) turn OFF the NRES_PWRON resource in warm reset sequence
ii) optimize the i2c writes during resource configuration
Since the voltage layer is evolving to a new design, the voltage dependant
changes required for the TWL4030 script are not incorporated in the patch series.
So this TWL4030 script patch series can be tested with a separate patch for
voltage layer changes.
link: http://pastebin.mozilla.org/1204011
This changes are tested on OMAP3430 & OMAP3630 SDP with off mode enabled in suspend path.
Tested with suspend/resume script, which will test system suspend in a loop.
Tested for more than 1000 iterations.
Also tested the reboot with WRM_RST button & reboot command.
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
Lesly A M (9):
OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence
OMAP3: PM: Correct the warning print during script loading
OMAP3: PM: Modifying the macro name Main_Ref to all caps
OMAP3: PM: TWL4030 power scripts for OMAP3 boards
OMAP3: PM: TWL5030 version checking
MFD: TWL4030: workaround changes for TWL4030 Erratum 27
OMAP3430: Updating the board file to use TWL4030 scripts
OMAP3630: Updating the board file to use TWL4030 scripts
OMAP3: PM: TWL4030 optimizing resource configuration
arch/arm/mach-omap2/Makefile | 1 +
arch/arm/mach-omap2/board-3430sdp.c | 2 +
arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +-
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 +
arch/arm/mach-omap2/twl4030-script.c | 481 ++++++++++++++++++++++++++
arch/arm/mach-omap2/twl4030-script.h | 23 ++
drivers/mfd/twl-core.c | 62 ++++
drivers/mfd/twl4030-power.c | 211 ++++++++---
include/linux/i2c/twl.h | 53 +++-
9 files changed, 774 insertions(+), 63 deletions(-)
create mode 100644 arch/arm/mach-omap2/twl4030-script.c
create mode 100644 arch/arm/mach-omap2/twl4030-script.h
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-26 9:54 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 2/9] OMAP3: PM: Correct the warning print during script loading Lesly A M
` (8 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Only configure sleep script when the flag is TWL4030_SLEEP_SCRIPT.
Adding the missing brackets for fixing the issue.
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
drivers/mfd/twl4030-power.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 16422de..2c0d4d1 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -447,12 +447,13 @@ static int __init load_twl4030_script(struct twl4030_script *tscript,
if (err)
goto out;
}
- if (tscript->flags & TWL4030_SLEEP_SCRIPT)
+ if (tscript->flags & TWL4030_SLEEP_SCRIPT) {
if (order)
pr_warning("TWL4030: Bad order of scripts (sleep "\
"script before wakeup) Leads to boot"\
"failure on some boards\n");
err = twl4030_config_sleep_sequence(address);
+ }
out:
return err;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 2/9] OMAP3: PM: Correct the warning print during script loading
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
2011-04-14 12:27 ` [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-26 9:57 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 3/9] OMAP3: PM: Modifying the macro name Main_Ref to all caps Lesly A M
` (7 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Correcting the if condition check for printing the warning,
if wakeup script is not updated before updating the sleep script.
Since the flag 'order' is set to '1' while updating the wakeup script for P1P2,
the condition checking for printing the warning should be if(!order)
(ie: print the warning if wakeup script is not updated before updating the sleep script)
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
drivers/mfd/twl4030-power.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 2c0d4d1..8373d79 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -448,7 +448,7 @@ static int __init load_twl4030_script(struct twl4030_script *tscript,
goto out;
}
if (tscript->flags & TWL4030_SLEEP_SCRIPT) {
- if (order)
+ if (!order)
pr_warning("TWL4030: Bad order of scripts (sleep "\
"script before wakeup) Leads to boot"\
"failure on some boards\n");
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 3/9] OMAP3: PM: Modifying the macro name Main_Ref to all caps
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
2011-04-14 12:27 ` [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence Lesly A M
2011-04-14 12:27 ` [PATCH v9 2/9] OMAP3: PM: Correct the warning print during script loading Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-26 10:07 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards Lesly A M
` (6 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Modifying the macro name Main_Ref to all caps(MAIN_REF).
Suggested by Nishanth Menon <nm@ti.com>
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +-
drivers/mfd/twl4030-power.c | 2 +-
include/linux/i2c/twl.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 5f1900c..e42b391 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -730,7 +730,7 @@ static struct twl4030_resconfig twl4030_rconfig[] __initdata = {
{ .resource = RES_RESET, .devgroup = -1,
.type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
},
- { .resource = RES_Main_Ref, .devgroup = -1,
+ { .resource = RES_MAIN_REF, .devgroup = -1,
.type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
},
{ 0, 0},
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 8373d79..8162e43 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -120,7 +120,7 @@ static u8 res_config_addrs[] = {
[RES_HFCLKOUT] = 0x8b,
[RES_32KCLKOUT] = 0x8e,
[RES_RESET] = 0x91,
- [RES_Main_Ref] = 0x94,
+ [RES_MAIN_REF] = 0x94,
};
static int __init twl4030_write_script_byte(u8 address, u8 byte)
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 9d88b71..dcc2998 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -501,7 +501,7 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
#define RES_32KCLKOUT 26
#define RES_RESET 27
/* Power Reference */
-#define RES_Main_Ref 28
+#define RES_MAIN_REF 28
#define TOTAL_RESOURCES 28
/*
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (2 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 3/9] OMAP3: PM: Modifying the macro name Main_Ref to all caps Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-18 12:32 ` Tony Lindgren
2011-04-14 12:27 ` [PATCH v9 5/9] OMAP3: PM: TWL5030 version checking Lesly A M
` (5 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Power bus message sequence for TWL4030 to enter sleep/wakeup/warm_reset.
TWL4030 power scripts which can be used by different OMAP3 boards
with the power companion chip (TWL4030 series).
The twl4030 generic script can be used by any board file to update
the power data in twl4030_platform_data.
http://omapedia.org/wiki/TWL4030_power_scripts
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
arch/arm/mach-omap2/twl4030-script.c | 331 ++++++++++++++++++++++++++++++++++
arch/arm/mach-omap2/twl4030-script.h | 23 +++
include/linux/i2c/twl.h | 33 +++-
3 files changed, 384 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/mach-omap2/twl4030-script.c
create mode 100644 arch/arm/mach-omap2/twl4030-script.h
diff --git a/arch/arm/mach-omap2/twl4030-script.c b/arch/arm/mach-omap2/twl4030-script.c
new file mode 100644
index 0000000..aa5afbd
--- /dev/null
+++ b/arch/arm/mach-omap2/twl4030-script.c
@@ -0,0 +1,331 @@
+/*
+ * OMAP power script for PMIC TWL4030
+ *
+ * Author: Lesly A M <leslyam@ti.com>
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc.
+ * Lesly A M <leslyam@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/i2c/twl.h>
+
+#include "twl4030-script.h"
+
+/*
+ * power management signal connections for OMAP3430 with TWL5030
+ *
+ * TWL5030 OMAP3430
+ * ______________________ _____________________
+ * | | | |
+ * | (P1) NSLEEP1|<----------|SYS_OFFMODE |
+ * | NRESWARM|<----------|NWARMRESET |
+ * | (P2) NSLEEP2|---| | |
+ * | | === | |
+ * | | - | |
+ * | | | |
+ * | VDD1 |---------->| VDD1 |
+ * | VDD2 |---------->| VDD2 |
+ * | VIO |---------->| VDDS |
+ * ________ | VAUX1 | | |
+ * | | | ... | | |
+ * | ENABLE|<--------|CLKEN CLKREQ|<----------|SYS_CLKREQ |
+ * | CLKOUT|-------->|HFCLKIN (P3) HFCLKOUT|---------->|XTALIN |
+ * |________| |______________________| |_____________________|
+ *
+ *
+ * Signal descriptions:
+ *
+ * SYS_OFFMODE - OMAP drives this signal low only when the OMAP is in the
+ * OFF idle mode. It is driven high when a wake up event is detected.
+ * This signal should control the P1 device group in the PMIC.
+ *
+ * SYS_CLKREQ - OMAP should drive this signal low when the OMAP goes into
+ * any idle mode. This signal should control the P3 device group
+ * in the PMIC. It is used to notify PMIC when XTALIN is no longer needed.
+ *
+ * NSLEEP1(P1) - When this signal goes low the P1 sleep sequence is executed
+ * in the PMIC turning off certain resources. When this signal goes high
+ * the P1 active sequence is executed turning back on certain resources.
+ *
+ * NSLEEP2(P2) - This signal controls the P2 device group of the PMIC.
+ * It is not used in this setup and should be tied to ground.
+ * This can be used for connecting a different processor or MODEM chip.
+ *
+ * CLKREQ(P3) - When this signal goes low the P3 sleep sequence is executed
+ * in the PMIC turning off HFCLKOUT. When this signal goes high
+ * the P3 active sequence is executed turning back on HFCLKOUT and other
+ * resources.
+ *
+ * CLKEN - Enable signal for oscillator. Should only go low when OMAP is
+ * in the OFF idle mode due to long oscillator startup times.
+ *
+ * HFCLKIN - Oscillator output clock into PMIC.
+ *
+ * HFCLKOUT - System clock output from PMIC to OMAP.
+ *
+ * XTALIN - OMAP system clock input(HFCLKOUT).
+ */
+
+/*
+ * Recommended sleep and active sequences for TWL5030 when connected to OMAP3
+ *
+ * WARNING: If the board is using NSLEEP2(P2), should modify this script and
+ * setuptime values accordingly.
+ *
+ * Chip Retention/Off (using i2c for scaling voltage):
+ * When OMAP de-assert the SYS_CLKREQ signal, only HFCLKOUT is affected
+ * since it is the only resource assigned to P3 only.
+ *
+ * Sysoff (using sys_off signal):
+ * When OMAP de-assert the SYS_OFFMODE signal A2S(active to sleep sequence)
+ * on the PMIC is executed. This will put resources of TYPE2=1 and TYPE2=2
+ * into sleep. At this point only resources assigned to P1 only will be
+ * affected (VDD1, VDD2 & VPLL1).
+ *
+ * Next the OMAP will lower SYS_CLKREQ which will allow the A2S sequence
+ * in PMIC to execute again. This will put resources of TYPE2=1 and TYPE2=2
+ * into sleep but will affect resources that are assigned to P3(HFCLKOUT)
+ * only or assigned to P1 and P3.
+ *
+ * On wakeup event OMAP goes active and pulls the SYS_CLKREQ high,
+ * which will execute the P3 S2A sequence on the PMIC. This will turn on
+ * resources assigned to P3 or assigned to P1 and P3 and of TYPE2=2.
+ *
+ * Next the OMAP will wait the PRM_VOLTOFFSET time and then de-assert
+ * the SYS_OFFMODE pin allowing the PMIC to execute the P1 S2A active
+ * sequence. This will turn on resources assigned to P1 or assigned to
+ * P1 and P3 and of TYPE2=1.
+ *
+ * Timing diagram for OMAP wakeup from OFFMODE using sys_off signal
+ * _____________________________________________________________
+ * OMAP active __/
+ * |<--------------------PRM_CLKSETP-------------------->|
+ * ______________________________________________________
+ * SYS_CLKREQ _________/
+ * ___________________________________________________
+ * CLKEN ____________/
+ *
+ * HFCLKIN _______________________________________________/////////////////
+ *
+ * HFCLKOUT __________________________________________________//////////////
+ * |<---PRM_VOLTOFFSET-->|
+ * ________________________________
+ * SYS_OFFMODE _______________________________/
+ * |<--------PRM_VOLTSETUP2------->|
+ * ___________
+ * VPLL1 ____________________________________________________/
+ * __
+ * VDD1 _____________________________________________________________/
+ * __
+ * VDD2 _____________________________________________________________/
+ *
+ * Other resources which are not handled by this script should be
+ * controlled by the respective drivers using them (VAUX1, VAUX2, VAUX3,
+ * VAUX4, VMMC1, VMMC2, VPLL2, VSIM, VDAC, VUSB1V5, VUSB1V8 & VUSB3V1).
+ *
+ * More info:
+ * http://omapedia.org/wiki/TWL4030_power_scripts
+ */
+
+/**
+ * DOC: Sleep to active sequence for P1/P2
+ *
+ * Sequence to control the TWL4030 Power resources,
+ * when the system wakeup from sleep.
+ * Executed upon P1_P2 transition for wakeup
+ * (sys_offmode signal de-asserted on OMAP).
+ */
+static struct twl4030_ins wakeup_p12_seq[] __initdata = {
+ /*
+ * Broadcast message to put resources to active
+ *
+ * Since we are not using TYPE, resources which have TYPE2 configured
+ * as 1 will be targeted (VPLL1, VDD1, VDD2, REGEN, NRES_PWRON, SYSEN).
+ */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
+ RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wakeup_p12_script __initdata = {
+ .script = wakeup_p12_seq,
+ .size = ARRAY_SIZE(wakeup_p12_seq),
+ .flags = TWL4030_WAKEUP12_SCRIPT,
+};
+
+/**
+ * DOC: Sleep to active sequence for P3
+ *
+ * Sequence to control the TWL4030 Power resources,
+ * when the system wakeup from sleep.
+ * Executed upon P3 transition for wakeup
+ * (clkreq signal asserted on OMAP).
+ */
+static struct twl4030_ins wakeup_p3_seq[] __initdata = {
+ /*
+ * Broadcast message to put resources to active
+ *
+ * Since we are not using TYPE, resources which have TYPE2 configured
+ * as 2 will be targeted
+ * (VINTANA1, VINTANA2, VINTDIG, VIO, CLKEN, HFCLKOUT).
+ */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wakeup_p3_script __initdata = {
+ .script = wakeup_p3_seq,
+ .size = ARRAY_SIZE(wakeup_p3_seq),
+ .flags = TWL4030_WAKEUP3_SCRIPT,
+};
+
+/**
+ * DOC: Active to sleep sequence for P1/P2/P3
+ *
+ * Sequence to control the TWL4030 Power resources,
+ * when the system goes into sleep.
+ * Executed upon P1_P2/P3 transition for sleep.
+ * (sys_offmode signal asserted/clkreq de-asserted on OMAP).
+ */
+static struct twl4030_ins sleep_on_seq[] __initdata = {
+ /* Broadcast message to put res to sleep (TYPE2 = 1, 2) */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
+ RES_STATE_SLEEP), 2},
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_SLEEP), 2},
+};
+
+static struct twl4030_script sleep_on_script __initdata = {
+ .script = sleep_on_seq,
+ .size = ARRAY_SIZE(sleep_on_seq),
+ .flags = TWL4030_SLEEP_SCRIPT,
+};
+
+/**
+ * DOC: Warm reset sequence
+ *
+ * Sequence to reset the TWL4030 Power resources,
+ * when the system gets warm reset.
+ * Executed upon warm reset signal.
+ *
+ * First the device is put in reset, then the system clock is requested to
+ * the external oscillator, and default ON power reference and power providers
+ * are enabled. Next some additional resources which are software controlled
+ * are enabled. Finally sequence is ended by the release of TWL5030 reset.
+ */
+static struct twl4030_ins wrst_seq[] __initdata = {
+ /*
+ * As a workaround for OMAP Erratum (ID: i537 - OMAP HS devices are
+ * not recovering from warm reset while in OFF mode)
+ * NRESPWRON is toggled to force a power on reset condition to OMAP
+ */
+ /* Trun OFF NRES_PWRON */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_NRES_PWRON, RES_STATE_OFF), 2},
+ /* Reset twl4030 */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_OFF), 2},
+ /* Reset MAIN_REF */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_MAIN_REF, RES_STATE_WRST), 2},
+ /* Reset All type2_group2 */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_WRST), 2},
+ /* Reset VUSB_3v1 */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_VUSB_3V1, RES_STATE_WRST), 2},
+ /* Reset All type2_group1 */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
+ RES_STATE_WRST), 2},
+ /* Reset the Reset & Contorl_signals */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
+ RES_STATE_WRST), 2},
+ /* Re-enable twl4030 */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_ACTIVE), 2},
+ /* Trun ON NRES_PWRON */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_NRES_PWRON, RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wrst_script __initdata = {
+ .script = wrst_seq,
+ .size = ARRAY_SIZE(wrst_seq),
+ .flags = TWL4030_WRST_SCRIPT,
+};
+
+/* TWL4030 script for sleep, wakeup & warm_reset */
+static struct twl4030_script *twl4030_scripts[] __initdata = {
+ &wakeup_p12_script,
+ &wakeup_p3_script,
+ &sleep_on_script,
+ &wrst_script,
+};
+
+/**
+ * DOC: TWL4030 resource configuration
+ *
+ * Resource which are attached to P1 device group alone
+ * will go to sleep state, when sys_off signal from OMAP is de-asserted.
+ * (VPLL1, VDD1, VDD2)
+ *
+ * None of the resources are attached to P2 device group alone.
+ * (WARNING: If MODEM or connectivity chip is connected to NSLEEP2 PIN on
+ * TWL4030, should modify the resource configuration accordingly).
+ *
+ * Resource which are attached to P3 device group alone
+ * will go to sleep state, when clk_req signal from OMAP is de-asserted.
+ * (HFCLKOUT)
+ *
+ * Resource which are attached to more than one device group
+ * will go to sleep state, when corresponding signals are de-asserted.
+ * (VINTANA1, VINTANA2, VINTDIG, VIO, REGEN, NRESPWRON, CLKEN, SYSEN)
+ *
+ * REGEN is an output of the device which can be connected to slave power ICs
+ * or external LDOs that power on before voltage for the IO interface (VIO).
+ *
+ * SYSEN is a bidirectional signal of the device that controls slave power ICs.
+ * In master mode, the device sets SYSEN high to enable the slave power ICs.
+ * In slave mode, when one of the power ICs drives the SYSEN signal low,
+ * all devices of the platform stay in the wait-on state.
+ *
+ * Resource which are attached to none of the device group by default
+ * will be in sleep state. These resource should be controlled by
+ * the respective drivers using them.
+ * Resource which are controlled by drivers are not modified here.
+ * (VAUX1, VAUX2, VAUX3, VAUX4, VMMC1, VMMC2, VPLL2, VSIM, VDAC,
+ * VUSB1V5, VUSB1V8, VUSB3V1)
+ *
+ * Resource using reset values.
+ * (32KCLKOUT, TRITON_RESET, MAINREF)
+ */
+static struct twl4030_resconfig twl4030_rconfig[] = {
+ { .resource = RES_VPLL1, .devgroup = DEV_GRP_P1, .type = 3,
+ .type2 = 1, .remap_sleep = RES_STATE_OFF },
+ { .resource = RES_VINTANA1, .devgroup = DEV_GRP_ALL, .type = 1,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VINTANA2, .devgroup = DEV_GRP_ALL, .type = 0,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VINTDIG, .devgroup = DEV_GRP_ALL, .type = 1,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VIO, .devgroup = DEV_GRP_ALL, .type = 2,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VDD1, .devgroup = DEV_GRP_P1,
+ .type = 4, .type2 = 1, .remap_sleep = RES_STATE_OFF },
+ { .resource = RES_VDD2, .devgroup = DEV_GRP_P1,
+ .type = 3, .type2 = 1, .remap_sleep = RES_STATE_OFF },
+ { .resource = RES_REGEN, .devgroup = DEV_GRP_ALL, .type = 2,
+ .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_NRES_PWRON, .devgroup = DEV_GRP_ALL, .type = 0,
+ .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_CLKEN, .devgroup = DEV_GRP_ALL, .type = 3,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_SYSEN, .devgroup = DEV_GRP_ALL, .type = 6,
+ .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3,
+ .type = 0, .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { 0, 0},
+};
+
+struct twl4030_power_data twl4030_generic_script __initdata = {
+ .scripts = twl4030_scripts,
+ .num = ARRAY_SIZE(twl4030_scripts),
+ .resource_config = twl4030_rconfig,
+};
diff --git a/arch/arm/mach-omap2/twl4030-script.h b/arch/arm/mach-omap2/twl4030-script.h
new file mode 100644
index 0000000..3611318
--- /dev/null
+++ b/arch/arm/mach-omap2/twl4030-script.h
@@ -0,0 +1,23 @@
+/*
+ * OMAP TWL4030 power scripts header file
+ *
+ * Author: Lesly A M <leslyam@ti.com>
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc.
+ * Lesly A M <leslyam@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ARCH_ARM_MACH_OMAP3_TWL4030_SCRIPT_H
+#define __ARCH_ARM_MACH_OMAP3_TWL4030_SCRIPT_H
+
+#ifdef CONFIG_TWL4030_POWER
+extern struct twl4030_power_data twl4030_generic_script;
+#else
+#define twl4030_generic_script NULL;
+#endif
+
+#endif
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index dcc2998..bb28d33 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -436,9 +436,23 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
/* Power bus message definitions */
-/* The TWL4030/5030 splits its power-management resources (the various
- * regulators, clock and reset lines) into 3 processor groups - P1, P2 and
- * P3. These groups can then be configured to transition between sleep, wait-on
+/*
+ * The TWL4030/5030 splits its power-management resources (the various
+ * regulators, clock and reset lines) into 3 processor groups - P1, P2 and P3.
+ *
+ * Resources attached to device group P1 is managed depending on the state of
+ * NSLEEP1 pin of TWL4030, which is connected to sys_off signal from OMAP
+ *
+ * Resources attached to device group P2 is managed depending on the state of
+ * NSLEEP2 pin of TWL4030, which is can be connected to a modem or
+ * connectivity chip
+ *
+ * Resources attached to device group P3 is managed depending on the state of
+ * CLKREQ pin of TWL4030, which is connected to clk request signal from OMAP
+ *
+ * If required these resources can be attached to combination of P1/P2/P3.
+ *
+ * These groups can then be configured to transition between sleep, wait-on
* and active states by sending messages to the power bus. See Section 5.4.2
* Power Resources of TWL4030 TRM
*/
@@ -448,7 +462,17 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
#define DEV_GRP_P1 0x1 /* P1: all OMAP devices */
#define DEV_GRP_P2 0x2 /* P2: all Modem devices */
#define DEV_GRP_P3 0x4 /* P3: all peripheral devices */
+#define DEV_GRP_ALL 0x7 /* P1/P2/P3: all devices */
+/*
+ * The 27 power resources in TWL4030 is again divided into
+ * analog resources:
+ * Power Providers - LDO regulators, dc-to-dc regulators
+ * Power Reference - analog reference
+ *
+ * and digital resources:
+ * Reset & Clock - reset and clock signals.
+ */
/* Resource groups */
#define RES_GRP_RES 0x0 /* Reserved */
#define RES_GRP_PP 0x1 /* Power providers */
@@ -460,7 +484,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
#define RES_GRP_ALL 0x7 /* All resource groups */
#define RES_TYPE2_R0 0x0
+#define RES_TYPE2_R1 0x1
+#define RES_TYPE2_R2 0x2
+#define RES_TYPE_R0 0x0
#define RES_TYPE_ALL 0x7
/* Resource states */
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 5/9] OMAP3: PM: TWL5030 version checking
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (3 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-26 10:12 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27 Lesly A M
` (4 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Added API to get the TWL5030 Si version from the IDCODE register.
It is used for enabling the workaround for TWL erratum 27.
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
drivers/mfd/twl-core.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/i2c/twl.h | 17 ++++++++++++-
2 files changed, 78 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index a35fa7d..c68e0cf 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -229,6 +229,9 @@
/* is driver active, bound to a chip? */
static bool inuse;
+/* TWL IDCODE Register value */
+static u32 twl_idcode;
+
static unsigned int twl_id;
unsigned int twl_rev(void)
{
@@ -487,6 +490,58 @@ EXPORT_SYMBOL(twl_i2c_read_u8);
/*----------------------------------------------------------------------*/
+/**
+ * twl_read_idcode_register - API to read the IDCODE register.
+ *
+ * Unlocks the IDCODE register and read the 32 bit value.
+ */
+static int twl_read_idcode_register(void)
+{
+ int err;
+
+ err = twl_i2c_write_u8(TWL4030_MODULE_INTBR, TWL_EEPROM_R_UNLOCK,
+ REG_UNLOCK_TEST_REG);
+ if (err) {
+ pr_err("TWL4030 Unable to unlock IDCODE registers -%d\n", err);
+ goto fail;
+ }
+
+ err = twl_i2c_read(TWL4030_MODULE_INTBR, (u8 *)(&twl_idcode),
+ REG_IDCODE_7_0, 4);
+ if (err) {
+ pr_err("TWL4030: unable to read IDCODE -%d\n", err);
+ goto fail;
+ }
+
+ err = twl_i2c_write_u8(TWL4030_MODULE_INTBR, 0x0, REG_UNLOCK_TEST_REG);
+ if (err)
+ pr_err("TWL4030 Unable to relock IDCODE registers -%d\n", err);
+fail:
+ return err;
+}
+
+/**
+ * twl_get_type - API to get TWL Si type.
+ *
+ * Api to get the TWL Si type from IDCODE value.
+ */
+int twl_get_type(void)
+{
+ return TWL_SIL_TYPE(twl_idcode);
+}
+EXPORT_SYMBOL_GPL(twl_get_type);
+
+/**
+ * twl_get_version - API to get TWL Si version.
+ *
+ * Api to get the TWL Si version from IDCODE value.
+ */
+int twl_get_version(void)
+{
+ return TWL_SIL_REV(twl_idcode);
+}
+EXPORT_SYMBOL_GPL(twl_get_version);
+
static struct device *
add_numbered_child(unsigned chip, const char *name, int num,
void *pdata, unsigned pdata_len,
@@ -1010,6 +1065,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
unsigned i;
struct twl4030_platform_data *pdata = client->dev.platform_data;
u8 temp;
+ int ret = 0;
if (!pdata) {
dev_dbg(&client->dev, "no platform data?\n");
@@ -1056,6 +1112,12 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
/* setup clock framework */
clocks_init(&client->dev, pdata->clock);
+ /* read TWL IDCODE Register */
+ if (twl_id == TWL4030_CLASS_ID) {
+ ret = twl_read_idcode_register();
+ WARN(ret < 0, "Error: reading twl_idcode register value\n");
+ }
+
/* load power event scripts */
if (twl_has_power() && pdata->power)
twl4030_power_init(pdata->power);
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index bb28d33..e1ff2c4 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -150,7 +150,12 @@
#define MMC_PU (0x1 << 3)
#define MMC_PD (0x1 << 2)
-
+#define TWL_SIL_TYPE(rev) ((rev) & 0x00FFFFFF)
+#define TWL_SIL_REV(rev) ((rev) >> 24)
+#define TWL_SIL_5030 0x09002F
+#define TWL5030_REV_1_0 0x00
+#define TWL5030_REV_1_1 0x10
+#define TWL5030_REV_1_2 0x30
#define TWL4030_CLASS_ID 0x4030
#define TWL6030_CLASS_ID 0x6030
@@ -180,6 +185,9 @@ int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg);
int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
+int twl_get_type(void);
+int twl_get_version(void);
+
int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
@@ -279,7 +287,12 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
*(Use TWL_4030_MODULE_INTBR)
*/
+#define REG_IDCODE_7_0 0x00
+#define REG_IDCODE_15_8 0x01
+#define REG_IDCODE_16_23 0x02
+#define REG_IDCODE_31_24 0x03
#define REG_GPPUPDCTR1 0x0F
+#define REG_UNLOCK_TEST_REG 0x12
/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */
@@ -288,6 +301,8 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
#define SR_I2C_SCL_CTRL_PU BIT(4)
#define SR_I2C_SDA_CTRL_PU BIT(6)
+#define TWL_EEPROM_R_UNLOCK 0x49
+
/*----------------------------------------------------------------------*/
/*
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (4 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 5/9] OMAP3: PM: TWL5030 version checking Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-26 10:13 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 7/9] OMAP3430: Updating the board file to use TWL4030 scripts Lesly A M
` (3 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Workaround for TWL5030 Silicon Errata 27 & 28:
27 - VDD1, VDD2, may have glitches when their output value is updated.
28 - VDD1 and / or VDD2 DCDC clock may stop working when internal clock
is switched from internal to external.
Erratum 27:
If the DCDC regulators is running on their internal oscillator,
negative glitches may occur on VDD1, VDD2 output when voltage is changed.
The OMAP device may reboot if the VDD1 or VDD2 go below the
core minimum operating voltage.
WORKAROUND
Set up the TWL5030 DC-DC power supplies to use the HFCLKIN instead of
the internal oscillator.
Erratum 28:
VDD1/VDD2 clock system may hang during switching the clock source from
internal oscillator to external. VDD1/VDD2 output voltages may collapse
if clock stops.
WORKAROUND
If HFCLK is disabled in OFFMODE, modify the sleep/wakeup sequence and
setuptimes to make sure the switching will happen only when HFCLKIN is stable.
Also use the TWL5030 watchdog to safeguard the first switching from
internal oscillator to HFCLKIN during the TWL5030 init.
IMPACT
power sequence is changed.
sleep/wakeup time values will be changed.
The workaround changes are called from twl4030_power_init(), since we have to
make some i2c_read calls to check the TWL4030 version & the i2c will not be
initialized in the early stage.
This workaround is required for TWL5030 Silicon version less than ES1.2
The power script & setup time changes are recommended by TI HW team.
http://omapedia.org/wiki/TWL4030_power_scripts
Changes taken from TWL4030 Erratum 27 workaround patch by Nishanth Menon.
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
arch/arm/mach-omap2/twl4030-script.c | 150 ++++++++++++++++++++++++++++++++++
drivers/mfd/twl4030-power.c | 78 ++++++++++++++++++
include/linux/i2c/twl.h | 1 +
3 files changed, 229 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/twl4030-script.c b/arch/arm/mach-omap2/twl4030-script.c
index aa5afbd..97cdaa3 100644
--- a/arch/arm/mach-omap2/twl4030-script.c
+++ b/arch/arm/mach-omap2/twl4030-script.c
@@ -324,8 +324,158 @@ static struct twl4030_resconfig twl4030_rconfig[] = {
{ 0, 0},
};
+/*
+ * Sleep and active sequences with changes for TWL5030 Erratum 27 workaround
+ *
+ * Sysoff (using sys_off signal):
+ * When SYS_CLKREQ goes low during retention no resources will be affected
+ * since no resources are assigned to P3 only.
+ *
+ * Since all resources are assigned to P1 and P3 then all resources
+ * will be affected on the falling edge of P3 (SYS_CLKREQ).
+ * When OMAP lower the SYS_CLKREQ signal PMIC will execute the
+ * A2S sequence in which HFCLKOUT is dissabled first and
+ * after 488.32 usec(PRM_VOLTOFFSET) resources assigned to P1 and P3
+ * and of TYPE2=1 are put to sleep
+ * (VDD1, VDD2, VPLL1, REGEN, NRESPWRON & SYSEN).
+ * Again after a 61.04 usec resources assigned to P1 and P3
+ * and of TYPE2=2 are put to sleep
+ * (VINTANA1, VINTANA2, VINTDIG, VIO & CLKEN).
+ *
+ * On wakeup event OMAP goes active and pulls the SYS_CLKREQ high,
+ * and will execute the S2A sequence which is same for P1_P2 & P3.
+ * This will turn on all resources of TYPE2=2 to go to the active state.
+ * Three dummy broadcast messages are added to get a delay of ~10 ms
+ * before enabling the HFCLKOUT resource. And after a 30.52 usec
+ * all resources of TYPE2=1 are put to the active state.
+ *
+ * This 10ms delay can be reduced if the oscillator is having less
+ * stabilization time. A should be taken care if it needs more time
+ * for stabilization.
+ *
+ */
+
+/**
+ * DOC: Sleep to Active sequence for P1/P2/P3
+ *
+ * The wakeup sequence is adjusted to do the VDD1/VDD2 voltage ramp-up
+ * only after HFCLKIN is stabilized and the HFCLKOUT is enabled.
+ */
+static struct twl4030_ins wakeup_seq_erratum27[] __initdata = {
+ /*
+ * Broadcast message to put res(TYPE2 = 2) to active.
+ * Wait for ~10 mS (ramp-up time for OSC on the board)
+ * after HFCLKIN is enabled
+ */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_ACTIVE), 55},
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_ACTIVE), 55},
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_ACTIVE), 54},
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_ACTIVE), 1},
+ /* Singular message to enable HCLKOUT after HFCLKIN is stabilized */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_HFCLKOUT, RES_STATE_ACTIVE), 1},
+ /*
+ * Broadcast message to put res(TYPE2 = 1) to active.
+ * VDD1/VDD2 ramp-up after HFCLKIN is stable and HFCLKOUT is enabled.
+ */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
+ RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wakeup_script_erratum27 __initdata = {
+ .script = wakeup_seq_erratum27,
+ .size = ARRAY_SIZE(wakeup_seq_erratum27),
+ .flags = TWL4030_WAKEUP12_SCRIPT | TWL4030_WAKEUP3_SCRIPT,
+};
+
+/**
+ * DOC: Active to Sleep sequence for P1/P2/P3
+ *
+ * The sleep sequence is adjusted to do the switching of VDD1/VDD2/VIO OSC from
+ * HFCLKIN to internal oscillator when the HFCLKIN is stable.
+ */
+static struct twl4030_ins __initdata sleep_on_seq_erratum27[] = {
+ /*
+ * Singular message to disable HCLKOUT.
+ * Wait for ~488.32 uS to do the switching of VDD1/VDD2/VIO OSC from
+ * HFCLKIN to internal oscillator before disabling HFCLKIN.
+ */
+ {MSG_SINGULAR(DEV_GRP_NULL, RES_HFCLKOUT, RES_STATE_SLEEP), 20},
+ /* Broadcast message to put res(TYPE2 = 1) to sleep */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
+ RES_STATE_SLEEP), 2},
+ /* Broadcast message to put res(TYPE2 = 2) to sleep, disable HFCLKIN */
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
+ RES_STATE_SLEEP), 2},
+};
+
+static struct twl4030_script sleep_on_script_erratum27 __initdata = {
+ .script = sleep_on_seq_erratum27,
+ .size = ARRAY_SIZE(sleep_on_seq_erratum27),
+ .flags = TWL4030_SLEEP_SCRIPT,
+};
+
+/* TWL4030 script for sleep, wakeup & warm_reset */
+static struct twl4030_script *twl4030_scripts_erratum27[] __initdata = {
+ &sleep_on_script_erratum27,
+ &wakeup_script_erratum27,
+ &wrst_script,
+};
+
+/**
+ * DOC: TWL4030 resource configuration
+ *
+ * VDD1/VDD2/VPLL are assigned to P1 and P3, to have better control
+ * during OFFMODE. HFCLKOUT is assigned to P1 and P3 (*p2) to turn off
+ * only during OFFMODE.
+ * (*P2 is included if the platform uses it for modem/some other processor)
+ */
+static struct twl4030_resconfig twl4030_rconfig_erratum27[] = {
+ { .resource = RES_VPLL1, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
+ .type = 3, .type2 = 1, .remap_sleep = RES_STATE_OFF },
+ { .resource = RES_VINTANA1, .devgroup = DEV_GRP_ALL, .type = 1,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VINTANA2, .devgroup = DEV_GRP_ALL, .type = 0,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VINTDIG, .devgroup = DEV_GRP_ALL, .type = 1,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VIO, .devgroup = DEV_GRP_ALL, .type = 2,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_VDD1, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
+ .type = 4, .type2 = 1, .remap_sleep = RES_STATE_OFF },
+ { .resource = RES_VDD2, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
+ .type = 3, .type2 = 1, .remap_sleep = RES_STATE_OFF },
+ { .resource = RES_REGEN, .devgroup = DEV_GRP_ALL, .type = 2,
+ .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_NRES_PWRON, .devgroup = DEV_GRP_ALL, .type = 0,
+ .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_CLKEN, .devgroup = DEV_GRP_ALL, .type = 3,
+ .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_SYSEN, .devgroup = DEV_GRP_ALL, .type = 6,
+ .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
+ .type = 0, .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
+ { 0, 0},
+};
+
+/**
+ * twl5030_script_erratum27() - API to modify TWL4030 script
+ *
+ * Updating the TWL4030 script & resource configuration
+ */
+static void __init twl5030_script_erratum27(void)
+{
+ twl4030_generic_script.scripts = twl4030_scripts_erratum27;
+ twl4030_generic_script.num = ARRAY_SIZE(twl4030_scripts_erratum27);
+ twl4030_generic_script.resource_config = twl4030_rconfig_erratum27;
+}
+
struct twl4030_power_data twl4030_generic_script __initdata = {
.scripts = twl4030_scripts,
.num = ARRAY_SIZE(twl4030_scripts),
.resource_config = twl4030_rconfig,
+ .twl5030_erratum27wa_script = twl5030_script_erratum27,
};
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 8162e43..8d1db78 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -63,6 +63,14 @@ static u8 twl4030_start_script_address = 0x2b;
#define R_MEMORY_ADDRESS PHY_TO_OFF_PM_MASTER(0x59)
#define R_MEMORY_DATA PHY_TO_OFF_PM_MASTER(0x5a)
+#define R_VDD1_OSC 0x5C
+#define R_VDD2_OSC 0x6A
+#define R_VIO_OSC 0x52
+#define EXT_FS_CLK_EN BIT(6)
+
+#define R_WDT_CFG 0x03
+#define WDT_WRK_TIMEOUT 0x03
+
/* resource configuration registers
<RESOURCE>_DEV_GRP at address 'n+0'
<RESOURCE>_TYPE at address 'n+1'
@@ -511,6 +519,67 @@ int twl4030_remove_script(u8 flags)
return err;
}
+/**
+ * twl_dcdc_use_hfclk - API to use HFCLK for TWL DCDCs
+ *
+ * TWL DCDCs switching to HFCLK instead of using internal RC oscillator.
+ */
+static int __init twl_dcdc_use_hfclk(void)
+{
+ u8 val;
+ u8 smps_osc_reg[] = {R_VDD1_OSC, R_VDD2_OSC, R_VIO_OSC};
+ int i;
+ int err;
+
+ for (i = 0; i < sizeof(smps_osc_reg); i++) {
+ err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &val,
+ smps_osc_reg[i]);
+ val |= EXT_FS_CLK_EN;
+ err |= twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, val,
+ smps_osc_reg[i]);
+ }
+ return err;
+}
+
+/**
+ * twl_erratum27_workaround - Workaround for TWL5030 Silicon Erratum 27
+ * 27 - VDD1, VDD2, may have glitches when their output value is updated.
+ * 28 - VDD1 and / or VDD2 DCDC clock may stop working when internal clock is
+ * switched from internal to external.
+ *
+ * Workaround requires the TWL DCDCs to use HFCLK instead of
+ * internal oscillator. Also enable TWL watchdog before switching the osc
+ * to recover if the VDD1/VDD2 stop working.
+ */
+static void __init twl_erratum27_workaround(void)
+{
+ u8 wdt_counter_val = 0;
+ int err;
+
+ /* Setup the twl wdt to take care of borderline failure case */
+ err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &wdt_counter_val,
+ R_WDT_CFG);
+ err |= twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, WDT_WRK_TIMEOUT,
+ R_WDT_CFG);
+
+ /* TWL DCDC switching to HFCLK */
+ err |= twl_dcdc_use_hfclk();
+
+ /* restore the original value */
+ err |= twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, wdt_counter_val,
+ R_WDT_CFG);
+ if (err)
+ pr_warning("TWL4030: workaround setup failed!\n");
+}
+
+static bool is_twl5030_erratum27wa_required(void)
+{
+ if (twl_get_type() == TWL_SIL_5030)
+ return (twl_get_version() < TWL5030_REV_1_2);
+
+ return 0;
+}
+
void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts)
{
int err = 0;
@@ -530,6 +599,15 @@ void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts)
if (err)
goto unlock;
+ /* Applying TWL5030 Erratum 27 WA based on Si revision &
+ * flag updated from board file*/
+ if (is_twl5030_erratum27wa_required()) {
+ pr_info("TWL5030: Enabling workaround for Si Erratum 27\n");
+ twl_erratum27_workaround();
+ if (twl4030_scripts->twl5030_erratum27wa_script)
+ twl4030_scripts->twl5030_erratum27wa_script();
+ }
+
for (i = 0; i < twl4030_scripts->num; i++) {
err = load_twl4030_script(twl4030_scripts->scripts[i], address);
if (err)
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index e1ff2c4..a37077e 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -672,6 +672,7 @@ struct twl4030_power_data {
struct twl4030_script **scripts;
unsigned num;
struct twl4030_resconfig *resource_config;
+ void (*twl5030_erratum27wa_script)(void);
#define TWL4030_RESCONFIG_UNDEF ((u8)-1)
};
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 7/9] OMAP3430: Updating the board file to use TWL4030 scripts
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (5 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27 Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-14 12:27 ` [PATCH v9 8/9] OMAP3630: " Lesly A M
` (2 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Using TWL4030 power scripts to control the LDOs and DCDC regulators
while going to low power mode.
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
arch/arm/mach-omap2/Makefile | 1 +
arch/arm/mach-omap2/board-3430sdp.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 82b2a67..51d17da 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -66,6 +66,7 @@ obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o
obj-$(CONFIG_PM_DEBUG) += pm-debug.o
obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o
obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o
+obj-$(CONFIG_TWL4030_POWER) += twl4030-script.o
AFLAGS_sleep24xx.o :=-Wa,-march=armv6
AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index b391804..fafbfb5 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -46,6 +46,7 @@
#include "mux.h"
#include "sdram-qimonda-hyb18m512160af-6.h"
#include "hsmmc.h"
+#include "twl4030-script.h"
#include "pm.h"
#include "control.h"
@@ -569,6 +570,7 @@ static struct twl4030_platform_data sdp3430_twldata = {
.madc = &sdp3430_madc_data,
.keypad = &sdp3430_kp_data,
.usb = &sdp3430_usb_data,
+ .power = &twl4030_generic_script,
.codec = &sdp3430_codec,
.vaux1 = &sdp3430_vaux1,
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 8/9] OMAP3630: Updating the board file to use TWL4030 scripts
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (6 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 7/9] OMAP3430: Updating the board file to use TWL4030 scripts Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-04-14 12:27 ` [PATCH v9 9/9] OMAP3: PM: TWL4030 optimizing resource configuration Lesly A M
2011-05-03 13:21 ` [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Jean Pihet
9 siblings, 0 replies; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Using TWL4030 power scripts to control the LDOs and DCDC regulators
while going to low power mode.
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 448ab60..aa8f50d 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -31,6 +31,7 @@
#include "mux.h"
#include "hsmmc.h"
+#include "twl4030-script.h"
#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
@@ -339,6 +340,7 @@ static struct twl4030_platform_data zoom_twldata = {
.usb = &zoom_usb_data,
.gpio = &zoom_gpio_data,
.keypad = &zoom_kp_twl4030_data,
+ .power = &twl4030_generic_script,
.codec = &zoom_codec_data,
.vmmc1 = &zoom_vmmc1,
.vmmc2 = &zoom_vmmc2,
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v9 9/9] OMAP3: PM: TWL4030 optimizing resource configuration
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (7 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 8/9] OMAP3630: " Lesly A M
@ 2011-04-14 12:27 ` Lesly A M
2011-05-03 13:21 ` [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Jean Pihet
9 siblings, 0 replies; 23+ messages in thread
From: Lesly A M @ 2011-04-14 12:27 UTC (permalink / raw)
To: linux-omap; +Cc: Lesly A M, Nishanth Menon, David Derrick, Samuel Ortiz
Skip the i2c register writes in twl4030_configure_resource() if the new value
is same as the old value, for devgrp/type/remap regs.
Suggested by David Derrick <dderrick@ti.com>
Signed-off-by: Lesly A M <leslyam@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: David Derrick <dderrick@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
drivers/mfd/twl4030-power.c | 126 ++++++++++++++++++++++++------------------
1 files changed, 72 insertions(+), 54 deletions(-)
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 8d1db78..95ef257 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -335,9 +335,9 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig)
{
int rconfig_addr;
int err;
- u8 type;
- u8 grp;
- u8 remap;
+ u8 type, type_value;
+ u8 grp, grp_value;
+ u8 remap, remap_value;
if (rconfig->resource > TOTAL_RESOURCES) {
pr_err("TWL4030 Resource %d does not exist\n",
@@ -348,76 +348,94 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig)
rconfig_addr = res_config_addrs[rconfig->resource];
/* Set resource group */
- err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &grp,
+ if (rconfig->devgroup != TWL4030_RESCONFIG_UNDEF) {
+ err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &grp,
rconfig_addr + DEV_GRP_OFFSET);
- if (err) {
- pr_err("TWL4030 Resource %d group could not be read\n",
- rconfig->resource);
- return err;
- }
+ if (err) {
+ pr_err("TWL4030 Resource %d group could not be read\n",
+ rconfig->resource);
+ return err;
+ }
- if (rconfig->devgroup != TWL4030_RESCONFIG_UNDEF) {
- grp &= ~DEV_GRP_MASK;
- grp |= rconfig->devgroup << DEV_GRP_SHIFT;
- err = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+ grp_value = (grp & DEV_GRP_MASK) >> DEV_GRP_SHIFT;
+
+ if (rconfig->devgroup != grp_value) {
+ grp &= ~DEV_GRP_MASK;
+ grp |= rconfig->devgroup << DEV_GRP_SHIFT;
+ err = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
grp, rconfig_addr + DEV_GRP_OFFSET);
- if (err < 0) {
- pr_err("TWL4030 failed to program devgroup\n");
- return err;
+ if (err < 0) {
+ pr_err("TWL4030 failed to program devgroup\n");
+ return err;
+ }
}
}
/* Set resource types */
- err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &type,
+ if ((rconfig->type != TWL4030_RESCONFIG_UNDEF) ||
+ (rconfig->type2 != TWL4030_RESCONFIG_UNDEF)) {
+
+ err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &type,
rconfig_addr + TYPE_OFFSET);
- if (err < 0) {
- pr_err("TWL4030 Resource %d type could not be read\n",
- rconfig->resource);
- return err;
- }
+ if (err < 0) {
+ pr_err("TWL4030 Resource %d type could not be read\n",
+ rconfig->resource);
+ return err;
+ }
- if (rconfig->type != TWL4030_RESCONFIG_UNDEF) {
- type &= ~TYPE_MASK;
- type |= rconfig->type << TYPE_SHIFT;
- }
+ type_value = type;
- if (rconfig->type2 != TWL4030_RESCONFIG_UNDEF) {
- type &= ~TYPE2_MASK;
- type |= rconfig->type2 << TYPE2_SHIFT;
- }
+ if (rconfig->type != TWL4030_RESCONFIG_UNDEF) {
+ type &= ~TYPE_MASK;
+ type |= rconfig->type << TYPE_SHIFT;
+ }
- err = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+ if (rconfig->type2 != TWL4030_RESCONFIG_UNDEF) {
+ type &= ~TYPE2_MASK;
+ type |= rconfig->type2 << TYPE2_SHIFT;
+ }
+
+ if (type != type_value) {
+ err = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
type, rconfig_addr + TYPE_OFFSET);
- if (err < 0) {
- pr_err("TWL4030 failed to program resource type\n");
- return err;
+ if (err < 0) {
+ pr_err("TWL4030 failed to program resource type\n");
+ return err;
+ }
+ }
}
/* Set remap states */
- err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &remap,
+ if ((rconfig->remap_off != TWL4030_RESCONFIG_UNDEF) ||
+ (rconfig->remap_sleep != TWL4030_RESCONFIG_UNDEF)) {
+ err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &remap,
rconfig_addr + REMAP_OFFSET);
- if (err < 0) {
- pr_err("TWL4030 Resource %d remap could not be read\n",
- rconfig->resource);
- return err;
- }
+ if (err < 0) {
+ pr_err("TWL4030 Resource %d remap could not be read\n",
+ rconfig->resource);
+ return err;
+ }
- if (rconfig->remap_off != TWL4030_RESCONFIG_UNDEF) {
- remap &= ~OFF_STATE_MASK;
- remap |= rconfig->remap_off << OFF_STATE_SHIFT;
- }
+ remap_value = remap;
- if (rconfig->remap_sleep != TWL4030_RESCONFIG_UNDEF) {
- remap &= ~SLEEP_STATE_MASK;
- remap |= rconfig->remap_sleep << SLEEP_STATE_SHIFT;
- }
+ if (rconfig->remap_off != TWL4030_RESCONFIG_UNDEF) {
+ remap &= ~OFF_STATE_MASK;
+ remap |= rconfig->remap_off << OFF_STATE_SHIFT;
+ }
- err = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
- remap,
- rconfig_addr + REMAP_OFFSET);
- if (err < 0) {
- pr_err("TWL4030 failed to program remap\n");
- return err;
+ if (rconfig->remap_sleep != TWL4030_RESCONFIG_UNDEF) {
+ remap &= ~SLEEP_STATE_MASK;
+ remap |= rconfig->remap_sleep << SLEEP_STATE_SHIFT;
+ }
+
+ if (remap != remap_value) {
+ err = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+ remap, rconfig_addr + REMAP_OFFSET);
+ if (err < 0) {
+ pr_err("TWL4030 failed to program remap\n");
+ return err;
+ }
+ }
}
return 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards
2011-04-14 12:27 ` [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards Lesly A M
@ 2011-04-18 12:32 ` Tony Lindgren
2011-04-18 12:55 ` Manuel, Lesly Arackal
0 siblings, 1 reply; 23+ messages in thread
From: Tony Lindgren @ 2011-04-18 12:32 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
Hi,
* Lesly A M <leslyam@ti.com> [110414 15:25]:
> Power bus message sequence for TWL4030 to enter sleep/wakeup/warm_reset.
>
> TWL4030 power scripts which can be used by different OMAP3 boards
> with the power companion chip (TWL4030 series).
>
> The twl4030 generic script can be used by any board file to update
> the power data in twl4030_platform_data.
>
> http://omapedia.org/wiki/TWL4030_power_scripts
>
> Signed-off-by: Lesly A M <leslyam@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: David Derrick <dderrick@ti.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> ---
> arch/arm/mach-omap2/twl4030-script.c | 331 ++++++++++++++++++++++++++++++++++
> arch/arm/mach-omap2/twl4030-script.h | 23 +++
> include/linux/i2c/twl.h | 33 +++-
> 3 files changed, 384 insertions(+), 3 deletions(-)
> create mode 100644 arch/arm/mach-omap2/twl4030-script.c
> create mode 100644 arch/arm/mach-omap2/twl4030-script.h
To me it seems this should go into drivers/mfd instead.
The script may contain omap specific values, but can be
a loadable driver module.
Maybe drivers/mfd/twl4030-script-omap.c?
Tony
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards
2011-04-18 12:32 ` Tony Lindgren
@ 2011-04-18 12:55 ` Manuel, Lesly Arackal
2011-04-18 12:58 ` Tony Lindgren
0 siblings, 1 reply; 23+ messages in thread
From: Manuel, Lesly Arackal @ 2011-04-18 12:55 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
Hi Tony,
On Mon, Apr 18, 2011 at 6:02 PM, Tony Lindgren <tony@atomide.com> wrote:
> Hi,
>
> * Lesly A M <leslyam@ti.com> [110414 15:25]:
>> Power bus message sequence for TWL4030 to enter sleep/wakeup/warm_reset.
>>
>> TWL4030 power scripts which can be used by different OMAP3 boards
>> with the power companion chip (TWL4030 series).
>>
>> The twl4030 generic script can be used by any board file to update
>> the power data in twl4030_platform_data.
>>
>> http://omapedia.org/wiki/TWL4030_power_scripts
>>
>> Signed-off-by: Lesly A M <leslyam@ti.com>
>> Cc: Nishanth Menon <nm@ti.com>
>> Cc: David Derrick <dderrick@ti.com>
>> Cc: Samuel Ortiz <sameo@linux.intel.com>
>> ---
>> arch/arm/mach-omap2/twl4030-script.c | 331 ++++++++++++++++++++++++++++++++++
>> arch/arm/mach-omap2/twl4030-script.h | 23 +++
>> include/linux/i2c/twl.h | 33 +++-
>> 3 files changed, 384 insertions(+), 3 deletions(-)
>> create mode 100644 arch/arm/mach-omap2/twl4030-script.c
>> create mode 100644 arch/arm/mach-omap2/twl4030-script.h
>
> To me it seems this should go into drivers/mfd instead.
> The script may contain omap specific values, but can be
> a loadable driver module.
- subsys_initcall(twl_init)
-> twl_probe()
-> twl4030_power_init()
-> load_twl4030_script() #to copy this script data to the PM IC.
Since this is getting called from a subsys initcall, not sure whether
we can make this scripts as loadable module.
>
> Maybe drivers/mfd/twl4030-script-omap.c?
Ok, fine
Regards,
Lesly A M
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards
2011-04-18 12:55 ` Manuel, Lesly Arackal
@ 2011-04-18 12:58 ` Tony Lindgren
2011-04-27 12:59 ` Manuel, Lesly Arackal
0 siblings, 1 reply; 23+ messages in thread
From: Tony Lindgren @ 2011-04-18 12:58 UTC (permalink / raw)
To: Manuel, Lesly Arackal
Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
* Manuel, Lesly Arackal <leslyam@ti.com> [110418 15:52]:
> >
> > To me it seems this should go into drivers/mfd instead.
> > The script may contain omap specific values, but can be
> > a loadable driver module.
>
> - subsys_initcall(twl_init)
> -> twl_probe()
> -> twl4030_power_init()
> -> load_twl4030_script() #to copy this script data to the PM IC.
>
> Since this is getting called from a subsys initcall, not sure whether
> we can make this scripts as loadable module.
AFAIK it does not need to do anything that early. Maybe take a look
at initialing it later?
Regards,
Tony
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence
2011-04-14 12:27 ` [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence Lesly A M
@ 2011-04-26 9:54 ` Samuel Ortiz
0 siblings, 0 replies; 23+ messages in thread
From: Samuel Ortiz @ 2011-04-26 9:54 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick
Hi Lesly,
On Thu, Apr 14, 2011 at 05:57:49PM +0530, Lesly A M wrote:
> Only configure sleep script when the flag is TWL4030_SLEEP_SCRIPT.
>
> Adding the missing brackets for fixing the issue.
Patch applied to my for-linus branch.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 2/9] OMAP3: PM: Correct the warning print during script loading
2011-04-14 12:27 ` [PATCH v9 2/9] OMAP3: PM: Correct the warning print during script loading Lesly A M
@ 2011-04-26 9:57 ` Samuel Ortiz
0 siblings, 0 replies; 23+ messages in thread
From: Samuel Ortiz @ 2011-04-26 9:57 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick
Hi Lesly,
On Thu, Apr 14, 2011 at 05:57:50PM +0530, Lesly A M wrote:
> Correcting the if condition check for printing the warning,
> if wakeup script is not updated before updating the sleep script.
>
> Since the flag 'order' is set to '1' while updating the wakeup script for P1P2,
> the condition checking for printing the warning should be if(!order)
> (ie: print the warning if wakeup script is not updated before updating the sleep script)
>
Patch applied to my for-next branch, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 3/9] OMAP3: PM: Modifying the macro name Main_Ref to all caps
2011-04-14 12:27 ` [PATCH v9 3/9] OMAP3: PM: Modifying the macro name Main_Ref to all caps Lesly A M
@ 2011-04-26 10:07 ` Samuel Ortiz
0 siblings, 0 replies; 23+ messages in thread
From: Samuel Ortiz @ 2011-04-26 10:07 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick
Hi Lesly,
On Thu, Apr 14, 2011 at 05:57:51PM +0530, Lesly A M wrote:
> Modifying the macro name Main_Ref to all caps(MAIN_REF).
Patch applied to my for-next branch.
Be careful with the patch subject, this one is definitely not OMAP3 related.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 5/9] OMAP3: PM: TWL5030 version checking
2011-04-14 12:27 ` [PATCH v9 5/9] OMAP3: PM: TWL5030 version checking Lesly A M
@ 2011-04-26 10:12 ` Samuel Ortiz
0 siblings, 0 replies; 23+ messages in thread
From: Samuel Ortiz @ 2011-04-26 10:12 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick
Hi Lesly,
On Thu, Apr 14, 2011 at 05:57:53PM +0530, Lesly A M wrote:
> Added API to get the TWL5030 Si version from the IDCODE register.
> It is used for enabling the workaround for TWL erratum 27.
Patch applied to my for-next branch, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27
2011-04-14 12:27 ` [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27 Lesly A M
@ 2011-04-26 10:13 ` Samuel Ortiz
2011-04-27 14:24 ` Manuel, Lesly Arackal
0 siblings, 1 reply; 23+ messages in thread
From: Samuel Ortiz @ 2011-04-26 10:13 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick
Hi Lesly,
On Thu, Apr 14, 2011 at 05:57:54PM +0530, Lesly A M wrote:
> Workaround for TWL5030 Silicon Errata 27 & 28:
> 27 - VDD1, VDD2, may have glitches when their output value is updated.
> 28 - VDD1 and / or VDD2 DCDC clock may stop working when internal clock
> is switched from internal to external.
>
> Erratum 27:
> If the DCDC regulators is running on their internal oscillator,
> negative glitches may occur on VDD1, VDD2 output when voltage is changed.
> The OMAP device may reboot if the VDD1 or VDD2 go below the
> core minimum operating voltage.
>
> WORKAROUND
> Set up the TWL5030 DC-DC power supplies to use the HFCLKIN instead of
> the internal oscillator.
>
> Erratum 28:
> VDD1/VDD2 clock system may hang during switching the clock source from
> internal oscillator to external. VDD1/VDD2 output voltages may collapse
> if clock stops.
>
> WORKAROUND
> If HFCLK is disabled in OFFMODE, modify the sleep/wakeup sequence and
> setuptimes to make sure the switching will happen only when HFCLKIN is stable.
> Also use the TWL5030 watchdog to safeguard the first switching from
> internal oscillator to HFCLKIN during the TWL5030 init.
>
> IMPACT
> power sequence is changed.
> sleep/wakeup time values will be changed.
>
> The workaround changes are called from twl4030_power_init(), since we have to
> make some i2c_read calls to check the TWL4030 version & the i2c will not be
> initialized in the early stage.
>
> This workaround is required for TWL5030 Silicon version less than ES1.2
> The power script & setup time changes are recommended by TI HW team.
>
> http://omapedia.org/wiki/TWL4030_power_scripts
>
> Changes taken from TWL4030 Erratum 27 workaround patch by Nishanth Menon.
This patch and the following one depend on patch#4. Please re-send it once you
agreed with Tony about where it should go.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards
2011-04-18 12:58 ` Tony Lindgren
@ 2011-04-27 12:59 ` Manuel, Lesly Arackal
2011-04-27 13:05 ` Tony Lindgren
0 siblings, 1 reply; 23+ messages in thread
From: Manuel, Lesly Arackal @ 2011-04-27 12:59 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
Hi Tony,
On Mon, Apr 18, 2011 at 6:28 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Manuel, Lesly Arackal <leslyam@ti.com> [110418 15:52]:
>> >
>> > To me it seems this should go into drivers/mfd instead.
>> > The script may contain omap specific values, but can be
>> > a loadable driver module.
>>
>> - subsys_initcall(twl_init)
>> -> twl_probe()
>> -> twl4030_power_init()
>> -> load_twl4030_script() #to copy this script data to the PM IC.
>>
>> Since this is getting called from a subsys initcall, not sure whether
>> we can make this scripts as loadable module.
>
> AFAIK it does not need to do anything that early. Maybe take a look
> at initialing it later?
>
The loading of script data & configuration of resource is one time process,
later HW will take care(executing the sequence in TWL based on
sys_offmode, clk_req, ...signal states)
So any specific reason for making this twl script as loadable module?
Thanks & regards,
Lesly
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards
2011-04-27 12:59 ` Manuel, Lesly Arackal
@ 2011-04-27 13:05 ` Tony Lindgren
0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2011-04-27 13:05 UTC (permalink / raw)
To: Manuel, Lesly Arackal
Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
* Manuel, Lesly Arackal <leslyam@ti.com> [110427 05:55]:
> Hi Tony,
>
> On Mon, Apr 18, 2011 at 6:28 PM, Tony Lindgren <tony@atomide.com> wrote:
> > * Manuel, Lesly Arackal <leslyam@ti.com> [110418 15:52]:
> >> >
> >> > To me it seems this should go into drivers/mfd instead.
> >> > The script may contain omap specific values, but can be
> >> > a loadable driver module.
> >>
> >> - subsys_initcall(twl_init)
> >> -> twl_probe()
> >> -> twl4030_power_init()
> >> -> load_twl4030_script() #to copy this script data to the PM IC.
> >>
> >> Since this is getting called from a subsys initcall, not sure whether
> >> we can make this scripts as loadable module.
> >
> > AFAIK it does not need to do anything that early. Maybe take a look
> > at initialing it later?
> >
>
> The loading of script data & configuration of resource is one time process,
> later HW will take care(executing the sequence in TWL based on
> sys_offmode, clk_req, ...signal states)
>
> So any specific reason for making this twl script as loadable module?
Because it should all be just a regular device driver living under
drivers/. You can still pass the platform data to it, there should not
be any need to initialize this earlier.
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27
2011-04-26 10:13 ` Samuel Ortiz
@ 2011-04-27 14:24 ` Manuel, Lesly Arackal
0 siblings, 0 replies; 23+ messages in thread
From: Manuel, Lesly Arackal @ 2011-04-27 14:24 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: linux-omap, Nishanth Menon, David Derrick
Hi Samuel,
On Tue, Apr 26, 2011 at 3:43 PM, Samuel Ortiz <sameo@linux.intel.com> wrote:
> Hi Lesly,
>
> On Thu, Apr 14, 2011 at 05:57:54PM +0530, Lesly A M wrote:
>> Workaround for TWL5030 Silicon Errata 27 & 28:
>> 27 - VDD1, VDD2, may have glitches when their output value is updated.
>> 28 - VDD1 and / or VDD2 DCDC clock may stop working when internal clock
>> is switched from internal to external.
>>
>> Erratum 27:
>> If the DCDC regulators is running on their internal oscillator,
>> negative glitches may occur on VDD1, VDD2 output when voltage is changed.
>> The OMAP device may reboot if the VDD1 or VDD2 go below the
>> core minimum operating voltage.
>>
>> WORKAROUND
>> Set up the TWL5030 DC-DC power supplies to use the HFCLKIN instead of
>> the internal oscillator.
>>
>> Erratum 28:
>> VDD1/VDD2 clock system may hang during switching the clock source from
>> internal oscillator to external. VDD1/VDD2 output voltages may collapse
>> if clock stops.
>>
>> WORKAROUND
>> If HFCLK is disabled in OFFMODE, modify the sleep/wakeup sequence and
>> setuptimes to make sure the switching will happen only when HFCLKIN is stable.
>> Also use the TWL5030 watchdog to safeguard the first switching from
>> internal oscillator to HFCLKIN during the TWL5030 init.
>>
>> IMPACT
>> power sequence is changed.
>> sleep/wakeup time values will be changed.
>>
>> The workaround changes are called from twl4030_power_init(), since we have to
>> make some i2c_read calls to check the TWL4030 version & the i2c will not be
>> initialized in the early stage.
>>
>> This workaround is required for TWL5030 Silicon version less than ES1.2
>> The power script & setup time changes are recommended by TI HW team.
>>
>> http://omapedia.org/wiki/TWL4030_power_scripts
>>
>> Changes taken from TWL4030 Erratum 27 workaround patch by Nishanth Menon.
> This patch and the following one depend on patch#4. Please re-send it once you
> agreed with Tony about where it should go.
>
I will make the changes for Tony's comments and repost the patches.
Thanks & Regards,
Lesly A M
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
` (8 preceding siblings ...)
2011-04-14 12:27 ` [PATCH v9 9/9] OMAP3: PM: TWL4030 optimizing resource configuration Lesly A M
@ 2011-05-03 13:21 ` Jean Pihet
2011-05-04 14:28 ` Manuel, Lesly Arackal
9 siblings, 1 reply; 23+ messages in thread
From: Jean Pihet @ 2011-05-03 13:21 UTC (permalink / raw)
To: Lesly A M; +Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
On Thu, Apr 14, 2011 at 2:27 PM, Lesly A M <leslyam@ti.com> wrote:
> Patch series for TWL4030 power scripts and workaround for TWL erratum 27.
>
> Changes for implementing TWL4030 power scripts recommended by hardware team.
> Introduced a new TWL4030 power script file, which can be used by different
> OMAP3 board with the power companion chip TWL4030.
>
> Updated the changes for TWL4030 errata 27 & 28, and modified
> the TWL4030 power script.
> Workaround for TWL4030 erratum 27 is required for Si version less than or
> equal to TWL5030 ES1.1.
>
...
> This changes are tested on OMAP3430 & OMAP3630 SDP with off mode enabled in suspend path.
With the patches series applied and a board file change for
Beagleboard (similar to patch 7/9 for SDP), the Beagleboard is not
consistently booting. Most of the time it is hanging at boot, cf. dump
below. In the case it boots OK no voltage drop is observed when going
to OFF mode.
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 2.6.39-rc5-09490-gf4c2b2b (def@defasus)
(gcc version 4.4.1 (Sourcery G++ L
ite 2010q1-202) ) #694 SMP Tue May 3 14:11:31 CEST 2011
[ 0.000000] CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=10c53c7f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing
instruction cache
[ 0.000000] Machine: OMAP3 Beagle Board
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] OMAP3430/3530 ES2.1 (l2cache iva sgx neon isp )
...
[ 0.350830] OMAP3 Beagle Rev: Ax/Bx
[ 0.365203] omap_device: omap_uart.0: new worst case activate
latency 0: 30517
[ 0.365570] omap_device: omap_uart.0: new worst case deactivate
latency 0: 30517
[ 0.385253] Found NAND on CS0
[ 0.388427] Registering NAND on CS0
[ 0.393585] Unable to get DVI reset GPIO
[ 0.398284] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.425659] OMAP DMA hardware revision 4.0
[ 0.509674] bio: create slab <bio-0> at 0
[ 0.526092] SCSI subsystem initialized
[ 0.531158] omap_device: omap2_mcspi.1: new worst case activate
latency 0: 30517
[ 0.541351] omap_device: omap2_mcspi.1: new worst case deactivate
latency 0: 30517
[ 0.557586] usbcore: registered new interface driver usbfs
[ 0.564971] usbcore: registered new interface driver hub
[ 0.572082] usbcore: registered new device driver usb
[ 0.579925] omap_device: omap_i2c.1: new worst case activate latency 0: 30517
[ 0.587768] omap_i2c omap_i2c.1: bus 1 rev1.3.12 at 2600 kHz
AFAICT the main difference in the wiring is that the PMIC CLKREQ is
not connected to the OMAP and is tied to VIO_1V8.
Any thought on how to support the T2 scripts on Beagle?
Regards,
Jean
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27
2011-05-03 13:21 ` [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Jean Pihet
@ 2011-05-04 14:28 ` Manuel, Lesly Arackal
0 siblings, 0 replies; 23+ messages in thread
From: Manuel, Lesly Arackal @ 2011-05-04 14:28 UTC (permalink / raw)
To: Jean Pihet; +Cc: linux-omap, Nishanth Menon, David Derrick, Samuel Ortiz
Hi Jean,
On Tue, May 3, 2011 at 6:51 PM, Jean Pihet <jean.pihet@newoldbits.com> wrote:
> On Thu, Apr 14, 2011 at 2:27 PM, Lesly A M <leslyam@ti.com> wrote:
>> Patch series for TWL4030 power scripts and workaround for TWL erratum 27.
>>
>> Changes for implementing TWL4030 power scripts recommended by hardware team.
>> Introduced a new TWL4030 power script file, which can be used by different
>> OMAP3 board with the power companion chip TWL4030.
>>
>> Updated the changes for TWL4030 errata 27 & 28, and modified
>> the TWL4030 power script.
>> Workaround for TWL4030 erratum 27 is required for Si version less than or
>> equal to TWL5030 ES1.1.
>>
> ...
>
>> This changes are tested on OMAP3430 & OMAP3630 SDP with off mode enabled in suspend path.
> With the patches series applied and a board file change for
> Beagleboard (similar to patch 7/9 for SDP), the Beagleboard is not
> consistently booting. Most of the time it is hanging at boot, cf. dump
> below. In the case it boots OK no voltage drop is observed when going
> to OFF mode.
>
> Uncompressing Linux... done, booting the kernel.
> [ 0.000000] Linux version 2.6.39-rc5-09490-gf4c2b2b (def@defasus)
> (gcc version 4.4.1 (Sourcery G++ L
> ite 2010q1-202) ) #694 SMP Tue May 3 14:11:31 CEST 2011
> [ 0.000000] CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=10c53c7f
> [ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing
> instruction cache
> [ 0.000000] Machine: OMAP3 Beagle Board
> [ 0.000000] bootconsole [earlycon0] enabled
> [ 0.000000] Memory policy: ECC disabled, Data cache writeback
> [ 0.000000] OMAP3430/3530 ES2.1 (l2cache iva sgx neon isp )
> ...
> [ 0.350830] OMAP3 Beagle Rev: Ax/Bx
> [ 0.365203] omap_device: omap_uart.0: new worst case activate
> latency 0: 30517
> [ 0.365570] omap_device: omap_uart.0: new worst case deactivate
> latency 0: 30517
> [ 0.385253] Found NAND on CS0
> [ 0.388427] Registering NAND on CS0
> [ 0.393585] Unable to get DVI reset GPIO
> [ 0.398284] hw-breakpoint: debug architecture 0x4 unsupported.
> [ 0.425659] OMAP DMA hardware revision 4.0
> [ 0.509674] bio: create slab <bio-0> at 0
> [ 0.526092] SCSI subsystem initialized
> [ 0.531158] omap_device: omap2_mcspi.1: new worst case activate
> latency 0: 30517
> [ 0.541351] omap_device: omap2_mcspi.1: new worst case deactivate
> latency 0: 30517
> [ 0.557586] usbcore: registered new interface driver usbfs
> [ 0.564971] usbcore: registered new interface driver hub
> [ 0.572082] usbcore: registered new device driver usb
> [ 0.579925] omap_device: omap_i2c.1: new worst case activate latency 0: 30517
> [ 0.587768] omap_i2c omap_i2c.1: bus 1 rev1.3.12 at 2600 kHz
>
> AFAICT the main difference in the wiring is that the PMIC CLKREQ is
> not connected to the OMAP and is tied to VIO_1V8.
>
> Any thought on how to support the T2 scripts on Beagle?
I have not tested this script on Beagle board.
This script actually expects the clk_req to go low during off_mode.
So you can try removing the P3 from resource configuration struct for
VDD1/VDD2 & check the voltage rails during OFF.
Regards,
Lesly A M
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2011-05-04 14:28 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-14 12:27 [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Lesly A M
2011-04-14 12:27 ` [PATCH v9 1/9] OMAP3: PM: Fix for the TWL4030 sleep/wakeup sequence Lesly A M
2011-04-26 9:54 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 2/9] OMAP3: PM: Correct the warning print during script loading Lesly A M
2011-04-26 9:57 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 3/9] OMAP3: PM: Modifying the macro name Main_Ref to all caps Lesly A M
2011-04-26 10:07 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 4/9] OMAP3: PM: TWL4030 power scripts for OMAP3 boards Lesly A M
2011-04-18 12:32 ` Tony Lindgren
2011-04-18 12:55 ` Manuel, Lesly Arackal
2011-04-18 12:58 ` Tony Lindgren
2011-04-27 12:59 ` Manuel, Lesly Arackal
2011-04-27 13:05 ` Tony Lindgren
2011-04-14 12:27 ` [PATCH v9 5/9] OMAP3: PM: TWL5030 version checking Lesly A M
2011-04-26 10:12 ` Samuel Ortiz
2011-04-14 12:27 ` [PATCH v9 6/9] MFD: TWL4030: workaround changes for TWL4030 Erratum 27 Lesly A M
2011-04-26 10:13 ` Samuel Ortiz
2011-04-27 14:24 ` Manuel, Lesly Arackal
2011-04-14 12:27 ` [PATCH v9 7/9] OMAP3430: Updating the board file to use TWL4030 scripts Lesly A M
2011-04-14 12:27 ` [PATCH v9 8/9] OMAP3630: " Lesly A M
2011-04-14 12:27 ` [PATCH v9 9/9] OMAP3: PM: TWL4030 optimizing resource configuration Lesly A M
2011-05-03 13:21 ` [PATCH v9 0/9] OMAP3: PM: TWL4030 power scripts and workaround for TWL erratum 27 Jean Pihet
2011-05-04 14:28 ` Manuel, Lesly Arackal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).