[PATCH v4 13/17] usb: phy-mxs: Add sync time after controller clear phcd

2013-12-03 Thread Peter Chen
After clear portsc.phcd, PHY needs 200us stable time for switch 32K clock to AHB clock. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c

[PATCH v4 17/17] usb: phy-mxs: do not set PWD.RXPWD1PT1 for low speed connection

2013-12-03 Thread Peter Chen
At very rare cases, the SoF will not send out after resume with low speed connection. The workaround is do not power down PWD.RXPWD1PT1 bit during the suspend. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 47 - 1 files changed, 46

[PATCH v4 09/17] usb: phy-mxs: Enable IC fixes for related SoCs

2013-12-03 Thread Peter Chen
Some PHY bugs are fixed by IC logic, but these bits are not enabled by default, so we enable them at driver. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b

[PATCH v4 11/17] usb: phy-mxs: Add implementation of set_wakeup

2013-12-03 Thread Peter Chen
mxs_phy_disconnect_line, there are unknown wakeups due to dp/dm floating at device mode. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 79 + 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb

[PATCH v4 05/17] ARM: dts: imx6: add anatop phandle for usbphy

2013-12-03 Thread Peter Chen
Add anatop phandle for usbphy Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx6qdl.dtsi |2 ++ arch/arm/boot/dts/imx6sl.dtsi |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 59154dc..4e74962

[PATCH v4 07/17] usb: phy: add notify suspend and resume callback

2013-12-03 Thread Peter Chen
They are used to notify PHY that the controller enters suspend or finishes resume. Signed-off-by: Peter Chen --- include/linux/usb/phy.h | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index

[PATCH v4 15/17] usb: phy-mxs: add controller id

2013-12-03 Thread Peter Chen
It is used to access un-regulator registers according to different controllers. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 52e80d9

[PATCH v4 16/17] usb: phy-mxs: fix the problem by only using 1st controller's register

2013-12-03 Thread Peter Chen
We fix the problem that we only use the 1st controller's related registers at mxs_phy_disconnect_line, but in fact, it needs to access registers according to different PHYs. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 89 + 1

[PATCH v4 12/17] usb: phy-mxs: Add system suspend/resume API

2013-12-03 Thread Peter Chen
We need this to keep PHY's power on or off during the system suspend mode. If we need to enable USB wakeup, then we must keep PHY's power being on during the system suspend mode. Otherwise, we need to keep PHY's power being off to save power. Signed-off-by: Peter Chen --- driv

[PATCH v4 14/17] ARM: dts: imx: add mxs phy controller id

2013-12-03 Thread Peter Chen
We need to use controller id to access different register regions for mxs phy. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx23.dtsi |1 + arch/arm/boot/dts/imx28.dtsi |2 ++ arch/arm/boot/dts/imx6qdl.dtsi |2 ++ arch/arm/boot/dts/imx6sl.dtsi |2 ++ 4 files changed, 7

[PATCH v4 08/17] usb: phy-mxs: Add implementation of nofity_suspend and notify_resume

2013-12-03 Thread Peter Chen
Implementation of notify_suspend and notify_resume will be different according to mxs_phy_data->flags. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 55 ++--- 1 files changed, 51 insertions(+), 4 deletions(-) diff --git a/drivers/usb/

[PATCH v4 06/17] usb: phy-mxs: Add anatop regmap

2013-12-03 Thread Peter Chen
It is needed by imx6 SoC series, but not for imx23 and imx28. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 70b084d

[PATCH v4 04/17] usb: doc: phy-mxs: update binding for adding anatop phandle

2013-12-03 Thread Peter Chen
Add anatop phandle which is used to access anatop registers to control PHY's power and other USB operations. Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/mxs-phy.txt |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Documentation/devic

[PATCH v4 10/17] usb: phy: Add set_wakeup API

2013-12-03 Thread Peter Chen
This API is used to set wakeup enable at PHY registers, in that case, the PHY can be waken up from suspend due to external events, like vbus change, dp/dm change and id change. Signed-off-by: Peter Chen --- include/linux/usb/phy.h | 16 1 files changed, 16 insertions(+), 0

RE: [PATCH v4 09/17] usb: phy-mxs: Enable IC fixes for related SoCs

2013-12-03 Thread Peter Chen
> > On 12/03/2013 08:37 AM, Peter Chen wrote: > > Some PHY bugs are fixed by IC logic, but these bits are not > > enabled by default, so we enable them at driver. > > > > Signed-off-by: Peter Chen > > --- > > drivers/usb/phy/phy-mxs-usb.c | 20 +++

Re: [PATCH v4 02/17] usb: phy-mxs: Add platform judgement code

