* [PATCH 1/7] usb: otg: enable regulator only on cable/device connect [not found] <yes> @ 2011-02-03 9:49 ` Hema HK 2011-02-03 9:49 ` [PATCH 2/7] usb: otg: Remove one unnecessary I2C read request Hema HK ` (8 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb; +Cc: linux-omap, Hema HK, Felipe Balbi Remove the regulator enable while driver loading and enable it only when the cable/device is connected and disable it when disconnected. Remove the configuration of config_state and config_trans register configuration as these registers are programmed when regulator enable/disable is called. Signed-off-by: Hema HK <hemahk@ti.com> Cc: Felipe Balbi <balbi@ti.com> --- drivers/usb/otg/twl6030-usb.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) Index: linux-2.6/drivers/usb/otg/twl6030-usb.c =================================================================== --- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c +++ linux-2.6/drivers/usb/otg/twl6030-usb.c @@ -158,8 +158,6 @@ static int twl6030_phy_init(struct otg_t dev = twl->dev; pdata = dev->platform_data; - regulator_enable(twl->usb3v3); - hw_state = twl6030_readb(twl, TWL6030_MODULE_ID0, STS_HW_CONDITIONS); if (hw_state & STS_USB_ID) @@ -180,7 +178,6 @@ static void twl6030_phy_shutdown(struct dev = twl->dev; pdata = dev->platform_data; pdata->phy_power(twl->dev, 0, 0); - regulator_disable(twl->usb3v3); } static int twl6030_usb_ldo_init(struct twl6030_usb *twl) @@ -199,16 +196,6 @@ static int twl6030_usb_ldo_init(struct t if (IS_ERR(twl->usb3v3)) return -ENODEV; - regulator_enable(twl->usb3v3); - - /* Program the VUSB_CFG_TRANS for ACTIVE state. */ - twl6030_writeb(twl, TWL_MODULE_PM_RECEIVER, 0x3F, - VUSB_CFG_TRANS); - - /* Program the VUSB_CFG_STATE register to ON on all groups. */ - twl6030_writeb(twl, TWL_MODULE_PM_RECEIVER, 0xE1, - VUSB_CFG_STATE); - /* Program the USB_VBUS_CTRL_SET and set VBUS_ACT_COMP bit */ twl6030_writeb(twl, TWL_MODULE_USB, 0x4, USB_VBUS_CTRL_SET); @@ -261,16 +248,23 @@ static irqreturn_t twl6030_usb_irq(int i CONTROLLER_STAT1); if (!(hw_state & STS_USB_ID)) { if (vbus_state & VBUS_DET) { + regulator_enable(twl->usb3v3); + twl->asleep = 1; status = USB_EVENT_VBUS; twl->otg.default_a = false; twl->otg.state = OTG_STATE_B_IDLE; + twl->linkstat = status; + blocking_notifier_call_chain(&twl->otg.notifier, + status, twl->otg.gadget); } else { status = USB_EVENT_NONE; - } - if (status >= 0) { twl->linkstat = status; blocking_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); + if (twl->asleep) { + regulator_disable(twl->usb3v3); + twl->asleep = 0; + } } } sysfs_notify(&twl->dev->kobj, NULL, "vbus"); @@ -288,6 +282,8 @@ static irqreturn_t twl6030_usbotg_irq(in if (hw_state & STS_USB_ID) { + regulator_enable(twl->usb3v3); + twl->asleep = 1; twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, 0x1); twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET, 0x10); @@ -437,6 +433,7 @@ static int __devinit twl6030_usb_probe(s return status; } + twl->asleep = 0; pdata->phy_init(dev); twl6030_enable_irq(&twl->otg); dev_info(&pdev->dev, "Initialized TWL6030 USB module\n"); ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 2/7] usb: otg: Remove one unnecessary I2C read request. [not found] <yes> 2011-02-03 9:49 ` [PATCH 1/7] usb: otg: enable regulator only on cable/device connect Hema HK @ 2011-02-03 9:49 ` Hema HK 2011-02-03 9:49 ` [PATCH 3/7] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK ` (7 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Hema HK, Felipe Balbi To get the ID status there was an I2C read transfer. Removed this I2C read transfer as this info can be used from existing variable(linkstat). Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> --- drivers/usb/otg/twl6030-usb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) Index: linux-2.6/drivers/usb/otg/twl6030-usb.c =================================================================== --- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c +++ linux-2.6/drivers/usb/otg/twl6030-usb.c @@ -149,7 +149,6 @@ static int twl6030_set_phy_clk(struct ot static int twl6030_phy_init(struct otg_transceiver *x) { - u8 hw_state; struct twl6030_usb *twl; struct device *dev; struct twl4030_usb_data *pdata; @@ -158,9 +157,7 @@ static int twl6030_phy_init(struct otg_t dev = twl->dev; pdata = dev->platform_data; - hw_state = twl6030_readb(twl, TWL6030_MODULE_ID0, STS_HW_CONDITIONS); ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 3/7] usb: otg: OMAP4430: Introducing suspend function for power management [not found] <yes> 2011-02-03 9:49 ` [PATCH 1/7] usb: otg: enable regulator only on cable/device connect Hema HK 2011-02-03 9:49 ` [PATCH 2/7] usb: otg: Remove one unnecessary I2C read request Hema HK @ 2011-02-03 9:49 ` Hema HK 2011-02-03 9:49 ` [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK ` (6 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb; +Cc: linux-omap, Hema HK, Felipe Balbi, Tony Lindgren Introduced the suspend/resume function for the OMAP4430 internal PHY. This will be used by the twl6030-usb transceiver driver. Moved the clock enable/disable function calls and power on/off of the PHY code from power on/off functions to suspend/resume function. Signed-off-by: Hema HK <hemahk@ti.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Tony Lindgren <tony@atomide.com> --- arch/arm/mach-omap2/omap_phy_internal.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) Index: linux-2.6/arch/arm/mach-omap2/omap_phy_internal.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap2/omap_phy_internal.c +++ linux-2.6/arch/arm/mach-omap2/omap_phy_internal.c @@ -103,13 +103,6 @@ int omap4430_phy_set_clk(struct device * int omap4430_phy_power(struct device *dev, int ID, int on) { if (on) { - /* enabled the clocks */ - omap4430_phy_set_clk(dev, 1); - /* power on the phy */ - if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) { - __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF); - mdelay(200); - } if (ID) /* enable VBUS valid, IDDIG groung */ __raw_writel(AVALID | VBUSVALID, ctrl_base + @@ -125,10 +118,25 @@ int omap4430_phy_power(struct device *de /* Enable session END and IDIG to high impedence. */ __raw_writel(SESSEND | IDDIG, ctrl_base + USBOTGHS_CONTROL); + } + return 0; +} + +int omap4430_phy_suspend(struct device *dev, int suspend) +{ + if (suspend) { /* Disable the clocks */ omap4430_phy_set_clk(dev, 0); /* Power down the phy */ __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); + } else { + /* Enable the internel phy clcoks */ + omap4430_phy_set_clk(dev, 1); + /* power on the phy */ + if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) { + __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF); + mdelay(200); + } } return 0; ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data [not found] <yes> ` (2 preceding siblings ...) 2011-02-03 9:49 ` [PATCH 3/7] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK @ 2011-02-03 9:49 ` Hema HK 2011-02-03 13:45 ` Sergei Shtylyov 2011-02-03 13:50 ` Sergei Shtylyov 2011-02-03 9:49 ` [PATCH 5/7] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function Hema HK ` (5 subsequent siblings) 9 siblings, 2 replies; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Hema HK, Felipe Balbi, Tony Lindgren Introduce the .phy_suspend function pointer to twl4030_usb_data structure. assign the function to it for both sdp board and panda boards. This will be used by the twl6030-usb transceiver driver. Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> --- arch/arm/mach-omap2/board-4430sdp.c | 1 + arch/arm/mach-omap2/board-omap4panda.c | 1 + arch/arm/plat-omap/include/plat/usb.h | 1 + include/linux/i2c/twl.h | 2 ++ 4 files changed, 5 insertions(+) Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap2/board-4430sdp.c +++ linux-2.6/arch/arm/mach-omap2/board-4430sdp.c @@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb .phy_exit = omap4430_phy_exit, .phy_power = omap4430_phy_power, .phy_set_clock = omap4430_phy_set_clk, + .phy_suspend = omap4430_phy_suspend, }; static struct omap2_hsmmc_info mmc[] = { Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap2/board-omap4panda.c +++ linux-2.6/arch/arm/mach-omap2/board-omap4panda.c @@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb .phy_exit = omap4430_phy_exit, .phy_power = omap4430_phy_power, .phy_set_clock = omap4430_phy_set_clk, + .phy_suspend = omap4430_phy_suspend, }; static struct omap2_hsmmc_info mmc[] = { Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h =================================================================== --- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h +++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h @@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev extern int omap4430_phy_set_clk(struct device *dev, int on); extern int omap4430_phy_init(struct device *dev); extern int omap4430_phy_exit(struct device *dev); +extern int omap4430_phy_suspend(struct device *dev, int suspend); #endif Index: linux-2.6/include/linux/i2c/twl.h =================================================================== --- linux-2.6.orig/include/linux/i2c/twl.h +++ linux-2.6/include/linux/i2c/twl.h @@ -600,6 +600,8 @@ struct twl4030_usb_data { int (*phy_power)(struct device *dev, int iD, int on); /* enable/disable phy clocks */ int (*phy_set_clock)(struct device *dev, int on); + /* suspend/resume of phy */ + int (*phy_suspend)(struct device *dev, int suspend); }; struct twl4030_ins { -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data 2011-02-03 9:49 ` [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK @ 2011-02-03 13:45 ` Sergei Shtylyov [not found] ` <4D4AB187.50406-hkdhdckH98+B+jHODAdFcQ@public.gmane.org> 2011-02-03 13:50 ` Sergei Shtylyov 1 sibling, 1 reply; 22+ messages in thread From: Sergei Shtylyov @ 2011-02-03 13:45 UTC (permalink / raw) To: Hema HK; +Cc: linux-usb, linux-omap, Felipe Balbi, Tony Lindgren Hello. On 03-02-2011 12:49, Hema HK wrote: > Introduce the .phy_suspend function pointer to twl4030_usb_data structure. > assign the function to it for both sdp board and panda boards. > This will be used by the twl6030-usb transceiver driver. > Signed-off-by: Hema HK<hemahk@ti.com> > Cc: Felipe Balbi<balbi@ti.com> > Cc: Tony Lindgren<tony@atomide.com> > Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h > =================================================================== > --- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h > +++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h > @@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev > extern int omap4430_phy_set_clk(struct device *dev, int on); > extern int omap4430_phy_init(struct device *dev); > extern int omap4430_phy_exit(struct device *dev); > +extern int omap4430_phy_suspend(struct device *dev, int suspend); And where it it defined? Why this doesn't happen in this patch? WBR, Sergei ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <4D4AB187.50406-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>]
* RE: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data [not found] ` <4D4AB187.50406-hkdhdckH98+B+jHODAdFcQ@public.gmane.org> @ 2011-02-04 5:23 ` Hema Kalliguddi 0 siblings, 0 replies; 22+ messages in thread From: Hema Kalliguddi @ 2011-02-04 5:23 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren Hi, >-----Original Message----- >From: Sergei Shtylyov [mailto:sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org] >Sent: Thursday, February 03, 2011 7:16 PM >To: Hema HK >Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; >Felipe Balbi; Tony Lindgren >Subject: Re: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend >function pointer to twl4030_usb_data > >Hello. > >On 03-02-2011 12:49, Hema HK wrote: > >> Introduce the .phy_suspend function pointer to >twl4030_usb_data structure. >> assign the function to it for both sdp board and panda boards. >> This will be used by the twl6030-usb transceiver driver. > >> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org> >> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org> >> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> > >> Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h >> =================================================================== >> --- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h >> +++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h >> @@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev >> extern int omap4430_phy_set_clk(struct device *dev, int on); >> extern int omap4430_phy_init(struct device *dev); >> extern int omap4430_phy_exit(struct device *dev); >> +extern int omap4430_phy_suspend(struct device *dev, int suspend); > > And where it it defined? Why this doesn't happen in this patch? > This is defined in the previous patch. This could have been done in previous patch also, but it is just that extern is done only when using. Regards, Hema >WBR, Sergei > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data 2011-02-03 9:49 ` [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK 2011-02-03 13:45 ` Sergei Shtylyov @ 2011-02-03 13:50 ` Sergei Shtylyov [not found] ` <4D4AB2A5.7000002-hkdhdckH98+B+jHODAdFcQ@public.gmane.org> 1 sibling, 1 reply; 22+ messages in thread From: Sergei Shtylyov @ 2011-02-03 13:50 UTC (permalink / raw) To: Hema HK; +Cc: linux-usb, linux-omap, Felipe Balbi, Tony Lindgren Hello. On 03-02-2011 12:49, Hema HK wrote: > Introduce the .phy_suspend function pointer to twl4030_usb_data structure. > assign the function to it for both sdp board and panda boards. > This will be used by the twl6030-usb transceiver driver. > Signed-off-by: Hema HK<hemahk@ti.com> > Cc: Felipe Balbi<balbi@ti.com> > Cc: Tony Lindgren<tony@atomide.com> [...] > Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c > =================================================================== > --- linux-2.6.orig/arch/arm/mach-omap2/board-4430sdp.c > +++ linux-2.6/arch/arm/mach-omap2/board-4430sdp.c > @@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb > .phy_exit = omap4430_phy_exit, > .phy_power = omap4430_phy_power, > .phy_set_clock = omap4430_phy_set_clk, > + .phy_suspend = omap4430_phy_suspend, > }; > > static struct omap2_hsmmc_info mmc[] = { > Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c > =================================================================== > --- linux-2.6.orig/arch/arm/mach-omap2/board-omap4panda.c > +++ linux-2.6/arch/arm/mach-omap2/board-omap4panda.c > @@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb > .phy_exit = omap4430_phy_exit, > .phy_power = omap4430_phy_power, > .phy_set_clock = omap4430_phy_set_clk, > + .phy_suspend = omap4430_phy_suspend, > }; > > static struct omap2_hsmmc_info mmc[] = { > Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h > =================================================================== > --- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h > +++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h > @@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev > extern int omap4430_phy_set_clk(struct device *dev, int on); > extern int omap4430_phy_init(struct device *dev); > extern int omap4430_phy_exit(struct device *dev); > +extern int omap4430_phy_suspend(struct device *dev, int suspend); > > #endif > > Index: linux-2.6/include/linux/i2c/twl.h > =================================================================== > --- linux-2.6.orig/include/linux/i2c/twl.h > +++ linux-2.6/include/linux/i2c/twl.h > @@ -600,6 +600,8 @@ struct twl4030_usb_data { > int (*phy_power)(struct device *dev, int iD, int on); > /* enable/disable phy clocks */ > int (*phy_set_clock)(struct device *dev, int on); > + /* suspend/resume of phy */ > + int (*phy_suspend)(struct device *dev, int suspend); > }; I think this patch should contain only this change, and the initializers and 'extern' declaration should be merged to the previous patch. Also, where do you call this method? Ah, I see, in the next patch. I think it should be merged to this one then. WBR, Sergei ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <4D4AB2A5.7000002-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>]
* RE: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data [not found] ` <4D4AB2A5.7000002-hkdhdckH98+B+jHODAdFcQ@public.gmane.org> @ 2011-02-04 6:03 ` Hema Kalliguddi 0 siblings, 0 replies; 22+ messages in thread From: Hema Kalliguddi @ 2011-02-04 6:03 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren Hi, >-----Original Message----- >From: Sergei Shtylyov [mailto:sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org] >Sent: Thursday, February 03, 2011 7:20 PM >To: Hema HK >Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; >Felipe Balbi; Tony Lindgren >Subject: Re: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend >function pointer to twl4030_usb_data > >Hello. > >On 03-02-2011 12:49, Hema HK wrote: > >> Introduce the .phy_suspend function pointer to >twl4030_usb_data structure. >> assign the function to it for both sdp board and panda boards. >> This will be used by the twl6030-usb transceiver driver. > >> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org> >> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org> >> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> >[...] > >> Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c >> =================================================================== >> --- linux-2.6.orig/arch/arm/mach-omap2/board-4430sdp.c >> +++ linux-2.6/arch/arm/mach-omap2/board-4430sdp.c >> @@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb >> .phy_exit = omap4430_phy_exit, >> .phy_power = omap4430_phy_power, >> .phy_set_clock = omap4430_phy_set_clk, >> + .phy_suspend = omap4430_phy_suspend, >> }; >> >> static struct omap2_hsmmc_info mmc[] = { >> Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c >> =================================================================== >> --- linux-2.6.orig/arch/arm/mach-omap2/board-omap4panda.c >> +++ linux-2.6/arch/arm/mach-omap2/board-omap4panda.c >> @@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb >> .phy_exit = omap4430_phy_exit, >> .phy_power = omap4430_phy_power, >> .phy_set_clock = omap4430_phy_set_clk, >> + .phy_suspend = omap4430_phy_suspend, >> }; >> >> static struct omap2_hsmmc_info mmc[] = { >> Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h >> =================================================================== >> --- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h >> +++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h >> @@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev >> extern int omap4430_phy_set_clk(struct device *dev, int on); >> extern int omap4430_phy_init(struct device *dev); >> extern int omap4430_phy_exit(struct device *dev); >> +extern int omap4430_phy_suspend(struct device *dev, int suspend); >> >> #endif >> >> Index: linux-2.6/include/linux/i2c/twl.h >> =================================================================== >> --- linux-2.6.orig/include/linux/i2c/twl.h >> +++ linux-2.6/include/linux/i2c/twl.h >> @@ -600,6 +600,8 @@ struct twl4030_usb_data { >> int (*phy_power)(struct device *dev, int >iD, int on); >> /* enable/disable phy clocks */ >> int (*phy_set_clock)(struct device *dev, int on); >> + /* suspend/resume of phy */ >> + int (*phy_suspend)(struct device *dev, int suspend); >> }; > > I think this patch should contain only this change, and >the initializers >and 'extern' declaration should be merged to the previous patch. > Also, where do you call this method? Ah, I see, in the >next patch. I think >it should be merged to this one then. No. if I do that git bisect fails. Initializer does not make any sense without function poointer declaration. Only extern can be moved to previous patch but, I think it is OK to extern it while using. Regards, Hema > >WBR, Sergei > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 5/7] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function. [not found] <yes> ` (3 preceding siblings ...) 2011-02-03 9:49 ` [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK @ 2011-02-03 9:49 ` Hema HK 2011-02-03 9:49 ` [PATCH 6/7] usb: otg: TWL6030 Save the last event in otg_transceiver Hema HK ` (4 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Hema HK, Felipe Balbi Introduce the twl6030_phy_suspend function and assign to otg.set_suspend function pointer. This function is used by the musb-omap2430 platform driver during suspend/resume. Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> --- drivers/usb/otg/twl6030-usb.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Index: linux-2.6/drivers/usb/otg/twl6030-usb.c =================================================================== --- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c +++ linux-2.6/drivers/usb/otg/twl6030-usb.c @@ -177,6 +177,20 @@ static void twl6030_phy_shutdown(struct pdata->phy_power(twl->dev, 0, 0); } +static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend) +{ + struct twl6030_usb *twl; + struct device *dev; + struct twl4030_usb_data *pdata; + + twl = xceiv_to_twl(x); + dev = twl->dev; + pdata = dev->platform_data; + pdata->phy_suspend(twl->dev, suspend); + + return 0; +} + static int twl6030_usb_ldo_init(struct twl6030_usb *twl) { @@ -388,6 +402,7 @@ static int __devinit twl6030_usb_probe(s twl->otg.set_vbus = twl6030_set_vbus; twl->otg.init = twl6030_phy_init; twl->otg.shutdown = twl6030_phy_shutdown; + twl->otg.set_suspend = twl6030_phy_suspend; /* init spinlock for workqueue */ spin_lock_init(&twl->lock); @@ -432,6 +447,7 @@ static int __devinit twl6030_usb_probe(s twl->asleep = 0; pdata->phy_init(dev); + twl6030_phy_suspend(&twl->otg, 0); twl6030_enable_irq(&twl->otg); dev_info(&pdev->dev, "Initialized TWL6030 USB module\n"); -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 6/7] usb: otg: TWL6030 Save the last event in otg_transceiver [not found] <yes> ` (4 preceding siblings ...) 2011-02-03 9:49 ` [PATCH 5/7] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function Hema HK @ 2011-02-03 9:49 ` Hema HK 2011-02-03 9:49 ` [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK ` (3 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Hema HK, Felipe Balbi Save the last event in the otg_transceiver so that it can used in the musb driver and gadget driver to configure the musb and enable the vbus for host mode and OTG mode, if the device is connected during boot. Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> --- [Reusing some part of the patch[1] posted by Arnaud Mandy] [1] http://permalink.gmane.org/gmane.linux.usb.general/37123 --- drivers/usb/otg/twl6030-usb.c | 3 +++ include/linux/usb/otg.h | 1 + 2 files changed, 4 insertions(+) Index: linux-2.6/drivers/usb/otg/twl6030-usb.c =================================================================== --- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c +++ linux-2.6/drivers/usb/otg/twl6030-usb.c @@ -265,11 +265,13 @@ static irqreturn_t twl6030_usb_irq(int i twl->otg.default_a = false; twl->otg.state = OTG_STATE_B_IDLE; twl->linkstat = status; + twl->otg.last_event = status; blocking_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); } else { status = USB_EVENT_NONE; twl->linkstat = status; + twl->otg.last_event = status; blocking_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); if (twl->asleep) { @@ -302,6 +304,7 @@ static irqreturn_t twl6030_usbotg_irq(in twl->otg.default_a = true; twl->otg.state = OTG_STATE_A_IDLE; twl->linkstat = status; + twl->otg.last_event = status; blocking_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); } else { Index: linux-2.6/include/linux/usb/otg.h =================================================================== --- linux-2.6.orig/include/linux/usb/otg.h +++ linux-2.6/include/linux/usb/otg.h @@ -66,6 +66,7 @@ struct otg_transceiver { u8 default_a; enum usb_otg_state state; + enum usb_xceiv_events last_event; struct usb_bus *host; struct usb_gadget *gadget; -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot [not found] <yes> ` (5 preceding siblings ...) 2011-02-03 9:49 ` [PATCH 6/7] usb: otg: TWL6030 Save the last event in otg_transceiver Hema HK @ 2011-02-03 9:49 ` Hema HK 2011-02-14 10:05 ` Felipe Balbi 2011-07-21 4:54 ` [PATCHV2] OMAP4: OPP: add OMAP4460 definitions Vishwanath BS ` (2 subsequent siblings) 9 siblings, 1 reply; 22+ messages in thread From: Hema HK @ 2011-02-03 9:49 UTC (permalink / raw) To: linux-usb; +Cc: linux-omap, Hema HK, Felipe Balbi OMAP4430 is embedded with UTMI PHY. This PHY does not support the OTG features like ID pin detection and VBUS detection. This function is exported to an external companion chip TWL6030. Software must retrieve the OTG HNP and SRP status from the TWL6030 and configure the bits inside the control module that drive the related USBOTGHS UTMI interface signals. It must also read back the UTMI signals needed to configure the TWL6030 OTG module. Can find more details in the TRM[1]. [1]:http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2.0_Public_TRM_vJ.pdf In OMAP4430 musb driver VBUS and ID notifications are received from the transceiver driver. If the cable/device is connected during boot, notifications from transceiver driver will be missed till musb driver is loaded. Patch to configure the transceiver in the platform_enable/disable functions and enable the vbus in the gadget driver based on the last_event of the otg_transceiver. Signed-off-by: Hema HK <hemahk@ti.com> Cc: Felipe Balbi <balbi@ti.com> --- drivers/usb/musb/musb_gadget.c | 4 +++ drivers/usb/musb/omap2430.c | 49 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 5 deletions(-) Index: linux-2.6/drivers/usb/musb/musb_gadget.c =================================================================== --- linux-2.6.orig/drivers/usb/musb/musb_gadget.c +++ linux-2.6/drivers/usb/musb/musb_gadget.c @@ -1855,6 +1855,10 @@ int usb_gadget_probe_driver(struct usb_g } else { hcd->self.uses_pio_for_control = 1; } + + if ((musb->xceiv->last_event == USB_EVENT_ID) + && musb->xceiv->set_vbus) + otg_set_vbus(musb->xceiv, 1); } } Index: linux-2.6/drivers/usb/musb/omap2430.c =================================================================== --- linux-2.6.orig/drivers/usb/musb/omap2430.c +++ linux-2.6/drivers/usb/musb/omap2430.c @@ -350,16 +350,55 @@ static int omap2430_musb_init(struct mus if (status) DBG(1, "notification register failed\n"); - /* check whether cable is already connected */ - if (musb->xceiv->state ==OTG_STATE_B_IDLE) - musb_otg_notifications(&musb->nb, 1, - musb->xceiv->gadget); - setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb); return 0; } +static void omap2430_musb_enable(struct musb *musb) +{ + u8 devctl; + unsigned long timeout = jiffies + msecs_to_jiffies(1000); + struct device *dev = musb->controller; + struct musb_hdrc_platform_data *pdata = dev->platform_data; + struct omap_musb_board_data *data = pdata->board_data; + + switch (musb->xceiv->last_event) { + + case USB_EVENT_ID: + otg_init(musb->xceiv); + if (data->interface_type == MUSB_INTERFACE_UTMI) { + devctl = musb_readb(musb->mregs, MUSB_DEVCTL); + /* start the session */ + devctl |= MUSB_DEVCTL_SESSION; + musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); + while (musb_readb(musb->mregs, MUSB_DEVCTL) & 0x80) { + cpu_relax(); + + if (time_after(jiffies, timeout)) { + dev_err(musb->controller, + "configured as A device timeout"); + break; + } + } + } + break; + + case USB_EVENT_VBUS: + otg_init(musb->xceiv); + break; + + default: + break; + } +} + +static void omap2430_musb_disable(struct musb *musb) +{ + if (musb->xceiv->last_event) + otg_shutdown(musb->xceiv); +} + static int omap2430_musb_exit(struct musb *musb) { @@ -377,6 +416,9 @@ static const struct musb_platform_ops om .try_idle = omap2430_musb_try_idle, .set_vbus = omap2430_musb_set_vbus, + + .enable = omap2430_musb_enable, + .disable = omap2430_musb_disable, }; static u64 omap2430_dmamask = DMA_BIT_MASK(32); ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot 2011-02-03 9:49 ` [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK @ 2011-02-14 10:05 ` Felipe Balbi 2011-02-15 8:23 ` Hema Kalliguddi 0 siblings, 1 reply; 22+ messages in thread From: Felipe Balbi @ 2011-02-14 10:05 UTC (permalink / raw) To: Hema HK; +Cc: linux-usb, linux-omap, Felipe Balbi Hi, On Thu, Feb 03, 2011 at 03:19:47PM +0530, Hema HK wrote: > +static void omap2430_musb_enable(struct musb *musb) > +{ > + u8 devctl; > + unsigned long timeout = jiffies + msecs_to_jiffies(1000); > + struct device *dev = musb->controller; > + struct musb_hdrc_platform_data *pdata = dev->platform_data; > + struct omap_musb_board_data *data = pdata->board_data; > + > + switch (musb->xceiv->last_event) { > + > + case USB_EVENT_ID: > + otg_init(musb->xceiv); > + if (data->interface_type == MUSB_INTERFACE_UTMI) { > + devctl = musb_readb(musb->mregs, MUSB_DEVCTL); > + /* start the session */ > + devctl |= MUSB_DEVCTL_SESSION; > + musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); > + while (musb_readb(musb->mregs, MUSB_DEVCTL) & 0x80) { isn't this BDEVICE bit ? We have a define for that, please use it. -- balbi ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot 2011-02-14 10:05 ` Felipe Balbi @ 2011-02-15 8:23 ` Hema Kalliguddi 0 siblings, 0 replies; 22+ messages in thread From: Hema Kalliguddi @ 2011-02-15 8:23 UTC (permalink / raw) To: balbi; +Cc: linux-usb, linux-omap >-----Original Message----- >From: Felipe Balbi [mailto:balbi@ti.com] >Sent: Monday, February 14, 2011 3:36 PM >To: Hema HK >Cc: linux-usb@vger.kernel.org; linux-omap@vger.kernel.org; Felipe Balbi >Subject: Re: [PATCH 7/7] usb: musb: OMAP4430: Fix usb device >detection if connected during boot > >Hi, > >On Thu, Feb 03, 2011 at 03:19:47PM +0530, Hema HK wrote: >> +static void omap2430_musb_enable(struct musb *musb) >> +{ >> + u8 devctl; >> + unsigned long timeout = jiffies + msecs_to_jiffies(1000); >> + struct device *dev = musb->controller; >> + struct musb_hdrc_platform_data *pdata = dev->platform_data; >> + struct omap_musb_board_data *data = pdata->board_data; >> + >> + switch (musb->xceiv->last_event) { >> + >> + case USB_EVENT_ID: >> + otg_init(musb->xceiv); >> + if (data->interface_type == MUSB_INTERFACE_UTMI) { >> + devctl = musb_readb(musb->mregs, MUSB_DEVCTL); >> + /* start the session */ >> + devctl |= MUSB_DEVCTL_SESSION; >> + musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); >> + while (musb_readb(musb->mregs, >MUSB_DEVCTL) & 0x80) { > >isn't this BDEVICE bit ? We have a define for that, please use it. > OK. Regards, Hema >-- >balbi > ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCHV2] OMAP4: OPP: add OMAP4460 definitions [not found] <yes> ` (6 preceding siblings ...) 2011-02-03 9:49 ` [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK @ 2011-07-21 4:54 ` Vishwanath BS [not found] ` <4e27b0d0.100e8e0a.43e0.ffffe6d9SMTPIN_ADDED@mx.google.com> 2013-09-12 8:42 ` [PATCH 1/1] OMAPDSS: Return right error during connector probe Sathya Prakash M R 9 siblings, 0 replies; 22+ messages in thread From: Vishwanath BS @ 2011-07-21 4:54 UTC (permalink / raw) To: linux-omap; +Cc: Sripathy, Vishwanath, Nishanth Menon, linux-arm-kernel From: Sripathy, Vishwanath <vishwanath.bs@ti.com> Add OMAP4460 OPP definitions for voltage and frequencies based on OMAP4460 ES1.0 DM Operating Condition Addendum Version 0.1 The following exceptions are present: * Smartreflex support is still on experimental mode: the gains and min limits are currently pending characterization data. Currently OMAP4430 values are used. * Efuse offset for core OPP100-OV setting is not clear in documentation. * IVA OPPs beyond OPP100 are disabled due to the delta between max OMAP4460 current requirements and Phoenix Max supply on VCORE2 in the default configuration - boards which have supply which can support this should explicitly call opp_enable and enable the same. * MPU OPPs > OPPTURBO can easily be detected using a efuse burnt - currently disabled pending clock changes to support DCC feature. [nm@ti.com: cleanups and updates from Datamanual] Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> --- Patch is generated against latest lo master. Changes in V2: Updated the commit log as per Nishant's comments. Patch has some checkpatch warnings related to line over 80 chars. They have been retained to keep the readability of the code. arch/arm/mach-omap2/control.h | 1 + arch/arm/mach-omap2/omap_opp_data.h | 9 ++- arch/arm/mach-omap2/opp4xxx_data.c | 96 ++++++++++++++++++++++--- arch/arm/mach-omap2/voltagedomains44xx_data.c | 14 +++- 4 files changed, 105 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index a016c8b..a41b9a7 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h @@ -195,6 +195,7 @@ #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 +#define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A /* AM35XX only CONTROL_GENERAL register offsets */ #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h index c784c12..18a750e 100644 --- a/arch/arm/mach-omap2/omap_opp_data.h +++ b/arch/arm/mach-omap2/omap_opp_data.h @@ -89,8 +89,11 @@ extern struct omap_volt_data omap34xx_vddcore_volt_data[]; extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; extern struct omap_volt_data omap36xx_vddcore_volt_data[]; -extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; -extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; -extern struct omap_volt_data omap44xx_vdd_core_volt_data[]; +extern struct omap_volt_data omap443x_vdd_mpu_volt_data[]; +extern struct omap_volt_data omap443x_vdd_iva_volt_data[]; +extern struct omap_volt_data omap443x_vdd_core_volt_data[]; +extern struct omap_volt_data omap446x_vdd_mpu_volt_data[]; +extern struct omap_volt_data omap446x_vdd_iva_volt_data[]; +extern struct omap_volt_data omap446x_vdd_core_volt_data[]; #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c index 2293ba2..8c285e4 100644 --- a/arch/arm/mach-omap2/opp4xxx_data.c +++ b/arch/arm/mach-omap2/opp4xxx_data.c @@ -1,7 +1,7 @@ /* * OMAP4 OPP table definitions. * - * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ * Nishanth Menon * Kevin Hilman * Thara Gopinath @@ -36,7 +36,7 @@ #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 -struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { +struct omap_volt_data omap443x_vdd_mpu_volt_data[] = { VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), @@ -48,7 +48,7 @@ struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { #define OMAP4430_VDD_IVA_OPP100_UV 1188000 #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 -struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { +struct omap_volt_data omap443x_vdd_iva_volt_data[] = { VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), @@ -58,14 +58,14 @@ struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { #define OMAP4430_VDD_CORE_OPP50_UV 1025000 #define OMAP4430_VDD_CORE_OPP100_UV 1200000 -struct omap_volt_data omap44xx_vdd_core_volt_data[] = { +struct omap_volt_data omap443x_vdd_core_volt_data[] = { VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), VOLT_DATA_DEFINE(0, 0, 0, 0), }; -static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { +static struct omap_opp_def __initdata omap443x_opp_def_list[] = { /* MPU OPP1 - OPP50 */ OPP_INITIALIZER("mpu", true, 300000000, OMAP4430_VDD_MPU_OPP50_UV), /* MPU OPP2 - OPP100 */ @@ -87,6 +87,82 @@ static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { /* TODO: add DSP, aess, fdif, gpu */ }; +#define OMAP4460_VDD_MPU_OPP50_UV 1025000 +#define OMAP4460_VDD_MPU_OPP100_UV 1200000 +#define OMAP4460_VDD_MPU_OPPTURBO_UV 1313000 +#define OMAP4460_VDD_MPU_OPPNITRO_UV 1375000 + +struct omap_volt_data omap446x_vdd_mpu_volt_data[] = { + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + +#define OMAP4460_VDD_IVA_OPP50_UV 1025000 +#define OMAP4460_VDD_IVA_OPP100_UV 1200000 +#define OMAP4460_VDD_IVA_OPPTURBO_UV 1313000 +#define OMAP4460_VDD_IVA_OPPNITRO_UV 1375000 + +struct omap_volt_data omap446x_vdd_iva_volt_data[] = { + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPNITRO, 0xfa, 0x23), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + +#define OMAP4460_VDD_CORE_OPP50_UV 1025000 +#define OMAP4460_VDD_CORE_OPP100_UV 1200000 +#define OMAP4460_VDD_CORE_OPP100_OV_UV 1250000 + +struct omap_volt_data omap446x_vdd_core_volt_data[] = { + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_OV_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100OV, 0xf9, 0x16), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + +static struct omap_opp_def __initdata omap446x_opp_def_list[] = { + /* MPU OPP1 - OPP50 */ + OPP_INITIALIZER("mpu", true, 350000000, OMAP4460_VDD_MPU_OPP50_UV), + /* MPU OPP2 - OPP100 */ + OPP_INITIALIZER("mpu", true, 700000000, OMAP4460_VDD_MPU_OPP100_UV), + /* MPU OPP3 - OPP-Turbo */ + OPP_INITIALIZER("mpu", true, 920000000, OMAP4460_VDD_MPU_OPPTURBO_UV), + /* + * MPU OPP4 - OPP-Nitro + Disabled as the reference schematics + * recommends TPS623631 - confirm and enable the opp in board file + * XXX: May be we should enable these based on mpu capability and + * Exception board files disable it... + */ + OPP_INITIALIZER("mpu", false, 1200000000, OMAP4460_VDD_MPU_OPPNITRO_UV), + /* MPU OPP4 - OPP-Nitro SpeedBin */ + OPP_INITIALIZER("mpu", false, 1500000000, OMAP4460_VDD_MPU_OPPNITRO_UV), + /* L3 OPP1 - OPP50 */ + OPP_INITIALIZER("l3_main_1", true, 100000000, OMAP4460_VDD_CORE_OPP50_UV), + /* L3 OPP2 - OPP100 */ + OPP_INITIALIZER("l3_main_1", true, 200000000, OMAP4460_VDD_CORE_OPP100_UV), + /* IVA OPP1 - OPP50 */ + OPP_INITIALIZER("iva", true, 133000000, OMAP4460_VDD_IVA_OPP50_UV), + /* IVA OPP2 - OPP100 */ + OPP_INITIALIZER("iva", true, 266100000, OMAP4460_VDD_IVA_OPP100_UV), + /* + * IVA OPP3 - OPP-Turbo + Disabled as the reference schematics + * recommends Phoenix VCORE2 which can supply only 600mA - so the ones + * above this OPP frequency, even though OMAP is capable, should be + * enabled by board file which is sure of the chip power capability + */ + OPP_INITIALIZER("iva", false, 332000000, OMAP4460_VDD_IVA_OPPTURBO_UV), + /* IVA OPP4 - OPP-Nitro */ + OPP_INITIALIZER("iva", false, 430000000, OMAP4460_VDD_IVA_OPPNITRO_UV), + /* IVA OPP5 - OPP-Nitro SpeedBin*/ + OPP_INITIALIZER("iva", false, 500000000, OMAP4460_VDD_IVA_OPPNITRO_UV), + + /* TODO: add DSP, aess, fdif, gpu */ +}; + /** * omap4_opp_init() - initialize omap4 opp table */ @@ -96,10 +172,12 @@ int __init omap4_opp_init(void) if (!cpu_is_omap44xx()) return r; - - r = omap_init_opp_table(omap44xx_opp_def_list, - ARRAY_SIZE(omap44xx_opp_def_list)); - + if (cpu_is_omap443x()) + r = omap_init_opp_table(omap443x_opp_def_list, + ARRAY_SIZE(omap443x_opp_def_list)); + else if (cpu_is_omap446x()) + r = omap_init_opp_table(omap446x_opp_def_list, + ARRAY_SIZE(omap446x_opp_def_list)); return r; } device_initcall(omap4_opp_init); diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c index cb64996..f516cfe 100644 --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c @@ -91,9 +91,17 @@ static int __init omap44xx_voltage_early_init(void) * XXX Will depend on the process, validation, and binning * for the currently-running IC */ - omap4_vdd_mpu_info.volt_data = omap44xx_vdd_mpu_volt_data; - omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data; - omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data; + if (cpu_is_omap443x()) { + omap4_vdd_mpu_info.volt_data = omap443x_vdd_mpu_volt_data; + omap4_vdd_iva_info.volt_data = omap443x_vdd_iva_volt_data; + omap4_vdd_core_info.volt_data = omap443x_vdd_core_volt_data; + } else if (cpu_is_omap446x()) { + omap4_vdd_mpu_info.volt_data = omap446x_vdd_mpu_volt_data; + omap4_vdd_iva_info.volt_data = omap446x_vdd_iva_volt_data; + omap4_vdd_core_info.volt_data = omap446x_vdd_core_volt_data; + } else { + return -ENODATA; + } return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod, omap4_vdd_info, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
[parent not found: <4e27b0d0.100e8e0a.43e0.ffffe6d9SMTPIN_ADDED@mx.google.com>]
* RE: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions [not found] ` <4e27b0d0.100e8e0a.43e0.ffffe6d9SMTPIN_ADDED@mx.google.com> @ 2011-07-21 4:56 ` Vishwanath Sripathy 0 siblings, 0 replies; 22+ messages in thread From: Vishwanath Sripathy @ 2011-07-21 4:56 UTC (permalink / raw) To: yes, linux-omap; +Cc: linux-arm-kernel, Nishanth Menon My mailer seems to have goofed the from email-id. Pls ignore this email. I have sent another patch correcting the same. Vishwa > -----Original Message----- > From: yes@dbdp31.itg.ti.com [mailto:yes@dbdp31.itg.ti.com] > Sent: Thursday, July 21, 2011 10:23 AM > To: linux-omap@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org; Sripathy, Vishwanath; > Nishanth Menon > Subject: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions > > From: Sripathy, Vishwanath <vishwanath.bs@ti.com> > > Add OMAP4460 OPP definitions for voltage and frequencies based on > OMAP4460 ES1.0 DM Operating Condition Addendum Version 0.1 > > The following exceptions are present: > * Smartreflex support is still on experimental mode: the gains and > min > limits are currently pending characterization data. Currently > OMAP4430 values > are used. > * Efuse offset for core OPP100-OV setting is not clear in > documentation. > * IVA OPPs beyond OPP100 are disabled due to the delta between max > OMAP4460 > current requirements and Phoenix Max supply on VCORE2 in the > default > configuration - boards which have supply which can support this > should > explicitly call opp_enable and enable the same. > * MPU OPPs > OPPTURBO can easily be detected using a efuse burnt - > currently > disabled pending clock changes to support DCC feature. > > [nm@ti.com: cleanups and updates from Datamanual] > Signed-off-by: Nishanth Menon <nm@ti.com> > Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> > --- > Patch is generated against latest lo master. > Changes in V2: Updated the commit log as per Nishant's comments. > Patch has some checkpatch warnings related to line over 80 chars. > They have > been retained to keep the readability of the code. > > arch/arm/mach-omap2/control.h | 1 + > arch/arm/mach-omap2/omap_opp_data.h | 9 ++- > arch/arm/mach-omap2/opp4xxx_data.c | 96 > ++++++++++++++++++++++--- > arch/arm/mach-omap2/voltagedomains44xx_data.c | 14 +++- > 4 files changed, 105 insertions(+), 15 deletions(-) > > diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach- > omap2/control.h > index a016c8b..a41b9a7 100644 > --- a/arch/arm/mach-omap2/control.h > +++ b/arch/arm/mach-omap2/control.h > @@ -195,6 +195,7 @@ > #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 > #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 > #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 > +#define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A > > /* AM35XX only CONTROL_GENERAL register offsets */ > #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + > 0x0038) > diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach- > omap2/omap_opp_data.h > index c784c12..18a750e 100644 > --- a/arch/arm/mach-omap2/omap_opp_data.h > +++ b/arch/arm/mach-omap2/omap_opp_data.h > @@ -89,8 +89,11 @@ extern struct omap_volt_data > omap34xx_vddcore_volt_data[]; > extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; > extern struct omap_volt_data omap36xx_vddcore_volt_data[]; > > -extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; > -extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; > -extern struct omap_volt_data omap44xx_vdd_core_volt_data[]; > +extern struct omap_volt_data omap443x_vdd_mpu_volt_data[]; > +extern struct omap_volt_data omap443x_vdd_iva_volt_data[]; > +extern struct omap_volt_data omap443x_vdd_core_volt_data[]; > +extern struct omap_volt_data omap446x_vdd_mpu_volt_data[]; > +extern struct omap_volt_data omap446x_vdd_iva_volt_data[]; > +extern struct omap_volt_data omap446x_vdd_core_volt_data[]; > > #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ > diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach- > omap2/opp4xxx_data.c > index 2293ba2..8c285e4 100644 > --- a/arch/arm/mach-omap2/opp4xxx_data.c > +++ b/arch/arm/mach-omap2/opp4xxx_data.c > @@ -1,7 +1,7 @@ > /* > * OMAP4 OPP table definitions. > * > - * Copyright (C) 2010 Texas Instruments Incorporated - > http://www.ti.com/ > + * Copyright (C) 2010-2011 Texas Instruments Incorporated - > http://www.ti.com/ > * Nishanth Menon > * Kevin Hilman > * Thara Gopinath > @@ -36,7 +36,7 @@ > #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 > #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 > > -struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { > +struct omap_volt_data omap443x_vdd_mpu_volt_data[] = { > VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), > VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), > VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), > @@ -48,7 +48,7 @@ struct omap_volt_data omap44xx_vdd_mpu_volt_data[] > = { > #define OMAP4430_VDD_IVA_OPP100_UV 1188000 > #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 > > -struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { > +struct omap_volt_data omap443x_vdd_iva_volt_data[] = { > VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), > VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), > VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), > @@ -58,14 +58,14 @@ struct omap_volt_data > omap44xx_vdd_iva_volt_data[] = { > #define OMAP4430_VDD_CORE_OPP50_UV 1025000 > #define OMAP4430_VDD_CORE_OPP100_UV 1200000 > > -struct omap_volt_data omap44xx_vdd_core_volt_data[] = { > +struct omap_volt_data omap443x_vdd_core_volt_data[] = { > VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), > VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), > VOLT_DATA_DEFINE(0, 0, 0, 0), > }; > > > -static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { > +static struct omap_opp_def __initdata omap443x_opp_def_list[] = { > /* MPU OPP1 - OPP50 */ > OPP_INITIALIZER("mpu", true, 300000000, > OMAP4430_VDD_MPU_OPP50_UV), > /* MPU OPP2 - OPP100 */ > @@ -87,6 +87,82 @@ static struct omap_opp_def __initdata > omap44xx_opp_def_list[] = { > /* TODO: add DSP, aess, fdif, gpu */ > }; > > +#define OMAP4460_VDD_MPU_OPP50_UV 1025000 > +#define OMAP4460_VDD_MPU_OPP100_UV 1200000 > +#define OMAP4460_VDD_MPU_OPPTURBO_UV 1313000 > +#define OMAP4460_VDD_MPU_OPPNITRO_UV 1375000 > + > +struct omap_volt_data omap446x_vdd_mpu_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP50_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP100_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPNITRO_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > +#define OMAP4460_VDD_IVA_OPP50_UV 1025000 > +#define OMAP4460_VDD_IVA_OPP100_UV 1200000 > +#define OMAP4460_VDD_IVA_OPPTURBO_UV 1313000 > +#define OMAP4460_VDD_IVA_OPPNITRO_UV 1375000 > + > +struct omap_volt_data omap446x_vdd_iva_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP50_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP100_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPNITRO_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPPNITRO, 0xfa, 0x23), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > +#define OMAP4460_VDD_CORE_OPP50_UV 1025000 > +#define OMAP4460_VDD_CORE_OPP100_UV 1200000 > +#define OMAP4460_VDD_CORE_OPP100_OV_UV 1250000 > + > +struct omap_volt_data omap446x_vdd_core_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP50_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), > + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), > + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_OV_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP100OV, 0xf9, 0x16), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > +static struct omap_opp_def __initdata omap446x_opp_def_list[] = { > + /* MPU OPP1 - OPP50 */ > + OPP_INITIALIZER("mpu", true, 350000000, > OMAP4460_VDD_MPU_OPP50_UV), > + /* MPU OPP2 - OPP100 */ > + OPP_INITIALIZER("mpu", true, 700000000, > OMAP4460_VDD_MPU_OPP100_UV), > + /* MPU OPP3 - OPP-Turbo */ > + OPP_INITIALIZER("mpu", true, 920000000, > OMAP4460_VDD_MPU_OPPTURBO_UV), > + /* > + * MPU OPP4 - OPP-Nitro + Disabled as the reference schematics > + * recommends TPS623631 - confirm and enable the opp in board > file > + * XXX: May be we should enable these based on mpu capability > and > + * Exception board files disable it... > + */ > + OPP_INITIALIZER("mpu", false, 1200000000, > OMAP4460_VDD_MPU_OPPNITRO_UV), > + /* MPU OPP4 - OPP-Nitro SpeedBin */ > + OPP_INITIALIZER("mpu", false, 1500000000, > OMAP4460_VDD_MPU_OPPNITRO_UV), > + /* L3 OPP1 - OPP50 */ > + OPP_INITIALIZER("l3_main_1", true, 100000000, > OMAP4460_VDD_CORE_OPP50_UV), > + /* L3 OPP2 - OPP100 */ > + OPP_INITIALIZER("l3_main_1", true, 200000000, > OMAP4460_VDD_CORE_OPP100_UV), > + /* IVA OPP1 - OPP50 */ > + OPP_INITIALIZER("iva", true, 133000000, > OMAP4460_VDD_IVA_OPP50_UV), > + /* IVA OPP2 - OPP100 */ > + OPP_INITIALIZER("iva", true, 266100000, > OMAP4460_VDD_IVA_OPP100_UV), > + /* > + * IVA OPP3 - OPP-Turbo + Disabled as the reference schematics > + * recommends Phoenix VCORE2 which can supply only 600mA - so > the ones > + * above this OPP frequency, even though OMAP is capable, > should be > + * enabled by board file which is sure of the chip power > capability > + */ > + OPP_INITIALIZER("iva", false, 332000000, > OMAP4460_VDD_IVA_OPPTURBO_UV), > + /* IVA OPP4 - OPP-Nitro */ > + OPP_INITIALIZER("iva", false, 430000000, > OMAP4460_VDD_IVA_OPPNITRO_UV), > + /* IVA OPP5 - OPP-Nitro SpeedBin*/ > + OPP_INITIALIZER("iva", false, 500000000, > OMAP4460_VDD_IVA_OPPNITRO_UV), > + > + /* TODO: add DSP, aess, fdif, gpu */ > +}; > + > /** > * omap4_opp_init() - initialize omap4 opp table > */ > @@ -96,10 +172,12 @@ int __init omap4_opp_init(void) > > if (!cpu_is_omap44xx()) > return r; > - > - r = omap_init_opp_table(omap44xx_opp_def_list, > - ARRAY_SIZE(omap44xx_opp_def_list)); > - > + if (cpu_is_omap443x()) > + r = omap_init_opp_table(omap443x_opp_def_list, > + ARRAY_SIZE(omap443x_opp_def_list)); > + else if (cpu_is_omap446x()) > + r = omap_init_opp_table(omap446x_opp_def_list, > + ARRAY_SIZE(omap446x_opp_def_list)); > return r; > } > device_initcall(omap4_opp_init); > diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c > b/arch/arm/mach-omap2/voltagedomains44xx_data.c > index cb64996..f516cfe 100644 > --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c > +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c > @@ -91,9 +91,17 @@ static int __init > omap44xx_voltage_early_init(void) > * XXX Will depend on the process, validation, and binning > * for the currently-running IC > */ > - omap4_vdd_mpu_info.volt_data = omap44xx_vdd_mpu_volt_data; > - omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data; > - omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data; > + if (cpu_is_omap443x()) { > + omap4_vdd_mpu_info.volt_data = > omap443x_vdd_mpu_volt_data; > + omap4_vdd_iva_info.volt_data = > omap443x_vdd_iva_volt_data; > + omap4_vdd_core_info.volt_data = > omap443x_vdd_core_volt_data; > + } else if (cpu_is_omap446x()) { > + omap4_vdd_mpu_info.volt_data = > omap446x_vdd_mpu_volt_data; > + omap4_vdd_iva_info.volt_data = > omap446x_vdd_iva_volt_data; > + omap4_vdd_core_info.volt_data = > omap446x_vdd_core_volt_data; > + } else { > + return -ENODATA; > + } > > return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod, > omap4_vdd_info, > -- > 1.7.0.4 ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 1/1] OMAPDSS: Return right error during connector probe [not found] <yes> ` (8 preceding siblings ...) [not found] ` <4e27b0d0.100e8e0a.43e0.ffffe6d9SMTPIN_ADDED@mx.google.com> @ 2013-09-12 8:42 ` Sathya Prakash M R 2013-09-16 9:41 ` Tomi Valkeinen 9 siblings, 1 reply; 22+ messages in thread From: Sathya Prakash M R @ 2013-09-12 8:42 UTC (permalink / raw) To: linux-omap; +Cc: tomi.valkeinen, Sathya Prakash M R While using HDMI connector driver with sil9022 encoder came across issue where connector driver is probed first. This resulted in error. A deffered probe solved this. Most connector drivers need a encoder driver as their video source. This patch ensures we do a probe defferal if video source is not present for connector drivers. Signed-off-by: Sathya Prakash M R <sathyap@ti.com> --- .../video/omap2/displays-new/connector-analog-tv.c | 2 +- drivers/video/omap2/displays-new/connector-dvi.c | 2 +- drivers/video/omap2/displays-new/connector-hdmi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/omap2/displays-new/connector-analog-tv.c b/drivers/video/omap2/displays-new/connector-analog-tv.c index 5338f36..547a604 100644 --- a/drivers/video/omap2/displays-new/connector-analog-tv.c +++ b/drivers/video/omap2/displays-new/connector-analog-tv.c @@ -177,7 +177,7 @@ static int tvc_probe_pdata(struct platform_device *pdev) in = omap_dss_find_output(pdata->source); if (in == NULL) { dev_err(&pdev->dev, "Failed to find video source\n"); - return -ENODEV; + return -EPROBE_DEFER; } ddata->in = in; diff --git a/drivers/video/omap2/displays-new/connector-dvi.c b/drivers/video/omap2/displays-new/connector-dvi.c index bc5f8ce..63d88ee 100644 --- a/drivers/video/omap2/displays-new/connector-dvi.c +++ b/drivers/video/omap2/displays-new/connector-dvi.c @@ -263,7 +263,7 @@ static int dvic_probe_pdata(struct platform_device *pdev) in = omap_dss_find_output(pdata->source); if (in == NULL) { dev_err(&pdev->dev, "Failed to find video source\n"); - return -ENODEV; + return -EPROBE_DEFER; } ddata->in = in; diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c index c582671..9abe2c0 100644 --- a/drivers/video/omap2/displays-new/connector-hdmi.c +++ b/drivers/video/omap2/displays-new/connector-hdmi.c @@ -290,7 +290,7 @@ static int hdmic_probe_pdata(struct platform_device *pdev) in = omap_dss_find_output(pdata->source); if (in == NULL) { dev_err(&pdev->dev, "Failed to find video source\n"); - return -ENODEV; + return -EPROBE_DEFER; } ddata->in = in; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 1/1] OMAPDSS: Return right error during connector probe 2013-09-12 8:42 ` [PATCH 1/1] OMAPDSS: Return right error during connector probe Sathya Prakash M R @ 2013-09-16 9:41 ` Tomi Valkeinen 0 siblings, 0 replies; 22+ messages in thread From: Tomi Valkeinen @ 2013-09-16 9:41 UTC (permalink / raw) To: Sathya Prakash M R; +Cc: linux-omap [-- Attachment #1: Type: text/plain, Size: 501 bytes --] On 12/09/13 11:42, Sathya Prakash M R wrote: > While using HDMI connector driver with sil9022 encoder > came across issue where connector driver is probed first. > This resulted in error. A deffered probe solved this. > Most connector drivers need a encoder driver as their > video source. This patch ensures we do a probe defferal > if video source is not present for connector drivers. > > Signed-off-by: Sathya Prakash M R <sathyap@ti.com> Thanks, applying to 3.12 fixes. Tomi [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCHV2] OMAP4: OPP: add OMAP4460 definitions @ 2011-07-04 5:40 Vishwanath BS 2011-07-19 13:25 ` Vishwanath Sripathy 0 siblings, 1 reply; 22+ messages in thread From: Vishwanath BS @ 2011-07-04 5:40 UTC (permalink / raw) To: linux-omap; +Cc: Vishwanath BS, Nishanth Menon Add OMAP4460 OPP definitions for voltage and frequencies based on OMAP4460 ES1.0 DM Operating Condition Addendum Version 0.1 The following exceptions are present: * Smartreflex support is still on experimental mode: the gains and min limits are currently pending characterization data. Currently OMAP4430 values are used. * Efuse offset for core OPP100-OV setting is not clear in documentation. * IVA OPPs beyond OPP100 are disabled due to the delta between max OMAP4460 current requirements and Phoenix Max supply on VCORE2 in the default configuration - boards which have supply which can support this should explicitly call opp_enable and enable the same. * MPU OPPs > OPPTURBO can easily be detected using a efuse burnt - currently disabled pending clock changes to support DCC feature. [nm@ti.com: cleanups and updates from Datamanual] Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> --- Patch is generated against Patch series "[PATCH v2 0/6] OMAP4: Add 4460 base support" from Rajendra and boot tested on 4460 and 4430 SDP. Changes in V2: Updated the commit log as per Nishant's comments arch/arm/mach-omap2/control.h | 1 + arch/arm/mach-omap2/omap_opp_data.h | 9 ++- arch/arm/mach-omap2/opp4xxx_data.c | 96 ++++++++++++++++++++++--- arch/arm/mach-omap2/voltagedomains44xx_data.c | 14 +++- 4 files changed, 105 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index a016c8b..a41b9a7 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h @@ -195,6 +195,7 @@ #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 +#define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A /* AM35XX only CONTROL_GENERAL register offsets */ #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h index c784c12..18a750e 100644 --- a/arch/arm/mach-omap2/omap_opp_data.h +++ b/arch/arm/mach-omap2/omap_opp_data.h @@ -89,8 +89,11 @@ extern struct omap_volt_data omap34xx_vddcore_volt_data[]; extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; extern struct omap_volt_data omap36xx_vddcore_volt_data[]; -extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; -extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; -extern struct omap_volt_data omap44xx_vdd_core_volt_data[]; +extern struct omap_volt_data omap443x_vdd_mpu_volt_data[]; +extern struct omap_volt_data omap443x_vdd_iva_volt_data[]; +extern struct omap_volt_data omap443x_vdd_core_volt_data[]; +extern struct omap_volt_data omap446x_vdd_mpu_volt_data[]; +extern struct omap_volt_data omap446x_vdd_iva_volt_data[]; +extern struct omap_volt_data omap446x_vdd_core_volt_data[]; #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c index 2293ba2..8c285e4 100644 --- a/arch/arm/mach-omap2/opp4xxx_data.c +++ b/arch/arm/mach-omap2/opp4xxx_data.c @@ -1,7 +1,7 @@ /* * OMAP4 OPP table definitions. * - * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ * Nishanth Menon * Kevin Hilman * Thara Gopinath @@ -36,7 +36,7 @@ #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 -struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { +struct omap_volt_data omap443x_vdd_mpu_volt_data[] = { VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), @@ -48,7 +48,7 @@ struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { #define OMAP4430_VDD_IVA_OPP100_UV 1188000 #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 -struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { +struct omap_volt_data omap443x_vdd_iva_volt_data[] = { VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), @@ -58,14 +58,14 @@ struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { #define OMAP4430_VDD_CORE_OPP50_UV 1025000 #define OMAP4430_VDD_CORE_OPP100_UV 1200000 -struct omap_volt_data omap44xx_vdd_core_volt_data[] = { +struct omap_volt_data omap443x_vdd_core_volt_data[] = { VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), VOLT_DATA_DEFINE(0, 0, 0, 0), }; -static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { +static struct omap_opp_def __initdata omap443x_opp_def_list[] = { /* MPU OPP1 - OPP50 */ OPP_INITIALIZER("mpu", true, 300000000, OMAP4430_VDD_MPU_OPP50_UV), /* MPU OPP2 - OPP100 */ @@ -87,6 +87,82 @@ static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { /* TODO: add DSP, aess, fdif, gpu */ }; +#define OMAP4460_VDD_MPU_OPP50_UV 1025000 +#define OMAP4460_VDD_MPU_OPP100_UV 1200000 +#define OMAP4460_VDD_MPU_OPPTURBO_UV 1313000 +#define OMAP4460_VDD_MPU_OPPNITRO_UV 1375000 + +struct omap_volt_data omap446x_vdd_mpu_volt_data[] = { + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + +#define OMAP4460_VDD_IVA_OPP50_UV 1025000 +#define OMAP4460_VDD_IVA_OPP100_UV 1200000 +#define OMAP4460_VDD_IVA_OPPTURBO_UV 1313000 +#define OMAP4460_VDD_IVA_OPPNITRO_UV 1375000 + +struct omap_volt_data omap446x_vdd_iva_volt_data[] = { + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPNITRO, 0xfa, 0x23), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + +#define OMAP4460_VDD_CORE_OPP50_UV 1025000 +#define OMAP4460_VDD_CORE_OPP100_UV 1200000 +#define OMAP4460_VDD_CORE_OPP100_OV_UV 1250000 + +struct omap_volt_data omap446x_vdd_core_volt_data[] = { + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_OV_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100OV, 0xf9, 0x16), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + +static struct omap_opp_def __initdata omap446x_opp_def_list[] = { + /* MPU OPP1 - OPP50 */ + OPP_INITIALIZER("mpu", true, 350000000, OMAP4460_VDD_MPU_OPP50_UV), + /* MPU OPP2 - OPP100 */ + OPP_INITIALIZER("mpu", true, 700000000, OMAP4460_VDD_MPU_OPP100_UV), + /* MPU OPP3 - OPP-Turbo */ + OPP_INITIALIZER("mpu", true, 920000000, OMAP4460_VDD_MPU_OPPTURBO_UV), + /* + * MPU OPP4 - OPP-Nitro + Disabled as the reference schematics + * recommends TPS623631 - confirm and enable the opp in board file + * XXX: May be we should enable these based on mpu capability and + * Exception board files disable it... + */ + OPP_INITIALIZER("mpu", false, 1200000000, OMAP4460_VDD_MPU_OPPNITRO_UV), + /* MPU OPP4 - OPP-Nitro SpeedBin */ + OPP_INITIALIZER("mpu", false, 1500000000, OMAP4460_VDD_MPU_OPPNITRO_UV), + /* L3 OPP1 - OPP50 */ + OPP_INITIALIZER("l3_main_1", true, 100000000, OMAP4460_VDD_CORE_OPP50_UV), + /* L3 OPP2 - OPP100 */ + OPP_INITIALIZER("l3_main_1", true, 200000000, OMAP4460_VDD_CORE_OPP100_UV), + /* IVA OPP1 - OPP50 */ + OPP_INITIALIZER("iva", true, 133000000, OMAP4460_VDD_IVA_OPP50_UV), + /* IVA OPP2 - OPP100 */ + OPP_INITIALIZER("iva", true, 266100000, OMAP4460_VDD_IVA_OPP100_UV), + /* + * IVA OPP3 - OPP-Turbo + Disabled as the reference schematics + * recommends Phoenix VCORE2 which can supply only 600mA - so the ones + * above this OPP frequency, even though OMAP is capable, should be + * enabled by board file which is sure of the chip power capability + */ + OPP_INITIALIZER("iva", false, 332000000, OMAP4460_VDD_IVA_OPPTURBO_UV), + /* IVA OPP4 - OPP-Nitro */ + OPP_INITIALIZER("iva", false, 430000000, OMAP4460_VDD_IVA_OPPNITRO_UV), + /* IVA OPP5 - OPP-Nitro SpeedBin*/ + OPP_INITIALIZER("iva", false, 500000000, OMAP4460_VDD_IVA_OPPNITRO_UV), + + /* TODO: add DSP, aess, fdif, gpu */ +}; + /** * omap4_opp_init() - initialize omap4 opp table */ @@ -96,10 +172,12 @@ int __init omap4_opp_init(void) if (!cpu_is_omap44xx()) return r; - - r = omap_init_opp_table(omap44xx_opp_def_list, - ARRAY_SIZE(omap44xx_opp_def_list)); - + if (cpu_is_omap443x()) + r = omap_init_opp_table(omap443x_opp_def_list, + ARRAY_SIZE(omap443x_opp_def_list)); + else if (cpu_is_omap446x()) + r = omap_init_opp_table(omap446x_opp_def_list, + ARRAY_SIZE(omap446x_opp_def_list)); return r; } device_initcall(omap4_opp_init); diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c index cb64996..f516cfe 100644 --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c @@ -91,9 +91,17 @@ static int __init omap44xx_voltage_early_init(void) * XXX Will depend on the process, validation, and binning * for the currently-running IC */ - omap4_vdd_mpu_info.volt_data = omap44xx_vdd_mpu_volt_data; - omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data; - omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data; + if (cpu_is_omap443x()) { + omap4_vdd_mpu_info.volt_data = omap443x_vdd_mpu_volt_data; + omap4_vdd_iva_info.volt_data = omap443x_vdd_iva_volt_data; + omap4_vdd_core_info.volt_data = omap443x_vdd_core_volt_data; + } else if (cpu_is_omap446x()) { + omap4_vdd_mpu_info.volt_data = omap446x_vdd_mpu_volt_data; + omap4_vdd_iva_info.volt_data = omap446x_vdd_iva_volt_data; + omap4_vdd_core_info.volt_data = omap446x_vdd_core_volt_data; + } else { + return -ENODATA; + } return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod, omap4_vdd_info, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* RE: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions 2011-07-04 5:40 [PATCHV2] OMAP4: OPP: add OMAP4460 definitions Vishwanath BS @ 2011-07-19 13:25 ` Vishwanath Sripathy 2011-07-19 15:16 ` Kevin Hilman 0 siblings, 1 reply; 22+ messages in thread From: Vishwanath Sripathy @ 2011-07-19 13:25 UTC (permalink / raw) To: linux-omap, Kevin Hilman, paul; +Cc: Nishanth Menon Kevin/Paul, I see that this patch is not queued for 3.1 merge window. Any issues/comments on this patch? Vishwa > -----Original Message----- > From: Vishwanath BS [mailto:vishwanath.bs@ti.com] > Sent: Monday, July 04, 2011 11:11 AM > To: linux-omap@vger.kernel.org > Cc: Vishwanath BS; Nishanth Menon > Subject: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions > > Add OMAP4460 OPP definitions for voltage and frequencies based on > OMAP4460 ES1.0 DM Operating Condition Addendum Version 0.1 > > The following exceptions are present: > * Smartreflex support is still on experimental mode: the gains and > min > limits are currently pending characterization data. Currently > OMAP4430 values > are used. > * Efuse offset for core OPP100-OV setting is not clear in > documentation. > * IVA OPPs beyond OPP100 are disabled due to the delta between max > OMAP4460 > current requirements and Phoenix Max supply on VCORE2 in the > default > configuration - boards which have supply which can support this > should > explicitly call opp_enable and enable the same. > * MPU OPPs > OPPTURBO can easily be detected using a efuse burnt - > currently > disabled pending clock changes to support DCC feature. > > [nm@ti.com: cleanups and updates from Datamanual] > Signed-off-by: Nishanth Menon <nm@ti.com> > Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> > --- > Patch is generated against Patch series "[PATCH v2 0/6] OMAP4: Add > 4460 base > support" from Rajendra and boot tested on 4460 and 4430 SDP. > > Changes in V2: Updated the commit log as per Nishant's comments > > arch/arm/mach-omap2/control.h | 1 + > arch/arm/mach-omap2/omap_opp_data.h | 9 ++- > arch/arm/mach-omap2/opp4xxx_data.c | 96 > ++++++++++++++++++++++--- > arch/arm/mach-omap2/voltagedomains44xx_data.c | 14 +++- > 4 files changed, 105 insertions(+), 15 deletions(-) > > diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach- > omap2/control.h > index a016c8b..a41b9a7 100644 > --- a/arch/arm/mach-omap2/control.h > +++ b/arch/arm/mach-omap2/control.h > @@ -195,6 +195,7 @@ > #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 > #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 > #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 > +#define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A > > /* AM35XX only CONTROL_GENERAL register offsets */ > #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + > 0x0038) > diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach- > omap2/omap_opp_data.h > index c784c12..18a750e 100644 > --- a/arch/arm/mach-omap2/omap_opp_data.h > +++ b/arch/arm/mach-omap2/omap_opp_data.h > @@ -89,8 +89,11 @@ extern struct omap_volt_data > omap34xx_vddcore_volt_data[]; > extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; > extern struct omap_volt_data omap36xx_vddcore_volt_data[]; > > -extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; > -extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; > -extern struct omap_volt_data omap44xx_vdd_core_volt_data[]; > +extern struct omap_volt_data omap443x_vdd_mpu_volt_data[]; > +extern struct omap_volt_data omap443x_vdd_iva_volt_data[]; > +extern struct omap_volt_data omap443x_vdd_core_volt_data[]; > +extern struct omap_volt_data omap446x_vdd_mpu_volt_data[]; > +extern struct omap_volt_data omap446x_vdd_iva_volt_data[]; > +extern struct omap_volt_data omap446x_vdd_core_volt_data[]; > > #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ > diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach- > omap2/opp4xxx_data.c > index 2293ba2..8c285e4 100644 > --- a/arch/arm/mach-omap2/opp4xxx_data.c > +++ b/arch/arm/mach-omap2/opp4xxx_data.c > @@ -1,7 +1,7 @@ > /* > * OMAP4 OPP table definitions. > * > - * Copyright (C) 2010 Texas Instruments Incorporated - > http://www.ti.com/ > + * Copyright (C) 2010-2011 Texas Instruments Incorporated - > http://www.ti.com/ > * Nishanth Menon > * Kevin Hilman > * Thara Gopinath > @@ -36,7 +36,7 @@ > #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 > #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 > > -struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { > +struct omap_volt_data omap443x_vdd_mpu_volt_data[] = { > VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), > VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), > VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), > @@ -48,7 +48,7 @@ struct omap_volt_data omap44xx_vdd_mpu_volt_data[] > = { > #define OMAP4430_VDD_IVA_OPP100_UV 1188000 > #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 > > -struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { > +struct omap_volt_data omap443x_vdd_iva_volt_data[] = { > VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), > VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), > VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), > @@ -58,14 +58,14 @@ struct omap_volt_data > omap44xx_vdd_iva_volt_data[] = { > #define OMAP4430_VDD_CORE_OPP50_UV 1025000 > #define OMAP4430_VDD_CORE_OPP100_UV 1200000 > > -struct omap_volt_data omap44xx_vdd_core_volt_data[] = { > +struct omap_volt_data omap443x_vdd_core_volt_data[] = { > VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), > VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), > VOLT_DATA_DEFINE(0, 0, 0, 0), > }; > > > -static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { > +static struct omap_opp_def __initdata omap443x_opp_def_list[] = { > /* MPU OPP1 - OPP50 */ > OPP_INITIALIZER("mpu", true, 300000000, > OMAP4430_VDD_MPU_OPP50_UV), > /* MPU OPP2 - OPP100 */ > @@ -87,6 +87,82 @@ static struct omap_opp_def __initdata > omap44xx_opp_def_list[] = { > /* TODO: add DSP, aess, fdif, gpu */ > }; > > +#define OMAP4460_VDD_MPU_OPP50_UV 1025000 > +#define OMAP4460_VDD_MPU_OPP100_UV 1200000 > +#define OMAP4460_VDD_MPU_OPPTURBO_UV 1313000 > +#define OMAP4460_VDD_MPU_OPPNITRO_UV 1375000 > + > +struct omap_volt_data omap446x_vdd_mpu_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP50_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP100_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), > + VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPNITRO_UV, > OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > +#define OMAP4460_VDD_IVA_OPP50_UV 1025000 > +#define OMAP4460_VDD_IVA_OPP100_UV 1200000 > +#define OMAP4460_VDD_IVA_OPPTURBO_UV 1313000 > +#define OMAP4460_VDD_IVA_OPPNITRO_UV 1375000 > + > +struct omap_volt_data omap446x_vdd_iva_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP50_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP100_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPTURBO_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), > + VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPNITRO_UV, > OMAP44XX_CONTROL_FUSE_IVA_OPPNITRO, 0xfa, 0x23), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > +#define OMAP4460_VDD_CORE_OPP50_UV 1025000 > +#define OMAP4460_VDD_CORE_OPP100_UV 1200000 > +#define OMAP4460_VDD_CORE_OPP100_OV_UV 1250000 > + > +struct omap_volt_data omap446x_vdd_core_volt_data[] = { > + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP50_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), > + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), > + VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_OV_UV, > OMAP44XX_CONTROL_FUSE_CORE_OPP100OV, 0xf9, 0x16), > + VOLT_DATA_DEFINE(0, 0, 0, 0), > +}; > + > +static struct omap_opp_def __initdata omap446x_opp_def_list[] = { > + /* MPU OPP1 - OPP50 */ > + OPP_INITIALIZER("mpu", true, 350000000, > OMAP4460_VDD_MPU_OPP50_UV), > + /* MPU OPP2 - OPP100 */ > + OPP_INITIALIZER("mpu", true, 700000000, > OMAP4460_VDD_MPU_OPP100_UV), > + /* MPU OPP3 - OPP-Turbo */ > + OPP_INITIALIZER("mpu", true, 920000000, > OMAP4460_VDD_MPU_OPPTURBO_UV), > + /* > + * MPU OPP4 - OPP-Nitro + Disabled as the reference schematics > + * recommends TPS623631 - confirm and enable the opp in board > file > + * XXX: May be we should enable these based on mpu capability > and > + * Exception board files disable it... > + */ > + OPP_INITIALIZER("mpu", false, 1200000000, > OMAP4460_VDD_MPU_OPPNITRO_UV), > + /* MPU OPP4 - OPP-Nitro SpeedBin */ > + OPP_INITIALIZER("mpu", false, 1500000000, > OMAP4460_VDD_MPU_OPPNITRO_UV), > + /* L3 OPP1 - OPP50 */ > + OPP_INITIALIZER("l3_main_1", true, 100000000, > OMAP4460_VDD_CORE_OPP50_UV), > + /* L3 OPP2 - OPP100 */ > + OPP_INITIALIZER("l3_main_1", true, 200000000, > OMAP4460_VDD_CORE_OPP100_UV), > + /* IVA OPP1 - OPP50 */ > + OPP_INITIALIZER("iva", true, 133000000, > OMAP4460_VDD_IVA_OPP50_UV), > + /* IVA OPP2 - OPP100 */ > + OPP_INITIALIZER("iva", true, 266100000, > OMAP4460_VDD_IVA_OPP100_UV), > + /* > + * IVA OPP3 - OPP-Turbo + Disabled as the reference schematics > + * recommends Phoenix VCORE2 which can supply only 600mA - so > the ones > + * above this OPP frequency, even though OMAP is capable, > should be > + * enabled by board file which is sure of the chip power > capability > + */ > + OPP_INITIALIZER("iva", false, 332000000, > OMAP4460_VDD_IVA_OPPTURBO_UV), > + /* IVA OPP4 - OPP-Nitro */ > + OPP_INITIALIZER("iva", false, 430000000, > OMAP4460_VDD_IVA_OPPNITRO_UV), > + /* IVA OPP5 - OPP-Nitro SpeedBin*/ > + OPP_INITIALIZER("iva", false, 500000000, > OMAP4460_VDD_IVA_OPPNITRO_UV), > + > + /* TODO: add DSP, aess, fdif, gpu */ > +}; > + > /** > * omap4_opp_init() - initialize omap4 opp table > */ > @@ -96,10 +172,12 @@ int __init omap4_opp_init(void) > > if (!cpu_is_omap44xx()) > return r; > - > - r = omap_init_opp_table(omap44xx_opp_def_list, > - ARRAY_SIZE(omap44xx_opp_def_list)); > - > + if (cpu_is_omap443x()) > + r = omap_init_opp_table(omap443x_opp_def_list, > + ARRAY_SIZE(omap443x_opp_def_list)); > + else if (cpu_is_omap446x()) > + r = omap_init_opp_table(omap446x_opp_def_list, > + ARRAY_SIZE(omap446x_opp_def_list)); > return r; > } > device_initcall(omap4_opp_init); > diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c > b/arch/arm/mach-omap2/voltagedomains44xx_data.c > index cb64996..f516cfe 100644 > --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c > +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c > @@ -91,9 +91,17 @@ static int __init > omap44xx_voltage_early_init(void) > * XXX Will depend on the process, validation, and binning > * for the currently-running IC > */ > - omap4_vdd_mpu_info.volt_data = omap44xx_vdd_mpu_volt_data; > - omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data; > - omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data; > + if (cpu_is_omap443x()) { > + omap4_vdd_mpu_info.volt_data = > omap443x_vdd_mpu_volt_data; > + omap4_vdd_iva_info.volt_data = > omap443x_vdd_iva_volt_data; > + omap4_vdd_core_info.volt_data = > omap443x_vdd_core_volt_data; > + } else if (cpu_is_omap446x()) { > + omap4_vdd_mpu_info.volt_data = > omap446x_vdd_mpu_volt_data; > + omap4_vdd_iva_info.volt_data = > omap446x_vdd_iva_volt_data; > + omap4_vdd_core_info.volt_data = > omap446x_vdd_core_volt_data; > + } else { > + return -ENODATA; > + } > > return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod, > omap4_vdd_info, > -- > 1.7.0.4 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions 2011-07-19 13:25 ` Vishwanath Sripathy @ 2011-07-19 15:16 ` Kevin Hilman 2011-07-20 17:30 ` Vishwanath Sripathy 0 siblings, 1 reply; 22+ messages in thread From: Kevin Hilman @ 2011-07-19 15:16 UTC (permalink / raw) To: Vishwanath Sripathy; +Cc: linux-omap, paul, Nishanth Menon Vishwanath Sripathy <vishwanath.bs@ti.com> writes: > I see that this patch is not queued for 3.1 merge window. Any > issues/comments on this patch? I did not look at this patch as it came late in the development cycle. A quick glance now suggests it has a few minor problems. - patch was not Cc's to linux-arm-kernel - uses 44XX naming which is not used in l-o master Please update against current l-o tree which has the PRCM/hwmod updates from Paul/Benoit as well as the base 4460 support for v3.1. Kevin ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions 2011-07-19 15:16 ` Kevin Hilman @ 2011-07-20 17:30 ` Vishwanath Sripathy 2011-07-21 0:04 ` Kevin Hilman 0 siblings, 1 reply; 22+ messages in thread From: Vishwanath Sripathy @ 2011-07-20 17:30 UTC (permalink / raw) To: Kevin Hilman; +Cc: linux-omap, paul, Nishanth Menon Kevin, > -----Original Message----- > From: Kevin Hilman [mailto:khilman@ti.com] > Sent: Tuesday, July 19, 2011 8:47 PM > To: Vishwanath Sripathy > Cc: linux-omap@vger.kernel.org; paul@pwsan.com; Nishanth Menon > Subject: Re: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions > > Vishwanath Sripathy <vishwanath.bs@ti.com> writes: > > > I see that this patch is not queued for 3.1 merge window. Any > > issues/comments on this patch? > > I did not look at this patch as it came late in the development > cycle. > > A quick glance now suggests it has a few minor problems. > > - patch was not Cc's to linux-arm-kernel > - uses 44XX naming which is not used in l-o master Sorry I did not get this point. What do you mean by 44XX naming? I applied this patch against lo master and it seems to apply and compile perfectly fine. Vishwa > > Please update against current l-o tree which has the PRCM/hwmod > updates > from Paul/Benoit as well as the base 4460 support for v3.1. > > Kevin ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHV2] OMAP4: OPP: add OMAP4460 definitions 2011-07-20 17:30 ` Vishwanath Sripathy @ 2011-07-21 0:04 ` Kevin Hilman 0 siblings, 0 replies; 22+ messages in thread From: Kevin Hilman @ 2011-07-21 0:04 UTC (permalink / raw) To: Vishwanath Sripathy; +Cc: linux-omap, paul, Nishanth Menon Vishwa, Vishwanath Sripathy <vishwanath.bs@ti.com> writes: [...] >> A quick glance now suggests it has a few minor problems. >> >> - patch was not Cc's to linux-arm-kernel >> - uses 44XX naming which is not used in l-o master > Sorry I did not get this point. What do you mean by 44XX naming? > I applied this patch against lo master and it seems to apply and compile > perfectly fine. You're right. Sorry, my fault. I thought I saw some CHIP_IS stuff in this patch using the 44XX naming that Tony did not merge for 3.1, but I was mistaken. It's only used in some register offset defines, which is fine. Kevin ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2013-09-16 9:41 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <yes>
2011-02-03 9:49 ` [PATCH 1/7] usb: otg: enable regulator only on cable/device connect Hema HK
2011-02-03 9:49 ` [PATCH 2/7] usb: otg: Remove one unnecessary I2C read request Hema HK
2011-02-03 9:49 ` [PATCH 3/7] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK
2011-02-03 9:49 ` [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK
2011-02-03 13:45 ` Sergei Shtylyov
[not found] ` <4D4AB187.50406-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-02-04 5:23 ` Hema Kalliguddi
2011-02-03 13:50 ` Sergei Shtylyov
[not found] ` <4D4AB2A5.7000002-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-02-04 6:03 ` Hema Kalliguddi
2011-02-03 9:49 ` [PATCH 5/7] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function Hema HK
2011-02-03 9:49 ` [PATCH 6/7] usb: otg: TWL6030 Save the last event in otg_transceiver Hema HK
2011-02-03 9:49 ` [PATCH 7/7] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK
2011-02-14 10:05 ` Felipe Balbi
2011-02-15 8:23 ` Hema Kalliguddi
2011-07-21 4:54 ` [PATCHV2] OMAP4: OPP: add OMAP4460 definitions Vishwanath BS
[not found] ` <4e27b0d0.100e8e0a.43e0.ffffe6d9SMTPIN_ADDED@mx.google.com>
2011-07-21 4:56 ` Vishwanath Sripathy
2013-09-12 8:42 ` [PATCH 1/1] OMAPDSS: Return right error during connector probe Sathya Prakash M R
2013-09-16 9:41 ` Tomi Valkeinen
2011-07-04 5:40 [PATCHV2] OMAP4: OPP: add OMAP4460 definitions Vishwanath BS
2011-07-19 13:25 ` Vishwanath Sripathy
2011-07-19 15:16 ` Kevin Hilman
2011-07-20 17:30 ` Vishwanath Sripathy
2011-07-21 0:04 ` Kevin Hilman
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).