Re: [PATCH v3] USB: mxs-phy: add basic otg support

2012-09-18 Thread Richard Zhao
On Mon, Sep 17, 2012 at 01:06:21PM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: Signed-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Felipe Balbi ba...@ti.com Felipe said, if you add a commit log you can add my: Acked-by: Felipe

[PATCH v2 RESEND] USB: chipidea: convert to use devm_request_irq

2012-09-18 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 307651b..0942b9b 100644 --- a/drivers/usb/chipidea/core.c +++ b

Re: [PATCH v2 10/11] USB: chipidea: add set_vbus_power support

2012-09-18 Thread Richard Zhao
Alex, I find you dropped this too. Did you mean to add it after otg driver or any other reason? Thanks Richard -- 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

Re: [PATCH v2 RESEND] USB: chipidea: convert to use devm_request_irq

2012-09-18 Thread Richard Zhao
On Wed, Sep 19, 2012 at 03:30:41AM +0200, Marek Vasut wrote: Dear Richard Zhao, You know, commit message would be nice to have. Yes, but for this one, the title shows obviously what it changed, doesn't it? Thanks Richard Signed-off-by: Richard Zhao richard.z...@freescale.com Otherwise

[PATCH] USB: chipidea: use OTGSC_BSV to detect vbus valid

2012-09-17 Thread Richard Zhao
OTGSC_AVVIS cannot be set when vbus voltage goes valid or invalid on imx, so convert to use OTGSC_BSV. OTGSC_BSVIE and OTGSC_BSVIS is not cleared when hw_device_reset, so we don't need to call hw_enable_vbus_intr after hw_device_reset. Signed-off-by: Richard Zhao richard.z...@freescale.com

[PATCH v3] USB: mxs-phy: add basic otg support

2012-09-17 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Felipe Balbi ba...@ti.com --- Changes from v2: - assign host/gadget in mxs_phy_set_host/mxs_phy_set_peripheral drivers/usb/otg/mxs-phy.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/usb

Re: [patch] USB: chipidea: fix vs | bug

2012-09-14 Thread Richard Zhao
On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote: There is a '' vs '|' typo in the original code so the condition is never true and we don't queue the work. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- diff --git a/drivers/usb/chipidea/udc.c

Re: [PATCH v2 06/11] USB: mxs-phy: add basic otg support