2013-12-03 Thread Peter Chen
On Tue, Dec 03, 2013 at 09:38:20AM +0100, Marc Kleine-Budde wrote: > On 12/03/2013 08:36 AM, Peter Chen wrote: > > The mxs-phy has several bugs and features at different > > versions, the driver code can get it through of_device_id.data. > > > > Signed-off-by: Peter Che

Re: [PATCH v4 16/17] usb: phy-mxs: fix the problem by only using 1st controller's register

2013-12-03 Thread Peter Chen
On Tue, Dec 03, 2013 at 09:34:09AM +0100, Marc Kleine-Budde wrote: > On 12/03/2013 08:37 AM, Peter Chen wrote: > > We fix the problem that we only use the 1st controller's related > > registers at mxs_phy_disconnect_line, but in fact, it needs to > > access registers a

RE: [PATCH v4 09/17] usb: phy-mxs: Enable IC fixes for related SoCs

2013-12-03 Thread Peter Chen
> On 12/03/2013 09:38 AM, Peter Chen wrote: > > > >> > >> On 12/03/2013 08:37 AM, Peter Chen wrote: > >>> Some PHY bugs are fixed by IC logic, but these bits are not > >>> enabled by default, so we enable them at driver. > >>> &g

RE: [PATCH v4 17/17] usb: phy-mxs: do not set PWD.RXPWD1PT1 for low speed connection

2013-12-03 Thread Peter Chen
> > On 12/03/2013 08:37 AM, Peter Chen wrote: > > At very rare cases, the SoF will not send out after resume with > > low speed connection. The workaround is do not power down > > PWD.RXPWD1PT1 bit during the suspend. > > Is this also a fix for newly added

RE: [PATCH v4 17/17] usb: phy-mxs: do not set PWD.RXPWD1PT1 for low speed connection

2013-12-03 Thread Peter Chen
> > On 12/03/2013 10:19 AM, Peter Chen wrote: > >> On 12/03/2013 08:37 AM, Peter Chen wrote: > >>> At very rare cases, the SoF will not send out after resume with > >>> low speed connection. The workaround is do not power down > >>> PWD.RXPWD1P

RE: [PATCH] USB: switch maintainership of chipidea to Peter

2013-12-03 Thread Peter Chen
> On 12/03/2013 06:21 AM, Peter Chen wrote: > > On Mon, Dec 02, 2013 at 07:38:46PM -0800, Greg KH wrote: > >> On Tue, Dec 03, 2013 at 11:00:30AM +0800, Peter Chen wrote: > >>> On Mon, Dec 02, 2013 at 03:43:48PM -0800, Greg KH wrote: > >>>> From: Greg

RE: [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected

2013-12-03 Thread Peter Chen
> > > > Signed-off-by: Chris Ruehl > > Acked-by: Peter Chen > > --- > > drivers/usb/chipidea/core.c |7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/co

RE: [PATCH v4 02/17] usb: phy-mxs: Add platform judgement code

2013-12-03 Thread Peter Chen
> > + > > +static const struct mxs_phy_data imx23_phy_data = { > > + .flags = MXS_PHY_ABNORAML_IN_SUSPEND | MXS_PHY_SENDING_SOF_TOO_FAST, > > +}; > > ABNORAML? -> ABNORMAL > My careless, will change. Thanks. Peter > > + > > +static const struct mxs_phy_data imx6q_phy_data = { > > + .fla

RE: [PATCH 3/3 v4] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init

2013-12-03 Thread Peter Chen
ng phy_inits to operate on the right parameters. This fix a > problem > where the UPLI (ISP1504) could not detected, ^^be > because the Viewport was not > available and read the viewport return 0's only. > > Signed-off-by:

RE: [PATCH v3 00/10] Add power management support for chipidea

2013-12-03 Thread Peter Chen
> > Hi Greg, > > > > This serial adds power management (system & runtime) for chipidea core. > > With this, the chipidea controller can be at low power mode when it is > not in > > use, and the chipidea controller can be the system wakeup source. > > It needs to depend on my patch[1], since [1]-"

RE: [PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-12-03 Thread Peter Chen
> > On 11/05/2013 02:55 AM, Peter Chen wrote: > > Enable CI_HDRC_IMX_EHCI_QUIRK for controllers who use mxs-phy. > > > > Signed-off-by: Peter Chen > > --- > > drivers/usb/chipidea/ci_hdrc_imx.c | 17 ++--- > > 1 files changed, 14 insert

Re: [PATCH 4/4] usb: chipidea: msm: Use USB PHY API to control PHY state

2013-12-03 Thread Peter Chen
On Mon, Nov 11, 2013 at 04:36:09PM +0200, Ivan T. Ivanov wrote: > > Hi Peter, > > On Mon, 2013-11-11 at 21:59 +0800, Peter Chen wrote: > > On Mon, Nov 11, 2013 at 03:35:37PM +0200, Ivan T. Ivanov wrote: > > > From: "Ivan T. Ivanov" > > > > &

Re: [PATCH 1/4] usb: chipidea: msm: Add device tree binding information

2013-12-03 Thread Peter Chen
ot;; > + interrupts = <0 134 0>; > + usb-phy = <&usb_otg>; > + }; > \ No newline at end of file > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a mess

Re: [PATCH 3/4] usb: chipidea: msm: Initialize offset of the capability registers

2013-12-03 Thread Peter Chen
EQUIRE_TRANSCEIVER | > CI_HDRC_DISABLE_STREAMING, > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger

Re: [PATCH v6 1/3] usb: ehci: add freescale imx28 special write register method

2013-12-03 Thread Peter Chen
On Tue, Nov 26, 2013 at 08:11:26PM +0800, Peter Chen wrote: > According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB > register error issue", All USB register write operations must > use the ARM SWP instruction. So, we implement a special ehci_write > for imx28. >

RE: [PATCH v6 1/3] usb: ehci: add freescale imx28 special write register method

2013-12-03 Thread Peter Chen
> > On Tue, Nov 26, 2013 at 08:11:26PM +0800, Peter Chen wrote: > > According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB > > register error issue", All USB register write operations must > > use the ARM SWP instruction. So, we implement

Re: [PATCHv3] usb: chipidea: add support for USB OTG controller on TI-NSPIRE

2013-12-03 Thread Peter Chen
t;, }, > + { /* sentinel */ } > +}; > + > +static struct platform_driver ci_hdrc_nspire_driver = { > + .probe = ci_hdrc_nspire_probe, > + .remove = ci_hdrc_nspire_remove, > + .driver = { > + .name = "nspire_usb", > + .owner = THIS_MODULE, > + .of_match_table = ci_hdrc_nspire_dt_ids, > + }, > +}; > + > +MODULE_DEVICE_TABLE(of, ci_hdrc_nspire_dt_ids); > +module_platform_driver(ci_hdrc_nspire_driver); > + > +MODULE_LICENSE("GPL v2"); > -- > 1.8.1.3 > > Applied, Thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: [PATCH 1/3 v5] usb: chipidea: Reallocate regmap only if lpm is detected

