RE: [PATCH v6 07/10] OMAP3: PM: Adding T2 enabling of smartreflex support

2011-01-02 Thread Woodruff, Richard

 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Gopinath, Thara
 Sent: Friday, December 31, 2010 2:02 AM

 Is this true for OMAP2 as well?

OMAP2 used VSEL for direct and VMODE for voltage control not SR path methods. I 
don't recall OMAP2 ever need to enable this as that path is not hooked up.  
I've not double checked details but that is recollection.

 This patch actually hangs the boot on 2430SDP.

There were a lot of versions of 2430SDP boards PMIC-boards which created a 
variety of issues of someone is really watching the details.

Issues which stopped booting as I recall in the past were:
- Initial state of interrupts not good allowing boot to livelock
- Old boards had poor power routing and min voltages needed to be 
higher.
- General i2c service thread issues.

I'd guess Thara has some random board with issues and Kevin's system is newer.  
Probably Kevin is seeing patch issue as SR doesn't seem to follow for OMAP2.

Regards,
Richard W.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 07/10] OMAP3: PM: Adding T2 enabling of smartreflex support

2010-12-22 Thread Kevin Hilman
Hi Thara,

Thara Gopinath th...@ti.com writes:

 This patch adds support in the twl4030 driver to enable smartreflex.
 The smartreflex bit on twl4030 needs to be enabled by default irrespective
 of whether smartreflex module is enabled on the OMAP side or not.
 This is because without this bit enabled the voltage scaling through
 vp forceupdate does not function properly.

Is this true for OMAP2 as well?  

This patch actually hangs the boot on 2430SDP.  

For now, I'll be dropping this patch from my pull request.  Also, this patch
will also need an Ack from the MFD maintainers, or possibly even merge 
through their tree.  Please also Cc the MFD list on the fix.

While fixing this issue, another CodingStyle comment below...

 Signed-off-by: Thara Gopinath th...@ti.com
 ---
  drivers/mfd/twl-core.c  |   13 +
  include/linux/i2c/twl.h |   11 +++
  2 files changed, 24 insertions(+), 0 deletions(-)

 diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
 index 35275ba..b895ceb 100644
 --- a/drivers/mfd/twl-core.c
 +++ b/drivers/mfd/twl-core.c
 @@ -1046,6 +1046,7 @@ twl_probe(struct i2c_client *client, const struct 
 i2c_device_id *id)
   /* Disable TWL4030/TWL5030 I2C Pull-up on I2C1 and I2C4(SR) interface.
* Program I2C_SCL_CTRL_PU(bit 0)=0, I2C_SDA_CTRL_PU (bit 2)=0,
* SR_I2C_SCL_CTRL_PU(bit 4)=0 and SR_I2C_SDA_CTRL_PU(bit 6)=0.
 +  * Also enable the smartreflex I2S bit.
*/
  
   if (twl_class_is_4030()) {
 @@ -1053,6 +1054,18 @@ twl_probe(struct i2c_client *client, const struct 
 i2c_device_id *id)
   temp = ~(SR_I2C_SDA_CTRL_PU | SR_I2C_SCL_CTRL_PU | \
   I2C_SDA_CTRL_PU | I2C_SCL_CTRL_PU);
   twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
 +
 + /* The smartreflex bit on twl4030 needs to be enabled by
 +  * default irrespective of whether smartreflex module is
 +  * enabled on the OMAP side or not. This is because without
 +  * this bit enabled the voltage scaling through
 +  * vp forceupdate does not function properly.
 +  */

please update multi-line coding style.

Kevin

 + twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, temp,
 + TWL4030_PM_RECEIVER_DCDC_GLOBAL_CFG);
 + temp |= SMARTREFLEX_ENABLE;
 + twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, temp,
 + TWL4030_PM_RECEIVER_DCDC_GLOBAL_CFG);
   }
  
   status = add_children(pdata, id-driver_data);
 diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
 index c760991..d392f06 100644
 --- a/include/linux/i2c/twl.h
 +++ b/include/linux/i2c/twl.h
 @@ -434,6 +434,17 @@ static inline int twl6030_mmc_card_detect(struct device 
 *dev, int slot)
  
  /*--*/
  
 +/*
 + * PM Receiver module register offsets (use TWL4030_MODULE_PM_RECEIVER)
 + */
 +
 +#define TWL4030_PM_RECEIVER_DCDC_GLOBAL_CFG  0x06
 +
 +/* Smartreflex I2S bus enable/ vmode enable bit */
 +#define SMARTREFLEX_ENABLE   BIT(3)
 +
 +/*--*/
 +
  /* Power bus message definitions */
  
  /* The TWL4030/5030 splits its power-management resources (the various
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 07/10] OMAP3: PM: Adding T2 enabling of smartreflex support

2010-12-20 Thread Thara Gopinath
This patch adds support in the twl4030 driver to enable smartreflex.
The smartreflex bit on twl4030 needs to be enabled by default irrespective
of whether smartreflex module is enabled on the OMAP side or not.
This is because without this bit enabled the voltage scaling through
vp forceupdate does not function properly.

Signed-off-by: Thara Gopinath th...@ti.com
---
 drivers/mfd/twl-core.c  |   13 +
 include/linux/i2c/twl.h |   11 +++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 35275ba..b895ceb 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1046,6 +1046,7 @@ twl_probe(struct i2c_client *client, const struct 
i2c_device_id *id)
/* Disable TWL4030/TWL5030 I2C Pull-up on I2C1 and I2C4(SR) interface.
 * Program I2C_SCL_CTRL_PU(bit 0)=0, I2C_SDA_CTRL_PU (bit 2)=0,
 * SR_I2C_SCL_CTRL_PU(bit 4)=0 and SR_I2C_SDA_CTRL_PU(bit 6)=0.
+* Also enable the smartreflex I2S bit.
 */
 
if (twl_class_is_4030()) {
@@ -1053,6 +1054,18 @@ twl_probe(struct i2c_client *client, const struct 
i2c_device_id *id)
temp = ~(SR_I2C_SDA_CTRL_PU | SR_I2C_SCL_CTRL_PU | \
I2C_SDA_CTRL_PU | I2C_SCL_CTRL_PU);
twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
+
+   /* The smartreflex bit on twl4030 needs to be enabled by
+* default irrespective of whether smartreflex module is
+* enabled on the OMAP side or not. This is because without
+* this bit enabled the voltage scaling through
+* vp forceupdate does not function properly.
+*/
+   twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, temp,
+   TWL4030_PM_RECEIVER_DCDC_GLOBAL_CFG);
+   temp |= SMARTREFLEX_ENABLE;
+   twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, temp,
+   TWL4030_PM_RECEIVER_DCDC_GLOBAL_CFG);
}
 
status = add_children(pdata, id-driver_data);
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index c760991..d392f06 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -434,6 +434,17 @@ static inline int twl6030_mmc_card_detect(struct device 
*dev, int slot)
 
 /*--*/
 
+/*
+ * PM Receiver module register offsets (use TWL4030_MODULE_PM_RECEIVER)
+ */
+
+#define TWL4030_PM_RECEIVER_DCDC_GLOBAL_CFG0x06
+
+/* Smartreflex I2S bus enable/ vmode enable bit */
+#define SMARTREFLEX_ENABLE BIT(3)
+
+/*--*/
+
 /* Power bus message definitions */
 
 /* The TWL4030/5030 splits its power-management resources (the various
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html