2012-09-14 Thread Richard Zhao
On Wed, Sep 12, 2012 at 01:39:01PM +0300, Heikki Krogerus wrote: Hi, On Tue, Aug 28, 2012 at 03:03:12PM +0800, Richard Zhao wrote: +static int mxs_phy_set_host(struct usb_otg *otg, struct usb_bus *host) +{ Shouldn't you at least save the host pointer? otg-host = host; It looks making

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-09-14 Thread Richard Zhao
On Wed, Sep 12, 2012 at 01:47:54PM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Tue, Sep 11, 2012 at 10:23:55AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Wed, Aug 29, 2012 at 12:48:15PM +0300, Alexander

Re: [PATCH v2 06/11] USB: mxs-phy: add basic otg support

2012-09-14 Thread Richard Zhao
On Fri, Sep 14, 2012 at 04:56:13PM +0800, Chen Peter-B29397 wrote: diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c index c1a67cb..6a03e97 100644 --- a/drivers/usb/otg/mxs-phy.c +++ b/drivers/usb/otg/mxs-phy.c @@ -97,12 +97,24 @@ static int

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-09-11 Thread Richard Zhao
On Tue, Sep 11, 2012 at 10:23:55AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Wed, Aug 29, 2012 at 12:48:15PM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Wed, Aug 29, 2012 at 11:10:33AM +0300, Alexander

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-09-07 Thread Richard Zhao
On Thu, Sep 06, 2012 at 05:18:29PM +0200, Marc Kleine-Budde wrote: On 09/06/2012 05:15 PM, Richard Zhao wrote: Hi Marc, usbmisc_imx6q.c is only for imx6x. And for a certain running kernel, there will be always one driver instance. It's currently only for imx6q, but I've patches[1

Re: [PATCH v3 4/5] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-09-06 Thread Richard Zhao
On Wed, Sep 05, 2012 at 10:11:52AM +0200, Marc Kleine-Budde wrote: If udc_start() fails the qh_pool dma-pool cannot be closed because it's still in use. This patch factors out the dma_pool_free() loop into destroy_eps() and calls it in the error path of udc_start(), too. Cc: Richard Zhao

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-06 Thread Richard Zhao
On Thu, Sep 06, 2012 at 05:30:02PM +0300, Felipe Balbi wrote: On Tue, Sep 04, 2012 at 09:32:06PM +0200, Marc Kleine-Budde wrote: On 09/04/2012 07:51 PM, ABRAHAM, KISHON VIJAY wrote: Since it's already a common function, we may give phandler property a common name too. So we will not

Re: [PATCH 1/2] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove

2012-09-06 Thread Richard Zhao
Hi Marc, Thanks for your patch. It's good. Richard On Thu, Sep 06, 2012 at 02:37:58PM +0200, Marc Kleine-Budde wrote: While there fix a potential race condition, first set usbmisc, then call usbmisc_set_ops(). Signed-off-by: Marc Kleine-Budde m...@pengutronix.de ---

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-09-06 Thread Richard Zhao
Hi Marc, usbmisc_imx6q.c is only for imx6x. And for a certain running kernel, there will be always one driver instance. Thanks Richard On Thu, Sep 06, 2012 at 02:37:59PM +0200, Marc Kleine-Budde wrote: Signed-off-by: Marc Kleine-Budde m...@pengutronix.de ---

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-04 Thread Richard Zhao
On Tue, Sep 04, 2012 at 03:58:50PM +0200, Marc Kleine-Budde wrote: On 09/04/2012 03:45 PM, Felipe Balbi wrote: On Tue, Sep 04, 2012 at 12:31:14PM +0200, Marc Kleine-Budde wrote: On 08/29/2012 10:11 PM, Marc Kleine-Budde wrote: [...] +struct usb_phy *devm_usb_get_phy_by_phandle(struct

Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-09-04 Thread Richard Zhao
: Richard Zhao richard.z...@freescale.com writes: i.MX usb controllers shares non-core registers, which may include SoC specific controls. We take it as a usbmisc device and usbmisc driver set operations needed by ci13xxx_imx driver. For example, Sabrelite board has bad over-current

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-09-04 Thread Richard Zhao
On Wed, Aug 29, 2012 at 06:46:00PM +0800, Richard Zhao wrote: On Wed, Aug 29, 2012 at 12:48:15PM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Wed, Aug 29, 2012 at 11:10:33AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com

Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-08-29 Thread Richard Zhao
On Wed, Aug 29, 2012 at 10:50:08AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: i.MX usb controllers shares non-core registers, which may include SoC specific controls. We take it as a usbmisc device and usbmisc driver set operations needed

Re: [PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path

2012-08-29 Thread Richard Zhao
On Wed, Aug 29, 2012 at 11:03:48AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Tue, Aug 28, 2012 at 11:29:35AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: States in gadget are not needed any more, set

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-08-29 Thread Richard Zhao
On Wed, Aug 29, 2012 at 11:10:33AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Tue, Aug 28, 2012 at 11:38:23AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: One role failed, but the other role will possiblly

[PATCH v6 0/3] imx: add usbmisc support

2012-08-28 Thread Richard Zhao
usbmisc driver handles the SoC specific non-core usb registers. Changes since last version: goto err when usbmisc_ops-init failed rather than return directly. Richard Zhao (3): USB: chipidea: add imx usbmisc support ARM: imx6q: clk_register_clkdev usbmisc clock ARM: dts: imx6q-sabrelite

[PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-08-28 Thread Richard Zhao
-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Sascha Hauer s.ha...@pengutronix.de --- .../devicetree/bindings/usb/ci13xxx-imx.txt|5 + .../devicetree/bindings/usb/usbmisc-imx.txt| 14 ++ drivers/usb/chipidea/Makefile |2 +- drivers/usb

[PATCH v6 3/3] ARM: dts: imx6q-sabrelite: add usbmisc device

2012-08-28 Thread Richard Zhao
- add usbmisc device - set property fsl,usbmisc for usb controllers - set disable-over-current for imx6q-sabrelite usb otg Signed-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Sascha Hauer s.ha...@pengutronix.de --- arch/arm/boot/dts/imx6q-sabrelite.dts |1 + arch/arm/boot/dts

[PATCH v6 2/3] ARM: imx6q: clk_register_clkdev usbmisc clock

2012-08-28 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Sascha Hauer s.ha...@pengutronix.de --- arch/arm/mach-imx/clk-imx6q.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index ea89520..660fcbb 100644 --- a/arch/arm

[PATCH v2 00/11] chipidea/imx: add otg support and some bug fix

2012-08-28 Thread Richard Zhao
patch series. - remove regulater_disable and old comments in ci13xxx_imx. Richard Zhao (11): USB: chipidea: imx: add pinctrl support USB: chipidea: delay 2ms before read ID status at probe time USB: chipidea: move OTGSC_IDIS clearing from ci_role_work to irq handler USB: chipidea: clear

[PATCH v2 01/11] USB: chipidea: imx: add pinctrl support

2012-08-28 Thread Richard Zhao
Some controllers may not need to setup pinctrl, so we don't fail the probe if pinctrl get/select failed. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/ci13xxx_imx.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/chipidea/ci13xxx_imx.c

[PATCH v2 02/11] USB: chipidea: delay 2ms before read ID status at probe time

2012-08-28 Thread Richard Zhao
The ID pin needs 1ms debounce time, event at probe time. We delay 2ms for safe. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 1083585

[PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path

2012-08-28 Thread Richard Zhao
States in gadget are not needed any more, set it to zero. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index c7a032a..9fb6394 100644

[PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-08-28 Thread Richard Zhao
One role failed, but the other role will possiblly still work. For example, when udc start failed, if plug in a host device, it works. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH v2 06/11] USB: mxs-phy: add basic otg support

2012-08-28 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/otg/mxs-phy.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c index c1a67cb..6a03e97 100644 --- a/drivers/usb/otg/mxs-phy.c +++ b/drivers/usb

[PATCH v2 08/11] USB: chipidea: convert to use devm_request_irq

2012-08-28 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 8fd390a..7485c84 100644 --- a/drivers/usb/chipidea/core.c +++ b

[PATCH v2 09/11] USB: chipidea: add -DDEBUG if CONFIG_USB_CHIPIDEA_DEBUG

2012-08-28 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/Makefile |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 57e510f..d92ca32 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb

Re: [PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path

2012-08-28 Thread Richard Zhao
On Tue, Aug 28, 2012 at 11:29:35AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: States in gadget are not needed any more, set it to zero. It's generally a good practice to mention in the commit message what is it that you are fixing with this patch

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-08-28 Thread Richard Zhao
On Tue, Aug 28, 2012 at 11:38:23AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: One role failed, but the other role will possiblly still work. For example, when udc start failed, if plug in a host device, it works. If you're a host device, ci-role

Re: [PATCH] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-08-28 Thread Richard Zhao
On Tue, Aug 28, 2012 at 12:52:19PM +0200, Marc Kleine-Budde wrote: On 08/28/2012 12:46 PM, Richard Zhao wrote: On Tue, Aug 28, 2012 at 12:31:25PM +0200, Marc Kleine-Budde wrote: If udc_start() fails the qh_pool dma-pool cannot be closed because it's still in use. This patch factors out

Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-28 Thread Richard Zhao
On Tue, Aug 28, 2012 at 03:42:07PM +0200, Marc Kleine-Budde wrote: On 08/27/2012 12:36 PM, Marc Kleine-Budde wrote: [...] +return usb_add_phy(mxs_phy-phy, USB_PHY_TYPE_USB2); Why is it usb2? It's kind of USB_PHY_TYPE_DT. For now there is USB_PHY_TYPE_USB2, USB_PHY_TYPE_USB3 and

Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-27 Thread Richard Zhao
On Mon, Aug 27, 2012 at 11:04:58AM +0530, ABRAHAM, KISHON VIJAY wrote: Hi, On Sat, Aug 25, 2012 at 3:33 PM, Marc Kleine-Budde m...@pengutronix.de wrote: On 08/24/2012 08:51 AM, Richard Zhao wrote: On Thu, Aug 23, 2012 at 07:22:54PM +0200, Marc Kleine-Budde wrote: This patch registers

Re: chipidea driver

2012-08-27 Thread Richard Zhao
On Fri, Aug 24, 2012 at 10:34:37AM +0300, Alexander Shishkin wrote: Richard Zhao richard.z...@freescale.com writes: On Thu, Aug 23, 2012 at 06:57:03PM +0200, Marc Kleine-Budde wrote: Hello, Hi, Michael and I have a bunch of updates and improvement for the chipidea driver

Re: [PATCH] usb: chipidea: ci13xxx_imx: fix regulator unbalance disable

2012-08-27 Thread Richard Zhao
: Richard Zhao richard.z...@freescale.com Signed-off-by: Marc Kleine-Budde m...@pengutronix.de --- drivers/usb/chipidea/ci13xxx_imx.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c index dd7f3a3..32e3e68 100644

Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-24 Thread Richard Zhao
On Thu, Aug 23, 2012 at 07:22:54PM +0200, Marc Kleine-Budde wrote: This patch registers the msx-phy as an USB_PHY_TYPE_USB2. This is needed to get reference to the phy with devm_usb_get_phy_by_phandle(), which will be added in a later patch. Signed-off-by: Marc Kleine-Budde

Re: [PATCH 1/4] usb: chipidea: udc: fix error path in udc_start()

2012-08-24 Thread Richard Zhao
On Thu, Aug 23, 2012 at 07:30:44PM +0200, Marc Kleine-Budde wrote: This patch fixes the error path of udc_start(). Now NULL is used to unset the peripheral with otg_set_peripheral(). Signed-off-by: Marc Kleine-Budde m...@pengutronix.de Reviewed-by: Richard Zhao richard.z...@freescale.com

Re: [PATCH 1/3] usb: otg: Improve phy handling

2012-08-23 Thread Richard Zhao
On Thu, Aug 23, 2012 at 07:22:51PM +0200, Marc Kleine-Budde wrote: This patch series improves the phy handling. The first patch fixes the problem that the phy driver, when build as module, can be unloaded when the phy is in use. ci13xxx_imx also have a try_module_get. Thanks Richard The

Re: chipidea driver

2012-08-23 Thread Richard Zhao
On Thu, Aug 23, 2012 at 06:57:03PM +0200, Marc Kleine-Budde wrote: Hello, Michael and I have a bunch of updates and improvement for the chipidea driver. They apply to Richard's tree: https://github.com/riczhao/kernel-imx/commits/topics/usb-driver What's the status of these patches? It

Re: mxs-phy on i.MX233 not enumerating

2012-08-13 Thread Richard Zhao
On Tue, Aug 14, 2012 at 10:40:21AM +0800, Chen Peter-B29397 wrote: According to IC guys, the logic of handling HOSTDISCONDETECT is the same between i.mx28 and i.mx23. As pointed out by Sean, on mx23 reference manual we have the following text describing HOSTDISCONDETECT:

Re: [PATCH v4 1/3] USB: chipidea: add imx usbmisc support

2012-08-01 Thread Richard Zhao
Could it be that something is missing in this patch? I don't see struct usbmisc_usb_device defined anywhere in this patch. ah, Sorry I missed the header file. I'll send a new version. Thanks Richard Sascha -- Pengutronix e.K. | |

[PATCH v5 0/3] imx: add usbmisc support

2012-08-01 Thread Richard Zhao
. Richard Zhao (3): USB: chipidea: add imx usbmisc support ARM: imx6q: clk_register_clkdev usbmisc clock ARM: dts: imx6q-sabrelite: add usbmisc device .../devicetree/bindings/usb/ci13xxx-imx.txt|5 + .../devicetree/bindings/usb/usbmisc-imx.txt| 14 ++ arch/arm/boot/dts

[PATCH v5 2/3] ARM: imx6q: clk_register_clkdev usbmisc clock

2012-08-01 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- arch/arm/mach-imx/clk-imx6q.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index ea89520..660fcbb 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx

[PATCH v5 3/3] ARM: dts: imx6q-sabrelite: add usbmisc device

2012-08-01 Thread Richard Zhao
- add usbmisc device - set property fsl,usbmisc for usb controllers - set disable-over-current for imx6q-sabrelite usb otg Signed-off-by: Richard Zhao richard.z...@freescale.com --- arch/arm/boot/dts/imx6q-sabrelite.dts |1 + arch/arm/boot/dts/imx6q.dtsi | 10 ++ 2 files

[PATCH v5 1/3] USB: chipidea: add imx usbmisc support

2012-08-01 Thread Richard Zhao
-off-by: Richard Zhao richard.z...@freescale.com --- .../devicetree/bindings/usb/ci13xxx-imx.txt|5 + .../devicetree/bindings/usb/usbmisc-imx.txt| 14 ++ drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/ci13xxx_imx.c | 64

Re: [PATCH v3 1/3] USB: chipidea: add imx usbmisc support

2012-07-31 Thread Richard Zhao
On Tue, Jul 31, 2012 at 09:06:33AM +0800, Chen Peter-B29397 wrote: usbmisc 0 would then mean port 0 of the usbmisc device. I didn't add the restriction that a usbmisc driver must have a usbmisc device. I'm not sure whether all SoC and future SoC can be look as a device. Peter,

[PATCH v4 0/3] imx: add usbmisc support

2012-07-31 Thread Richard Zhao
usbmisc driver handles the SoC specific non-core usb registers. Changes since last version: - rebase onto torvalds latest git tree - use phandle linke usb controllers and usbmisc device. It also make usbmisc driver possible to be kernel modules. Richard Zhao (3): USB: chipidea: add imx

[PATCH v4 1/3] USB: chipidea: add imx usbmisc support

2012-07-31 Thread Richard Zhao
-off-by: Richard Zhao richard.z...@freescale.com --- .../devicetree/bindings/usb/ci13xxx-imx.txt|5 + .../devicetree/bindings/usb/usbmisc-imx.txt| 14 ++ drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/ci13xxx_imx.c | 64

[PATCH v4 3/3] ARM: dts: imx6q-sabrelite: add usbmisc device

2012-07-31 Thread Richard Zhao
- add usbmisc device - set property fsl,usbmisc for usb controllers Signed-off-by: Richard Zhao richard.z...@freescale.com --- arch/arm/boot/dts/imx6q-sabrelite.dts |1 + arch/arm/boot/dts/imx6q.dtsi | 10 ++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/boot

Re: [PATCH 00/12] chipidea/imx: add otg support and some bug fix

2012-07-30 Thread Richard Zhao
On Thu, Jul 26, 2012 at 06:59:48PM +0800, Richard Zhao wrote: On Thu, Jul 19, 2012 at 10:05:54AM +0800, Richard Zhao wrote: On Mon, Jul 16, 2012 at 05:40:57PM -0700, Greg KH wrote: On Thu, Jul 12, 2012 at 03:01:40PM +0800, Richard Zhao wrote: The patch set is tested on imx6q_sabrelite

Re: [PATCH v3 1/3] USB: chipidea: add imx usbmisc support

2012-07-30 Thread Richard Zhao
On Mon, Jul 30, 2012 at 11:32:44AM +0200, Sascha Hauer wrote: On Thu, Jul 26, 2012 at 06:35:14PM +0800, Richard Zhao wrote: i.MX usb controllers shares non-core registers, which may include SoC specific controls. We take it as a usbmisc device and usbmisc driver set operations needed

[PATCH v3 0/3] imx: add usbmisc support

2012-07-26 Thread Richard Zhao
as a seperate patch Richard Zhao (3): USB: chipidea: add imx usbmisc support ARM: dts: imx6q-sabrelite: add usbmisc device ARM: imx6q: clk_register_clkdev usbmisc clock .../devicetree/bindings/usb/ci13xxx-imx.txt|2 + .../devicetree/bindings/usb/usbmisc-imx.txt| 12

[PATCH v3 1/3] USB: chipidea: add imx usbmisc support

2012-07-26 Thread Richard Zhao
-off-by: Richard Zhao richard.z...@freescale.com --- .../devicetree/bindings/usb/ci13xxx-imx.txt|2 + .../devicetree/bindings/usb/usbmisc-imx.txt| 12 ++ drivers/usb/chipidea/Makefile |3 +- drivers/usb/chipidea/ci13xxx_imx.c | 72

Re: [PATCH v2 1/2] USB: chipidea: add imx usbmisc support

2012-07-23 Thread Richard Zhao
On Mon, Jul 23, 2012 at 02:21:06PM +0300, Felipe Balbi wrote: On Mon, Jul 23, 2012 at 07:13:52PM +0800, Richard Zhao wrote: On Mon, Jul 23, 2012 at 01:51:55PM +0300, Felipe Balbi wrote: On Mon, Jul 23, 2012 at 11:30:18AM +0200, Marc Kleine-Budde wrote: On 07/23/2012 11:27 AM, Richard

[PATCH v2 1/2] USB: chipidea: add imx usbmisc support

2012-07-18 Thread Richard Zhao
-off-by: Richard Zhao richard.z...@freescale.com --- .../devicetree/bindings/usb/ci13xxx-imx.txt|2 + .../devicetree/bindings/usb/usbmisc-imx.txt| 12 ++ drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/ci13xxx_imx.c | 23

Re: [PATCH v2 1/2] USB: chipidea: add imx usbmisc support

2012-07-18 Thread Richard Zhao
[snip] static struct ci13xxx_platform_data ci13xxx_imx_platdata __devinitdata = { .name = ci13xxx_imx, .flags = CI13XXX_REQUIRE_TRANSCEIVER | @@ -120,6 +140,9 @@ static int __devinit ci13xxx_imx_probe(struct platform_device *pdev)

Re: [PATCH 00/12] chipidea/imx: add otg support and some bug fix

2012-07-18 Thread Richard Zhao
On Mon, Jul 16, 2012 at 05:40:57PM -0700, Greg KH wrote: On Thu, Jul 12, 2012 at 03:01:40PM +0800, Richard Zhao wrote: The patch set is tested on imx6q_sabrelite board. The patch can also be found at https://github.com/riczhao/kernel-imx/commits/topics/usb-driver For test which

Re: [Patch v5 08/13] ARM: imx6q: add config-on-boot gpios

2012-07-18 Thread Richard Zhao
On Tue, Jul 17, 2012 at 02:30:17PM +0200, Dirk Behme wrote: On 13.06.2012 14:34, Richard Zhao wrote: Sometimes, boards have gpios that don't own by any driver or owner by a generic driver that don't like hacks. Such gpios is normally output and need setup once on boot. So I introduce

Re: [PATCH 12/12] USB: chipidea: add imx usbmisc support

2012-07-16 Thread Richard Zhao
On Mon, Jul 16, 2012 at 10:25:20AM +0200, Sascha Hauer wrote: On Thu, Jul 12, 2012 at 03:01:52PM +0800, Richard Zhao wrote: i.MX usb controllers shares non-core registers, which may include SoC specific controls. We take it as a usbmisc device and usbmisc driver export functions needed

Re: [PATCH] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-07-16 Thread Richard Zhao
Hi Alex, Could you please also review ack this patch? Thanks Richard -- 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 12/12] USB: chipidea: add imx usbmisc support

2012-07-13 Thread Richard Zhao
On Fri, Jul 13, 2012 at 02:25:45PM +0200, Michael Grzeschik wrote: On Thu, Jul 12, 2012 at 03:01:52PM +0800, Richard Zhao wrote: i.MX usb controllers shares non-core registers, which may include SoC specific controls. We take it as a usbmisc device and usbmisc driver export functions needed

[PATCH 01/12] USB: chipidea: imx: add pinctrl support

2012-07-12 Thread Richard Zhao
Some controllers may not need to setup pinctrl, so we don't fail the probe if pinctrl get/select failed. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/ci13xxx_imx.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/chipidea/ci13xxx_imx.c

[PATCH 03/12] USB: chipidea: move OTGSC_IDIS clearing from ci_role_work to irq handler

2012-07-12 Thread Richard Zhao
OTGSC_IDIS must be cleared in irq handler to avoid re-queue the work. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index

[PATCH 04/12] USB: chipidea: clear gadget struct at udc_start fail path

2012-07-12 Thread Richard Zhao
States in gadget are not needed any more, set it to zero. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 9029985..fd27f4d 100644

[PATCH 05/12] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-07-12 Thread Richard Zhao
One role failed, but the other role will possiblly still work. For example, when udc start failed, if plug in a host device, it works. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH 07/12] USB: chipidea: add vbus detect for udc

2012-07-12 Thread Richard Zhao
Using vbus valid interrupt to detect vbus. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/ci.h |1 + drivers/usb/chipidea/udc.c | 39 ++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/usb

[PATCH 02/12] USB: chipidea: delay 2ms before read ID status at probe time

2012-07-12 Thread Richard Zhao
The ID pin needs 1ms debounce time, event at probe time. We delay 2ms for safe. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 1083585

[PATCH 08/12] USB: chipidea: convert to use devm_request_irq

2012-07-12 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/core.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 8fd390a..7485c84 100644 --- a/drivers/usb/chipidea/core.c +++ b

[PATCH 09/12] USB: chipidea: add -DDEBUG if CONFIG_USB_CHIPIDEA_DEBUG

2012-07-12 Thread Richard Zhao
Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/Makefile |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 5c66d9c..3f56b76 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb

[PATCH 10/12] USB: chipidea: add set_vbus_power support

2012-07-12 Thread Richard Zhao
set_vbus_power is used to enable or disable vbus power for usb host. Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/ci13xxx_imx.c | 39 +--- drivers/usb/chipidea/host.c|8 include/linux/usb/chipidea.h

[PATCH 12/12] USB: chipidea: add imx usbmisc support

2012-07-12 Thread Richard Zhao
. Signed-off-by: Richard Zhao richard.z...@freescale.com --- .../devicetree/bindings/usb/imx-usbmisc.txt| 15 ++ drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/ci13xxx_imx.c |4 + drivers/usb/chipidea/imx_usbmisc.c | 144

Re: [PATCH 12/12] USB: chipidea: add imx usbmisc support

2012-07-12 Thread Richard Zhao
[snip] --- /dev/null +++ b/drivers/usb/chipidea/imx_usbmisc.c @@ -0,0 +1,144 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version

[PATCH] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-07-11 Thread Richard Zhao
...@pengutronix.de Signed-off-by: Richard Zhao richard.z...@freescale.com --- drivers/usb/chipidea/udc.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index c7a032a..9029985 100644 --- a/drivers/usb/chipidea

Re: [PATCH v9 REBASE 6/9] USB: notify phy when root hub port connect change

2012-07-10 Thread Richard Zhao
On Tue, Jul 10, 2012 at 05:22:20AM +0200, Marek Vasut wrote: Dear Richard Zhao, On Sat, Jul 07, 2012 at 10:56:45PM +0800, Richard Zhao wrote: Phy may need to change settings when port connect change. Signed-off-by: Richard Zhao richard.z...@freescale.com Tested-by: Subodh Nijsure

Re: [PATCH v9 REBASE 6/9] USB: notify phy when root hub port connect change

2012-07-10 Thread Richard Zhao
On Tue, Jul 10, 2012 at 10:24:07AM -0400, Alan Stern wrote: On Tue, 10 Jul 2012, Richard Zhao wrote: @@ -4037,6 +4038,13 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, } } + if (unlikely(hcd-phy !hdev-parent

Re: [PATCH v9 REBASE 6/9] USB: notify phy when root hub port connect change

2012-07-09 Thread Richard Zhao
On Mon, Jul 09, 2012 at 09:57:57AM -0700, Greg KH wrote: On Sat, Jul 07, 2012 at 10:56:45PM +0800, Richard Zhao wrote: Phy may need to change settings when port connect change. Signed-off-by: Richard Zhao richard.z...@freescale.com Tested-by: Subodh Nijsure snijs...@grid-net.com

Re: [PATCH v8 06/14] USB: Chipidea: rename struct ci13xxx variables from udc to ci

2012-07-07 Thread Richard Zhao
On Fri, Jul 06, 2012 at 11:07:21AM -0700, Greg KH wrote: On Fri, Jun 29, 2012 at 05:48:54PM +0800, Richard Zhao wrote: struct ci13xxx represent the controller, which may be device or host, so name its variables as ci. Signed-off-by: Richard Zhao richard.z...@freescale.com Reviewed

[PATCH v9 REBASE 2/9] USB: Chipidea: add unified ci13xxx_{add,remove}_device for platform drivers

2012-07-07 Thread Richard Zhao
Platform drivers do the similar things to add/remove ci13xxx device, so create a unified one. Signed-off-by: Richard Zhao richard.z...@freescale.com Reviewed-by: Felipe Balbi ba...@ti.com Signed-off-by: Alexander Shishkin alexander.shish...@linux.intel.com --- drivers/usb/chipidea/ci13xxx_msm.c

[PATCH v9 REBASE 3/9] USB: Chipidea: add ci13xxx device id management

2012-07-07 Thread Richard Zhao
We use ida_simple_get and ida_simple_remove to manage the ids. Signed-off-by: Richard Zhao richard.z...@freescale.com Reviewed-by: Felipe Balbi ba...@ti.com Signed-off-by: Alexander Shishkin alexander.shish...@linux.intel.com --- drivers/usb/chipidea/core.c | 21 - 1 file

[PATCH v9 REBASE 4/9] usb: chipidea: select USB_EHCI_ROOT_HUB_TT in USB_CHIPIDEA_HOST of Kconfig

2012-07-07 Thread Richard Zhao
ci13xxx host needs Root Hub Transaction Translators. Reported-by: Shawn Guo shawn@freescale.com Signed-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Felipe Balbi ba...@ti.com Signed-off-by: Alexander Shishkin alexander.shish...@linux.intel.com Acked-by: Marek Vasut ma...@denx.de

[PATCH v9 REBASE 5/9] usb: otg: add notify_connect/notify_disconnect callback

2012-07-07 Thread Richard Zhao
This let usb phy driver has a chance to change hw settings when connect status change. Signed-off-by: Richard Zhao richard.z...@freescale.com Acked-by: Felipe Balbi ba...@ti.com Tested-by: Subodh Nijsure snijs...@grid-net.com --- include/linux/usb/otg.h | 21 + 1 file

[PATCH v9 REBASE 7/9] usb: chipidea: permit driver bindings pass phy pointer

2012-07-07 Thread Richard Zhao
Sometimes, the driver bindings may know what phy they use. For example, when using device tree, the usb controller may have a phandler pointing to usb phy. Signed-off-by: Richard Zhao richard.z...@freescale.com Reviewed-by: Marek Vasut ma...@denx.de Acked-by: Felipe Balbi ba...@ti.com Tested

[PATCH v9 REBASE 6/9] USB: notify phy when root hub port connect change

2012-07-07 Thread Richard Zhao
Phy may need to change settings when port connect change. Signed-off-by: Richard Zhao richard.z...@freescale.com Tested-by: Subodh Nijsure snijs...@grid-net.com --- drivers/usb/core/hub.c |8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core

[PATCH v9 REBASE 8/9] usb: otg: add basic mxs phy driver support

2012-07-07 Thread Richard Zhao
mxs phy is used in Freescale i.MX SoCs, for example imx23, imx28, imx6Q. This patch adds the basic host support. Signed-off-by: Richard Zhao richard.z...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de Cc: Peter Chen peter.c...@freescale.com Acked-by: Felipe Balbi ba...@ti.com Tested