2013-12-03 Thread Peter Chen
> usb: chipidea: Reallocate regmap only if lpm is detected > > The regmap only needs to reallocate if the hw_read on the CAP register > shows > lpm is used. Therefore the if() statement check the change. > > Signed-off-by: Chris Ruehl > Acked-by: Peter Chen >

Re: [PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-12-03 Thread Peter Chen
On Fri, Nov 22, 2013 at 04:42:38PM +0800, Peter Chen wrote: > The ci_hdrc_imx's probe needs usbmisc_imx to be loadded beforehand, > so it is better we load usbmisc_imx first. > > Signed-off-by: Peter Chen > --- > drivers/usb/chipidea/Makefile |2 +- > 1 files c

Re: [PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-12-04 Thread Peter Chen
On Wed, Dec 04, 2013 at 09:33:26AM +0100, Marc Kleine-Budde wrote: > On 12/04/2013 02:40 AM, Peter Chen wrote: > > There are some re-work for this serial, I will do it. > > But I don't get your mean why it needs to squash into another patch? > > Let's look a

Re: [PATCH 1/4] usb: chipidea: msm: Add device tree binding information

2013-12-04 Thread Peter Chen
On Wed, Dec 04, 2013 at 10:33:57AM +0200, Ivan T. Ivanov wrote: > Hi Peter, > > Thank you for reviewing this patch. > > On Wed, 2013-12-04 at 13:40 +0800, Peter Chen wrote: > > On Mon, Nov 11, 2013 at 03:35:34PM +0200, Ivan T. Ivanov wrote: > > > From: "Ivan

Re: [PATCH 4/4] usb: chipidea: msm: Use USB PHY API to control PHY state

2013-12-04 Thread Peter Chen
On Wed, Dec 04, 2013 at 11:35:54AM +0200, Ivan T. Ivanov wrote: > > Hi Peter, > > On Wed, 2013-12-04 at 13:37 +0800, Peter Chen wrote: > > On Mon, Nov 11, 2013 at 04:36:09PM +0200, Ivan T. Ivanov wrote: > > > > > > Hi Peter, > > > > > &g

Re: [PATCH 1/2] usb: chipidea: fix mistake in device tree binding of nspire-usb to use vendor name 'lsi' instead of SoC name 'zevio'

2013-12-04 Thread Peter Chen
e > *pdev) > } > > static const struct of_device_id ci_hdrc_nspire_dt_ids[] = { > - { .compatible = "zevio,nspire-usb", }, > + { .compatible = "lsi,nspire-usb", }, > { /* sentinel */ } > }; > > -- > 1.7.10.4 > > -- > To unsubscribe f

