* [PATCH v3 00/12] add imx usb driver for mx28/6x @ 2012-05-25 2:24 Richard Zhao [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 The work is based on ci13xxx rework done by Alexander Shishkin. Status: - this version only support host - usbotg controler works at host role Changes since V2: - Rebase to Alex's tree - Use regulator to control vbus power - Remove ARCH check in Kconfig, but add OF_DEV check. - Other changes according laster version comments. Richard Zhao (12): usb: otg: add notify_connect/notify_disconnect callback usb: chipidea: permit driver bindings pass phy pointer usb: ehci-hcd: notify phy when connect change usb: otg: add basic mxs phy driver support usb: chipidea: add imx platform driver ARM: imx6q: correct device name of usbphy and usb controller clock export ARM: imx6q: add config-on-boot gpios ARM: imx6q: add usbphy clocks ARM: imx6q: disable usb charger detector ARM: dts: imx6q-sabrelite: add usb devices ARM: mxs: clk_register_clkdev mx28 usb clocks ARM: dts: imx28-evk: add usb devices .../devicetree/bindings/arm/config-on-boot.txt | 12 ++ .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ Documentation/devicetree/bindings/usb/mxs-phy.txt | 13 ++ arch/arm/boot/dts/imx28-evk.dts | 36 ++++ arch/arm/boot/dts/imx28.dtsi | 12 +- arch/arm/boot/dts/imx6q-sabrelite.dts | 35 ++++ arch/arm/boot/dts/imx6q.dtsi | 36 ++++- arch/arm/mach-imx/clk-imx6q.c | 12 +- arch/arm/mach-imx/mach-imx6q.c | 59 ++++++ drivers/clk/mxs/clk-imx28.c | 4 + drivers/usb/chipidea/Makefile | 3 + drivers/usb/chipidea/ci.h | 2 + drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++ drivers/usb/chipidea/core.c | 4 + drivers/usb/chipidea/host.c | 1 + drivers/usb/chipidea/udc.c | 11 +- drivers/usb/host/ehci-hcd.c | 14 ++ drivers/usb/otg/Kconfig | 8 + drivers/usb/otg/Makefile | 1 + drivers/usb/otg/mxs-phy.c | 204 ++++++++++++++++++++ include/linux/usb/chipidea.h | 3 + include/linux/usb/otg.h | 21 ++ 22 files changed, 690 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/config-on-boot.txt create mode 100644 Documentation/devicetree/bindings/usb/ci13xxx-imx.txt create mode 100644 Documentation/devicetree/bindings/usb/mxs-phy.txt create mode 100644 drivers/usb/chipidea/ci13xxx_imx.c create mode 100644 drivers/usb/otg/mxs-phy.c -- 1.7.5.4 -- 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] 60+ messages in thread
[parent not found: <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* [PATCH v3 01/12] usb: otg: add notify_connect/notify_disconnect callback [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-05-25 2:24 ` Richard Zhao [not found] ` <1337912665-16615-2-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 02/12] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao ` (13 subsequent siblings) 14 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: marex-ynQEQJNshbs, B20596-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, fabio.estevam-KZfg59tc24xl57MIdRCFDg, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, B29397-KZfg59tc24xl57MIdRCFDg, balbi-l0cyMroinI0, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w This let usb phy driver has a chance to change hw settings when connect status change. Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- include/linux/usb/otg.h | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 38ab3f4..6dfdc8d 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h @@ -117,6 +117,9 @@ struct usb_phy { int (*set_suspend)(struct usb_phy *x, int suspend); + /* notify phy connect status change */ + int (*notify_connect)(struct usb_phy *x, int port); + int (*notify_disconnect)(struct usb_phy *x, int port); }; @@ -252,6 +255,24 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) } static inline int +usb_phy_notify_connect(struct usb_phy *x, int port) +{ + if (x->notify_connect) + return x->notify_connect(x, port); + else + return 0; +} + +static inline int +usb_phy_notify_disconnect(struct usb_phy *x, int port) +{ + if (x->notify_disconnect) + return x->notify_disconnect(x, port); + else + return 0; +} + +static inline int otg_start_srp(struct usb_otg *otg) { if (otg && otg->start_srp) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 60+ messages in thread
[parent not found: <1337912665-16615-2-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v3 01/12] usb: otg: add notify_connect/notify_disconnect callback [not found] ` <1337912665-16615-2-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-06 8:49 ` Felipe Balbi 0 siblings, 0 replies; 60+ messages in thread From: Felipe Balbi @ 2012-06-06 8:49 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 [-- Attachment #1: Type: text/plain, Size: 1508 bytes --] Hi, On Fri, May 25, 2012 at 10:24:14AM +0800, Richard Zhao wrote: > This let usb phy driver has a chance to change hw settings when connect > status change. > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > --- > include/linux/usb/otg.h | 21 +++++++++++++++++++++ > 1 files changed, 21 insertions(+), 0 deletions(-) > > diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h > index 38ab3f4..6dfdc8d 100644 > --- a/include/linux/usb/otg.h > +++ b/include/linux/usb/otg.h > @@ -117,6 +117,9 @@ struct usb_phy { > int (*set_suspend)(struct usb_phy *x, > int suspend); > > + /* notify phy connect status change */ > + int (*notify_connect)(struct usb_phy *x, int port); > + int (*notify_disconnect)(struct usb_phy *x, int port); > }; > > > @@ -252,6 +255,24 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) > } > > static inline int > +usb_phy_notify_connect(struct usb_phy *x, int port) > +{ > + if (x->notify_connect) > + return x->notify_connect(x, port); > + else > + return 0; > +} > + > +static inline int > +usb_phy_notify_disconnect(struct usb_phy *x, int port) > +{ > + if (x->notify_disconnect) > + return x->notify_disconnect(x, port); > + else > + return 0; > +} > + > +static inline int > otg_start_srp(struct usb_otg *otg) > { > if (otg && otg->start_srp) > -- > 1.7.5.4 > > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH v3 02/12] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 01/12] usb: otg: add notify_connect/notify_disconnect callback Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao [not found] ` <1337912665-16615-3-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-08 12:37 ` [PATCH v4] " Richard Zhao 2012-05-25 2:24 ` [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change Richard Zhao ` (12 subsequent siblings) 14 siblings, 2 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> --- drivers/usb/chipidea/ci.h | 2 ++ drivers/usb/chipidea/core.c | 4 ++++ drivers/usb/chipidea/host.c | 1 + drivers/usb/chipidea/udc.c | 11 +++++++---- include/linux/usb/chipidea.h | 3 +++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index 9655e35..d738603 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -160,6 +160,8 @@ struct ci13xxx { struct ci13xxx_platform_data *platdata; int vbus_active; + /* FIXME: some day, we'll not use global phy */ + bool global_phy; struct usb_phy *transceiver; struct usb_hcd *hcd; }; diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index c14ce2b..21407e7 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -419,6 +419,10 @@ static int __devinit ci_hdrc_probe(struct platform_device *pdev) ci->dev = dev; ci->platdata = dev->platform_data; + if (ci->platdata->phy) + ci->transceiver = ci->platdata->phy; + else + ci->global_phy = true; ret = hw_device_init(ci, base); if (ret < 0) { diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 4a4fdb8..4479f5a 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -121,6 +121,7 @@ static int host_start(struct ci13xxx *ci) ehci = hcd_to_ehci(hcd); ehci->caps = ci->hw_bank.cap; ehci->has_hostpc = ci->hw_bank.lpm; + ehci->transceiver = ci->transceiver; ret = usb_add_hcd(hcd, 0, 0); if (ret) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index ca9b387..b43b29c 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1684,7 +1684,8 @@ static int udc_start(struct ci13xxx *ci) ci->gadget.ep0 = &ci->ep0in->ep; - ci->transceiver = usb_get_transceiver(); + if (ci->global_phy) { + ci->transceiver = usb_get_transceiver(); if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) { if (ci->transceiver == NULL) { @@ -1728,7 +1729,8 @@ static int udc_start(struct ci13xxx *ci) remove_trans: if (ci->transceiver) { otg_set_peripheral(ci->transceiver->otg, &ci->gadget); - usb_put_transceiver(ci->transceiver); + if (ci->global_phy) + usb_put_transceiver(ci->transceiver); } dev_err(dev, "error = %i\n", retval); @@ -1737,7 +1739,7 @@ remove_dbg: unreg_device: device_unregister(&ci->gadget.dev); put_transceiver: - if (ci->transceiver) + if (ci->transceiver && ci->global_phy) usb_put_transceiver(ci->transceiver); free_pools: dma_pool_destroy(ci->td_pool); @@ -1771,7 +1773,8 @@ static void udc_stop(struct ci13xxx *ci) if (ci->transceiver) { otg_set_peripheral(ci->transceiver->otg, NULL); - usb_put_transceiver(ci->transceiver); + if (ci->global_phy) + usb_put_transceiver(ci->transceiver); } dbg_remove_files(&ci->gadget.dev); device_unregister(&ci->gadget.dev); diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h index be078f0..544825d 100644 --- a/include/linux/usb/chipidea.h +++ b/include/linux/usb/chipidea.h @@ -5,12 +5,15 @@ #ifndef __LINUX_USB_CHIPIDEA_H #define __LINUX_USB_CHIPIDEA_H +#include <linux/usb/otg.h> + struct ci13xxx; struct ci13xxx_platform_data { const char *name; /* offset of the capability registers */ uintptr_t capoffset; unsigned power_budget; + struct usb_phy *phy; unsigned long flags; #define CI13XXX_REGS_SHARED BIT(0) #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1) -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
[parent not found: <1337912665-16615-3-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v3 02/12] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <1337912665-16615-3-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-06 8:50 ` Felipe Balbi 0 siblings, 0 replies; 60+ messages in thread From: Felipe Balbi @ 2012-06-06 8:50 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 [-- Attachment #1: Type: text/plain, Size: 4305 bytes --] On Fri, May 25, 2012 at 10:24:15AM +0800, Richard Zhao wrote: > 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > --- > drivers/usb/chipidea/ci.h | 2 ++ > drivers/usb/chipidea/core.c | 4 ++++ > drivers/usb/chipidea/host.c | 1 + > drivers/usb/chipidea/udc.c | 11 +++++++---- > include/linux/usb/chipidea.h | 3 +++ > 5 files changed, 17 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h > index 9655e35..d738603 100644 > --- a/drivers/usb/chipidea/ci.h > +++ b/drivers/usb/chipidea/ci.h > @@ -160,6 +160,8 @@ struct ci13xxx { > > struct ci13xxx_platform_data *platdata; > int vbus_active; > + /* FIXME: some day, we'll not use global phy */ > + bool global_phy; > struct usb_phy *transceiver; > struct usb_hcd *hcd; > }; > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > index c14ce2b..21407e7 100644 > --- a/drivers/usb/chipidea/core.c > +++ b/drivers/usb/chipidea/core.c > @@ -419,6 +419,10 @@ static int __devinit ci_hdrc_probe(struct platform_device *pdev) > > ci->dev = dev; > ci->platdata = dev->platform_data; > + if (ci->platdata->phy) > + ci->transceiver = ci->platdata->phy; > + else > + ci->global_phy = true; > > ret = hw_device_init(ci, base); > if (ret < 0) { > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c > index 4a4fdb8..4479f5a 100644 > --- a/drivers/usb/chipidea/host.c > +++ b/drivers/usb/chipidea/host.c > @@ -121,6 +121,7 @@ static int host_start(struct ci13xxx *ci) > ehci = hcd_to_ehci(hcd); > ehci->caps = ci->hw_bank.cap; > ehci->has_hostpc = ci->hw_bank.lpm; > + ehci->transceiver = ci->transceiver; > > ret = usb_add_hcd(hcd, 0, 0); > if (ret) > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index ca9b387..b43b29c 100644 > --- a/drivers/usb/chipidea/udc.c > +++ b/drivers/usb/chipidea/udc.c > @@ -1684,7 +1684,8 @@ static int udc_start(struct ci13xxx *ci) > > ci->gadget.ep0 = &ci->ep0in->ep; > > - ci->transceiver = usb_get_transceiver(); > + if (ci->global_phy) { > + ci->transceiver = usb_get_transceiver(); > > if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) { > if (ci->transceiver == NULL) { > @@ -1728,7 +1729,8 @@ static int udc_start(struct ci13xxx *ci) > remove_trans: > if (ci->transceiver) { > otg_set_peripheral(ci->transceiver->otg, &ci->gadget); > - usb_put_transceiver(ci->transceiver); > + if (ci->global_phy) > + usb_put_transceiver(ci->transceiver); > } > > dev_err(dev, "error = %i\n", retval); > @@ -1737,7 +1739,7 @@ remove_dbg: > unreg_device: > device_unregister(&ci->gadget.dev); > put_transceiver: > - if (ci->transceiver) > + if (ci->transceiver && ci->global_phy) > usb_put_transceiver(ci->transceiver); > free_pools: > dma_pool_destroy(ci->td_pool); > @@ -1771,7 +1773,8 @@ static void udc_stop(struct ci13xxx *ci) > > if (ci->transceiver) { > otg_set_peripheral(ci->transceiver->otg, NULL); > - usb_put_transceiver(ci->transceiver); > + if (ci->global_phy) > + usb_put_transceiver(ci->transceiver); > } > dbg_remove_files(&ci->gadget.dev); > device_unregister(&ci->gadget.dev); > diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h > index be078f0..544825d 100644 > --- a/include/linux/usb/chipidea.h > +++ b/include/linux/usb/chipidea.h > @@ -5,12 +5,15 @@ > #ifndef __LINUX_USB_CHIPIDEA_H > #define __LINUX_USB_CHIPIDEA_H > > +#include <linux/usb/otg.h> > + > struct ci13xxx; > struct ci13xxx_platform_data { > const char *name; > /* offset of the capability registers */ > uintptr_t capoffset; > unsigned power_budget; > + struct usb_phy *phy; > unsigned long flags; > #define CI13XXX_REGS_SHARED BIT(0) > #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1) > -- > 1.7.5.4 > > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer 2012-05-25 2:24 ` [PATCH v3 02/12] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao [not found] ` <1337912665-16615-3-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-08 12:37 ` Richard Zhao [not found] ` <1339159026-15837-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 1 sibling, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-08 12:37 UTC (permalink / raw) To: linux-usb, linux-arm-kernel, devicetree-discuss Cc: marex, B20596, dong.aisheng, fabio.estevam, alexander.shishkin, B29397, balbi, stern, kernel, gregkh, richard.zhao, shawn.guo, linuxzsc 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.zhao@freescale.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Felipe Balbi <balbi@ti.com> --- Changes since laster version: - hcd transceiver renamed to phy drivers/usb/chipidea/ci.h | 2 ++ drivers/usb/chipidea/core.c | 4 ++++ drivers/usb/chipidea/host.c | 1 + drivers/usb/chipidea/udc.c | 11 +++++++---- include/linux/usb/chipidea.h | 3 +++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index 9655e35..d738603 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -160,6 +160,8 @@ struct ci13xxx { struct ci13xxx_platform_data *platdata; int vbus_active; + /* FIXME: some day, we'll not use global phy */ + bool global_phy; struct usb_phy *transceiver; struct usb_hcd *hcd; }; diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index c14ce2b..21407e7 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -419,6 +419,10 @@ static int __devinit ci_hdrc_probe(struct platform_device *pdev) ci->dev = dev; ci->platdata = dev->platform_data; + if (ci->platdata->phy) + ci->transceiver = ci->platdata->phy; + else + ci->global_phy = true; ret = hw_device_init(ci, base); if (ret < 0) { diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 4a4fdb8..ebff9f4 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -117,6 +117,7 @@ static int host_start(struct ci13xxx *ci) hcd->has_tt = 1; hcd->power_budget = ci->platdata->power_budget; + hcd->phy = ci->transceiver; ehci = hcd_to_ehci(hcd); ehci->caps = ci->hw_bank.cap; diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index ca9b387..b43b29c 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1684,7 +1684,8 @@ static int udc_start(struct ci13xxx *ci) ci->gadget.ep0 = &ci->ep0in->ep; - ci->transceiver = usb_get_transceiver(); + if (ci->global_phy) { + ci->transceiver = usb_get_transceiver(); if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) { if (ci->transceiver == NULL) { @@ -1728,7 +1729,8 @@ static int udc_start(struct ci13xxx *ci) remove_trans: if (ci->transceiver) { otg_set_peripheral(ci->transceiver->otg, &ci->gadget); - usb_put_transceiver(ci->transceiver); + if (ci->global_phy) + usb_put_transceiver(ci->transceiver); } dev_err(dev, "error = %i\n", retval); @@ -1737,7 +1739,7 @@ remove_dbg: unreg_device: device_unregister(&ci->gadget.dev); put_transceiver: - if (ci->transceiver) + if (ci->transceiver && ci->global_phy) usb_put_transceiver(ci->transceiver); free_pools: dma_pool_destroy(ci->td_pool); @@ -1771,7 +1773,8 @@ static void udc_stop(struct ci13xxx *ci) if (ci->transceiver) { otg_set_peripheral(ci->transceiver->otg, NULL); - usb_put_transceiver(ci->transceiver); + if (ci->global_phy) + usb_put_transceiver(ci->transceiver); } dbg_remove_files(&ci->gadget.dev); device_unregister(&ci->gadget.dev); diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h index be078f0..544825d 100644 --- a/include/linux/usb/chipidea.h +++ b/include/linux/usb/chipidea.h @@ -5,12 +5,15 @@ #ifndef __LINUX_USB_CHIPIDEA_H #define __LINUX_USB_CHIPIDEA_H +#include <linux/usb/otg.h> + struct ci13xxx; struct ci13xxx_platform_data { const char *name; /* offset of the capability registers */ uintptr_t capoffset; unsigned power_budget; + struct usb_phy *phy; unsigned long flags; #define CI13XXX_REGS_SHARED BIT(0) #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1) -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 60+ messages in thread
[parent not found: <1339159026-15837-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <1339159026-15837-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-12 23:14 ` Greg KH [not found] ` <20120612231438.GA6177-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Greg KH @ 2012-06-12 23:14 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: > 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > --- > Changes since laster version: > - hcd transceiver renamed to phy Ick, I see patches all over this thread, and other threads, and I have no idea what to apply anywhere... So, consider all chipidea patches dropped from my queue now, can you please resend them to me, with the accumulated acks and reviewed-by line, so that I can queue them up? thanks, greg k-h -- 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] 60+ messages in thread
[parent not found: <20120612231438.GA6177-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <20120612231438.GA6177-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> @ 2012-06-13 6:23 ` Richard Zhao 2012-06-14 7:52 ` Alexander Shishkin 1 sibling, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-06-13 6:23 UTC (permalink / raw) To: Greg KH Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 On Tue, Jun 12, 2012 at 04:14:38PM -0700, Greg KH wrote: > On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: > > 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > > Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > > --- > > Changes since laster version: > > - hcd transceiver renamed to phy > > Ick, I see patches all over this thread, and other threads, and I have > no idea what to apply anywhere... I thought it only need small fix, but the fix became bigger and bigger. > > So, consider all chipidea patches dropped from my queue now, can you > please resend them to me, with the accumulated acks and reviewed-by > line, so that I can queue them up? I'll send out a new version series. Thanks for review. Richard > > thanks, > > greg k-h > -- 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] 60+ messages in thread
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <20120612231438.GA6177-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 2012-06-13 6:23 ` Richard Zhao @ 2012-06-14 7:52 ` Alexander Shishkin [not found] ` <8762au8h46.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 1 sibling, 1 reply; 60+ messages in thread From: Alexander Shishkin @ 2012-06-14 7:52 UTC (permalink / raw) To: Greg KH, Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> writes: > On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: >> 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> >> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> >> --- >> Changes since laster version: >> - hcd transceiver renamed to phy > > Ick, I see patches all over this thread, and other threads, and I have > no idea what to apply anywhere... > > So, consider all chipidea patches dropped from my queue now, can you > please resend them to me, with the accumulated acks and reviewed-by > line, so that I can queue them up? So will you pick these patches to your tree or should I apply them to mine or what is the plan? I kind of have a tree [1] for chipidea stuff where I have been collecting patches, to send a pull request to you for 3.6. [1] git://github.com/virtuoso/linux-ci.git ci Regards, -- Alex -- 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] 60+ messages in thread
[parent not found: <8762au8h46.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>]
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <8762au8h46.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> @ 2012-06-14 15:46 ` Greg KH [not found] ` <20120614154624.GF17140-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Greg KH @ 2012-06-14 15:46 UTC (permalink / raw) To: Alexander Shishkin Cc: Richard Zhao, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 On Thu, Jun 14, 2012 at 10:52:57AM +0300, Alexander Shishkin wrote: > Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> writes: > > > On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: > >> 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > >> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > >> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > >> --- > >> Changes since laster version: > >> - hcd transceiver renamed to phy > > > > Ick, I see patches all over this thread, and other threads, and I have > > no idea what to apply anywhere... > > > > So, consider all chipidea patches dropped from my queue now, can you > > please resend them to me, with the accumulated acks and reviewed-by > > line, so that I can queue them up? > > So will you pick these patches to your tree or should I apply them to > mine or what is the plan? I kind of have a tree [1] for chipidea stuff > where I have been collecting patches, to send a pull request to you for > 3.6. I do not accept pull requests for this code, sorry, I need patches in email. You and Richard work it out how you are going to handle this and then, send me patches that you both agree on. thanks, greg k-h -- 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] 60+ messages in thread
[parent not found: <20120614154624.GF17140-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <20120614154624.GF17140-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> @ 2012-06-15 2:46 ` Richard Zhao [not found] ` <20120615024625.GA26563-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-15 2:46 UTC (permalink / raw) To: Greg KH Cc: Alexander Shishkin, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 On Thu, Jun 14, 2012 at 08:46:24AM -0700, Greg KH wrote: > On Thu, Jun 14, 2012 at 10:52:57AM +0300, Alexander Shishkin wrote: > > Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> writes: > > > > > On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: > > >> 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > >> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > > >> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > > >> --- > > >> Changes since laster version: > > >> - hcd transceiver renamed to phy > > > > > > Ick, I see patches all over this thread, and other threads, and I have > > > no idea what to apply anywhere... > > > > > > So, consider all chipidea patches dropped from my queue now, can you > > > please resend them to me, with the accumulated acks and reviewed-by > > > line, so that I can queue them up? > > > > So will you pick these patches to your tree or should I apply them to > > mine or what is the plan? I kind of have a tree [1] for chipidea stuff > > where I have been collecting patches, to send a pull request to you for > > 3.6. > > I do not accept pull requests for this code, sorry, I need patches in > email. You and Richard work it out how you are going to handle this and > then, send me patches that you both agree on. So, Alex, Could you send out patch you queued? And I'll send out v6 patch series which depends on that. Is it ok for driver part? For arm platform part, it may need further discussion. Thanks Richard > > thanks, > > greg k-h > -- 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] 60+ messages in thread
[parent not found: <20120615024625.GA26563-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <20120615024625.GA26563-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-21 5:50 ` Richard Zhao [not found] ` <20120621055048.GA1582-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-21 5:50 UTC (permalink / raw) To: Greg KH Cc: Alexander Shishkin, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 On Fri, Jun 15, 2012 at 10:46:26AM +0800, Richard Zhao wrote: > On Thu, Jun 14, 2012 at 08:46:24AM -0700, Greg KH wrote: > > On Thu, Jun 14, 2012 at 10:52:57AM +0300, Alexander Shishkin wrote: > > > Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> writes: > > > > > > > On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: > > > >> 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > > >> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > > > >> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > > > >> --- > > > >> Changes since laster version: > > > >> - hcd transceiver renamed to phy > > > > > > > > Ick, I see patches all over this thread, and other threads, and I have > > > > no idea what to apply anywhere... > > > > > > > > So, consider all chipidea patches dropped from my queue now, can you > > > > please resend them to me, with the accumulated acks and reviewed-by > > > > line, so that I can queue them up? > > > > > > So will you pick these patches to your tree or should I apply them to > > > mine or what is the plan? I kind of have a tree [1] for chipidea stuff > > > where I have been collecting patches, to send a pull request to you for > > > 3.6. > > > > I do not accept pull requests for this code, sorry, I need patches in > > email. You and Richard work it out how you are going to handle this and > > then, send me patches that you both agree on. > So, Alex, Could you send out patch you queued? And I'll send out v6 > patch series which depends on that. Is it ok for driver part? All right, I'll send out all. Thanks Richard > > For arm platform part, it may need further discussion. > > Thanks > Richard > > > > thanks, > > > > greg k-h -- 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] 60+ messages in thread
[parent not found: <20120621055048.GA1582-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v4] usb: chipidea: permit driver bindings pass phy pointer [not found] ` <20120621055048.GA1582-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-21 6:44 ` Alexander Shishkin 0 siblings, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-21 6:44 UTC (permalink / raw) To: Richard Zhao, Greg KH Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > On Fri, Jun 15, 2012 at 10:46:26AM +0800, Richard Zhao wrote: >> On Thu, Jun 14, 2012 at 08:46:24AM -0700, Greg KH wrote: >> > On Thu, Jun 14, 2012 at 10:52:57AM +0300, Alexander Shishkin wrote: >> > > Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> writes: >> > > >> > > > On Fri, Jun 08, 2012 at 08:37:06PM +0800, Richard Zhao wrote: >> > > >> 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> > > >> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> >> > > >> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> >> > > >> --- >> > > >> Changes since laster version: >> > > >> - hcd transceiver renamed to phy >> > > > >> > > > Ick, I see patches all over this thread, and other threads, and I have >> > > > no idea what to apply anywhere... >> > > > >> > > > So, consider all chipidea patches dropped from my queue now, can you >> > > > please resend them to me, with the accumulated acks and reviewed-by >> > > > line, so that I can queue them up? >> > > >> > > So will you pick these patches to your tree or should I apply them to >> > > mine or what is the plan? I kind of have a tree [1] for chipidea stuff >> > > where I have been collecting patches, to send a pull request to you for >> > > 3.6. >> > >> > I do not accept pull requests for this code, sorry, I need patches in >> > email. You and Richard work it out how you are going to handle this and >> > then, send me patches that you both agree on. >> So, Alex, Could you send out patch you queued? And I'll send out v6 >> patch series which depends on that. Is it ok for driver part? > All right, I'll send out all. Yes, I think it's easiest if you send everything this time. Please make sure to rebase it on usb-next first, though. Regards, -- Alex -- 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] 60+ messages in thread
* [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 01/12] usb: otg: add notify_connect/notify_disconnect callback Richard Zhao 2012-05-25 2:24 ` [PATCH v3 02/12] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao [not found] ` <1337912665-16615-4-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 04/12] usb: otg: add basic mxs phy driver support Richard Zhao ` (11 subsequent siblings) 14 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 It still has below limitations: - it does not work for multi-phy ehci - the best place is after debounce, but I can't get phy there Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/usb/host/ehci-hcd.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index b100f5f..8c39a7a 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -928,6 +928,20 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) pstatus = ehci_readl(ehci, &ehci->regs->port_status[i]); + /* FIXME: + * - it does not work for multi-phy ehci + * - the best place is after debounce, but I can't get + * phy there + */ + if ((pstatus & PORT_CSC) && ehci->transceiver) { + if (pstatus & PORT_CONNECT) + usb_phy_notify_connect( + ehci->transceiver, i); + else + usb_phy_notify_disconnect( + ehci->transceiver, i); + } + if (pstatus & PORT_OWNER) continue; if (!(test_bit(i, &ehci->suspended_ports) && -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
[parent not found: <1337912665-16615-4-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <1337912665-16615-4-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-05 14:00 ` Alexander Shishkin [not found] ` <87y5o197tw.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-06-06 1:29 ` [PATCH v4] " Richard Zhao 1 sibling, 1 reply; 60+ messages in thread From: Alexander Shishkin @ 2012-06-05 14:00 UTC (permalink / raw) To: Alan Stern Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > It still has below limitations: > - it does not work for multi-phy ehci > - the best place is after debounce, but I can't get > phy there > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Alan, are you ok with this? > --- > drivers/usb/host/ehci-hcd.c | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > index b100f5f..8c39a7a 100644 > --- a/drivers/usb/host/ehci-hcd.c > +++ b/drivers/usb/host/ehci-hcd.c > @@ -928,6 +928,20 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) > pstatus = ehci_readl(ehci, > &ehci->regs->port_status[i]); > > + /* FIXME: > + * - it does not work for multi-phy ehci > + * - the best place is after debounce, but I can't get > + * phy there > + */ > + if ((pstatus & PORT_CSC) && ehci->transceiver) { > + if (pstatus & PORT_CONNECT) > + usb_phy_notify_connect( > + ehci->transceiver, i); > + else > + usb_phy_notify_disconnect( > + ehci->transceiver, i); > + } > + > if (pstatus & PORT_OWNER) > continue; > if (!(test_bit(i, &ehci->suspended_ports) && > -- > 1.7.5.4 Regards, -- Alex -- 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] 60+ messages in thread
[parent not found: <87y5o197tw.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <87y5o197tw.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> @ 2012-06-05 14:28 ` Alan Stern [not found] ` <Pine.LNX.4.44L0.1206051025540.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Alan Stern @ 2012-06-05 14:28 UTC (permalink / raw) To: Alexander Shishkin Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ On Tue, 5 Jun 2012, Alexander Shishkin wrote: > Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > > > It still has below limitations: > > - it does not work for multi-phy ehci > > - the best place is after debounce, but I can't get > > phy there > > > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > Alan, are you ok with this? > > > --- > > drivers/usb/host/ehci-hcd.c | 14 ++++++++++++++ > > 1 files changed, 14 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > > index b100f5f..8c39a7a 100644 > > --- a/drivers/usb/host/ehci-hcd.c > > +++ b/drivers/usb/host/ehci-hcd.c > > @@ -928,6 +928,20 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) > > pstatus = ehci_readl(ehci, > > &ehci->regs->port_status[i]); > > > > + /* FIXME: > > + * - it does not work for multi-phy ehci > > + * - the best place is after debounce, but I can't get > > + * phy there > > + */ > > + if ((pstatus & PORT_CSC) && ehci->transceiver) { Do the tests in the opposite order and add "unlikely": if (unlikely(ehci->transceiver && (pstatus & PORT_CSC)) { That way it will fail more quickly on systems where it doesn't apply or for unaffected ports. > > + if (pstatus & PORT_CONNECT) > > + usb_phy_notify_connect( > > + ehci->transceiver, i); > > + else > > + usb_phy_notify_disconnect( > > + ehci->transceiver, i); > > + } > > + > > if (pstatus & PORT_OWNER) > > continue; > > if (!(test_bit(i, &ehci->suspended_ports) && Otherwise it's okay. Alan Stern -- 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] 60+ messages in thread
[parent not found: <Pine.LNX.4.44L0.1206051025540.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <Pine.LNX.4.44L0.1206051025540.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> @ 2012-06-05 15:03 ` Marek Vasut [not found] ` <201206051703.17691.marex-ynQEQJNshbs@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Marek Vasut @ 2012-06-05 15:03 UTC (permalink / raw) To: Alan Stern Cc: Alexander Shishkin, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Dear Alan Stern, > On Tue, 5 Jun 2012, Alexander Shishkin wrote: > > Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > > > It still has below limitations: > > > - it does not work for multi-phy ehci > > > - the best place is after debounce, but I can't get > > > > > > phy there > > > > > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > > > Alan, are you ok with this? > > > > > --- > > > > > > drivers/usb/host/ehci-hcd.c | 14 ++++++++++++++ > > > 1 files changed, 14 insertions(+), 0 deletions(-) > > > > > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > > > index b100f5f..8c39a7a 100644 > > > --- a/drivers/usb/host/ehci-hcd.c > > > +++ b/drivers/usb/host/ehci-hcd.c > > > @@ -928,6 +928,20 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) > > > > > > pstatus = ehci_readl(ehci, > > > > > > &ehci->regs->port_status[i]); > > > > > > + /* FIXME: > > > + * - it does not work for multi-phy ehci > > > + * - the best place is after debounce, but I can't get > > > + * phy there > > > + */ > > > + if ((pstatus & PORT_CSC) && ehci->transceiver) { > > Do the tests in the opposite order and add "unlikely": > > if (unlikely(ehci->transceiver && > (pstatus & PORT_CSC)) { > > That way it will fail more quickly on systems where it doesn't apply or > for unaffected ports. Does this unlikely() have any effect on ARM/MIPS/PPC, where this chipidea IP is used ? Or is there some x86 device sporting this IP too? > > > + if (pstatus & PORT_CONNECT) > > > + usb_phy_notify_connect( > > > + ehci->transceiver, i); > > > + else > > > + usb_phy_notify_disconnect( > > > + ehci->transceiver, i); > > > + } > > > + > > > > > > if (pstatus & PORT_OWNER) > > > > > > continue; > > > > > > if (!(test_bit(i, &ehci->suspended_ports) && > > Otherwise it's okay. > > Alan Stern Best regards, Marek Vasut -- 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] 60+ messages in thread
[parent not found: <201206051703.17691.marex-ynQEQJNshbs@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <201206051703.17691.marex-ynQEQJNshbs@public.gmane.org> @ 2012-06-05 16:56 ` Alan Stern [not found] ` <Pine.LNX.4.44L0.1206051250400.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> 2012-06-06 8:28 ` Alexander Shishkin 1 sibling, 1 reply; 60+ messages in thread From: Alan Stern @ 2012-06-05 16:56 UTC (permalink / raw) To: Marek Vasut Cc: fabio.estevam-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, Alexander Shishkin, B29397-KZfg59tc24xl57MIdRCFDg, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-usb-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, richard.zhao-KZfg59tc24xl57MIdRCFDg, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w On Tue, 5 Jun 2012, Marek Vasut wrote: > > > > + /* FIXME: > > > > + * - it does not work for multi-phy ehci > > > > + * - the best place is after debounce, but I can't get > > > > + * phy there > > > > + */ > > > > + if ((pstatus & PORT_CSC) && ehci->transceiver) { > > > > Do the tests in the opposite order and add "unlikely": > > > > if (unlikely(ehci->transceiver && > > (pstatus & PORT_CSC)) { > > > > That way it will fail more quickly on systems where it doesn't apply or > > for unaffected ports. > > Does this unlikely() have any effect on ARM/MIPS/PPC, where this chipidea IP is > used ? Or is there some x86 device sporting this IP too? I don't know what unlikely() does on architectures other than x86. And I haven't heard of any x86 systems that would need to use this code. On the other hand, port-status changes don't occur very frequently. A little time penalty one way or the other won't make much difference. Alan Stern ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <Pine.LNX.4.44L0.1206051250400.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <Pine.LNX.4.44L0.1206051250400.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> @ 2012-06-05 17:23 ` Marek Vasut [not found] ` <201206051923.09063.marex-ynQEQJNshbs@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Marek Vasut @ 2012-06-05 17:23 UTC (permalink / raw) To: Alan Stern Cc: Alexander Shishkin, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Dear Alan Stern, > On Tue, 5 Jun 2012, Marek Vasut wrote: > > > > > + /* FIXME: > > > > > + * - it does not work for multi-phy ehci > > > > > + * - the best place is after debounce, but I can't get > > > > > + * phy there > > > > > + */ > > > > > + if ((pstatus & PORT_CSC) && ehci->transceiver) { > > > > > > Do the tests in the opposite order and add "unlikely": > > > if (unlikely(ehci->transceiver && > > > > > > (pstatus & PORT_CSC)) { > > > > > > That way it will fail more quickly on systems where it doesn't apply or > > > for unaffected ports. > > > > Does this unlikely() have any effect on ARM/MIPS/PPC, where this chipidea > > IP is used ? Or is there some x86 device sporting this IP too? > > I don't know what unlikely() does on architectures other than x86. It should be optimized out to nothing on anything else but x86. On x86 it is a hint for the branch predictor. Or that's what I believe it is. > And > I haven't heard of any x86 systems that would need to use this code. > > On the other hand, port-status changes don't occur very frequently. A > little time penalty one way or the other won't make much difference. I'm not opposed, just curious :) > Alan Stern Best regards, Marek Vasut -- 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] 60+ messages in thread
[parent not found: <201206051923.09063.marex-ynQEQJNshbs@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <201206051923.09063.marex-ynQEQJNshbs@public.gmane.org> @ 2012-06-05 17:30 ` Alan Stern [not found] ` <Pine.LNX.4.44L0.1206051328430.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Alan Stern @ 2012-06-05 17:30 UTC (permalink / raw) To: Marek Vasut Cc: Alexander Shishkin, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ On Tue, 5 Jun 2012, Marek Vasut wrote: > > > > Do the tests in the opposite order and add "unlikely": > > > > if (unlikely(ehci->transceiver && > > > > > > > > (pstatus & PORT_CSC)) { > > > > > > > > That way it will fail more quickly on systems where it doesn't apply or > > > > for unaffected ports. > > > > > > Does this unlikely() have any effect on ARM/MIPS/PPC, where this chipidea > > > IP is used ? Or is there some x86 device sporting this IP too? > > > > I don't know what unlikely() does on architectures other than x86. > > It should be optimized out to nothing on anything else but x86. On x86 it is a > hint for the branch predictor. Or that's what I believe it is. That's right. Then it should have no effect on ARM/MIPS/PPC. > > And > > I haven't heard of any x86 systems that would need to use this code. > > > > On the other hand, port-status changes don't occur very frequently. A > > little time penalty one way or the other won't make much difference. > > I'm not opposed, just curious :) No big deal either way. But the order of the tests should be switched, because on most systems, ehci->transceiver will be NULL. Alan Stern -- 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] 60+ messages in thread
[parent not found: <Pine.LNX.4.44L0.1206051328430.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>]
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <Pine.LNX.4.44L0.1206051328430.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> @ 2012-06-06 1:27 ` Richard Zhao 0 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-06-06 1:27 UTC (permalink / raw) To: Alan Stern Cc: Marek Vasut, Alexander Shishkin, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ On Tue, Jun 05, 2012 at 01:30:08PM -0400, Alan Stern wrote: > On Tue, 5 Jun 2012, Marek Vasut wrote: > > > > > > Do the tests in the opposite order and add "unlikely": > > > > > if (unlikely(ehci->transceiver && > > > > > > > > > > (pstatus & PORT_CSC)) { > > > > > > > > > > That way it will fail more quickly on systems where it doesn't apply or > > > > > for unaffected ports. > > > > > > > > Does this unlikely() have any effect on ARM/MIPS/PPC, where this chipidea > > > > IP is used ? Or is there some x86 device sporting this IP too? > > > > > > I don't know what unlikely() does on architectures other than x86. > > > > It should be optimized out to nothing on anything else but x86. On x86 it is a > > hint for the branch predictor. Or that's what I believe it is. > > That's right. Then it should have no effect on ARM/MIPS/PPC. I prefer add the unlikely, we don't need to care about the arch implementation. Maybe it'll be implemented some day if it don't. and at least the code tell the reader the condition is unlikely. I'll post a update to this series. Thanks Richard > > > > And > > > I haven't heard of any x86 systems that would need to use this code. > > > > > > On the other hand, port-status changes don't occur very frequently. A > > > little time penalty one way or the other won't make much difference. > > > > I'm not opposed, just curious :) > > No big deal either way. But the order of the tests should be switched, > because on most systems, ehci->transceiver will be NULL. > > Alan Stern > > -- 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] 60+ messages in thread
* Re: [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change [not found] ` <201206051703.17691.marex-ynQEQJNshbs@public.gmane.org> 2012-06-05 16:56 ` Alan Stern @ 2012-06-06 8:28 ` Alexander Shishkin 1 sibling, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-06 8:28 UTC (permalink / raw) To: Marek Vasut, Alan Stern Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> writes: > Does this unlikely() have any effect on ARM/MIPS/PPC, where this chipidea IP is > used ? Or is there some x86 device sporting this IP too? Of course there is. :) Regards, -- Alex -- 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] 60+ messages in thread
* [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <1337912665-16615-4-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-05 14:00 ` Alexander Shishkin @ 2012-06-06 1:29 ` Richard Zhao [not found] ` <1338946190-19105-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 1 sibling, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-06 1:29 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 It still has below limitations: - it does not work for multi-phy ehci - the best place is after debounce, but I can't get phy there Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/usb/host/ehci-hcd.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index b100f5f..724ac471 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -928,6 +928,21 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) pstatus = ehci_readl(ehci, &ehci->regs->port_status[i]); + /* FIXME: + * - it does not work for multi-phy ehci + * - the best place is after debounce, but I can't get + * phy there + */ + if (unlikely(ehci->transceiver && + (pstatus & PORT_CSC))) { + if (pstatus & PORT_CONNECT) + usb_phy_notify_connect( + ehci->transceiver, i); + else + usb_phy_notify_disconnect( + ehci->transceiver, i); + } + if (pstatus & PORT_OWNER) continue; if (!(test_bit(i, &ehci->suspended_ports) && -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
[parent not found: <1338946190-19105-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <1338946190-19105-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-06 9:39 ` Alexander Shishkin [not found] ` <87mx4g93tg.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-06-06 14:19 ` Alan Stern 2012-06-08 12:32 ` [PATCH 1/2] USB: move transceiver from ehci_hcd and ohci_hcd to hcd and rename it as phy Richard Zhao 2 siblings, 1 reply; 60+ messages in thread From: Alexander Shishkin @ 2012-06-06 9:39 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > It still has below limitations: > - it does not work for multi-phy ehci > - the best place is after debounce, but I can't get > phy there > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > --- > drivers/usb/host/ehci-hcd.c | 15 +++++++++++++++ > 1 files changed, 15 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > index b100f5f..724ac471 100644 > --- a/drivers/usb/host/ehci-hcd.c > +++ b/drivers/usb/host/ehci-hcd.c > @@ -928,6 +928,21 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) > pstatus = ehci_readl(ehci, > &ehci->regs->port_status[i]); > > + /* FIXME: > + * - it does not work for multi-phy ehci > + * - the best place is after debounce, but I can't get > + * phy there > + */ > + if (unlikely(ehci->transceiver && > + (pstatus & PORT_CSC))) { I don't think you need parens around (pstatus & PORT_CSC), since it should already have higher precedence. > + if (pstatus & PORT_CONNECT) > + usb_phy_notify_connect( > + ehci->transceiver, i); > + else > + usb_phy_notify_disconnect( > + ehci->transceiver, i); > + } > + > if (pstatus & PORT_OWNER) > continue; > if (!(test_bit(i, &ehci->suspended_ports) && > -- > 1.7.5.4 -- 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] 60+ messages in thread
[parent not found: <87mx4g93tg.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>]
* Re: [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <87mx4g93tg.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> @ 2012-06-06 11:05 ` Richard Zhao [not found] ` <20120606110539.GA5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-06 11:05 UTC (permalink / raw) To: Alexander Shishkin Cc: marex-ynQEQJNshbs, B20596-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, fabio.estevam-KZfg59tc24xl57MIdRCFDg, B29397-KZfg59tc24xl57MIdRCFDg, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-usb-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w On Wed, Jun 06, 2012 at 12:39:55PM +0300, Alexander Shishkin wrote: > Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > > > It still has below limitations: > > - it does not work for multi-phy ehci > > - the best place is after debounce, but I can't get > > phy there > > > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > --- > > drivers/usb/host/ehci-hcd.c | 15 +++++++++++++++ > > 1 files changed, 15 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > > index b100f5f..724ac471 100644 > > --- a/drivers/usb/host/ehci-hcd.c > > +++ b/drivers/usb/host/ehci-hcd.c > > @@ -928,6 +928,21 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) > > pstatus = ehci_readl(ehci, > > &ehci->regs->port_status[i]); > > > > + /* FIXME: > > + * - it does not work for multi-phy ehci > > + * - the best place is after debounce, but I can't get > > + * phy there > > + */ > > + if (unlikely(ehci->transceiver && > > + (pstatus & PORT_CSC))) { > > I don't think you need parens around (pstatus & PORT_CSC), since it > should already have higher precedence. But it's more readable. Isn't it? Thanks Richard ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <20120606110539.GA5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <20120606110539.GA5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-06 11:27 ` Alexander Shishkin 0 siblings, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-06 11:27 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > On Wed, Jun 06, 2012 at 12:39:55PM +0300, Alexander Shishkin wrote: >> Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: >> >> > It still has below limitations: >> > - it does not work for multi-phy ehci >> > - the best place is after debounce, but I can't get >> > phy there >> > >> > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> > --- >> > drivers/usb/host/ehci-hcd.c | 15 +++++++++++++++ >> > 1 files changed, 15 insertions(+), 0 deletions(-) >> > >> > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c >> > index b100f5f..724ac471 100644 >> > --- a/drivers/usb/host/ehci-hcd.c >> > +++ b/drivers/usb/host/ehci-hcd.c >> > @@ -928,6 +928,21 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) >> > pstatus = ehci_readl(ehci, >> > &ehci->regs->port_status[i]); >> > >> > + /* FIXME: >> > + * - it does not work for multi-phy ehci >> > + * - the best place is after debounce, but I can't get >> > + * phy there >> > + */ >> > + if (unlikely(ehci->transceiver && >> > + (pstatus & PORT_CSC))) { >> >> I don't think you need parens around (pstatus & PORT_CSC), since it >> should already have higher precedence. > But it's more readable. Isn't it? I guess it is. Regards, -- Alex -- 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] 60+ messages in thread
* Re: [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <1338946190-19105-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-06 9:39 ` Alexander Shishkin @ 2012-06-06 14:19 ` Alan Stern 2012-06-07 2:04 ` Chen Peter-B29397 2012-06-08 12:32 ` [PATCH 1/2] USB: move transceiver from ehci_hcd and ohci_hcd to hcd and rename it as phy Richard Zhao 2 siblings, 1 reply; 60+ messages in thread From: Alan Stern @ 2012-06-06 14:19 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 On Wed, 6 Jun 2012, Richard Zhao wrote: > It still has below limitations: > - it does not work for multi-phy ehci > - the best place is after debounce, but I can't get > phy there > + /* FIXME: > + * - it does not work for multi-phy ehci > + * - the best place is after debounce, but I can't get > + * phy there > + */ > + if (unlikely(ehci->transceiver && > + (pstatus & PORT_CSC))) { A new thought... If you move the transceiver pointer from struct ehci_hcd to struct usb_hcd, then you _will_ be able to get at it from within the debouncing routine. Or if you prefer, leave the pointer where it is and add a method to struct hc_driver for retrieving the pointer. Alan Stern -- 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] 60+ messages in thread
* RE: [PATCH v4] usb: ehci-hcd: notify phy when connect change 2012-06-06 14:19 ` Alan Stern @ 2012-06-07 2:04 ` Chen Peter-B29397 [not found] ` <F281D0F91ED19E4D8E63A7504E8A649803BDB929-RL0Hj/+nBVDtkydW1Tv2Dq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Chen Peter-B29397 @ 2012-06-07 2:04 UTC (permalink / raw) To: Alan Stern, Zhao Richard-B20223 Cc: marex@denx.de, Li Frank-B20596, dong.aisheng@linaro.org, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org, linux-usb@vger.kernel.org, balbi@ti.com, kernel@pengutronix.de, Estevam Fabio-R49496, shawn.guo@linaro.org, linux-arm-kernel@lists.infradead.org, linuxzsc@gmail.com > > > It still has below limitations: > > - it does not work for multi-phy ehci > > - the best place is after debounce, but I can't get > > phy there > > > + /* FIXME: > > + * - it does not work for multi-phy ehci > > + * - the best place is after debounce, but I can't get > > + * phy there > > + */ > > + if (unlikely(ehci->transceiver && > > + (pstatus & PORT_CSC))) { > > A new thought... If you move the transceiver pointer from struct > ehci_hcd to struct usb_hcd, then you _will_ be able to get at it from > within the debouncing routine. > Good suggestion, after that the driver can add PHY operation(quirk or not) during the whole usb host life periods. > Or if you prefer, leave the pointer where it is and add a method to > struct hc_driver for retrieving the pointer. > > Alan Stern > ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <F281D0F91ED19E4D8E63A7504E8A649803BDB929-RL0Hj/+nBVDtkydW1Tv2Dq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>]
* Re: [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <F281D0F91ED19E4D8E63A7504E8A649803BDB929-RL0Hj/+nBVDtkydW1Tv2Dq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org> @ 2012-06-07 2:43 ` Richard Zhao [not found] ` <20120607024328.GB5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-07 2:43 UTC (permalink / raw) To: Chen Peter-B29397 Cc: Alan Stern, Zhao Richard-B20223, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Li Frank-B20596, marex-ynQEQJNshbs@public.gmane.org, shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, Estevam Fabio-R49496, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, balbi-l0cyMroinI0@public.gmane.org On Thu, Jun 07, 2012 at 10:04:00AM +0800, Chen Peter-B29397 wrote: > > > > > > It still has below limitations: > > > - it does not work for multi-phy ehci > > > - the best place is after debounce, but I can't get > > > phy there > > > > > + /* FIXME: > > > + * - it does not work for multi-phy ehci > > > + * - the best place is after debounce, but I can't get > > > + * phy there > > > + */ > > > + if (unlikely(ehci->transceiver && > > > + (pstatus & PORT_CSC))) { > > > > A new thought... If you move the transceiver pointer from struct > > ehci_hcd to struct usb_hcd, then you _will_ be able to get at it from > > within the debouncing routine. > > > Good suggestion, after that the driver can add PHY operation(quirk or not) > during the whole usb host life periods. Since it makes it more generic, I'm considering: - change variable name from transceiver to phy - Do we need considering phy on hub? I prefer HCD phy only. - Do we need supporting multi-phy for one hcd? I don't know multi-phy case, so I prefer one phy one hcd. Thanks Richard > > > Or if you prefer, leave the pointer where it is and add a method to > > struct hc_driver for retrieving the pointer. > > > > Alan Stern > > > -- 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] 60+ messages in thread
[parent not found: <20120607024328.GB5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* RE: [PATCH v4] usb: ehci-hcd: notify phy when connect change [not found] ` <20120607024328.GB5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-07 3:14 ` Chen Peter-B29397 0 siblings, 0 replies; 60+ messages in thread From: Chen Peter-B29397 @ 2012-06-07 3:14 UTC (permalink / raw) To: Zhao Richard-B20223 Cc: Alan Stern, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Li Frank-B20596, marex-ynQEQJNshbs@public.gmane.org, shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, Estevam Fabio-R49496, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, balbi-l0cyMroinI0@public.gmane.org > > > > > > > + /* FIXME: > > > > + * - it does not work for multi-phy ehci > > > > + * - the best place is after debounce, but I > can't get > > > > + * phy there > > > > + */ > > > > + if (unlikely(ehci->transceiver && > > > > + (pstatus & PORT_CSC))) { > > > > > > A new thought... If you move the transceiver pointer from struct > > > ehci_hcd to struct usb_hcd, then you _will_ be able to get at it from > > > within the debouncing routine. > > > > > Good suggestion, after that the driver can add PHY operation(quirk or > not) > > during the whole usb host life periods. > Since it makes it more generic, I'm considering: > - change variable name from transceiver to phy > - Do we need considering phy on hub? I prefer HCD phy only. > - Do we need supporting multi-phy for one hcd? I don't know multi-phy > case, so I prefer one phy one hcd. > I suggest that you can do it at next patchset. This patchset is just add phy notify to ehci hcd interrupt handler. At next patchset, you can refine and improve PHY operation at the whole hcd. I am not sure Alan's suggestion. -- 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] 60+ messages in thread
* [PATCH 1/2] USB: move transceiver from ehci_hcd and ohci_hcd to hcd and rename it as phy [not found] ` <1338946190-19105-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-06 9:39 ` Alexander Shishkin 2012-06-06 14:19 ` Alan Stern @ 2012-06-08 12:32 ` Richard Zhao [not found] ` <1339158749-15634-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-08 12:32 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: marex-ynQEQJNshbs, B20596-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, fabio.estevam-KZfg59tc24xl57MIdRCFDg, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, B29397-KZfg59tc24xl57MIdRCFDg, balbi-l0cyMroinI0, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w - to decrease redundant since both ehci_hcd and ohci_hcd have the same variable - it helps access phy in usb core code - phy is more meaningful than transceiver Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/usb/host/ehci-fsl.c | 21 ++++++++++----------- drivers/usb/host/ehci-hub.c | 2 +- drivers/usb/host/ehci.h | 4 ---- drivers/usb/host/ohci-omap.c | 27 ++++++++++++++------------- drivers/usb/host/ohci.h | 5 ----- include/linux/usb/hcd.h | 6 ++++++ 6 files changed, 31 insertions(+), 34 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 4336257..3379945 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -142,19 +142,19 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, if (pdata->operating_mode == FSL_USB2_DR_OTG) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); - ehci->transceiver = usb_get_transceiver(); - dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, transceiver=0x%p\n", - hcd, ehci, ehci->transceiver); + hcd->phy = usb_get_transceiver(); + dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", + hcd, ehci, hcd->phy); - if (ehci->transceiver) { - retval = otg_set_host(ehci->transceiver->otg, + if (hcd->phy) { + retval = otg_set_host(hcd->phy->otg, &ehci_to_hcd(ehci)->self); if (retval) { - usb_put_transceiver(ehci->transceiver); + usb_put_transceiver(hcd->phy); goto err4; } } else { - dev_err(&pdev->dev, "can't find transceiver\n"); + dev_err(&pdev->dev, "can't find phy\n"); retval = -ENODEV; goto err4; } @@ -190,11 +190,10 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd, struct platform_device *pdev) { struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; - struct ehci_hcd *ehci = hcd_to_ehci(hcd); - if (ehci->transceiver) { - otg_set_host(ehci->transceiver->otg, NULL); - usb_put_transceiver(ehci->transceiver); + if (hcd->phy) { + otg_set_host(hcd->phy->otg, NULL); + usb_put_transceiver(hcd->phy); } usb_remove_hcd(hcd); diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index fc9e7cc..dd5eef6 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -724,7 +724,7 @@ static int ehci_hub_control ( #ifdef CONFIG_USB_OTG if ((hcd->self.otg_port == (wIndex + 1)) && hcd->self.b_hnp_enable) { - otg_start_hnp(ehci->transceiver->otg); + otg_start_hnp(hcd->phy->otg); break; } #endif diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 2694ed6..85c3572 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -175,10 +175,6 @@ struct ehci_hcd { /* one per controller */ #ifdef DEBUG struct dentry *debug_dir; #endif - /* - * OTG controllers and transceivers need software interaction - */ - struct usb_phy *transceiver; }; /* convert between an HCD pointer and the corresponding EHCI_HCD */ diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 9ce35d0..eccddb4 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -167,14 +167,15 @@ static int omap_1510_local_bus_init(void) static void start_hnp(struct ohci_hcd *ohci) { - const unsigned port = ohci_to_hcd(ohci)->self.otg_port - 1; + struct usb_hcd *hcd = ohci_to_hcd(ohci); + const unsigned port = hcd->self.otg_port - 1; unsigned long flags; u32 l; - otg_start_hnp(ohci->transceiver->otg); + otg_start_hnp(hcd->phy->otg); local_irq_save(flags); - ohci->transceiver->state = OTG_STATE_A_SUSPEND; + hcd->phy->state = OTG_STATE_A_SUSPEND; writel (RH_PS_PSS, &ohci->regs->roothub.portstatus [port]); l = omap_readl(OTG_CTRL); l &= ~OTG_A_BUSREQ; @@ -211,18 +212,18 @@ static int ohci_omap_init(struct usb_hcd *hcd) #ifdef CONFIG_USB_OTG if (need_transceiver) { - ohci->transceiver = usb_get_transceiver(); - if (ohci->transceiver) { - int status = otg_set_host(ohci->transceiver->otg, + hcd->phy = usb_get_transceiver(); + if (hcd->phy) { + int status = otg_set_host(hcd->phy->otg, &ohci_to_hcd(ohci)->self); - dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n", - ohci->transceiver->label, status); + dev_dbg(hcd->self.controller, "init %s phy, status %d\n", + hcd->phy->label, status); if (status) { - usb_put_transceiver(ohci->transceiver); + usb_put_transceiver(hcd->phy); return status; } } else { - dev_err(hcd->self.controller, "can't find transceiver\n"); + dev_err(hcd->self.controller, "can't find phy\n"); return -ENODEV; } ohci->start_hnp = start_hnp; @@ -403,9 +404,9 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) struct ohci_hcd *ohci = hcd_to_ohci (hcd); usb_remove_hcd(hcd); - if (ohci->transceiver) { - (void) otg_set_host(ohci->transceiver->otg, 0); - usb_put_transceiver(ohci->transceiver); + if (hcd->phy) { + (void) otg_set_host(hcd->phy->otg, 0); + usb_put_transceiver(hcd->phy); } if (machine_is_omap_osk()) gpio_free(9); diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 1b19aea..d329914 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -372,11 +372,6 @@ struct ohci_hcd { struct ed *ed_controltail; /* last in ctrl list */ struct ed *periodic [NUM_INTS]; /* shadow int_table */ - /* - * OTG controllers and transceivers need software interaction; - * other external transceivers should be software-transparent - */ - struct usb_phy *transceiver; void (*start_hnp)(struct ohci_hcd *ohci); /* diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 7f855d5..c532cbe 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -93,6 +93,12 @@ struct usb_hcd { */ const struct hc_driver *driver; /* hw-specific hooks */ + /* + * OTG and some Host controllers need software interaction with phys; + * other external phys should be software-transparent + */ + struct usb_phy *phy; + /* Flags that need to be manipulated atomically because they can * change while the host controller is running. Always use * set_bit() or clear_bit() to change their values. -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 60+ messages in thread
[parent not found: <1339158749-15634-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* [PATCH v5 2/2] USB: notify phy when root hub port connect change [not found] ` <1339158749-15634-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-08 12:32 ` Richard Zhao 0 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-06-08 12:32 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: marex-ynQEQJNshbs, B20596-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, fabio.estevam-KZfg59tc24xl57MIdRCFDg, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, B29397-KZfg59tc24xl57MIdRCFDg, balbi-l0cyMroinI0, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w Phy may need to change settings when port connect change. Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/usb/core/hub.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 04fb834..e1a6d31 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -20,6 +20,7 @@ #include <linux/usb.h> #include <linux/usbdevice_fs.h> #include <linux/usb/hcd.h> +#include <linux/usb/otg.h> #include <linux/usb/quirks.h> #include <linux/kthread.h> #include <linux/mutex.h> @@ -4034,6 +4035,13 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, } } + if (unlikely(hcd->phy && !hdev->level)) { + if (portstatus & USB_PORT_STAT_CONNECTION) + usb_phy_notify_connect(hcd->phy, port1); + else + usb_phy_notify_disconnect(hcd->phy, port1); + } + /* Return now if debouncing failed or nothing is connected or * the device was "removed". */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 60+ messages in thread
* [PATCH v3 04/12] usb: otg: add basic mxs phy driver support [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (2 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao [not found] ` <1337912665-16615-5-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 05/12] usb: chipidea: add imx platform driver Richard Zhao ` (10 subsequent siblings) 14 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- Documentation/devicetree/bindings/usb/mxs-phy.txt | 13 ++ drivers/usb/otg/Kconfig | 8 + drivers/usb/otg/Makefile | 1 + drivers/usb/otg/mxs-phy.c | 204 +++++++++++++++++++++ 4 files changed, 226 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/mxs-phy.txt create mode 100644 drivers/usb/otg/mxs-phy.c diff --git a/Documentation/devicetree/bindings/usb/mxs-phy.txt b/Documentation/devicetree/bindings/usb/mxs-phy.txt new file mode 100644 index 0000000..5835b27 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mxs-phy.txt @@ -0,0 +1,13 @@ +* Freescale MXS USB Phy Device + +Required properties: +- compatible: Should be "fsl,imx23-usbphy" +- reg: Should contain registers location and length +- interrupts: Should contain phy interrupt + +Example: +usbphy1: usbphy@020c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + interrupts = <0 44 0x04>; +}; diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index 5c87db0..3a9bc44 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig @@ -116,6 +116,14 @@ config FSL_USB2_OTG help Enable this to support Freescale USB OTG transceiver. +config USB_MXS_PHY + tristate "Freescale MXS USB PHY support" + select USB_OTG_UTILS + help + Enable this to support the Freescale MXS USB PHY. + + MXS Phy is used by some of the i.MX SoCs, for example imx23/28/6x. + config USB_MV_OTG tristate "Marvell USB OTG support" depends on USB_EHCI_MV && USB_MV_UDC && USB_SUSPEND diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile index 41aa509..a844b8d 100644 --- a/drivers/usb/otg/Makefile +++ b/drivers/usb/otg/Makefile @@ -20,4 +20,5 @@ obj-$(CONFIG_USB_MSM_OTG) += msm_otg.o obj-$(CONFIG_AB8500_USB) += ab8500-usb.o fsl_usb2_otg-objs := fsl_otg.o otg_fsm.o obj-$(CONFIG_FSL_USB2_OTG) += fsl_usb2_otg.o +obj-$(CONFIG_USB_MXS_PHY) += mxs-phy.o obj-$(CONFIG_USB_MV_OTG) += mv_otg.o diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c new file mode 100644 index 0000000..a55aaed --- /dev/null +++ b/drivers/usb/otg/mxs-phy.c @@ -0,0 +1,204 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * Copyright (C) 2012 Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> + * on behalf of DENX Software Engineering GmbH + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/clk.h> +#include <linux/usb/otg.h> +#include <linux/delay.h> +#include <linux/err.h> +#include <linux/io.h> + +#define DRIVER_NAME "mxs_phy" + +#define HW_USBPHY_PWD 0x00 +#define HW_USBPHY_CTRL 0x30 +#define HW_USBPHY_CTRL_SET 0x34 +#define HW_USBPHY_CTRL_CLR 0x38 + +#define BM_USBPHY_CTRL_SFTRST BIT(31) +#define BM_USBPHY_CTRL_CLKGATE BIT(30) +#define BM_USBPHY_CTRL_ENUTMILEVEL3 BIT(15) +#define BM_USBPHY_CTRL_ENUTMILEVEL2 BIT(14) +#define BM_USBPHY_CTRL_ENHOSTDISCONDETECT BIT(1) + +struct mxs_phy { + struct usb_phy phy; + struct clk *clk; + int connected:1; +}; + +#define to_mxs_phy(p) container_of((p), struct mxs_phy, phy) + +static void mxs_phy_hw_init(struct mxs_phy *mxs_phy) +{ + void __iomem *base = mxs_phy->phy.io_priv; + + writel_relaxed(BM_USBPHY_CTRL_CLKGATE, base + HW_USBPHY_CTRL_CLR); + + /* Reset USBPHY module */ + writel_relaxed(BM_USBPHY_CTRL_SFTRST, base + HW_USBPHY_CTRL_SET); + udelay(10); + + /* Remove CLKGATE and SFTRST */ + writel_relaxed(BM_USBPHY_CTRL_CLKGATE | BM_USBPHY_CTRL_SFTRST, + base + HW_USBPHY_CTRL_CLR); + udelay(10); + + /* Power up the PHY */ + writel_relaxed(0, base + HW_USBPHY_PWD); + + /* enable FS/LS device */ + writel_relaxed(BM_USBPHY_CTRL_ENUTMILEVEL2 | + BM_USBPHY_CTRL_ENUTMILEVEL3, + base + HW_USBPHY_CTRL_SET); + +} + +static int mxs_phy_init(struct usb_phy *phy) +{ + struct mxs_phy *mxs_phy = to_mxs_phy(phy); + + clk_prepare_enable(mxs_phy->clk); + mxs_phy_hw_init(mxs_phy); + + return 0; +} + +static void mxs_phy_shutdown(struct usb_phy *phy) +{ + struct mxs_phy *mxs_phy = to_mxs_phy(phy); + + writel_relaxed(BM_USBPHY_CTRL_CLKGATE, + phy->io_priv + HW_USBPHY_CTRL_SET); + + clk_disable_unprepare(mxs_phy->clk); +} + +static int mxs_phy_on_connect(struct usb_phy *phy, int port) +{ + struct mxs_phy *mxs_phy = to_mxs_phy(phy); + + dev_dbg(phy->dev, "Connect on port %d\n", port); + + if (mxs_phy->connected) + return 0; + mxs_phy_hw_init(to_mxs_phy(phy)); + writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, + phy->io_priv + HW_USBPHY_CTRL_SET); + mxs_phy->connected = 1; + + return 0; +} + +static int mxs_phy_on_disconnect(struct usb_phy *phy, int port) +{ + struct mxs_phy *mxs_phy = to_mxs_phy(phy); + + dev_dbg(phy->dev, "Disconnect on port %d\n", port); + + if (!mxs_phy->connected) + return 0; + writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, + phy->io_priv + HW_USBPHY_CTRL_CLR); + mxs_phy->connected = 0; + + return 0; +} + +static int mxs_phy_probe(struct platform_device *pdev) +{ + struct resource *res; + void __iomem *base; + struct clk *clk; + struct mxs_phy *mxs_phy; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "can't get device resources\n"); + return -ENOENT; + } + + base = devm_request_and_ioremap(&pdev->dev, res); + if (!base) + return -EBUSY; + + clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(clk)) { + dev_err(&pdev->dev, "can't get the clock!"); + return PTR_ERR(clk); + } + + mxs_phy = devm_kzalloc(&pdev->dev, sizeof(*mxs_phy), GFP_KERNEL); + if (!mxs_phy) { + dev_err(&pdev->dev, "Failed to allocate USB PHY structure!\n"); + return -ENOMEM; + } + + mxs_phy->phy.io_priv = base; + mxs_phy->phy.dev = &pdev->dev; + mxs_phy->phy.label = DRIVER_NAME; + mxs_phy->phy.init = mxs_phy_init; + mxs_phy->phy.shutdown = mxs_phy_shutdown; + mxs_phy->phy.notify_connect = mxs_phy_on_connect; + mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect; + + ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier); + + mxs_phy->clk = clk; + + platform_set_drvdata(pdev, &mxs_phy->phy); + + return 0; +} + +static int __devexit mxs_phy_remove(struct platform_device *pdev) +{ + platform_set_drvdata(pdev, NULL); + + return 0; +} + +static const struct of_device_id mxs_phy_dt_ids[] = { + { .compatible = "fsl,imx23-usbphy", }, + { /* sentinel */ } +}; + +static struct platform_driver mxs_phy_driver = { + .probe = mxs_phy_probe, + .remove = __devexit_p(mxs_phy_remove), + .driver = { + .name = DRIVER_NAME, + .owner = THIS_MODULE, + .of_match_table = mxs_phy_dt_ids, + }, +}; + +static int __init mxs_phy_module_init(void) +{ + return platform_driver_register(&mxs_phy_driver); +} +postcore_initcall(mxs_phy_module_init); + +static void __exit mxs_phy_module_exit(void) +{ + platform_driver_unregister(&mxs_phy_driver); +} +module_exit(mxs_phy_module_exit); + +MODULE_ALIAS("platform:mxs-usb-phy"); +MODULE_AUTHOR("Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>"); +MODULE_AUTHOR("Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>"); +MODULE_DESCRIPTION("Freescale MXS USB PHY driver"); +MODULE_LICENSE("GPL"); -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
[parent not found: <1337912665-16615-5-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v3 04/12] usb: otg: add basic mxs phy driver support [not found] ` <1337912665-16615-5-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-06-06 8:51 ` Felipe Balbi 0 siblings, 0 replies; 60+ messages in thread From: Felipe Balbi @ 2012-06-06 8:51 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen [-- Attachment #1: Type: text/plain, Size: 8738 bytes --] On Fri, May 25, 2012 at 10:24:17AM +0800, Richard Zhao wrote: > 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.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > --- > Documentation/devicetree/bindings/usb/mxs-phy.txt | 13 ++ > drivers/usb/otg/Kconfig | 8 + > drivers/usb/otg/Makefile | 1 + > drivers/usb/otg/mxs-phy.c | 204 +++++++++++++++++++++ > 4 files changed, 226 insertions(+), 0 deletions(-) > create mode 100644 Documentation/devicetree/bindings/usb/mxs-phy.txt > create mode 100644 drivers/usb/otg/mxs-phy.c > > diff --git a/Documentation/devicetree/bindings/usb/mxs-phy.txt b/Documentation/devicetree/bindings/usb/mxs-phy.txt > new file mode 100644 > index 0000000..5835b27 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/mxs-phy.txt > @@ -0,0 +1,13 @@ > +* Freescale MXS USB Phy Device > + > +Required properties: > +- compatible: Should be "fsl,imx23-usbphy" > +- reg: Should contain registers location and length > +- interrupts: Should contain phy interrupt > + > +Example: > +usbphy1: usbphy@020c9000 { > + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; > + reg = <0x020c9000 0x1000>; > + interrupts = <0 44 0x04>; > +}; > diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig > index 5c87db0..3a9bc44 100644 > --- a/drivers/usb/otg/Kconfig > +++ b/drivers/usb/otg/Kconfig > @@ -116,6 +116,14 @@ config FSL_USB2_OTG > help > Enable this to support Freescale USB OTG transceiver. > > +config USB_MXS_PHY > + tristate "Freescale MXS USB PHY support" > + select USB_OTG_UTILS > + help > + Enable this to support the Freescale MXS USB PHY. > + > + MXS Phy is used by some of the i.MX SoCs, for example imx23/28/6x. > + > config USB_MV_OTG > tristate "Marvell USB OTG support" > depends on USB_EHCI_MV && USB_MV_UDC && USB_SUSPEND > diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile > index 41aa509..a844b8d 100644 > --- a/drivers/usb/otg/Makefile > +++ b/drivers/usb/otg/Makefile > @@ -20,4 +20,5 @@ obj-$(CONFIG_USB_MSM_OTG) += msm_otg.o > obj-$(CONFIG_AB8500_USB) += ab8500-usb.o > fsl_usb2_otg-objs := fsl_otg.o otg_fsm.o > obj-$(CONFIG_FSL_USB2_OTG) += fsl_usb2_otg.o > +obj-$(CONFIG_USB_MXS_PHY) += mxs-phy.o > obj-$(CONFIG_USB_MV_OTG) += mv_otg.o > diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c > new file mode 100644 > index 0000000..a55aaed > --- /dev/null > +++ b/drivers/usb/otg/mxs-phy.c > @@ -0,0 +1,204 @@ > +/* > + * Copyright 2012 Freescale Semiconductor, Inc. > + * Copyright (C) 2012 Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > + * on behalf of DENX Software Engineering GmbH > + * > + * The code contained herein is licensed under the GNU General Public > + * License. You may obtain a copy of the GNU General Public License > + * Version 2 or later at the following locations: > + * > + * http://www.opensource.org/licenses/gpl-license.html > + * http://www.gnu.org/copyleft/gpl.html > + */ > + > +#include <linux/module.h> > +#include <linux/kernel.h> > +#include <linux/platform_device.h> > +#include <linux/clk.h> > +#include <linux/usb/otg.h> > +#include <linux/delay.h> > +#include <linux/err.h> > +#include <linux/io.h> > + > +#define DRIVER_NAME "mxs_phy" > + > +#define HW_USBPHY_PWD 0x00 > +#define HW_USBPHY_CTRL 0x30 > +#define HW_USBPHY_CTRL_SET 0x34 > +#define HW_USBPHY_CTRL_CLR 0x38 > + > +#define BM_USBPHY_CTRL_SFTRST BIT(31) > +#define BM_USBPHY_CTRL_CLKGATE BIT(30) > +#define BM_USBPHY_CTRL_ENUTMILEVEL3 BIT(15) > +#define BM_USBPHY_CTRL_ENUTMILEVEL2 BIT(14) > +#define BM_USBPHY_CTRL_ENHOSTDISCONDETECT BIT(1) > + > +struct mxs_phy { > + struct usb_phy phy; > + struct clk *clk; > + int connected:1; > +}; > + > +#define to_mxs_phy(p) container_of((p), struct mxs_phy, phy) > + > +static void mxs_phy_hw_init(struct mxs_phy *mxs_phy) > +{ > + void __iomem *base = mxs_phy->phy.io_priv; > + > + writel_relaxed(BM_USBPHY_CTRL_CLKGATE, base + HW_USBPHY_CTRL_CLR); > + > + /* Reset USBPHY module */ > + writel_relaxed(BM_USBPHY_CTRL_SFTRST, base + HW_USBPHY_CTRL_SET); > + udelay(10); > + > + /* Remove CLKGATE and SFTRST */ > + writel_relaxed(BM_USBPHY_CTRL_CLKGATE | BM_USBPHY_CTRL_SFTRST, > + base + HW_USBPHY_CTRL_CLR); > + udelay(10); > + > + /* Power up the PHY */ > + writel_relaxed(0, base + HW_USBPHY_PWD); > + > + /* enable FS/LS device */ > + writel_relaxed(BM_USBPHY_CTRL_ENUTMILEVEL2 | > + BM_USBPHY_CTRL_ENUTMILEVEL3, > + base + HW_USBPHY_CTRL_SET); > + > +} > + > +static int mxs_phy_init(struct usb_phy *phy) > +{ > + struct mxs_phy *mxs_phy = to_mxs_phy(phy); > + > + clk_prepare_enable(mxs_phy->clk); > + mxs_phy_hw_init(mxs_phy); > + > + return 0; > +} > + > +static void mxs_phy_shutdown(struct usb_phy *phy) > +{ > + struct mxs_phy *mxs_phy = to_mxs_phy(phy); > + > + writel_relaxed(BM_USBPHY_CTRL_CLKGATE, > + phy->io_priv + HW_USBPHY_CTRL_SET); > + > + clk_disable_unprepare(mxs_phy->clk); > +} > + > +static int mxs_phy_on_connect(struct usb_phy *phy, int port) > +{ > + struct mxs_phy *mxs_phy = to_mxs_phy(phy); > + > + dev_dbg(phy->dev, "Connect on port %d\n", port); > + > + if (mxs_phy->connected) > + return 0; > + mxs_phy_hw_init(to_mxs_phy(phy)); > + writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, > + phy->io_priv + HW_USBPHY_CTRL_SET); > + mxs_phy->connected = 1; > + > + return 0; > +} > + > +static int mxs_phy_on_disconnect(struct usb_phy *phy, int port) > +{ > + struct mxs_phy *mxs_phy = to_mxs_phy(phy); > + > + dev_dbg(phy->dev, "Disconnect on port %d\n", port); > + > + if (!mxs_phy->connected) > + return 0; > + writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, > + phy->io_priv + HW_USBPHY_CTRL_CLR); > + mxs_phy->connected = 0; > + > + return 0; > +} > + > +static int mxs_phy_probe(struct platform_device *pdev) > +{ > + struct resource *res; > + void __iomem *base; > + struct clk *clk; > + struct mxs_phy *mxs_phy; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (!res) { > + dev_err(&pdev->dev, "can't get device resources\n"); > + return -ENOENT; > + } > + > + base = devm_request_and_ioremap(&pdev->dev, res); > + if (!base) > + return -EBUSY; > + > + clk = devm_clk_get(&pdev->dev, NULL); > + if (IS_ERR(clk)) { > + dev_err(&pdev->dev, "can't get the clock!"); > + return PTR_ERR(clk); > + } > + > + mxs_phy = devm_kzalloc(&pdev->dev, sizeof(*mxs_phy), GFP_KERNEL); > + if (!mxs_phy) { > + dev_err(&pdev->dev, "Failed to allocate USB PHY structure!\n"); > + return -ENOMEM; > + } > + > + mxs_phy->phy.io_priv = base; > + mxs_phy->phy.dev = &pdev->dev; > + mxs_phy->phy.label = DRIVER_NAME; > + mxs_phy->phy.init = mxs_phy_init; > + mxs_phy->phy.shutdown = mxs_phy_shutdown; > + mxs_phy->phy.notify_connect = mxs_phy_on_connect; > + mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect; > + > + ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier); > + > + mxs_phy->clk = clk; > + > + platform_set_drvdata(pdev, &mxs_phy->phy); > + > + return 0; > +} > + > +static int __devexit mxs_phy_remove(struct platform_device *pdev) > +{ > + platform_set_drvdata(pdev, NULL); > + > + return 0; > +} > + > +static const struct of_device_id mxs_phy_dt_ids[] = { > + { .compatible = "fsl,imx23-usbphy", }, > + { /* sentinel */ } > +}; > + > +static struct platform_driver mxs_phy_driver = { > + .probe = mxs_phy_probe, > + .remove = __devexit_p(mxs_phy_remove), > + .driver = { > + .name = DRIVER_NAME, > + .owner = THIS_MODULE, > + .of_match_table = mxs_phy_dt_ids, > + }, > +}; > + > +static int __init mxs_phy_module_init(void) > +{ > + return platform_driver_register(&mxs_phy_driver); > +} > +postcore_initcall(mxs_phy_module_init); > + > +static void __exit mxs_phy_module_exit(void) > +{ > + platform_driver_unregister(&mxs_phy_driver); > +} > +module_exit(mxs_phy_module_exit); > + > +MODULE_ALIAS("platform:mxs-usb-phy"); > +MODULE_AUTHOR("Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>"); > +MODULE_AUTHOR("Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>"); > +MODULE_DESCRIPTION("Freescale MXS USB PHY driver"); > +MODULE_LICENSE("GPL"); > -- > 1.7.5.4 > > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH v3 05/12] usb: chipidea: add imx platform driver [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (3 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 04/12] usb: otg: add basic mxs phy driver support Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao [not found] ` <1337912665-16615-6-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 06/12] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao ` (9 subsequent siblings) 14 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen This patch supports only the host-mode functionality so far. Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Cc: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> --- .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ drivers/usb/chipidea/Makefile | 3 + drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++++ 3 files changed, 212 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/ci13xxx-imx.txt create mode 100644 drivers/usb/chipidea/ci13xxx_imx.c diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt new file mode 100644 index 0000000..beb75d6 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt @@ -0,0 +1,20 @@ +* Freescale i.MX ci13xxx usb controllers + +Required properties: +- compatible: Should be "fsl,imx31-usb" +- reg: Should contain registers location and length +- interrupts: Should contain controller interrupt + +Optional properties: +- fsl,usbphy: phandler of usb phy that connects to the only one port +- fsl,hub-reset-gpios: gpio used to reset on-board usb hub +- fsl,vbus-power-gpios: gpio used to set vbus power of the only one port + +Examples: +usb@02184000 { /* USB OTG */ + compatible = "fsl,imx6q-usb", "fsl,imx31-usb"; + reg = <0x02184000 0x200>; + interrupts = <0 43 0x04>; + fsl,usbphy = <&usbphy1>; + fsl,vbus-power-gpios = <&gpio3 22 0>; +}; diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index b69900a..5c66d9c 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb/chipidea/Makefile @@ -14,3 +14,6 @@ ifneq ($(CONFIG_PCI),) obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_pci.o endif +ifneq ($(CONFIG_OF_DEVICE),) + obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o +endif diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c new file mode 100644 index 0000000..de570a2 --- /dev/null +++ b/drivers/usb/chipidea/ci13xxx_imx.c @@ -0,0 +1,189 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * Copyright (C) 2012 Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> + * on behalf of DENX Software Engineering GmbH + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include <linux/module.h> +#include <linux/of_platform.h> +#include <linux/of_gpio.h> +#include <linux/platform_device.h> +#include <linux/pm_runtime.h> +#include <linux/dma-mapping.h> +#include <linux/usb/chipidea.h> +#include <linux/clk.h> +#include <linux/regulator/consumer.h> + +#include "ci.h" + +#define pdev_to_phy(pdev) \ + ((struct usb_phy *)platform_get_drvdata(pdev)) + +struct ci13xxx_imx_data { + struct device_node *phy_np; + struct usb_phy *phy; + struct platform_device *ci_pdev; + struct clk *clk; + struct regulator *reg_vbus; +}; + +static struct ci13xxx_platform_data ci13xxx_imx_platdata __devinitdata = { + .name = "ci13xxx_imx", + .flags = CI13XXX_REQUIRE_TRANSCEIVER | + CI13XXX_PULLUP_ON_VBUS | + CI13XXX_DISABLE_STREAMING, + .capoffset = DEF_CAPOFFSET, +}; + +static int __devinit ci13xxx_imx_probe(struct platform_device *pdev) +{ + struct ci13xxx_imx_data *data; + struct platform_device *plat_ci, *phy_pdev; + struct device_node *phy_np; + struct resource *res; + struct regulator *reg_vbus; + int ret; + + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); + if (!data) { + dev_err(&pdev->dev, "Failed to allocate CI13xxx-IMX data!\n"); + return -ENOMEM; + } + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "Can't get device resources!\n"); + return -ENOENT; + } + + data->clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(data->clk)) { + dev_err(&pdev->dev, "Failed to get clock!\n"); + return PTR_ERR(data->clk); + } + + ret = clk_prepare_enable(data->clk); + if (ret) { + dev_err(&pdev->dev, "Failed to prepare or enable clock!\n"); + return ret; + } + + phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0); + if (phy_np) { + data->phy_np = phy_np; + phy_pdev = of_find_device_by_node(phy_np); + if (phy_pdev) { + struct usb_phy *phy; + phy = pdev_to_phy(phy_pdev); + if (phy && + try_module_get(phy_pdev->dev.driver->owner)) { + usb_phy_init(phy); + data->phy = phy; + } + } + } + + /* we only support host now, so enable vbus here */ + reg_vbus = devm_regulator_get(&pdev->dev, "vbus"); + if (!IS_ERR(reg_vbus)) { + ret = regulator_enable(reg_vbus); + if (ret) { + dev_err(&pdev->dev, + "Failed to enable vbus regulator!\n"); + goto put_np; + } + data->reg_vbus = reg_vbus; + } else + reg_vbus = NULL; + + ci13xxx_imx_platdata.phy = data->phy; + + if (!pdev->dev.dma_mask) { + pdev->dev.dma_mask = devm_kzalloc(&pdev->dev, + sizeof(*pdev->dev.dma_mask), GFP_KERNEL); + if (!pdev->dev.dma_mask) { + ret = -ENOMEM; + dev_err(&pdev->dev, "Failed to alloc dma_mask!\n"); + goto err; + } + *pdev->dev.dma_mask = DMA_BIT_MASK(32); + dma_set_coherent_mask(&pdev->dev, *pdev->dev.dma_mask); + } + plat_ci = ci13xxx_add_device(&pdev->dev, + pdev->resource, pdev->num_resources, + &ci13xxx_imx_platdata); + if (IS_ERR(plat_ci)) { + dev_err(&pdev->dev, "Can't register ci_hdrc platform device\n"); + ret = PTR_ERR(plat_ci); + goto err; + } + + data->ci_pdev = plat_ci; + platform_set_drvdata(pdev, data); + + pm_runtime_no_callbacks(&pdev->dev); + pm_runtime_enable(&pdev->dev); + + return 0; + +err: + if (reg_vbus) + regulator_disable(reg_vbus); +put_np: + if (phy_np) + of_node_put(phy_np); + return ret; +} + +static int __devexit ci13xxx_imx_remove(struct platform_device *pdev) +{ + struct ci13xxx_imx_data *data = platform_get_drvdata(pdev); + + ci13xxx_remove_device(data->ci_pdev); + + if (data->reg_vbus) + regulator_disable(data->reg_vbus); + + if (data->phy) { + usb_phy_shutdown(data->phy); + module_put(data->phy->dev->driver->owner); + } + + of_node_put(data->phy_np); + + clk_disable_unprepare(data->clk); + + platform_set_drvdata(pdev, NULL); + + return 0; +} + +static const struct of_device_id ci13xxx_imx_dt_ids[] = { + { .compatible = "fsl,imx31-usb", }, + { /* sentinel */ } +}; + +static struct platform_driver ci13xxx_imx_driver = { + .probe = ci13xxx_imx_probe, + .remove = __devexit_p(ci13xxx_imx_remove), + .driver = { + .name = "imx_usb", + .owner = THIS_MODULE, + .of_match_table = ci13xxx_imx_dt_ids, + }, +}; + +module_platform_driver(ci13xxx_imx_driver); + +MODULE_ALIAS("platform:imx-usb"); +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("CI13xxx i.MX USB binding"); +MODULE_AUTHOR("Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>"); +MODULE_AUTHOR("Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>"); -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
[parent not found: <1337912665-16615-6-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH v3 05/12] usb: chipidea: add imx platform driver [not found] ` <1337912665-16615-6-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2012-05-25 8:37 ` Alexander Shishkin [not found] ` <87k400ac6x.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Alexander Shishkin @ 2012-05-25 8:37 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > This patch supports only the host-mode functionality so far. > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > Cc: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> > Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> > --- > .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ > drivers/usb/chipidea/Makefile | 3 + > drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++++ One comment: I was going to suggest dropping "13xxx" suffix from everywhere in the driver, maybe module names too, since it doesn't really add any value and people often mistype it, so maybe for the new code it makes sense to avoid it? ci-imx looks better than ci13xxx-imx anyway and same goes for ci_imx_probe() vs ci13xxx_imx_probe(). Does this make sense to you? Regards, -- Alex -- 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] 60+ messages in thread
[parent not found: <87k400ac6x.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>]
* Re: [PATCH v3 05/12] usb: chipidea: add imx platform driver [not found] ` <87k400ac6x.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> @ 2012-05-25 8:51 ` Richard Zhao [not found] ` <20120525085109.GB18733-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-25 8:51 UTC (permalink / raw) To: Alexander Shishkin Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen On Fri, May 25, 2012 at 11:37:26AM +0300, Alexander Shishkin wrote: > Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > > > This patch supports only the host-mode functionality so far. > > > > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > > Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > Cc: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> > > Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > > Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> > > --- > > .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ > > drivers/usb/chipidea/Makefile | 3 + > > drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++++ > > One comment: I was going to suggest dropping "13xxx" suffix from > everywhere in the driver, maybe module names too, since it doesn't > really add any value and people often mistype it, so maybe for the new > code it makes sense to avoid it? ci-imx looks better than ci13xxx-imx > anyway and same goes for ci_imx_probe() vs ci13xxx_imx_probe(). > Does this make sense to you? I'm not clear with the history. Does Chipidea only have one IP? Thanks Richard > > Regards, > -- > Alex > -- 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] 60+ messages in thread
[parent not found: <20120525085109.GB18733-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v3 05/12] usb: chipidea: add imx platform driver [not found] ` <20120525085109.GB18733-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-05-25 9:49 ` Alexander Shishkin [not found] ` <87hav4a8ud.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Alexander Shishkin @ 2012-05-25 9:49 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > On Fri, May 25, 2012 at 11:37:26AM +0300, Alexander Shishkin wrote: >> Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: >> >> > This patch supports only the host-mode functionality so far. >> > >> > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> > Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> >> > Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> > Cc: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> >> > Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> >> > Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> >> > --- >> > .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ >> > drivers/usb/chipidea/Makefile | 3 + >> > drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++++ >> >> One comment: I was going to suggest dropping "13xxx" suffix from >> everywhere in the driver, maybe module names too, since it doesn't >> really add any value and people often mistype it, so maybe for the new >> code it makes sense to avoid it? ci-imx looks better than ci13xxx-imx >> anyway and same goes for ci_imx_probe() vs ci13xxx_imx_probe(). >> Does this make sense to you? > I'm not clear with the history. Does Chipidea only have one IP? As far as their USB controllers go, there are several versions with different features and register layouts, but essentially similar. I want to support all of them with this driver. As for the other IPs designed by chipidea -- I have no idea about those, but I don't think we should care. Regards, -- Alex -- 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] 60+ messages in thread
[parent not found: <87hav4a8ud.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>]
* Re: [PATCH v3 05/12] usb: chipidea: add imx platform driver [not found] ` <87hav4a8ud.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> @ 2012-05-29 3:05 ` Richard Zhao [not found] ` <20120529030505.GA2542-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-05-29 3:05 UTC (permalink / raw) To: Alexander Shishkin Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen Hi Alex, On Fri, May 25, 2012 at 12:49:46PM +0300, Alexander Shishkin wrote: > Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > > > On Fri, May 25, 2012 at 11:37:26AM +0300, Alexander Shishkin wrote: > >> Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > >> > >> > This patch supports only the host-mode functionality so far. > >> > > >> > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > >> > Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> > >> > Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > >> > Cc: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> > >> > Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > >> > Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> > >> > --- > >> > .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ > >> > drivers/usb/chipidea/Makefile | 3 + > >> > drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++++ > >> > >> One comment: I was going to suggest dropping "13xxx" suffix from > >> everywhere in the driver, maybe module names too, since it doesn't > >> really add any value and people often mistype it, so maybe for the new > >> code it makes sense to avoid it? ci-imx looks better than ci13xxx-imx > >> anyway and same goes for ci_imx_probe() vs ci13xxx_imx_probe(). > >> Does this make sense to you? > > I'm not clear with the history. Does Chipidea only have one IP? > > As far as their USB controllers go, there are several versions with > different features and register layouts, but essentially similar. I want > to support all of them with this driver. As for the other IPs designed > by chipidea -- I have no idea about those, but I don't think we should > care. Cleaning up ci13xxx will touch almost every chipidea driver files. Do you want me to do it or ? Thanks Richard > > Regards, > -- > Alex > -- 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] 60+ messages in thread
[parent not found: <20120529030505.GA2542-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v3 05/12] usb: chipidea: add imx platform driver [not found] ` <20120529030505.GA2542-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-05 14:25 ` Alexander Shishkin 0 siblings, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-05 14:25 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Peter Chen Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > Hi Alex, Hi, (overlooked this email somehow) > On Fri, May 25, 2012 at 12:49:46PM +0300, Alexander Shishkin wrote: >> Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: >> >> > On Fri, May 25, 2012 at 11:37:26AM +0300, Alexander Shishkin wrote: >> >> Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: >> >> >> >> > This patch supports only the host-mode functionality so far. >> >> > >> >> > Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> >> > Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> >> >> > Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> >> >> > Cc: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> >> >> > Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> >> >> > Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> >> >> > --- >> >> > .../devicetree/bindings/usb/ci13xxx-imx.txt | 20 ++ >> >> > drivers/usb/chipidea/Makefile | 3 + >> >> > drivers/usb/chipidea/ci13xxx_imx.c | 189 ++++++++++++++++++++ >> >> >> >> One comment: I was going to suggest dropping "13xxx" suffix from >> >> everywhere in the driver, maybe module names too, since it doesn't >> >> really add any value and people often mistype it, so maybe for the new >> >> code it makes sense to avoid it? ci-imx looks better than ci13xxx-imx >> >> anyway and same goes for ci_imx_probe() vs ci13xxx_imx_probe(). >> >> Does this make sense to you? >> > I'm not clear with the history. Does Chipidea only have one IP? >> >> As far as their USB controllers go, there are several versions with >> different features and register layouts, but essentially similar. I want >> to support all of them with this driver. As for the other IPs designed >> by chipidea -- I have no idea about those, but I don't think we should >> care. > Cleaning up ci13xxx will touch almost every chipidea driver files. Do > you want me to do it or ? If you have more patches for chipidea driver, you can include the 13xxx removal there, otherwise I'll do it as a part of my patchset that I'll send after we sort out this one. Regards, -- Alex -- 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] 60+ messages in thread
* [PATCH v3 06/12] ARM: imx6q: correct device name of usbphy and usb controller clock export [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (4 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 05/12] usb: chipidea: add imx platform driver Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-25 2:24 ` [PATCH v3 07/12] ARM: imx6q: add config-on-boot gpios Richard Zhao ` (8 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- arch/arm/mach-imx/clk-imx6q.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 96e9edd..f99509a 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -391,7 +391,10 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0"); clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); clk_register_clkdev(clk[twd], NULL, "smp_twd"); - clk_register_clkdev(clk[usboh3], NULL, "usboh3"); + clk_register_clkdev(clk[usboh3], NULL, "2184000.usb"); + clk_register_clkdev(clk[usboh3], NULL, "2184200.usb"); + clk_register_clkdev(clk[usboh3], NULL, "2184400.usb"); + clk_register_clkdev(clk[usboh3], NULL, "2184600.usb"); clk_register_clkdev(clk[uart_serial], "per", "2020000.serial"); clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial"); clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial"); -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* [PATCH v3 07/12] ARM: imx6q: add config-on-boot gpios [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (5 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 06/12] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-25 2:24 ` [PATCH v3 08/12] ARM: imx6q: add usbphy clocks Richard Zhao ` (7 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0, Rob Herring, Grant Likely 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 the config-on-boot gpios. Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Cc: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> --- .../devicetree/bindings/arm/config-on-boot.txt | 12 +++++++ arch/arm/boot/dts/imx6q-sabrelite.dts | 7 ++++ arch/arm/mach-imx/mach-imx6q.c | 35 ++++++++++++++++++++ 3 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/config-on-boot.txt diff --git a/Documentation/devicetree/bindings/arm/config-on-boot.txt b/Documentation/devicetree/bindings/arm/config-on-boot.txt new file mode 100644 index 0000000..f98ed74 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/config-on-boot.txt @@ -0,0 +1,12 @@ +* Configure on Boot + +Node name: config-on-boot + It must be in root node. config-on-boot means to describe settings that needs + to be set one time on boot but aren't owned by any driver, or the owned driver + is too generic to handle such settings. For example, usb hub uses generic + driver in usb core code, a on-board usb may need deassert reset pin. + +Optional properties: +- output-gpios: Output gpio array that needs to set. +- output-gpio-values: This property is required if output-gpios is set. + The value is a array of 0 or 1. Total count eaquals the number of gpios. diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index e0ec929..1dd2261 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -17,6 +17,13 @@ model = "Freescale i.MX6 Quad SABRE Lite Board"; compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; + config-on-boot { + output-gpios = < + &gpio3 22 0>; /* vbus reset */ + output-gpio-values = < + 1>; /* vbus reset */ + }; + memory { reg = <0x10000000 0x40000000>; }; diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index b47e98b..577cf19 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -19,6 +19,7 @@ #include <linux/irqdomain.h> #include <linux/of.h> #include <linux/of_address.h> +#include <linux/of_gpio.h> #include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/pinctrl/machine.h> @@ -113,6 +114,38 @@ static void __init imx6q_sabrelite_init(void) imx6q_sabrelite_cko1_setup(); } +static void __init imx6q_config_on_boot(void) +{ + struct device_node *np; + struct property *pp; + int cnt, len, i; + int gpio; + + np = of_find_node_by_path("/config-on-boot"); + if (!np) + return; + cnt = of_gpio_named_count(np, "output-gpios"); + pp = of_find_property(np, "output-gpio-values", &len); + if (!pp || cnt != len / sizeof(u32)) { + pr_err("Invalid config-on-boot gpios!\n"); + of_node_put(np); + return; + } + for (i = 0; i < cnt; i++) { + gpio = of_get_named_gpio(np, "output-gpios", i); + if (gpio_is_valid(gpio)) + gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, + "config-on-boot"); + } + + of_node_put(np); +} + +static void __init imx6q_post_populate(void) +{ + imx6q_config_on_boot(); +} + static void __init imx6q_init_machine(void) { /* @@ -126,6 +159,8 @@ static void __init imx6q_init_machine(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + imx6q_post_populate(); + imx6q_pm_init(); } -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* [PATCH v3 08/12] ARM: imx6q: add usbphy clocks [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (6 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 07/12] ARM: imx6q: add config-on-boot gpios Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-25 2:24 ` [PATCH v3 09/12] ARM: imx6q: disable usb charger detector Richard Zhao ` (6 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- arch/arm/mach-imx/clk-imx6q.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index f99509a..8c4166a 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -152,7 +152,7 @@ enum mx6q_clks { ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, - ssi2_ipg, ssi3_ipg, clk_max + ssi2_ipg, ssi3_ipg, usbphy1, usbphy2, clk_max }; static struct clk *clk[clk_max]; @@ -197,6 +197,9 @@ int __init mx6q_clocks_init(void) clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x2000, 0x3); clk[pll8_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll8_enet", "osc", base + 0xe0, 0x182000, 0x3); + clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); + clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); + /* name parent_name reg idx */ clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); @@ -395,6 +398,8 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[usboh3], NULL, "2184200.usb"); clk_register_clkdev(clk[usboh3], NULL, "2184400.usb"); clk_register_clkdev(clk[usboh3], NULL, "2184600.usb"); + clk_register_clkdev(clk[usbphy1], NULL, "20c9000.usbphy"); + clk_register_clkdev(clk[usbphy2], NULL, "20ca000.usbphy"); clk_register_clkdev(clk[uart_serial], "per", "2020000.serial"); clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial"); clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial"); -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* [PATCH v3 09/12] ARM: imx6q: disable usb charger detector [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (7 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 08/12] ARM: imx6q: add usbphy clocks Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-25 2:24 ` [PATCH v3 10/12] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao ` (5 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 The external charger detector needs to be disabled, or the signal at DP will be poor Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- arch/arm/mach-imx/mach-imx6q.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 577cf19..c4f9b82 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -25,6 +25,7 @@ #include <linux/pinctrl/machine.h> #include <linux/phy.h> #include <linux/micrel_phy.h> +#include <linux/mfd/anatop.h> #include <asm/smp_twd.h> #include <asm/hardware/cache-l2x0.h> #include <asm/hardware/gic.h> @@ -141,9 +142,32 @@ static void __init imx6q_config_on_boot(void) of_node_put(np); } +static void __init imx6q_usb_init(void) +{ +#define HW_ANADIG_USB1_CHRG_DETECT 0x000001b0 +#define HW_ANADIG_USB2_CHRG_DETECT 0x00000210 + +#define BM_ANADIG_USB_CHRG_DETECT_EN_B 0x00100000 +#define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B 0x00080000 + + /* + * The external charger detector needs to be disabled, + * or the signal at DP will be poor + */ + anatop_write_reg(NULL, HW_ANADIG_USB1_CHRG_DETECT, + BM_ANADIG_USB_CHRG_DETECT_EN_B + | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B, + ~0); + anatop_write_reg(NULL, HW_ANADIG_USB2_CHRG_DETECT, + BM_ANADIG_USB_CHRG_DETECT_EN_B | + BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B, + ~0); +} + static void __init imx6q_post_populate(void) { imx6q_config_on_boot(); + imx6q_usb_init(); } static void __init imx6q_init_machine(void) -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* [PATCH v3 10/12] ARM: dts: imx6q-sabrelite: add usb devices [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (8 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 09/12] ARM: imx6q: disable usb charger detector Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-25 2:24 ` [PATCH v3 11/12] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao ` (4 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 - add usbphy devices - add usb host controller and otg devices - add on-board hub reset gpio pinctrl - add usb h1 vbus regulator Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- arch/arm/boot/dts/imx6q-sabrelite.dts | 28 +++++++++++++++++++++++++ arch/arm/boot/dts/imx6q.dtsi | 36 +++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 1dd2261..06a5d00 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -48,10 +48,29 @@ status = "okay"; }; }; + iomuxc@020e0000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_hog>; + gpios { + pinctrl_gpio_hog: gpiohog { + fsl,pins = <1044 0x80000000 /* MX6Q_PAD_GPIO_17__GPIO_7_12 */ + 144 0x80000000>; /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ + }; + }; + }; }; aips-bus@02100000 { /* AIPS2 */ + usb@02184000 { /* USB OTG */ + vbus-supply = <®_usb_otg_vbus>; + status = "okay"; + }; + + usb@02184200 { /* USB1 */ + status = "okay"; + }; + ethernet@02188000 { phy-mode = "rgmii"; phy-reset-gpios = <&gpio3 23 0>; @@ -118,6 +137,15 @@ regulator-max-microvolt = <3300000>; regulator-always-on; }; + + reg_usb_otg_vbus: usb_otg_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 22 0>; + enable-active-high; + }; }; sound { diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 8c90cba..ccc8a5f 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -444,12 +444,14 @@ }; }; - usbphy@020c9000 { /* USBPHY1 */ + usbphy1: usbphy@020c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; reg = <0x020c9000 0x1000>; interrupts = <0 44 0x04>; }; - usbphy@020ca000 { /* USBPHY2 */ + usbphy2: usbphy@020ca000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; reg = <0x020ca000 0x1000>; interrupts = <0 45 0x04>; }; @@ -573,6 +575,36 @@ reg = <0x0217c000 0x4000>; }; + usb@02184000 { /* USB OTG */ + compatible = "fsl,imx6q-usb", "fsl,imx31-usb"; + reg = <0x02184000 0x200>; + interrupts = <0 43 0x04>; + fsl,usbphy = <&usbphy1>; + status = "disabled"; + }; + + usb@02184200 { /* USB1 */ + compatible = "fsl,imx6q-usb", "fsl,imx31-usb"; + reg = <0x02184200 0x200>; + interrupts = <0 40 0x04>; + fsl,usbphy = <&usbphy2>; + status = "disabled"; + }; + + usb@02184400 { /* USB2 */ + compatible = "fsl,imx6q-usb", "fsl,imx31-usb"; + reg = <0x02184400 0x200>; + interrupts = <0 41 0x04>; + status = "disabled"; + }; + + usb@02184600 { /* USB3 */ + compatible = "fsl,imx6q-usb", "fsl,imx31-usb"; + reg = <0x02184600 0x200>; + interrupts = <0 42 0x04>; + status = "disabled"; + }; + ethernet@02188000 { compatible = "fsl,imx6q-fec"; reg = <0x02188000 0x4000>; -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* [PATCH v3 11/12] ARM: mxs: clk_register_clkdev mx28 usb clocks [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (9 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 10/12] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-25 2:24 ` [PATCH v3 12/12] ARM: dts: imx28-evk: add usb devices Richard Zhao ` (3 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/clk/mxs/clk-imx28.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index 2826a26..0201a0f 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -328,6 +328,10 @@ int __init mx28_clocks_init(void) clk_register_clkdevs(clks[fec], fec_lookups, ARRAY_SIZE(fec_lookups)); clk_register_clkdevs(clks[can0], can0_lookups, ARRAY_SIZE(can0_lookups)); clk_register_clkdevs(clks[can1], can1_lookups, ARRAY_SIZE(can1_lookups)); + clk_register_clkdev(clks[usb0_pwr], NULL, "8007c000.usbphy"); + clk_register_clkdev(clks[usb1_pwr], NULL, "8007e000.usbphy"); + clk_register_clkdev(clks[usb0], NULL, "80080000.usb"); + clk_register_clkdev(clks[usb1], NULL, "80090000.usb"); for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) clk_prepare_enable(clks[clks_init_on[i]]); -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* [PATCH v3 12/12] ARM: dts: imx28-evk: add usb devices [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (10 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 11/12] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao @ 2012-05-25 2:24 ` Richard Zhao 2012-05-26 11:37 ` [PATCH v3 00/12] add imx usb driver for mx28/6x Marek Vasut ` (2 subsequent siblings) 14 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-25 2:24 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, richard.zhao-KZfg59tc24xl57MIdRCFDg, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 - add usb phy devices - add usb controller devices - add usb vbus regulators Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- arch/arm/boot/dts/imx28-evk.dts | 36 ++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 12 ++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts index ee520a5..a06d86a 100644 --- a/arch/arm/boot/dts/imx28-evk.dts +++ b/arch/arm/boot/dts/imx28-evk.dts @@ -73,10 +73,28 @@ pinctrl-0 = <&duart_pins_a>; status = "okay"; }; + + usbphy0: usbphy@8007c000 { + status = "okay"; + }; + + usbphy1: usbphy@8007e000 { + status = "okay"; + }; }; }; ahb@80080000 { + usb0: usb@80080000 { + vbus-supply = <®_usb0_vbus>; + status = "okay"; + }; + + usb1: usb@80090000 { + vbus-supply = <®_usb1_vbus>; + status = "okay"; + }; + mac0: ethernet@800f0000 { phy-mode = "rmii"; pinctrl-names = "default"; @@ -102,6 +120,24 @@ regulator-max-microvolt = <3300000>; regulator-always-on; }; + + reg_usb0_vbus: usb0_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb0_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 9 0>; + enable-active-high; + }; + + reg_usb1_vbus: usb1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 8 0>; + enable-active-high; + }; }; sound { diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 4634cb8..502ad05 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -441,11 +441,13 @@ }; usbphy0: usbphy@8007c000 { + compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; reg = <0x8007c000 0x2000>; status = "disabled"; }; usbphy1: usbphy@8007e000 { + compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; reg = <0x8007e000 0x2000>; status = "disabled"; }; @@ -459,13 +461,19 @@ reg = <0x80080000 0x80000>; ranges; - usbctrl0: usbctrl@80080000 { + usb0: usb@80080000 { + compatible = "fsl,imx28-usb", "fsl,imx31-usb"; reg = <0x80080000 0x10000>; + interrupts = <93>; + fsl,usbphy = <&usbphy0>; status = "disabled"; }; - usbctrl1: usbctrl@80090000 { + usb1: usb@80090000 { + compatible = "fsl,imx28-usb", "fsl,imx31-usb"; reg = <0x80090000 0x10000>; + interrupts = <92>; + fsl,usbphy = <&usbphy1>; status = "disabled"; }; -- 1.7.5.4 -- 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 related [flat|nested] 60+ messages in thread
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (11 preceding siblings ...) 2012-05-25 2:24 ` [PATCH v3 12/12] ARM: dts: imx28-evk: add usb devices Richard Zhao @ 2012-05-26 11:37 ` Marek Vasut [not found] ` <201205261337.59500.marex-ynQEQJNshbs@public.gmane.org> 2012-06-04 0:46 ` Richard Zhao 2012-06-05 15:02 ` Felipe Balbi 14 siblings, 1 reply; 60+ messages in thread From: Marek Vasut @ 2012-05-26 11:37 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Dear Richard Zhao, > The work is based on ci13xxx rework done by Alexander Shishkin. > > Status: > - this version only support host > - usbotg controler works at host role > > Changes since V2: > - Rebase to Alex's tree > - Use regulator to control vbus power > - Remove ARCH check in Kconfig, but add OF_DEV check. > - Other changes according laster version comments. Is there any git tree with these patches? Also, on top of what tree are these based on please? Thanks! Best regards, Marek Vasut -- 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] 60+ messages in thread
[parent not found: <201205261337.59500.marex-ynQEQJNshbs@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <201205261337.59500.marex-ynQEQJNshbs@public.gmane.org> @ 2012-05-26 12:50 ` Richard Zhao 0 siblings, 0 replies; 60+ messages in thread From: Richard Zhao @ 2012-05-26 12:50 UTC (permalink / raw) To: Marek Vasut Cc: Richard Zhao, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, balbi-l0cyMroinI0 Hi Marek, On Sat, May 26, 2012 at 7:37 PM, Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> wrote: > Dear Richard Zhao, > >> The work is based on ci13xxx rework done by Alexander Shishkin. >> >> Status: >> - this version only support host >> - usbotg controler works at host role >> >> Changes since V2: >> - Rebase to Alex's tree >> - Use regulator to control vbus power >> - Remove ARCH check in Kconfig, but add OF_DEV check. >> - Other changes according laster version comments. > > Is there any git tree with these patches? https://github.com/riczhao/kernel-imx/commits/topics/usb > Also, on top of what tree are these > based on please? They're based on Alex's tree. > > Thanks! > > Best regards, > Marek Vasut -- 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] 60+ messages in thread
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (12 preceding siblings ...) 2012-05-26 11:37 ` [PATCH v3 00/12] add imx usb driver for mx28/6x Marek Vasut @ 2012-06-04 0:46 ` Richard Zhao [not found] ` <20120604004610.GA2857-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-05 15:02 ` Felipe Balbi 14 siblings, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-04 0:46 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: marex-ynQEQJNshbs, B20596-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, fabio.estevam-KZfg59tc24xl57MIdRCFDg, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, B29397-KZfg59tc24xl57MIdRCFDg, balbi-l0cyMroinI0, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w Hi Guys, The merge window was closed. Do you have time to check whether the patch series is ok to pick up? Thanks Richard ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <20120604004610.GA2857-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120604004610.GA2857-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-04 15:00 ` Felipe Balbi [not found] ` <20120604150024.GN8002-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 2012-06-04 18:58 ` Alexander Shishkin 1 sibling, 1 reply; 60+ messages in thread From: Felipe Balbi @ 2012-06-04 15:00 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 [-- Attachment #1: Type: text/plain, Size: 236 bytes --] On Mon, Jun 04, 2012 at 08:46:11AM +0800, Richard Zhao wrote: > Hi Guys, > > The merge window was closed. Do you have time to check whether the > patch series is ok to pick up? The drivers/ part looks fine to me. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <20120604150024.GN8002-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120604150024.GN8002-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> @ 2012-06-04 17:16 ` Marek Vasut 0 siblings, 0 replies; 60+ messages in thread From: Marek Vasut @ 2012-06-04 17:16 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: Richard Zhao, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w Dear Felipe Balbi, > On Mon, Jun 04, 2012 at 08:46:11AM +0800, Richard Zhao wrote: > > Hi Guys, > > > > The merge window was closed. Do you have time to check whether the > > patch series is ok to pick up? > > The drivers/ part looks fine to me. Shitty me, I'm stuck with an exam until 20th. If it's not in by then, I'll have time to poke into it. Sorry guys :-( Best regards, Marek Vasut -- 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] 60+ messages in thread
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120604004610.GA2857-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-04 15:00 ` Felipe Balbi @ 2012-06-04 18:58 ` Alexander Shishkin 1 sibling, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-04 18:58 UTC (permalink / raw) To: Richard Zhao, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > Hi Guys, Hi, > The merge window was closed. Do you have time to check whether the > patch series is ok to pick up? I'll try to pick the chipidea relevant bits tomorrow morning. Thanks, -- Alex -- 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] 60+ messages in thread
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (13 preceding siblings ...) 2012-06-04 0:46 ` Richard Zhao @ 2012-06-05 15:02 ` Felipe Balbi [not found] ` <20120605150209.GZ28631-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 14 siblings, 1 reply; 60+ messages in thread From: Felipe Balbi @ 2012-06-05 15:02 UTC (permalink / raw) To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w, balbi-l0cyMroinI0 [-- Attachment #1: Type: text/plain, Size: 1396 bytes --] Hi, On Fri, May 25, 2012 at 10:24:13AM +0800, Richard Zhao wrote: > The work is based on ci13xxx rework done by Alexander Shishkin. > > Status: > - this version only support host > - usbotg controler works at host role > > Changes since V2: > - Rebase to Alex's tree > - Use regulator to control vbus power > - Remove ARCH check in Kconfig, but add OF_DEV check. > - Other changes according laster version comments. > > Richard Zhao (12): > usb: otg: add notify_connect/notify_disconnect callback > usb: chipidea: permit driver bindings pass phy pointer > usb: ehci-hcd: notify phy when connect change > usb: otg: add basic mxs phy driver support > usb: chipidea: add imx platform driver > ARM: imx6q: correct device name of usbphy and usb controller clock > export > ARM: imx6q: add config-on-boot gpios > ARM: imx6q: add usbphy clocks > ARM: imx6q: disable usb charger detector > ARM: dts: imx6q-sabrelite: add usb devices > ARM: mxs: clk_register_clkdev mx28 usb clocks > ARM: dts: imx28-evk: add usb devices how are we going to handle these series ? drivers/usb/otg/* parts are mostly ok (I need to look deeper) but if I take drivers/usb/otg/* we will have to delay drivers/usb/chipidea I guess... So someone would have to take the whole series ? Who will be that person? Alex, will it be you ? -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <20120605150209.GZ28631-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120605150209.GZ28631-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> @ 2012-06-06 2:27 ` Shawn Guo [not found] ` <20120606022714.GA2667-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Shawn Guo @ 2012-06-06 2:27 UTC (permalink / raw) To: Felipe Balbi Cc: marex-ynQEQJNshbs, B20596-KZfg59tc24xl57MIdRCFDg, fabio.estevam-KZfg59tc24xl57MIdRCFDg, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, B29397-KZfg59tc24xl57MIdRCFDg, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-usb-u79uwXL29TY76Z2rM5mHXA, Richard Zhao, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w On Tue, Jun 05, 2012 at 06:02:13PM +0300, Felipe Balbi wrote: > Hi, > > On Fri, May 25, 2012 at 10:24:13AM +0800, Richard Zhao wrote: > > The work is based on ci13xxx rework done by Alexander Shishkin. > > > > Status: > > - this version only support host > > - usbotg controler works at host role > > > > Changes since V2: > > - Rebase to Alex's tree > > - Use regulator to control vbus power > > - Remove ARCH check in Kconfig, but add OF_DEV check. > > - Other changes according laster version comments. > > > > Richard Zhao (12): > > usb: otg: add notify_connect/notify_disconnect callback > > usb: chipidea: permit driver bindings pass phy pointer > > usb: ehci-hcd: notify phy when connect change > > usb: otg: add basic mxs phy driver support > > usb: chipidea: add imx platform driver > > ARM: imx6q: correct device name of usbphy and usb controller clock > > export > > ARM: imx6q: add config-on-boot gpios > > ARM: imx6q: add usbphy clocks > > ARM: imx6q: disable usb charger detector > > ARM: dts: imx6q-sabrelite: add usb devices > > ARM: mxs: clk_register_clkdev mx28 usb clocks > > ARM: dts: imx28-evk: add usb devices > > how are we going to handle these series ? drivers/usb/otg/* parts are > mostly ok (I need to look deeper) but if I take drivers/usb/otg/* we > will have to delay drivers/usb/chipidea I guess... > > So someone would have to take the whole series ? Who will be that > person? Alex, will it be you ? > I'm unsure about drivers/usb part, but arch/arm part should go via arm-soc tree. -- Regards, Shawn ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <20120606022714.GA2667-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120606022714.GA2667-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> @ 2012-06-06 6:03 ` Felipe Balbi [not found] ` <20120606060348.GD32345-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 0 siblings, 1 reply; 60+ messages in thread From: Felipe Balbi @ 2012-06-06 6:03 UTC (permalink / raw) To: Shawn Guo Cc: Felipe Balbi, Richard Zhao, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w [-- Attachment #1: Type: text/plain, Size: 2017 bytes --] On Wed, Jun 06, 2012 at 10:27:22AM +0800, Shawn Guo wrote: > On Tue, Jun 05, 2012 at 06:02:13PM +0300, Felipe Balbi wrote: > > Hi, > > > > On Fri, May 25, 2012 at 10:24:13AM +0800, Richard Zhao wrote: > > > The work is based on ci13xxx rework done by Alexander Shishkin. > > > > > > Status: > > > - this version only support host > > > - usbotg controler works at host role > > > > > > Changes since V2: > > > - Rebase to Alex's tree > > > - Use regulator to control vbus power > > > - Remove ARCH check in Kconfig, but add OF_DEV check. > > > - Other changes according laster version comments. > > > > > > Richard Zhao (12): > > > usb: otg: add notify_connect/notify_disconnect callback > > > usb: chipidea: permit driver bindings pass phy pointer > > > usb: ehci-hcd: notify phy when connect change > > > usb: otg: add basic mxs phy driver support > > > usb: chipidea: add imx platform driver > > > ARM: imx6q: correct device name of usbphy and usb controller clock > > > export > > > ARM: imx6q: add config-on-boot gpios > > > ARM: imx6q: add usbphy clocks > > > ARM: imx6q: disable usb charger detector > > > ARM: dts: imx6q-sabrelite: add usb devices > > > ARM: mxs: clk_register_clkdev mx28 usb clocks > > > ARM: dts: imx28-evk: add usb devices > > > > how are we going to handle these series ? drivers/usb/otg/* parts are > > mostly ok (I need to look deeper) but if I take drivers/usb/otg/* we > > will have to delay drivers/usb/chipidea I guess... > > > > So someone would have to take the whole series ? Who will be that > > person? Alex, will it be you ? > > > I'm unsure about drivers/usb part, but arch/arm part should go via > arm-soc tree. Yes, sure but the whole series is very "coupled" together... Maybe Richard could try to split this series into things that can go through arm-soc with no dependency on the other part and things that depend on drivers/usb/* Richard, can you do that ? -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 60+ messages in thread
[parent not found: <20120606060348.GD32345-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120606060348.GD32345-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> @ 2012-06-06 6:27 ` Shawn Guo 2012-06-06 6:30 ` Richard Zhao 1 sibling, 0 replies; 60+ messages in thread From: Shawn Guo @ 2012-06-06 6:27 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: Richard Zhao, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w On 6 June 2012 14:03, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote: > Yes, sure but the whole series is very "coupled" together... Maybe > Richard could try to split this series into things that can go through > arm-soc with no dependency on the other part and things that depend on > drivers/usb/* > As far as arch/arm patches applying concerned, I haven't seen any dependency on drivers/usb part. If those patches can be applied on arm-soc tree and do not break anything, that's good enough. For usb to actually function, we will need to wait usb and arm-soc trees get together somewhere, firstly linux-next, eventually mainline. Regards, Shawn -- 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] 60+ messages in thread
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120606060348.GD32345-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 2012-06-06 6:27 ` Shawn Guo @ 2012-06-06 6:30 ` Richard Zhao [not found] ` <20120606063030.GA29481-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 1 sibling, 1 reply; 60+ messages in thread From: Richard Zhao @ 2012-06-06 6:30 UTC (permalink / raw) To: Felipe Balbi Cc: Shawn Guo, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w On Wed, Jun 06, 2012 at 09:03:50AM +0300, Felipe Balbi wrote: > On Wed, Jun 06, 2012 at 10:27:22AM +0800, Shawn Guo wrote: > > On Tue, Jun 05, 2012 at 06:02:13PM +0300, Felipe Balbi wrote: > > > Hi, > > > > > > On Fri, May 25, 2012 at 10:24:13AM +0800, Richard Zhao wrote: > > > > The work is based on ci13xxx rework done by Alexander Shishkin. > > > > > > > > Status: > > > > - this version only support host > > > > - usbotg controler works at host role > > > > > > > > Changes since V2: > > > > - Rebase to Alex's tree > > > > - Use regulator to control vbus power > > > > - Remove ARCH check in Kconfig, but add OF_DEV check. > > > > - Other changes according laster version comments. > > > > > > > > Richard Zhao (12): > > > > usb: otg: add notify_connect/notify_disconnect callback > > > > usb: chipidea: permit driver bindings pass phy pointer > > > > usb: ehci-hcd: notify phy when connect change > > > > usb: otg: add basic mxs phy driver support > > > > usb: chipidea: add imx platform driver > > > > ARM: imx6q: correct device name of usbphy and usb controller clock > > > > export > > > > ARM: imx6q: add config-on-boot gpios > > > > ARM: imx6q: add usbphy clocks > > > > ARM: imx6q: disable usb charger detector > > > > ARM: dts: imx6q-sabrelite: add usb devices > > > > ARM: mxs: clk_register_clkdev mx28 usb clocks > > > > ARM: dts: imx28-evk: add usb devices > > > > > > how are we going to handle these series ? drivers/usb/otg/* parts are > > > mostly ok (I need to look deeper) but if I take drivers/usb/otg/* we > > > will have to delay drivers/usb/chipidea I guess... > > > > > > So someone would have to take the whole series ? Who will be that > > > person? Alex, will it be you ? > > > > > I'm unsure about drivers/usb part, but arch/arm part should go via > > arm-soc tree. > > Yes, sure but the whole series is very "coupled" together... Maybe > Richard could try to split this series into things that can go through > arm-soc with no dependency on the other part and things that depend on > drivers/usb/* I'm not clear. How does the ARM part depend on drivers/usb? Shawn maybe could pick the ARM platform part. But the usb driver part is divided into three maintainer, Balbi for otg, Alan for ehci-hcd, Alex for Chipidea. Chipidea part depends on ehci-hcd and otg. So I guess Greg could pick up all the driver part and Balbi, Alan and Alex merge them back. Hope it could avoid loop dependency. Thanks Richard > > Richard, can you do that ? > > -- > balbi -- 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] 60+ messages in thread
[parent not found: <20120606063030.GA29481-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>]
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120606063030.GA29481-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> @ 2012-06-06 8:39 ` Alexander Shishkin 2012-06-06 13:20 ` Alexander Shishkin 1 sibling, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-06 8:39 UTC (permalink / raw) To: Richard Zhao, Felipe Balbi Cc: Shawn Guo, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > On Wed, Jun 06, 2012 at 09:03:50AM +0300, Felipe Balbi wrote: >> On Wed, Jun 06, 2012 at 10:27:22AM +0800, Shawn Guo wrote: >> > On Tue, Jun 05, 2012 at 06:02:13PM +0300, Felipe Balbi wrote: >> > > Hi, >> > > >> > > On Fri, May 25, 2012 at 10:24:13AM +0800, Richard Zhao wrote: >> > > > The work is based on ci13xxx rework done by Alexander Shishkin. >> > > > >> > > > Status: >> > > > - this version only support host >> > > > - usbotg controler works at host role >> > > > >> > > > Changes since V2: >> > > > - Rebase to Alex's tree >> > > > - Use regulator to control vbus power >> > > > - Remove ARCH check in Kconfig, but add OF_DEV check. >> > > > - Other changes according laster version comments. >> > > > >> > > > Richard Zhao (12): >> > > > usb: otg: add notify_connect/notify_disconnect callback >> > > > usb: chipidea: permit driver bindings pass phy pointer >> > > > usb: ehci-hcd: notify phy when connect change >> > > > usb: otg: add basic mxs phy driver support >> > > > usb: chipidea: add imx platform driver >> > > > ARM: imx6q: correct device name of usbphy and usb controller clock >> > > > export >> > > > ARM: imx6q: add config-on-boot gpios >> > > > ARM: imx6q: add usbphy clocks >> > > > ARM: imx6q: disable usb charger detector >> > > > ARM: dts: imx6q-sabrelite: add usb devices >> > > > ARM: mxs: clk_register_clkdev mx28 usb clocks >> > > > ARM: dts: imx28-evk: add usb devices >> > > >> > > how are we going to handle these series ? drivers/usb/otg/* parts are >> > > mostly ok (I need to look deeper) but if I take drivers/usb/otg/* we >> > > will have to delay drivers/usb/chipidea I guess... >> > > >> > > So someone would have to take the whole series ? Who will be that >> > > person? Alex, will it be you ? >> > > >> > I'm unsure about drivers/usb part, but arch/arm part should go via >> > arm-soc tree. >> >> Yes, sure but the whole series is very "coupled" together... Maybe >> Richard could try to split this series into things that can go through >> arm-soc with no dependency on the other part and things that depend on >> drivers/usb/* > I'm not clear. How does the ARM part depend on drivers/usb? > Shawn maybe could pick the ARM platform part. But the usb driver part > is divided into three maintainer, Balbi for otg, Alan for ehci-hcd, > Alex for Chipidea. Chipidea part depends on ehci-hcd and otg. So I > guess Greg could pick up all the driver part and Balbi, Alan and Alex > merge them back. Hope it could avoid loop dependency. As long as Felipe and Alan give their acks and it's ok with everybody else, I can pick up the whole drivers/usb part (patches 01-05). Regards, -- Alex -- 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] 60+ messages in thread
* Re: [PATCH v3 00/12] add imx usb driver for mx28/6x [not found] ` <20120606063030.GA29481-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-06 8:39 ` Alexander Shishkin @ 2012-06-06 13:20 ` Alexander Shishkin 1 sibling, 0 replies; 60+ messages in thread From: Alexander Shishkin @ 2012-06-06 13:20 UTC (permalink / raw) To: Richard Zhao, Felipe Balbi Cc: Shawn Guo, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, B29397-KZfg59tc24xl57MIdRCFDg, B20596-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, fabio.estevam-KZfg59tc24xl57MIdRCFDg, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes: > On Wed, Jun 06, 2012 at 09:03:50AM +0300, Felipe Balbi wrote: >> On Wed, Jun 06, 2012 at 10:27:22AM +0800, Shawn Guo wrote: >> > On Tue, Jun 05, 2012 at 06:02:13PM +0300, Felipe Balbi wrote: >> > > Hi, >> > > >> > > On Fri, May 25, 2012 at 10:24:13AM +0800, Richard Zhao wrote: >> > > > The work is based on ci13xxx rework done by Alexander Shishkin. >> > > > >> > > > Status: >> > > > - this version only support host >> > > > - usbotg controler works at host role >> > > > >> > > > Changes since V2: >> > > > - Rebase to Alex's tree >> > > > - Use regulator to control vbus power >> > > > - Remove ARCH check in Kconfig, but add OF_DEV check. >> > > > - Other changes according laster version comments. >> > > > >> > > > Richard Zhao (12): >> > > > usb: otg: add notify_connect/notify_disconnect callback >> > > > usb: chipidea: permit driver bindings pass phy pointer >> > > > usb: ehci-hcd: notify phy when connect change >> > > > usb: otg: add basic mxs phy driver support >> > > > usb: chipidea: add imx platform driver >> > > > ARM: imx6q: correct device name of usbphy and usb controller clock >> > > > export >> > > > ARM: imx6q: add config-on-boot gpios >> > > > ARM: imx6q: add usbphy clocks >> > > > ARM: imx6q: disable usb charger detector >> > > > ARM: dts: imx6q-sabrelite: add usb devices >> > > > ARM: mxs: clk_register_clkdev mx28 usb clocks >> > > > ARM: dts: imx28-evk: add usb devices >> > > >> > > how are we going to handle these series ? drivers/usb/otg/* parts are >> > > mostly ok (I need to look deeper) but if I take drivers/usb/otg/* we >> > > will have to delay drivers/usb/chipidea I guess... >> > > >> > > So someone would have to take the whole series ? Who will be that >> > > person? Alex, will it be you ? >> > > >> > I'm unsure about drivers/usb part, but arch/arm part should go via >> > arm-soc tree. >> >> Yes, sure but the whole series is very "coupled" together... Maybe >> Richard could try to split this series into things that can go through >> arm-soc with no dependency on the other part and things that depend on >> drivers/usb/* > I'm not clear. How does the ARM part depend on drivers/usb? > Shawn maybe could pick the ARM platform part. But the usb driver part > is divided into three maintainer, Balbi for otg, Alan for ehci-hcd, > Alex for Chipidea. Chipidea part depends on ehci-hcd and otg. So I > guess Greg could pick up all the driver part and Balbi, Alan and Alex > merge them back. Hope it could avoid loop dependency. I will apply this stuff to my tree as soon as we have an explicit ack from Alan on the notifiers patch [1]. [1] http://marc.info/?l=linux-arm-kernel&m=133894640106323&w=2 Regards, -- Alex -- 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] 60+ messages in thread
end of thread, other threads:[~2012-06-21 6:44 UTC | newest] Thread overview: 60+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-25 2:24 [PATCH v3 00/12] add imx usb driver for mx28/6x Richard Zhao [not found] ` <1337912665-16615-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 2:24 ` [PATCH v3 01/12] usb: otg: add notify_connect/notify_disconnect callback Richard Zhao [not found] ` <1337912665-16615-2-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-06 8:49 ` Felipe Balbi 2012-05-25 2:24 ` [PATCH v3 02/12] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao [not found] ` <1337912665-16615-3-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-06 8:50 ` Felipe Balbi 2012-06-08 12:37 ` [PATCH v4] " Richard Zhao [not found] ` <1339159026-15837-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-12 23:14 ` Greg KH [not found] ` <20120612231438.GA6177-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 2012-06-13 6:23 ` Richard Zhao 2012-06-14 7:52 ` Alexander Shishkin [not found] ` <8762au8h46.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-06-14 15:46 ` Greg KH [not found] ` <20120614154624.GF17140-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 2012-06-15 2:46 ` Richard Zhao [not found] ` <20120615024625.GA26563-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-21 5:50 ` Richard Zhao [not found] ` <20120621055048.GA1582-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-21 6:44 ` Alexander Shishkin 2012-05-25 2:24 ` [PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change Richard Zhao [not found] ` <1337912665-16615-4-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-05 14:00 ` Alexander Shishkin [not found] ` <87y5o197tw.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-06-05 14:28 ` Alan Stern [not found] ` <Pine.LNX.4.44L0.1206051025540.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> 2012-06-05 15:03 ` Marek Vasut [not found] ` <201206051703.17691.marex-ynQEQJNshbs@public.gmane.org> 2012-06-05 16:56 ` Alan Stern [not found] ` <Pine.LNX.4.44L0.1206051250400.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> 2012-06-05 17:23 ` Marek Vasut [not found] ` <201206051923.09063.marex-ynQEQJNshbs@public.gmane.org> 2012-06-05 17:30 ` Alan Stern [not found] ` <Pine.LNX.4.44L0.1206051328430.1542-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org> 2012-06-06 1:27 ` Richard Zhao 2012-06-06 8:28 ` Alexander Shishkin 2012-06-06 1:29 ` [PATCH v4] " Richard Zhao [not found] ` <1338946190-19105-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-06 9:39 ` Alexander Shishkin [not found] ` <87mx4g93tg.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-06-06 11:05 ` Richard Zhao [not found] ` <20120606110539.GA5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-06 11:27 ` Alexander Shishkin 2012-06-06 14:19 ` Alan Stern 2012-06-07 2:04 ` Chen Peter-B29397 [not found] ` <F281D0F91ED19E4D8E63A7504E8A649803BDB929-RL0Hj/+nBVDtkydW1Tv2Dq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org> 2012-06-07 2:43 ` Richard Zhao [not found] ` <20120607024328.GB5566-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-07 3:14 ` Chen Peter-B29397 2012-06-08 12:32 ` [PATCH 1/2] USB: move transceiver from ehci_hcd and ohci_hcd to hcd and rename it as phy Richard Zhao [not found] ` <1339158749-15634-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-08 12:32 ` [PATCH v5 2/2] USB: notify phy when root hub port connect change Richard Zhao 2012-05-25 2:24 ` [PATCH v3 04/12] usb: otg: add basic mxs phy driver support Richard Zhao [not found] ` <1337912665-16615-5-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-06-06 8:51 ` Felipe Balbi 2012-05-25 2:24 ` [PATCH v3 05/12] usb: chipidea: add imx platform driver Richard Zhao [not found] ` <1337912665-16615-6-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2012-05-25 8:37 ` Alexander Shishkin [not found] ` <87k400ac6x.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-05-25 8:51 ` Richard Zhao [not found] ` <20120525085109.GB18733-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-05-25 9:49 ` Alexander Shishkin [not found] ` <87hav4a8ud.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-05-29 3:05 ` Richard Zhao [not found] ` <20120529030505.GA2542-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-05 14:25 ` Alexander Shishkin 2012-05-25 2:24 ` [PATCH v3 06/12] ARM: imx6q: correct device name of usbphy and usb controller clock export Richard Zhao 2012-05-25 2:24 ` [PATCH v3 07/12] ARM: imx6q: add config-on-boot gpios Richard Zhao 2012-05-25 2:24 ` [PATCH v3 08/12] ARM: imx6q: add usbphy clocks Richard Zhao 2012-05-25 2:24 ` [PATCH v3 09/12] ARM: imx6q: disable usb charger detector Richard Zhao 2012-05-25 2:24 ` [PATCH v3 10/12] ARM: dts: imx6q-sabrelite: add usb devices Richard Zhao 2012-05-25 2:24 ` [PATCH v3 11/12] ARM: mxs: clk_register_clkdev mx28 usb clocks Richard Zhao 2012-05-25 2:24 ` [PATCH v3 12/12] ARM: dts: imx28-evk: add usb devices Richard Zhao 2012-05-26 11:37 ` [PATCH v3 00/12] add imx usb driver for mx28/6x Marek Vasut [not found] ` <201205261337.59500.marex-ynQEQJNshbs@public.gmane.org> 2012-05-26 12:50 ` Richard Zhao 2012-06-04 0:46 ` Richard Zhao [not found] ` <20120604004610.GA2857-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-04 15:00 ` Felipe Balbi [not found] ` <20120604150024.GN8002-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 2012-06-04 17:16 ` Marek Vasut 2012-06-04 18:58 ` Alexander Shishkin 2012-06-05 15:02 ` Felipe Balbi [not found] ` <20120605150209.GZ28631-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 2012-06-06 2:27 ` Shawn Guo [not found] ` <20120606022714.GA2667-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> 2012-06-06 6:03 ` Felipe Balbi [not found] ` <20120606060348.GD32345-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 2012-06-06 6:27 ` Shawn Guo 2012-06-06 6:30 ` Richard Zhao [not found] ` <20120606063030.GA29481-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> 2012-06-06 8:39 ` Alexander Shishkin 2012-06-06 13:20 ` Alexander Shishkin
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).