Re: [PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-12 Thread Roger Quadros
On 12/11/18 13:03, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>>> Also can we have some consistency in usage of '-' vs '_'? >>> Right.. I agree. I've been using '-' as it is the preferred syntax as >>> most of the properties, but so

Re: [PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-12 Thread Roger Quadros
Thinh, On 12/11/18 07:29, Thinh Nguyen wrote: > Hi Roger, > > On 11/9/2018 3:58 AM, Roger Quadros wrote: >> Hi, >> >> On 08/11/18 04:10, Thinh Nguyen wrote: >>> Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable" >>> proper

Re: [PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-09 Thread Roger Quadros
Hi, On 08/11/18 04:10, Thinh Nguyen wrote: > Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable" > property via "snps,usb2-lpm-disable" property. > > Signed-off-by: Thinh Nguyen > --- > drivers/usb/dwc3/core.c | 2 ++ > drivers/usb/dwc3/core.h | 2 ++ > drivers/usb/dwc3/host.c

Re: usb: dwc3: dwc3 errors while video streaming with uvc-gadget

2018-11-05 Thread Roger Quadros
m: Laurent Pinchart Sent: 02 November 2018 11:49 To: Roger Quadros Cc: Terence Neill ; linux-usb@vger.kernel.org; Eaves, Paul Subject: Re: usb: dwc3: dwc3 errors while video streaming with uvc-gadget Hello, On Friday, 2 November 2018 11:50:47 EET Roger Quadros wrote: On 15/10/18 19:34, Terence N

Re: usb: dwc3: dwc3 errors while video streaming with uvc-gadget

2018-11-02 Thread Roger Quadros
Hi Terry, On 15/10/18 19:34, Terence Neill wrote: Hi Felipe, I am having some issues when attempting to stream 1280x720 uncompressed video @ 10fps over a USB 2.0 High-Speed link. The system setup is: WebCam --- USB 2.0 link ---> x86 Linux Machine running uvc-gadget USB 2.0 link --->

Re: [PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-12 Thread Roger Quadros
On 12/09/18 11:30, Laurent Pinchart wrote: > Hi Roger, > > On Wednesday, 12 September 2018 10:57:31 EEST Roger Quadros wrote: >> On 11/09/18 18:06, Laurent Pinchart wrote: >>> Now that all platforms using OMAP USB host devices have been converted >>> to DT, dro

Re: [PATCH 2/3] ARM: OMAP2+: Remove legacy USB initialization code

2018-09-12 Thread Roger Quadros
On 11/09/18 18:06, Laurent Pinchart wrote: > Several legacy USB-related functions, structures and macros are not used > anymore after conversion to DT. Remove them. > > Signed-off-by: Laurent Pinchart Acked-by: Roger Quadros cheers, -roger > --- > arch/arm/m

Re: [PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-12 Thread Roger Quadros
Hi Laurent, On 11/09/18 18:06, Laurent Pinchart wrote: > Now that all platforms using OMAP USB host devices have been converted > to DT, drop support for legacy non-DT probe from the driver. > > Signed-off-by: Laurent Pinchart > --- > drivers/mfd/omap-usb-host.c| 153 >

Re: usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers

2018-06-21 Thread Roger Quadros
On 21/06/18 13:52, Lars-Peter Clausen wrote: > On 06/21/2018 10:29 AM, Roger Quadros wrote: > [...] >>>> static int ffs_aio_cancel(struct kiocb *kiocb) >>>> { >>>> struct ffs_io_data *io_data = kiocb->private; >>>> -

Re: usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers

2018-06-21 Thread Roger Quadros
+Lars-Peter Vincent, On 14/06/18 16:23, Sam Protsenko wrote: > + Roger Quadros > + Praneeth Bajjuri > > Tested-by: Sam Protsenko > > I've tested it on X15 board (DWC3 controller) on Android master, by > doing "adb root". Without this patch I see backtrace and

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-21 Thread Roger Quadros
On 21/06/18 01:55, Rafael J. Wysocki wrote: > On Thu, Jun 21, 2018 at 12:32 AM, Rafael J. Wysocki wrote: >> On Wed, Jun 20, 2018 at 5:46 PM, Johan Hovold wrote: >>> On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Roger Quadros
+Tero, Tony and some TI folks On 18/06/18 15:21, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 18/06/18 12:51, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Johan Hovold writes: >>>> On Mon, Jun 18, 2018 at 12:

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Roger Quadros
On 18/06/18 12:51, Felipe Balbi wrote: > > Hi, > > Johan Hovold writes: >> On Mon, Jun 18, 2018 at 12:33:44PM +0300, Felipe Balbi wrote: >> >>> Johan Hovold writes: >> I suggest merging this fix for 4.18-rc, and then Roger can rework the driver so that it works also on OMAP. >>> >>>

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Roger Quadros
On 13/06/18 11:05, Felipe Balbi wrote: > Roger Quadros writes: > >> Hi Johan, >> >> On 31/05/18 17:45, Johan Hovold wrote: >>> The clocks have already been explicitly disabled and put as part of >>> remove() so the runtime suspend callback must not be r

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Roger Quadros
Hi Johan, On 31/05/18 17:45, Johan Hovold wrote: > The clocks have already been explicitly disabled and put as part of > remove() so the runtime suspend callback must not be run when balancing > the runtime PM usage count before returning. > > Fixes: 16adc674d0d6 ("usb: dwc3: add generic OF glue

[PATCH 2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active()

2018-05-28 Thread Roger Quadros
Don't call pm_runtime_set_active() as it will prevent the device from being activated in the next pm_runtime_get_sync() call. Also call pm_runtime_get_sync() before of_platform_populate(). Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/dwc3-of-simple.c | 7 +++

[PATCH 1/2] usb: dwc3: of-simple: Don't fail if no clock entries

2018-05-28 Thread Roger Quadros
of_count_phandle_with_args() returns -ENOENT (-2) if there are no clock entries. Don't fail in such a case. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/dwc3-of-simple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc

Re: [RFC PATCH linux-next] USB: dwc3: dwc3_get_extcon() can be static

2018-05-18 Thread Roger Quadros
On 18/05/18 10:47, Andrzej Hajda wrote: > On 18.05.2018 09:38, Roger Quadros wrote: >> On 18/05/18 08:39, Andrzej Hajda wrote: >>> On 17.05.2018 18:06, kbuild test robot wrote: >>>> Fixes: 5f0b74e54890 ("USB: dwc3: get extcon device by OF graph bindings"

Re: [RFC PATCH linux-next] USB: dwc3: dwc3_get_extcon() can be static

2018-05-18 Thread Roger Quadros
On 18/05/18 08:39, Andrzej Hajda wrote: > On 17.05.2018 18:06, kbuild test robot wrote: >> Fixes: 5f0b74e54890 ("USB: dwc3: get extcon device by OF graph bindings") >> Signed-off-by: kbuild test robot > > It should be static of course, my bad. > > Reviewed-by: Andrzej

Re: [PATCH v2 2/3] usb: gadget: uvc: remove delay usb status phase

2018-04-25 Thread Roger Quadros
Hi Paul, On 24/04/18 23:59, Paul Elder wrote: > The completion of the usb status phase doesn't need to be delayed > from uvc_function_set_alt to uvc_v4l2_streamon/off. > Remove USB_GADGET_DELAYED_STATUS and usb_composite_setup_delay from > these two, respectively. > > Signed-off-by: Paul Elder

Re: [PATCH 2/4] usb: gadget: composite: add function to increment delayed_status

2018-04-20 Thread Roger Quadros
Hi, On 19/04/18 22:42, Laurent Pinchart wrote: > Hi Paul, > > (CC'ing Felipe Balbi and Roger Quadros) > > Thank you for the patch. > > Have you used scripts/get_maintainer.pl ? It should point you to Felipe > Balbi, > the maintainer of the USB gadget subsys

Re: [PATCH usb-next v4 0/2] fix HCD PHY suspend handling

2018-04-05 Thread Roger Quadros
Greg, On 28/03/18 00:26, Martin Blumenstingl wrote: > This is a follow-up to my previous series "initialize (multiple) PHYs > for a HCD": [0]. > > Roger Quadros reported [1] that it "is breaking low power cases on TI > SoCs when USB is in host mode".

Re: [RFC usb-next v3 1/2] usb: core: split usb_phy_roothub_{init,alloc}

2018-03-27 Thread Roger Quadros
called during resume. > > Signed-off-by: Martin Blumenstingl <martin.blumensti...@googlemail.com> I don't think we need RFC in subject. Reviewed-by: Roger Quadros <rog...@ti.com> > --- > drivers/usb/core/hcd.c | 10 +++--- > drivers/usb/core/phy.c | 53 > +

Re: [RFC usb-next v3 2/2] usb: core: use phy_exit during suspend if wake up is not supported

2018-03-27 Thread Roger Quadros
hub_power_on. > > Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") > Fixes: 178a0bce05cbc1 ("usb: core: hcd: integrate the PHY wrapper into the > HCD core") > Reported-by: Roger Quadros <rog...@ti.com> > Suggested-by

Re: [RFC usb-next v2 1/2] usb: core: split usb_phy_roothub_{init,alloc}

2018-03-26 Thread Roger Quadros
On 24/03/18 16:21, Martin Blumenstingl wrote: > Before this patch usb_phy_roothub_init served two purposes (from a > caller's point of view - like hcd.c): > - parsing the PHYs and allocating the list entries > - calling phy_init on each list entry > > While this worked so far it has one

Re: [RFC usb-next v2 2/2] usb: core: use phy_exit during suspend if wake up is not supported

2018-03-26 Thread Roger Quadros
nction takes care of calling > usb_phy_roothub_init (if the controller can't wake up the system) in > addition to usb_phy_roothub_power_on. > > Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") > Fixes: 178a0bce05cbc1 ("usb: core: hcd: i

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-22 Thread Roger Quadros
On 22/03/18 10:10, Chunfeng Yun wrote: > Hi, > On Wed, 2018-03-21 at 13:30 +0200, Roger Quadros wrote: >> Martin, >> >> On 21/03/18 00:01, Martin Blumenstingl wrote: >>> Hi Roger, Hi Chunfeng, >>> >>> On Tue, Mar 20, 2018 at 1:04 PM, Chunfeng

Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Roger Quadros
On 22/03/18 14:12, Chunfeng Yun wrote: > The phys has already been initialized when add primary hcd, > including usb2 phys and usb3 phys also if exist, so needn't > re-parse "phys" property again. > > Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com>

Re: [usb-next PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-21 Thread Roger Quadros
On 21/03/18 13:50, Chunfeng Yun wrote: > Hi Roger, > > On Wed, 2018-03-21 at 11:05 +0200, Roger Quadros wrote: >> Hi Chunfeng, >> >> On 21/03/18 08:12, Chunfeng Yun wrote: >>> The phys has already been initialized when add primary hcd, >>> includ

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-21 Thread Roger Quadros
te: >>> Hi Roger, >>> >>> On Mon, Mar 19, 2018 at 9:49 AM, Roger Quadros <rog...@ti.com> wrote: >>>> Hi, >>>> >>>> On 19/03/18 00:29, Martin Blumenstingl wrote: >>>>> Hi Roger, >>>>> >>>>

Re: [usb-next PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-21 Thread Roger Quadros
Hi Chunfeng, On 21/03/18 08:12, Chunfeng Yun wrote: > The phys has already been initialized when add primary hcd, > including usb2 phys and usb3 phys also if exist, so needn't > re-parse "phys" property again. > > Signed-off-by: Chunfeng Yun > --- >

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-20 Thread Roger Quadros
On 20/03/18 12:55, Roger Quadros wrote: > On 19/03/18 18:12, Martin Blumenstingl wrote: >> Hi Roger, >> >> On Mon, Mar 19, 2018 at 9:49 AM, Roger Quadros <rog...@ti.com> wrote: >>> Hi, >>> >>> On 19/03/18 00:29, Martin Blumenstingl wrote: &g

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-20 Thread Roger Quadros
On 19/03/18 18:12, Martin Blumenstingl wrote: > Hi Roger, > > On Mon, Mar 19, 2018 at 9:49 AM, Roger Quadros <rog...@ti.com> wrote: >> Hi, >> >> On 19/03/18 00:29, Martin Blumenstingl wrote: >>> Hi Roger, >>> >>> On Fri, Mar 16, 2018 at

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-19 Thread Roger Quadros
Hi, On 19/03/18 00:29, Martin Blumenstingl wrote: > Hi Roger, > > On Fri, Mar 16, 2018 at 3:32 PM, Roger Quadros <rog...@ti.com> wrote: >> +some TI folks >> >> Hi Martin, >> >> On 18/02/18 20:44, Martin Blumenstingl wrote: >>> Many SoC

[PATCH] usb: dwc3: core: Fix broken system suspend/resume on AM437x

2018-03-16 Thread Roger Quadros
. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e8890c0..5becd7f 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1374,6 +1374,7 @@ stat

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-16 Thread Roger Quadros
+some TI folks Hi Martin, On 18/02/18 20:44, Martin Blumenstingl wrote: > Many SoC platforms have separate devices for the USB PHY which are > registered through the generic PHY framework. These PHYs have to be > enabled to make the USB controller actually work. They also have to be > disabled

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Roger Quadros
On 16/03/18 13:00, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: > >> Hi Felipe, >> >> On 09/03/18 14:47, Roger Quadros wrote: >>> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >>> afte

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Roger Quadros
Hi Felipe, On 09/03/18 14:47, Roger Quadros wrote: > In the following test we get stuck by sleeping forever in _dwc3_set_mode() > after which dual-role switching doesn't work. > > On dra7-evm's dual-role port, > - Load g_zero gadget driver and enumerate to host > - suspend to

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-15 Thread Roger Quadros
On 15/03/18 13:46, Robin Murphy wrote: > On 12/03/18 10:41, Roger Quadros wrote: > [...] >>>>> @@ -0,0 +1,75 @@ >>>>> +USB Connector >>>>> += >>>>> + >>>>> +USB connector node represent

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-12 Thread Roger Quadros
Andrezej, Why don't you have any of the USB maintainers in to/cc? Greg Kroah-Hartman <gre...@linuxfoundation.org> (supporter:USB SUBSYSTEM) Felipe Balbi <ba...@kernel.org> (maintainer:USB GADGET/PERIPHERAL SUBSYSTEM) On 12/03/18 09:02, Andrzej Hajda wrote: > On 09.03.2018 11:24

[PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
_irq_timeout() and print and error message if there was a timeout. Signed-off-by: Roger Quadros <rog...@ti.com> --- Changelog: v2: - use wait_event_interruptible_lock_irq_timeout() instead of wait_event_lock_irq() drivers/usb/dwc3/gadget.c | 23 --- 1 file changed, 20 insertio

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-09 Thread Roger Quadros
Hi, On 27/02/18 09:11, Andrzej Hajda wrote: > These bindings allow to describe most known standard USB connectors > and it should be possible to extend it if necessary. > USB connectors, beside USB can be used to route other protocols, > for example UART, Audio, MHL. In such case every device

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
On 09/03/18 11:26, Roger Quadros wrote: > On 09/03/18 11:23, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros <rog...@ti.com> writes: >> >> >> >>>>> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >&

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
On 09/03/18 11:23, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: > > > >>>> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >>>> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >>>

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
On 05/03/18 13:27, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> void dwc3_gadget_exit(struct dwc3 *dwc) >> { >> + int epnum; >> + unsigned long flags; >> + >> + spin_lock_irqsave(>lock, flags); >> +

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-09 Thread Roger Quadros
Hi, On 08/03/18 18:49, Brian Norris wrote: > Hi, > > On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote: >> William Wu writes: >>> The dwc3_core_init() gets the PHYs and initializes the PHYs with >>> the usb_phy_init() and phy_init() functions before

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Roger Quadros
Felipe, On 08/03/18 12:39, Felipe Balbi wrote: > Roger Quadros <rog...@ti.com> writes: > >> This is useful on platforms (e.g. TI AM437x) that don't >> have ID available on a GPIO but do have the OTG block. >> >> We can obtain the ID state via the OTG block a

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Roger Quadros
On 05/03/18 13:06, Felipe Balbi wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> Roger Quadros <rog...@ti.com> writes: >>>>>> Roger Quadros <rog...@ti.com> writes: >>>>>>> In the following test

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Roger Quadros
On 05/03/18 12:41, Baolin Wang wrote: > Hi Roger, > > On 5 March 2018 at 17:45, Roger Quadros <rog...@ti.com> wrote: >> Felipe, >> >> On 05/03/18 10:49, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadr

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Roger Quadros
Felipe, On 05/03/18 10:49, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >>> Roger Quadros <rog...@ti.com> writes: >>>> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >>>> after which

Re: [PATCH v3] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-28 Thread Roger Quadros
hci-platform. > > Signed-off-by: Amelie Delaunay <amelie.delau...@st.com> > > --- > Changes in v3: > * Address Felipe Balbi comments: reduce indentation in >ehci_platform_port_power. > * Address Roger Quadros and Alan Stern comments: platforms can have one >

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-02-28 Thread Roger Quadros
Felipe, On 28/02/18 09:53, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On dra7-evm's dual

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-02-28 Thread Roger Quadros
Hi Baolin, On 28/02/18 05:04, Baolin Wang wrote: > Hi Roger, > > On 27 February 2018 at 19:22, Roger Quadros <rog...@ti.com> wrote: >> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >> after which dual-role switching doesn't work. >>

[PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-02-27 Thread Roger Quadros
This is useful on platforms (e.g. TI AM437x) that don't have ID available on a GPIO but do have the OTG block. We can obtain the ID state via the OTG block and use it for dual-role switching. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 67 ++- drive

[PATCH v2 1/2] usb: dwc3: core.h: add some register definitions

2018-02-27 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.h | 82 + 1 file changed, 82 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 860d2bc..0

[PATCH v2 0/2] usb: dwc3: Add dual-role support using OTG core

2018-02-27 Thread Roger Quadros
functional so user can switch between "otg", "host" or "device" modes for debug. Although system suspend/resume isn't working yet in mainline for AM437x, I've tested this series for system suspend/resume using a local tree. Roger Quadros (2): usb: dwc3: core.h: add some re

[PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-02-27 Thread Roger Quadros
in it. - resume system - we sleep indefinitely in _dwc3_set_mode due to. dwc3_gadget_exit()->usb_del_gadget_udc()->udc_stop()-> dwc3_gadget_stop()->wait_event_lock_irq() Let's clear the DWC3_EP_END_TRANSFER_PENDING flag on all endpoints so we don't wait in dwc3_gadget_stop(). Signed-o

[PATCH] usb: dwc3: prevent setting PRTCAP to OTG from debugfs

2018-02-27 Thread Roger Quadros
We don't support PRTCAP == OTG yet, so prevent user from setting it via debugfs. Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Cc: <sta...@vger.kernel.org> # v4.12+ Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 3

[PATCH] usb: dwc3: Fix lock-up on ID change during system suspend/resume

2018-02-27 Thread Roger Quadros
at the second usb_remove_hcd() call. To work around this we queue the _dwc3_set_mode() work on the system_freezable_wq. Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Cc: <sta...@vger.kernel.org> # v4.12+ Suggested-by: Manu Gautam <mgau...@codeaurora.org>

Re: [PATCH RFC] ehci-omap: simple suspend implementation

2018-02-26 Thread Roger Quadros
Andreas, On 26/02/18 09:04, Andreas Kemnade wrote: > Hi, > > On Mon, 19 Feb 2018 11:41:36 +0200 > Roger Quadros <rog...@ti.com> wrote: > >> Andreas, >> >> On 16/02/18 20:35, Andreas Kemnade wrote: >>> On Fri, 16 Feb 2018 13:13:11 -0500 (EST)

Re: [PATCH v2] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-20 Thread Roger Quadros
On 20/02/18 16:46, Amelie DELAUNAY wrote: > Hi, > > On 02/20/2018 03:00 PM, Roger Quadros wrote: >> Hi, >> >> On 20/02/18 14:58, Amelie Delaunay wrote: >>> On some boards, especially when vbus supply requires large current, >>> and the charge pump on

Re: [PATCH v2] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-20 Thread Roger Quadros
; > Signed-off-by: Amelie Delaunay <amelie.delau...@st.com> > > --- > Changes in v2: > * Address Roger Quadros comments: move regulator_enable/disable from > ehci_platform_power_on/off to ehci_platform_port_power. > --- > Documentation/devicetree/bindings/usb

Re: [PATCH] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-20 Thread Roger Quadros
Hi, On 20/02/18 11:11, Amelie Delaunay wrote: > On some boards, especially when vbus supply requires large current, > and the charge pump on the PHY isn't enough, an external vbus power switch > may be used. > Add support for this optional external vbus supply in ehci-platform. Isn't this

Re: [PATCH RFC] ehci-omap: simple suspend implementation

2018-02-19 Thread Roger Quadros
Andreas, On 16/02/18 20:35, Andreas Kemnade wrote: > On Fri, 16 Feb 2018 13:13:11 -0500 (EST) > Alan Stern wrote: > >> On Fri, 16 Feb 2018, Andreas Kemnade wrote: >> >>> This powers down the phy and on a gta04 it reduces >>> suspend current by 13 mA. >>> For unknown

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-02-14 Thread Roger Quadros
Felipe, On 25/01/18 18:11, Roger Quadros wrote: > Hi, > > On 24/01/18 14:19, Roger Quadros wrote: >> On 23/01/18 14:41, Roger Quadros wrote: >>> Hi Manu, >>> >>> On 23/01/18 05:45, Manu Gautam wrote: >>>> Hi, >>>> >>>&

Re: [PATCH 0/4] usb: dwc3: Add dual-role support using OTG core

2018-02-14 Thread Roger Quadros
Hi Felipe, On 22/01/18 15:11, Roger Quadros wrote: > Hi Felipe, > > Some platforms (e.g. TI's AM437x) don't have USB ID pin state available > over GPIO/extcon but need to rely on the DWC3 core's OTG block to > get the ID pin state instead. > > This series implem

[PATCH v2 RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume

2018-02-12 Thread Roger Quadros
ng phys") Fixes: f54edb539c11 ("usb: dwc3: core: initialize ULPI before trying to get the PHY") Cc: linux-stable <sta...@vger.kernel.org> # >= v4.13 Signed-off-by: Roger Quadros <rog...@ti.com> --- Rebased on Felipe's testing

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-02-12 Thread Roger Quadros
Felipe, On 12/02/18 10:54, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >> Adding/removing host/gadget controller before .pm_complete() >> causes a lock-up. Let's prevent any dual-role state change >> between .pm_prepare() and .pm_

Re: power management problems in ehci-omap

2018-02-07 Thread Roger Quadros
Hi, On 06/02/18 20:40, Andreas Kemnade wrote: > On Tue, 6 Feb 2018 10:16:23 -0800 > Tony Lindgren wrote: > >> * Andreas Kemnade [180206 18:04]: >>> On Tue, 6 Feb 2018 09:17:37 -0800 >>> Tony Lindgren wrote: uarts=$(find

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-01-25 Thread Roger Quadros
Hi, On 24/01/18 14:19, Roger Quadros wrote: > On 23/01/18 14:41, Roger Quadros wrote: >> Hi Manu, >> >> On 23/01/18 05:45, Manu Gautam wrote: >>> Hi, >>> >>> >>> On 1/22/2018 6:31 PM, Roger Quadros wrote: >>>> Adding/removi

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-01-24 Thread Roger Quadros
On 23/01/18 14:41, Roger Quadros wrote: > Hi Manu, > > On 23/01/18 05:45, Manu Gautam wrote: >> Hi, >> >> >> On 1/22/2018 6:31 PM, Roger Quadros wrote: >>> Adding/removing host/gadget controller before .pm_complete() >>> causes a lock-up. L

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-01-23 Thread Roger Quadros
Hi Manu, On 23/01/18 05:45, Manu Gautam wrote: > Hi, > > > On 1/22/2018 6:31 PM, Roger Quadros wrote: >> Adding/removing host/gadget controller before .pm_complete() >> causes a lock-up. Let's prevent any dual-role state change >> between .pm_prepare() and .pm_com

Re: [PATCH 4/4] ARM: dts: am43xx: Enable dual-role mode for USB1

2018-01-22 Thread Roger Quadros
+Tony On 22/01/18 15:11, Roger Quadros wrote: > USB1 port is micro-AB type and can function as peripheral > as well as host. Enable dual-role mode for USB1. > > Signed-off-by: Roger Quadros <rog...@ti.com> > --- > arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- >

[PATCH 2/4] usb: dwc3: core.h: add some register definitions

2018-01-22 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.h | 82 + 1 file changed, 82 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index f5eb474..8

[PATCH 0/4] usb: dwc3: Add dual-role support using OTG core

2018-01-22 Thread Roger Quadros
www.mail-archive.com/linux-usb@vger.kernel.org/msg98771.html [2] https://www.mail-archive.com/linux-usb@vger.kernel.org/msg98848.html Roger Quadros (4): usb: dwc3: prevent setting PRTCAP to OTG from debugfs usb: dwc3: core.h: add some register definitions usb: dwc3: add dual role support usin

[PATCH 1/4] usb: dwc3: prevent setting PRTCAP to OTG from debugfs

2018-01-22 Thread Roger Quadros
We don't support PRTCAP == OTG so prevent user from setting it via debugfs. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 85388dd..2929b1d

[PATCH 4/4] ARM: dts: am43xx: Enable dual-role mode for USB1

2018-01-22 Thread Roger Quadros
USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1. Signed-off-by: Roger Quadros <rog...@ti.com> --- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2

[PATCH 3/4] usb: dwc3: add dual role support using OTG block

2018-01-22 Thread Roger Quadros
This is useful on platforms (e.g. TI AM437x) that don't have ID available on a GPIO but do have the OTG block. We can obtain the ID state via the OTG block and use it for dual-role switching. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 73 +-- drive

[PATCH 1/2] usb: dwc3: omap: don't miss events during suspend/resume

2018-01-22 Thread Roger Quadros
The USB cable state can change during suspend/resume so be sure to check and update the extcon state. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/dwc3-omap.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drive

[PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-01-22 Thread Roger Quadros
Adding/removing host/gadget controller before .pm_complete() causes a lock-up. Let's prevent any dual-role state change between .pm_prepare() and .pm_complete() to fix this. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 31 +++ drive

[PATCH 0/2] usb: dwc3: Fix dual role during system suspend/resume

2018-01-22 Thread Roger Quadros
Hi Felipe, These patches address issues with system suspend/resume when we're in dual-role configuration and the ID pin state toggles while the system is suspended. This series depends on https://www.mail-archive.com/linux-usb@vger.kernel.org/msg98771.html Roger Quadros (2): usb: dwc3: omap

Re: [PATCH v2] usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode

2018-01-18 Thread Roger Quadros
quot;) > Signed-off-by: Manu Gautam <mgau...@codeaurora.org> Tested to work on dra7x platform. Reviewed-by: Roger Quadros <rog...@ti.com> -- cheers, -roger Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Re: [PATCH v2] usb: ehci-omap: don't complain on -EPROBE_DEFER when no PHY found

2018-01-17 Thread Roger Quadros
On 17/01/18 12:08, Ladislav Michl wrote: > Don't complain on -EPROBE_DEFER when when no PHY found, the driver > probe will be retried later. > > Signed-off-by: Ladislav Michl <la...@linux-mips.org> > Acked-by: Tony Lindgren <t...@atomide.com> Acked-by: R

Re: [PATCH] usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode

2018-01-17 Thread Roger Quadros
Manu, On 16/01/18 08:26, Manu Gautam wrote: > Commit 689bf72c6e0d ("usb: dwc3: Don't reinitialize core during > host bus-suspend/resume") updated suspend/resume routines to not > power_off and reinit PHYs/core for host mode. > It broke platforms that rely on DWC3 core to power_off PHYs to > enter

Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2018-01-15 Thread Roger Quadros
Hi Manu, On 11/01/18 03:41, Manu Gautam wrote: > Hi, > > > On 1/10/2018 6:18 PM, Roger Quadros wrote: >> Hi Manu, >> >> On 27/09/17 14:19, Manu Gautam wrote: >>> Driver powers-off PHYs and reinitializes DWC3 core and gadget on >>> resume. W

[PATCH v2] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume

2018-01-11 Thread Roger Quadros
ng phys") Fixes: f54edb539c11 ("usb: dwc3: core: initialize ULPI before trying to get the PHY") Cc: linux-stable <sta...@vger.kernel.org> # >= v4.13 Signed-off-by: Roger Quadros <rog...@ti.com> --- Changelog: v2: - don't break ULPI case. Also take into consideration susp

Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-11 Thread Roger Quadros
On 11/01/18 11:31, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >>> Roger Quadros <rog...@ti.com> writes: >>>>>>> - ret = dwc3_core_soft_reset(dwc); >>>>>>> + ret = dwc3_core_get_phy(d

Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-11 Thread Roger Quadros
On 11/01/18 11:09, Roger Quadros wrote: > +Heikki > > On 11/01/18 10:25, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros <rog...@ti.com> writes: >>>>>> -ret = dwc3_core_soft_reset(dwc); >>>>>> +

Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2018-01-11 Thread Roger Quadros
Felipe, On 11/01/18 11:04, Felipe Balbi wrote: > > Hi, > > Manu Gautam writes: > On 27/09/17 14:19, Manu Gautam wrote: >> Driver powers-off PHYs and reinitializes DWC3 core and gadget on >> resume. While this works fine for gadget mode but in host >>

Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-11 Thread Roger Quadros
+Heikki On 11/01/18 10:25, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >>>>> - ret = dwc3_core_soft_reset(dwc); >>>>> + ret = dwc3_core_get_phy(dwc); >>>> >>>> we can get_phy in dwc3_c

Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-10 Thread Roger Quadros
On 10/01/18 16:04, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >>> Roger Quadros <rog...@ti.com> writes: >>>> Felipe, >>>> >>>> On 10/01/18 15:11, Roger Quadros wrote: >>>>> T

Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-10 Thread Roger Quadros
On 10/01/18 15:33, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >> Felipe, >> >> On 10/01/18 15:11, Roger Quadros wrote: >>> The USB PHYs should be requested only once during the life cycle of >>> this driver. >&

Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-10 Thread Roger Quadros
Felipe, On 10/01/18 15:11, Roger Quadros wrote: > The USB PHYs should be requested only once during the life cycle of > this driver. > > As dwc3_core_init() is called during system suspend/resume > it will result in multiple calls to dwc3_core_get_phy() which is wrong. > >

[PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

2018-01-10 Thread Roger Quadros
: 541768b08a4 ("usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys") Cc: linux-stable <sta...@vger.kernel.org> # >= v4.13 Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2018-01-10 Thread Roger Quadros
On 10/01/18 14:57, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rog...@ti.com> writes: >> Hi Manu, >> >> On 27/09/17 14:19, Manu Gautam wrote: >>> Driver powers-off PHYs and reinitializes DWC3 core and gadget on >>> resume. Whil

Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2018-01-10 Thread Roger Quadros
Hi Manu, On 27/09/17 14:19, Manu Gautam wrote: > Driver powers-off PHYs and reinitializes DWC3 core and gadget on > resume. While this works fine for gadget mode but in host > mode there is not re-initialization of host stack. Also, resetting > bus as part of bus_suspend/resume is not correct

Re: xhci_hcd HC died; cleaning up with TUSB7340 and µPD720201

2017-11-20 Thread Roger Quadros
On 20/11/17 15:19, Vignesh R wrote: > > > On Monday 20 November 2017 01:31 PM, Roger Quadros wrote: > [...] >>> >>> So, could you try reverting commit 8c934095fa2f3 and >>> also apply below patch and let me know if that fixes the issue? >>> >

Re: xhci_hcd HC died; cleaning up with TUSB7340 and µPD720201

2017-11-20 Thread Roger Quadros
Hi Vignesh, On 16/11/17 14:26, Vignesh R wrote: > +linux-pci > > Hi Chris, > > On Thursday 16 November 2017 05:20 PM, Quadros, Roger wrote: >> +Vignesh >> >> On 13/09/17 17:26, Chris Welch wrote: >>> We are developing a product based on the TI AM5728 EVM.  The product >>> utilizes a TUSB7340 

Re: xhci_hcd HC died; cleaning up with TUSB7340 and µPD720201

2017-11-16 Thread Roger Quadros
+Vigesh On 13/09/17 17:26, Chris Welch wrote: > We are developing a product based on the TI AM5728 EVM.  The product utilizes > a TUSB7340 PCIe USB host for additional ports.  The TUSB7340 is detected and > setup properly and works OK with low data rate devices.  However, hot > plugging a

[PATCH] USB: dummy-hcd: don't set gadget.speed in dummy_hub_control()

2017-11-03 Thread Roger Quadros
There will never be a case when gadget.speed isn't already USB_SPEED_FULL if connection is not USB-3 and gadget.speed is not USB_SPEED_HIGH or USB_SPEED_LOW. Remove the unnecessary code. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/gadget/udc/dummy_hcd.c | 2 -- 1 file c

  1   2   3   4   5   6   7   8   9   10   >