Re: [PATCH v2 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs

2013-12-04 Thread Peter Chen
nit, > +}; > + > static const struct usbmisc_ops imx53_usbmisc_ops = { > .init = usbmisc_imx53_init, > }; > @@ -162,6 +200,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = { > .data = &imx25_usbmisc_ops, > }, > { > + .comp

Re: [PATCH v2 2/2] usb: chipidea: usbmisc: Add support for i.MX51 CPU

2013-12-04 Thread Peter Chen
gt; + { > .compatible = "fsl,imx53-usbmisc", > .data = &imx53_usbmisc_ops, > }, > -- > 1.8.3.2 > > Applied, thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/1] usb: doc: rename ci13xxx-imx.txt to ci-hdrc-imx.txt

2013-12-04 Thread Peter Chen
We have already renamed the file name, change doc name at this patch. Cc: devicet...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Peter Chen --- .../usb/{ci13xxx-imx.txt => ci-hdrc-imx.txt} |0 1 files changed, 0 insertions(+), 0 deletions(-) rename Documentat

[PATCH 1/1] usb: doc: rename ci13xxx-imx.txt to ci-hdrc-imx.txt

2013-12-04 Thread Peter Chen
We have already renamed the file name, change doc name at this patch. Cc: devicet...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Peter Chen --- .../usb/{ci13xxx-imx.txt => ci-hdrc-imx.txt} |0 1 files changed, 0 insertions(+), 0 deletions(-) rename Documentat

[PATCH 0/7] Chipidea Fix for 3.13-rc2

2013-12-04 Thread Peter Chen
before ci_usb_phy_init Fabio Estevam (1): usb: chipidea: host: Only disable the vbus regulator if it is not NULL Peter Chen (4): usb: chipidea: fix nobody cared IRQ when booting with host role usb: ehci: add freescale imx28 special write register method usb: chipidea: add freescale

[PATCH 1/7] usb: chipidea: host: Only disable the vbus regulator if it is not NULL

2013-12-04 Thread Peter Chen
stable Reported-by: Dan Carpenter Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen --- drivers/usb/chipidea/host.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 59e6020..526cd77 100644 --- a/drive

[PATCH 7/7] usb: chipidea: put hw_phymode_configure before ci_usb_phy_init

2013-12-04 Thread Peter Chen
igned-off-by: Chris Ruehl Signed-off-by: Peter Chen --- drivers/usb/chipidea/core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 1677fed..20ed5e2 100644 --- a/drivers/usb/chipidea/core.c +++ b/driver

[PATCH 2/7] usb: chipidea: fix nobody cared IRQ when booting with host role

2013-12-04 Thread Peter Chen
suspend (USBi_SLI) interrupt which is enabled for peripheral mode, it causes no one will handle irq error. This patch is needed for 3.12 stable Cc: stable Acked-by: Michael Grzeschik Reported-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde Signed-off-by: Marc Kleine-Budde Signed-off-by: Pe

[PATCH 6/7] usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag

2013-12-04 Thread Peter Chen
From: Chris Ruehl * init the sts flag to 0 (missed) * fix write the real bit not sts value * Set PORTCS_STS and DEVLC_STS only if sts = 1 Signed-off-by: Chris Ruehl Signed-off-by: Peter Chen --- drivers/usb/chipidea/core.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions

[PATCH 3/7] usb: ehci: add freescale imx28 special write register method

2013-12-04 Thread Peter Chen
mp;w=2 Signed-off-by: Peter Chen Acked-by: Alan Stern Signed-off-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde --- drivers/usb/host/ehci.h | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h inde

[PATCH 4/7] usb: chipidea: add freescale imx28 special write register method

2013-12-04 Thread Peter Chen
inux-usb&m=137996395529294&w=2 Signed-off-by: Peter Chen Signed-off-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde --- drivers/usb/chipidea/ci.h| 26 -- drivers/usb/chipidea/core.c |2 ++ drivers/usb/chipidea/host.c |1 + include/linux/usb/chipidea.h |1

[PATCH 5/7] usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28

2013-12-04 Thread Peter Chen
Due to imx28 needs ARM swp instruction for writing, we set CI_HDRC_IMX28_WRITE_FIX for imx28. Signed-off-by: Peter Chen Signed-off-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde --- drivers/usb/chipidea/ci_hdrc_imx.c | 32 ++-- 1 files changed, 26 insertions

Re: [PATCH 1/2] usb: chipidea: fix mistake in device tree binding of nspire-usb to use vendor name 'lsi' instead of SoC name 'zevio'

2013-12-05 Thread Peter Chen
On Thu, Dec 05, 2013 at 04:44:13PM +1100, Daniel Tang wrote: > Hi, > > On 05/12/2013, at 12:44 AM, Peter Chen wrote: > > > > > lsi is vendor name, what are zevio and nspire? > > Usually, the compatible string should be "vendor_name,soc_name-module_nam

RE: [PATCH 4/7] usb: chipidea: add freescale imx28 special write register method

2013-12-05 Thread Peter Chen
> > Personally I think you should include the text of the errata > in one of the files. > Yes, some may be interested in detail, not only the solution, will do it next time. > I'm not suggesting you change the guts of the patch, but... > > Having read the errata it isn't 100% clear to me th

RE: [PATCH 4/7] usb: chipidea: add freescale imx28 special write register method

2013-12-05 Thread Peter Chen
> > On 12/05/2013 01:16 PM, Peter Chen wrote: > >> Personally I think you should include the text of the errata > >> in one of the files. > > > Yes, some may be interested in detail, not only the solution, > > will do it next time. > > > >&g

RE: [PATCH 1/2] usb: chipidea: fix mistake in device tree binding of nspire-usb to use vendor name 'lsi' instead of SoC name 'zevio'

2013-12-05 Thread Peter Chen
> > Hi, > > On 05/12/2013, at 7:49 PM, Peter Chen wrote: > > > On Thu, Dec 05, 2013 at 04:44:13PM +1100, Daniel Tang wrote: > >> Hi, > >> > >> On 05/12/2013, at 12:44 AM, Peter Chen > wrote: > >> > >>> > >>>

Re: [PATCH 0/2] usb: chipidea: streamline regmap handling

2013-12-05 Thread Peter Chen
-68 > udc_irq 32363136-100 > Hi Marc, Thanks for doing that, would you explain more why the function code size can be smaller with your two patches? -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsu

Re: [PATCH 1/2] usb: chipidea: move malloced regmap directly into struct hw_bank

2013-12-05 Thread Peter Chen
ci->hw_bank.regmap[i] = > (i <= CAP_LAST ? ci->hw_bank.cap : ci->hw_bank.op) + > @@ -677,7 +670,6 @@ static int ci_hdrc_remove(struct platform_device *pdev) > ci_role_destroy(ci); > ci_hdrc_enter_lpm(ci, true); > ci_usb_phy_des

Re: [PATCH 2/2] usb: chipidea: mark register map as "const" and convert to u8

2013-12-05 Thread Peter Chen
; + [OP_ENDPTFLUSH] = 0xE0U, > + [OP_ENDPTSTAT] = 0xE4U, > + [OP_ENDPTCOMPLETE] = 0xE8U, > + [OP_ENDPTCTRL] = 0xECU, > }; > Add "const" is a good fix, but I can't see much benefit of change uintptr_t to u8 except reduce the kernel data segment. Using uintprt_t make the code easier to read as the reader can know it stands for pointer. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] usb: chipidea: fix device tree binding for zevio/nspire usb driver

2013-12-05 Thread Peter Chen
return PTR_ERR(ci_pdev); > + } > + > + platform_set_drvdata(pdev, ci_pdev); > + > + return 0; > +} > + > +static int ci_hdrc_zevio_remove(struct platform_device *pdev) > +{ > + struct platform_device *ci_pdev = platform_get_drvdata(pdev); > + > + ci_hdrc_remove_device(ci_pdev); > + > + return 0; > +} > + > +static const struct of_device_id ci_hdrc_zevio_dt_ids[] = { > + { .compatible = "lsi,zevio-usb", }, > + { /* sentinel */ } > +}; > + > +static struct platform_driver ci_hdrc_zevio_driver = { > + .probe = ci_hdrc_zevio_probe, > + .remove = ci_hdrc_zevio_remove, > + .driver = { > + .name = "zevio_usb", > + .owner = THIS_MODULE, > + .of_match_table = ci_hdrc_zevio_dt_ids, > + }, > +}; > + > +MODULE_DEVICE_TABLE(of, ci_hdrc_zevio_dt_ids); > +module_platform_driver(ci_hdrc_zevio_driver); > + > +MODULE_LICENSE("GPL v2"); > -- > 1.7.10.4 > > -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] usb: chipidea: host: Only disable the vbus regulator if it is not NULL

2013-12-05 Thread Peter Chen
g_vbus); > + if (ci->platdata->reg_vbus) > + regulator_disable(ci->platdata->reg_vbus); > > put_hcd: > usb_put_hcd(hcd); > -- > 1.8.1.2 > > Applied, Thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list:

Re: [PATCH 1/1] usb: chipidea: fix nobody cared IRQ when booting with host role

2013-12-05 Thread Peter Chen
On Sat, Nov 30, 2013 at 02:38:29PM +0100, Marc Kleine-Budde wrote: > On 11/22/2013 09:14 AM, Peter Chen wrote: > > If we connect Male-A-To-Male-A cable between otg-host and host pc, > > the ci->vbus_active is set wrongly, and cause the controller run > > at peripheral

Re: [PATCH v6 0/3] usb: ehci+chipidea: fix imx28 "ENGR119653 USB: ARM to USB register error issue"

2013-12-05 Thread Peter Chen
On Sat, Nov 30, 2013 at 02:34:36PM +0100, Marc Kleine-Budde wrote: > On 11/26/2013 01:11 PM, Peter Chen wrote: > > Changes for v6: > > - Add volatile for arm swp instruction, since we need io access > > to fix this problem > > - Add kernel style comment for imx28_write

Re: [PATCH 2/3 v5] Fix Internal error: : 808 [#1] ARM related to STS flag

2013-12-05 Thread Peter Chen
On Wed, Dec 04, 2013 at 09:56:18AM +0800, Chris Ruehl wrote: > Fix Internal error: : 808 [#1] ARM related to STS flag > > * init the sts flag to 0 (missed) > * fix write the real bit not sts value > * Set PORTCS_STS and DEVLC_STS only if sts = 1 > (prefered solution by Mr. Pete

RE: [PATCH 3/3 v5] usb: chipidea: put hw_phymode_configure before ci_usb_phy_init

2013-12-05 Thread Peter Chen
ause the Viewport was > not > available and read the viewport return 0's only. > > Signed-off-by: Chris Ruehl > Acked-by: Peter Chen > --- > drivers/usb/chipidea/core.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/u

Re: [PATCHv3] usb: chipidea: add support for USB OTG controller on TI-NSPIRE

2013-12-06 Thread Peter Chen
On Wed, Dec 04, 2013 at 03:02:56PM +0800, Peter Chen wrote: > On Mon, Nov 25, 2013 at 02:53:37PM +1100, dt.ta...@gmail.com wrote: > > From: Daniel Tang > > > > The USB controller in TI-NSPIRE calculators are based off either Freescale's > > USB OTG controller or

[PATCH 1/4] usb: chipidea: Reallocate regmap only if lpm is detected

2013-12-06 Thread Peter Chen
From: Chris Ruehl The regmap only needs to reallocate if the hw_read on the CAP register shows lpm is used. Therefore the if() statement check the change. Signed-off-by: Chris Ruehl Signed-off-by: Peter Chen --- drivers/usb/chipidea/core.c |3 ++- 1 files changed, 2 insertions(+), 1

[PATCH 2/4] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-12-06 Thread Peter Chen
The ci_hdrc_imx's probe needs usbmisc_imx to be loadded beforehand, so it is better we load usbmisc_imx first. Signed-off-by: Peter Chen --- drivers/usb/chipidea/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/Makefile b/driver

[PATCH 4/4] usb: chipidea: usbmisc: Add support for i.MX51 CPU

2013-12-06 Thread Peter Chen
From: Alexander Shiyan This adds i.MX51 as the next user of the usbmisc driver. Functionality is similar to i.MX53, so at this stage simply reuse existing i.MX53 calls. Signed-off-by: Alexander Shiyan Signed-off-by: Peter Chen --- drivers/usb/chipidea/usbmisc_imx.c |4 1 files

[PATCH 0/4] Chipidea Patches for 3.14

2013-12-06 Thread Peter Chen
Hi Greg, Below four patches are for usb-next, thanks. Alexander Shiyan (2): usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs usb: chipidea: usbmisc: Add support for i.MX51 CPU Chris Ruehl (1): usb: chipidea: Reallocate regmap only if lpm is detected Peter Chen (1): usb

[PATCH 3/4] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs

2013-12-06 Thread Peter Chen
From: Alexander Shiyan This adds i.MX27 and i.MX31 as the next user of the usbmisc driver. Tested-by: Chris Ruehl Signed-off-by: Alexander Shiyan Signed-off-by: Peter Chen --- drivers/usb/chipidea/usbmisc_imx.c | 42 1 files changed, 42 insertions

Re: [PATCH 2/2] usb: chipidea: mark register map as "const" and convert to u8

2013-12-06 Thread Peter Chen
On Fri, Dec 06, 2013 at 10:28:12AM +0100, Marc Kleine-Budde wrote: > On 12/06/2013 07:49 AM, Peter Chen wrote: > > On Thu, Dec 05, 2013 at 12:32:57PM +0100, Marc Kleine-Budde wrote: > >> This patch makes the controller register map ci_regs_nolpm and ci_regs_lpm > >> a

Re: [PATCH 0/2] usb: chipidea: streamline regmap handling

2013-12-06 Thread Peter Chen
On Fri, Dec 06, 2013 at 10:14:33AM +0100, Marc Kleine-Budde wrote: > On 12/06/2013 07:39 AM, Peter Chen wrote: > > On Thu, Dec 05, 2013 at 12:32:55PM +0100, Marc Kleine-Budde wrote: > >> Hello Peter, > >> > >> these patches are for your ci-for-usb

Re: [PATCH v2 0/2] usb: chipidea: streamline regmap handling

2013-12-08 Thread Peter Chen
204 136 -68 > ci_hdrc_probe 15121444 -68 > udc_irq 32363136-100 > > regards, > Marc > > Applied this patchset, thanks. -- Best Regards, Peter Chen -- To unsubscribe from th

Re: [PATCH 2/4 V2] ARM: mx28: Add USB PHY overcurrent pinmux

2013-12-08 Thread Peter Chen
On Fri, Dec 06, 2013 at 04:17:33PM +0100, Michael Grzeschik wrote: > Hi Peter, > > On Tue, Nov 26, 2013 at 12:08:03PM +0000, Peter Chen wrote: > > > The GPIO is working for this pin. But also the DIGCTL register bits > > > helped here. Now the OC event triggers if

[PATCH v5 03/15] usb: phy-mxs: Add auto clock and power setting

2013-12-08 Thread Peter Chen
With the auto setting, the PHY's clock and power can be recovered correctly from low power mode, it is ganranteed by IC logic. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 20 +--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/us

[PATCH v5 07/15] usb: phy: add notify suspend and resume callback

2013-12-08 Thread Peter Chen
They are used to notify PHY that the controller enters suspend or finishes resume. Signed-off-by: Peter Chen --- include/linux/usb/phy.h | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index

[PATCH v5 05/15] ARM: dts: imx6: add anatop phandle for usbphy

2013-12-08 Thread Peter Chen
Add anatop phandle for usbphy Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx6qdl.dtsi |2 ++ arch/arm/boot/dts/imx6sl.dtsi |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 59154dc..4e74962

[PATCH v5 06/15] usb: phy-mxs: Add anatop regmap

2013-12-08 Thread Peter Chen
It is needed by imx6 SoC series, but not for imx23 and imx28. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 0c6f3bc

[PATCH v5 04/15] usb: doc: phy-mxs: update binding for adding anatop phandle

2013-12-08 Thread Peter Chen
Add anatop phandle which is used to access anatop registers to control PHY's power and other USB operations. Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/mxs-phy.txt |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Documentation/devic

[PATCH v5 01/15] usb: doc: phy-mxs: Add more compatible strings

2013-12-08 Thread Peter Chen
Add "fsl,imx6q-usbphy" for imx6dq and imx6dl, add "fsl,imx6sl-usbphy" for imx6sl. Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/mxs-phy.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Documentation/devicetree/binding

[PATCH v5 08/15] usb: phy-mxs: Add implementation of nofity_suspend and notify_resume

2013-12-08 Thread Peter Chen
Implementation of notify_suspend and notify_resume will be different according to mxs_phy_data->flags. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 55 ++--- 1 files changed, 51 insertions(+), 4 deletions(-) diff --git a/drivers/usb/

[PATCH v5 00/15] Add power management support for mxs phy

2013-12-08 Thread Peter Chen
essary dts/doc patches due to above change - Several comment change Peter Chen (15): usb: doc: phy-mxs: Add more compatible strings usb: phy-mxs: Add platform judgement code usb: phy-mxs: Add auto clock and power setting usb: doc: phy-mxs: update binding for adding anatop phandle ARM: dts: im

[PATCH v5 02/15] usb: phy-mxs: Add platform judgement code

2013-12-08 Thread Peter Chen
The mxs-phy has several bugs and features at different versions, the driver code can get it through of_device_id.data. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 58 ++-- 1 files changed, 49 insertions(+), 9 deletions(-) diff --git a

[PATCH v5 14/15] usb: phy-mxs: Add system suspend/resume API

2013-12-08 Thread Peter Chen
We need this to keep PHY's power on or off during the system suspend mode. If we need to enable USB wakeup, then we must keep PHY's power being on during the system suspend mode. Otherwise, we need to keep PHY's power being off to save power. Signed-off-by: Peter Chen --- driv

[PATCH v5 15/15] usb: phy-mxs: Add sync time after controller clear phcd

2013-12-08 Thread Peter Chen
After clear portsc.phcd, PHY needs 200us stable time for switch 32K clock to AHB clock. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c

[PATCH v5 13/15] usb: phy-mxs: Add implementation of set_wakeup

2013-12-08 Thread Peter Chen
mxs_phy_disconnect_line, there are unknown wakeups due to dp/dm floating at device mode. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 116 + 1 files changed, 116 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb

[PATCH v5 10/15] ARM: dts: imx: add mxs phy controller id

2013-12-08 Thread Peter Chen
We need to use controller id to access different register regions for mxs phy. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx23.dtsi |1 + arch/arm/boot/dts/imx28.dtsi |2 ++ arch/arm/boot/dts/imx6qdl.dtsi |2 ++ arch/arm/boot/dts/imx6sl.dtsi |2 ++ 4 files changed, 7

[PATCH v5 11/15] usb: phy-mxs: add controller id

2013-12-08 Thread Peter Chen
It is used to access un-regulator registers according to different controllers. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index d1c319b

[PATCH v5 12/15] usb: phy: Add set_wakeup API

2013-12-08 Thread Peter Chen
This API is used to set wakeup enable at PHY registers, in that case, the PHY can be waken up from suspend due to external events, like vbus change, dp/dm change and id change. Signed-off-by: Peter Chen --- include/linux/usb/phy.h | 16 1 files changed, 16 insertions(+), 0

[PATCH v5 09/15] usb: phy-mxs: Enable IC fixes for related SoCs

2013-12-08 Thread Peter Chen
Some PHY bugs are fixed by IC logic, but these bits are not enabled by default, so we enable them at driver. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 28 ++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-30 Thread Peter Chen
ta->reg_vbus)); > + ret = PTR_ERR(platdata->reg_vbus); > + goto err; > + } > + > pdev->dev.parent = dev; Michael, thanks to do this for me. One small suggestion is: it is better add one function like: ci_get_platdata, and move the vbus stuff to that function. This function is used to get common thing from glue layer. And it is better at the beginning of ci_hdrc_add_device, since the other code at ci_hdrc_add_device are all related to core device. I can help to do refine this patch (with some typo which Felipe mentioned) if you consider it is necessary. I know you may be busy with other things. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] chipidea: Remove previous MODULE_ALIAS

2013-07-30 Thread Peter Chen
= { > module_platform_driver(ci_hdrc_driver); > > MODULE_ALIAS("platform:ci_hdrc"); > -MODULE_ALIAS("platform:ci13xxx"); > MODULE_LICENSE("GPL v2"); > MODULE_AUTHOR("David Lopo "); > MODULE_DESCRIPTION("ChipIdea HDRC Driver");

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-30 Thread Peter Chen
stop: > ci_role_stop(ci); > rm_wq: > @@ -531,7 +530,6 @@ static int ci_hdrc_remove(struct platform_device *pdev) > dbg_remove_files(ci); > flush_workqueue(ci->wq); > destroy_workqueue(ci->wq); > - free_irq(ci->irq, ci); > ci_role_stop(ci

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 09:23:56AM +0200, Michael Grzeschik wrote: > Hi Peter, > > On Wed, Jul 31, 2013 at 09:39:50AM +0800, Peter Chen wrote: > > On Tue, Jul 30, 2013 at 02:41:23PM +0200, Michael Grzeschik wrote: > > > From: Michael Grzeschik > > > > >

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
> and: > > devm_request_threaded_irq() is just generally a bit of a warning > sign since it needs careful checking to tell if it's safe. > The probably problem I find is the free_irq will be called after driver's removal is called, then the problem Mark describ

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
gt; guarantee of that it'd help. The nice thing about explicitly freeing > the IRQ is that you can tell that all this stuff is safe by inspection. Yes, agree, driver knows when to call free_irq safely, besides, free_irq can be at the beginnig of removal but not at last of removal, just lik

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
ler, but using managed interrupt handler, things still will go wrong if there is an odd (unexpected) interrupt after we finish deactivation at removal. -- BR, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 10:15:12AM -0400, Tejun Heo wrote: > hello, > > On Wed, Jul 31, 2013 at 09:55:26PM +0800, Peter Chen wrote: > > I think the main point is we should allocate managed resource which is used > > at interrupt handler before devm_request_irq, and all

Re: [PATCH 1/4] usb: chipidea: improve kconfig 2.0

2013-07-31 Thread Peter Chen
ay Y here to enable device controller functionality of the > ChipIdea driver. > > config USB_CHIPIDEA_HOST > bool "ChipIdea host controller" > - depends on USB=y > - depends on USB_EHCI_HCD=y || (USB_CHIPIDEA=m && USB_EHCI_HCD=m) > + depends on US

Re: [PATCH 2/4] usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call from ci_hdrc_imx_remove()

2013-07-31 Thread Peter Chen
(data->phy->dev->driver->owner); > - } > > clk_disable_unprepare(data->clk); Have you met warning? devm_usb_get_phy_by_phandle at probe calls try_module_get. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH 3/4] usb: chipidea: don't clobber return value of ci_role_start()

2013-07-31 Thread Peter Chen
v, "can't start %s role\n", ci_role(ci)->name); > - ret = -ENODEV; > goto rm_wq; > } > +1, it can help get the error one time, without need to add the code and get the error number from ci_role_start again. -- Best Regards, Peter Chen --

<    1   2   3   4   5   6   7   8   9   10   >