Re: [PATCH v5 2/4] usb: phy: samsung: Add host phy support to samsung-phy driver

2013-01-11 Thread Doug Anderson
Vivek, On Fri, Jan 11, 2013 at 4:40 AM, Vivek Gautam gautamvivek1...@gmail.com wrote: +#define HOST_CTRL0_REFCLKSEL_MASK (0x3) +#define HOST_CTRL0_REFCLKSEL_XTAL (0x0 19) +#define HOST_CTRL0_REFCLKSEL_EXTL (0x1 19) +#define HOST_CTRL0_REFCLKSEL_CLKCORE

Re: [PATCH] usb: phy: samsung: Add support to set pmu isolation

2013-01-14 Thread Doug Anderson
Vivek, Sorry for being so absent from these reviews. I'll try to look over a few patches today, but please don't hold up anything on account of my reviews. I'm definitely a bit of an interested bystander in USB land. ;) In general things look pretty good here. :) One last comment below...

Re: [PATCH v5 2/4] usb: phy: samsung: Add host phy support to samsung-phy driver

2013-01-14 Thread Doug Anderson
Vivek, On Mon, Jan 14, 2013 at 12:06 AM, Vivek Gautam gautamvivek1...@gmail.com wrote: Is it fine if we don't use macro for SHIFT, earlier code also doesn't use it. Can we just do like this .. #define HOST_CTRL0_FSEL_MASK (0x7 16) #define HOST_CTRL0_FSEL_CLKSEL_50M

Re: [PATCH] USB: ehci-s5p: Fix phy reset

2013-03-13 Thread Doug Anderson
Alexander, On Tue, Mar 12, 2013 at 6:09 PM, Alexander Graf ag...@suse.de wrote: - err = gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, ehci_vbus_gpio); - if (err) + /* reset pulls the line down, then up again */ + err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW,

Re: [PATCH] USB: ehci-s5p: Fix phy reset

2013-03-13 Thread Doug Anderson
Alexander, On Wed, Mar 13, 2013 at 10:45 AM, Alexander Graf ag...@suse.de wrote: + gpio_free(gpio); Freeing the gpio is a little on the iffy side since you actually care about keeping the value. Perhaps you can change this to devm_gpio_request_one() and avoid the free? I was about

Re: [PATCH v2] USB: ehci-s5p: Fix phy reset

2013-03-13 Thread Doug Anderson
-Hartman gre...@linuxfoundation.org CC: Doug Anderson diand...@chromium.org --- v1 - v2: - remove gpio_free call - move reset logic after phy node search Seems fine to me. I guess the earlier problem you wrote about was the probe failure, then? I think that the reason I don't tend to get

Re: [PATCH v2] USB: ehci-s5p: Fix phy reset

2013-03-14 Thread Doug Anderson
Hi, On Thu, Mar 14, 2013 at 7:58 AM, Thomas Abraham thomas.abra...@linaro.org wrote: I can see your point, but as I mentioned earlier there seems to be some timing issue here. By simply doing the reset a few ms earlier (in the first probe, before the driver detects that it needs to defer

[PATCH] usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio

2013-03-14 Thread Doug Anderson
The ehci_vbus_gpio is requested but never freed. This can cause problems with deferred probes and would cause problems if s5p_ehci_remove was ever called. Use devm to fix this. Signed-off-by: Doug Anderson diand...@chromium.org --- drivers/usb/host/ehci-s5p.c | 4 +++- 1 file changed, 3

Re: [PATCH] usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio

2013-03-14 Thread Doug Anderson
Jingoo, On Thu, Mar 14, 2013 at 5:30 PM, Jingoo Han jg1@samsung.com wrote: Would you replace other 'pdev-dev' with 'dev' in s5p_setup_vbus_gpio() as below? It seems to be better for readability. Yes, of course. That was silly of me not to add the dev local and not update the other

[PATCH v2] usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio

2013-03-14 Thread Doug Anderson
The ehci_vbus_gpio is requested but never freed. This can cause problems with deferred probes and would cause problems if s5p_ehci_remove was ever called. Use devm to fix this. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - pdev-dev = dev elsewhere

Re: [PATCH v5 1/4] ARM: EXYNOS: Update move usb-phy types to generic include layer

2012-12-19 Thread Doug Anderson
Vivek, On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam gautam.vi...@samsung.com wrote: Updating the names of usb-phy types to more generic names: USB_PHY_TYPE_DEIVCE USB_PHY_TYPE_HOST; and further update its dependencies. Since you're changing the name, I would have expected to see a removal

Re: [PATCH v5 2/4] usb: phy: samsung: Add host phy support to samsung-phy driver

2012-12-19 Thread Doug Anderson
Vivek, I don't really have a good 1 foot view about how all of the USB bits fit together, but a few detail-oriented comments below. On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam gautam.vi...@samsung.com wrote: This patch adds host phy support to samsung-usbphy.c and further adds support

Re: [PATCH v5 3/4] USB: ehci-s5p: Add phy driver support

2012-12-19 Thread Doug Anderson
Vivek, Again, not a high-level review, but... On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam gautam.vi...@samsung.com wrote: Adding the phy driver to ehci-s5p. Keeping the platform data for continuing the smooth operation for boards which still uses it Signed-off-by: Vivek Gautam

Re: [PATCH v5 1/4] ARM: EXYNOS: Update move usb-phy types to generic include layer

2012-12-20 Thread Doug Anderson
Vivek, On Wed, Dec 19, 2012 at 9:51 PM, Vivek Gautam gautamvivek1...@gmail.com wrote: Hi Doug, On Thu, Dec 20, 2012 at 3:18 AM, Doug Anderson diand...@chromium.org wrote: Vivek, Since you're changing the name, I would have expected to see a removal of the old enum type in this patch. I

Re: [PATCH v5 3/4] USB: ehci-s5p: Add phy driver support

2012-12-20 Thread Doug Anderson
On Wed, Dec 19, 2012 at 10:37 PM, Vivek Gautam gautamvivek1...@gmail.com wrote: On Thu, Dec 20, 2012 at 5:00 AM, Doug Anderson diand...@chromium.org wrote: On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam gautam.vi...@samsung.com wrote: +static void s5p_ehci_phy_enable(struct s5p_ehci_hcd

Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI

2014-06-27 Thread Doug Anderson
Felipe, On Fri, Jun 27, 2014 at 8:46 AM, Felipe Balbi ba...@ti.com wrote: On Thu, Jun 26, 2014 at 11:09:37AM +0530, Sachin Kamat wrote: EHCI and OHCI drivers on Exynos platforms do not work without their corresponding SoC specific phy drivers. Hence it makes no sense to keep these phy drivers

Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI

2014-06-27 Thread Doug Anderson
Felipe, On Fri, Jun 27, 2014 at 8:59 AM, Felipe Balbi ba...@ti.com wrote: I'll admit to not having been involved with the previous discussions, but this seems strange to me. Are we throwing in the towel and deciding that it's too hard to get the Kconfigs right and that we'll just rely on

[PATCH 0/3] Enable EHCI port on rk3288-evb

2014-07-29 Thread Doug Anderson
This series enables the EHCI port on the rk3288-evb boards. A later patch series (from Kever) will enable the dwc2 ports. Doug Anderson (3): ARM: dts: Turn on USB host vbus on rk3288-evb ARM: dts: add rk3288 ehci usb devices ARM: dts: Enable USB host0 (EHCI) on rk3288-evb arch/arm/boot

[PATCH 3/3] ARM: dts: Enable USB host0 (EHCI) on rk3288-evb

2014-07-29 Thread Doug Anderson
This is the top USB port on the evb (the one closest to the Ethernet connector). Signed-off-by: Doug Anderson diand...@chromium.org Signed-off-by: Kever Yang kever.y...@rock-chips.com --- arch/arm/boot/dts/rk3288-evb.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb

2014-07-29 Thread Doug Anderson
There is no phy driver that works on the Rockchip board for either USB host port yet. For now just hardcode the vbus signal to be on all the time which makes both the dwc2 host and the EHCI port work. Signed-off-by: Doug Anderson diand...@chromium.org --- arch/arm/boot/dts/rk3288-evb.dtsi | 18

[PATCH 2/3] ARM: dts: add rk3288 ehci usb devices

2014-07-29 Thread Doug Anderson
support high-speed devices. Signed-off-by: Kever Yang kever.y...@rock-chips.com Signed-off-by: Doug Anderson diand...@chromium.org --- arch/arm/boot/dts/rk3288.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi

Re: [PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb

2014-07-30 Thread Doug Anderson
Heiko, On Wed, Jul 30, 2014 at 4:24 AM, Heiko Stübner he...@sntech.de wrote: Am Dienstag, 29. Juli 2014, 16:24:31 schrieb Doug Anderson: There is no phy driver that works on the Rockchip board for either USB host port yet. For now just hardcode the vbus signal to be on all the time which

Re: [PATCH 3/3] ARM: dts: Enable USB host0 (EHCI) on rk3288-evb

2014-07-30 Thread Doug Anderson
Heiko, On Wed, Jul 30, 2014 at 4:26 AM, Heiko Stübner he...@sntech.de wrote: Am Dienstag, 29. Juli 2014, 16:24:33 schrieb Doug Anderson: This is the top USB port on the evb (the one closest to the Ethernet connector). Signed-off-by: Doug Anderson diand...@chromium.org Signed-off-by: Kever

Re: [PATCH 2/3] ARM: dts: add rk3288 ehci usb devices

2014-07-30 Thread Doug Anderson
Hi, On Tue, Jul 29, 2014 at 4:24 PM, Doug Anderson diand...@chromium.org wrote: rk3288 has two kind of usb controller; this adds the ehci variant for host0 and hsic. At the moment we don't add any phys for these controllers, but the default settings seem to work OK. There is a hardware

Re: [PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb

2014-07-30 Thread Doug Anderson
Heiko, On Wed, Jul 30, 2014 at 11:24 AM, Heiko Stübner he...@sntech.de wrote: Hi Doug, Am Mittwoch, 30. Juli 2014, 08:13:52 schrieb Doug Anderson: On Wed, Jul 30, 2014 at 4:24 AM, Heiko Stübner he...@sntech.de wrote: Am Dienstag, 29. Juli 2014, 16:24:31 schrieb Doug Anderson

[PATCH v2 0/3] Enable EHCI port on rk3288-evb

2014-07-30 Thread Doug Anderson
Doug Anderson (2): ARM: dts: Turn on USB host vbus on rk3288-evb ARM: dts: Enable USB host0 (EHCI) on rk3288-evb Kever Yang (1): ARM: dts: add rk3288 ehci usb devices arch/arm/boot/dts/rk3288-evb.dtsi | 22 ++ arch/arm/boot/dts/rk3288.dtsi | 20 2

[PATCH v2 3/3] ARM: dts: Enable USB host0 (EHCI) on rk3288-evb

2014-07-30 Thread Doug Anderson
This is the top USB port on the evb (the one closest to the Ethernet connector). Signed-off-by: Doug Anderson diand...@chromium.org Signed-off-by: Kever Yang kever.y...@rock-chips.com --- Changes in v2: None arch/arm/boot/dts/rk3288-evb.dtsi | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v2 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb

2014-07-30 Thread Doug Anderson
There is no phy driver that works on the Rockchip board for either USB host port yet. For now just hardcode the vbus signal to be on all the time which makes both the dwc2 host and the EHCI port work. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - usb_host_vbus

[PATCH v2 2/3] ARM: dts: add rk3288 ehci usb devices

2014-07-30 Thread Doug Anderson
it unavailable and host0 controller can only support high-speed devices. Signed-off-by: Kever Yang kever.y...@rock-chips.com Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - Kever is now the author - Node is now named usb arch/arm/boot/dts/rk3288.dtsi | 20 1

Re: [PATCH v3 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting

2014-08-04 Thread Doug Anderson
Kever, On Mon, Aug 4, 2014 at 6:45 AM, Kever Yang kever.y...@rock-chips.com wrote: According to the dr_mode, the otg controller can work as device role during firmware period, and work as host role in the kernel, without use of usb_id pin. As the commit usb: dwc3: set 'mode' based on selected

Re: [PATCH v3 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting

2014-08-04 Thread Doug Anderson
Kever, On Mon, Aug 4, 2014 at 6:45 PM, Kever Yang kever.y...@rock-chips.com wrote: Doug, On 08/05/2014 12:34 AM, Doug Anderson wrote: Kever, On Mon, Aug 4, 2014 at 6:45 AM, Kever Yang kever.y...@rock-chips.com wrote: According to the dr_mode, the otg controller can work as device role

Re: [PATCH v3 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting

2014-08-06 Thread Doug Anderson
Paul, On Tue, Aug 5, 2014 at 1:08 PM, Paul Zimmerman paul.zimmer...@synopsys.com wrote: Maybe dwc2 is refer to the Kconfig in dwc3 for there is a choice from one of Host only mode, Gadget only mode and Dual Role mode, which means the role is decided by the Kconfig. In my opinion, there maybe

Re: [PATCH v4 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting

2014-08-06 Thread Doug Anderson
Kever, On Tue, Aug 5, 2014 at 6:01 PM, Kever Yang kever.y...@rock-chips.com wrote: According to the dr_mode, the otg controller can work as device role and host role. Some boards always want to use host mode and some other boards want to use gadget mode. We use the dts setting to set dwc2's

Re: [PATCH v4 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting

2014-08-06 Thread Doug Anderson
Kever, On Tue, Aug 5, 2014 at 6:01 PM, Kever Yang kever.y...@rock-chips.com wrote: According to the dr_mode, the otg controller can work as device role and host role. Some boards always want to use host mode and some other boards want to use gadget mode. We use the dts setting to set dwc2's

[PATCH] usb: dwc2: Read GNPTXFSIZ when in forced HOST mode.

2014-08-07 Thread Doug Anderson
ff58.usb: 128 invalid for host_nperio_tx_fifo_size. Check HW configuration. After this change we see: dwc2 ff58.usb: gnptxfsiz=04000400 Signed-off-by: Doug Anderson diand...@chromium.org --- drivers/usb/dwc2/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v4 2/4] usb: dwc2: add compatible data for rockchip soc

2014-08-07 Thread Doug Anderson
Paul, On Thu, Aug 7, 2014 at 11:26 AM, Paul Zimmerman paul.zimmer...@synopsys.com wrote: From: Kever Yang [mailto:kever.y...@gmail.com] On Behalf Of Kever Yang Sent: Thursday, August 07, 2014 2:35 AM This patch add compatible data for dwc2 controller found on rk3066, rk3188 and rk3288

Re: [PATCH] usb: dwc2: Read GNPTXFSIZ when in forced HOST mode.

2014-08-07 Thread Doug Anderson
Paul, On Thu, Aug 7, 2014 at 1:18 PM, Paul Zimmerman paul.zimmer...@synopsys.com wrote: From: Doug Anderson [mailto:diand...@chromium.org] Sent: Thursday, August 07, 2014 12:48 PM The documentation for GNPTXFSIZ says that For host mode, this field is always valid. Since we're already

Re: [PATCH v5 2/4] usb: dwc2: add compatible data for rockchip soc

2014-08-08 Thread Doug Anderson
feel it's the right time. Reviewed-by: Doug Anderson diand...@chromium.org Tested-by: Doug Anderson diand...@chromium.org -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH v4 2/2] usb: dwc2: add 'mode' which based on Kconfig select or dts setting

2014-08-19 Thread Doug Anderson
-by: Doug Anderson diand...@chromium.org Greg: now that the merge window has closed, are you interested in landing Kever's changes (with Paul's Ack). There's this series and another adding rk3288 support. If you'd like Kever to repost with Acks or want pointers to patches, please yell! ;) -Doug

Re: [PATCH] usb: dwc2: Read GNPTXFSIZ when in forced HOST mode.

2014-09-08 Thread Doug Anderson
Greg, On Thu, Aug 7, 2014 at 1:18 PM, Paul Zimmerman paul.zimmer...@synopsys.com wrote: From: Doug Anderson [mailto:diand...@chromium.org] Sent: Thursday, August 07, 2014 12:48 PM The documentation for GNPTXFSIZ says that For host mode, this field is always valid. Since we're already

Re: [PATCH v3] usb: dwc2: add bus suspend/resume for dwc2

2014-11-12 Thread Doug Anderson
Kever, On Mon, Nov 10, 2014 at 5:09 AM, Kever Yang kever.y...@rock-chips.com wrote: Hcd controller needs bus_suspend/resume, dwc2 controller make root hub generate suspend/resume signal with hprt0 register when work in host mode. After the root hub enter suspend, we can make controller enter

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Doug Anderson
that in my tests this fixes the problems introduced by your v3 patch at https://patchwork.kernel.org/patch/5266281/. On rk3288-pinky: Tested-by: Doug Anderson diand...@chromium.org -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY

2014-12-12 Thread Doug Anderson
Yunzhi, On Fri, Dec 12, 2014 at 7:07 AM, Yunzhi Li l...@rock-chips.com wrote: This patch to add a generic PHY driver for ROCKCHIP usb PHYs, currently this driver can support RK3288. The RK3288 SoC have three independent USB PHY IPs which are all configured through a set of registers located

Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY

2014-12-13 Thread Doug Anderson
Hi, On Fri, Dec 12, 2014 at 11:24 PM, Kishon Vijay Abraham I kis...@ti.com wrote: hi, On Saturday 13 December 2014 05:49 AM, Doug Anderson wrote: Yunzhi, On Fri, Dec 12, 2014 at 7:07 AM, Yunzhi Li l...@rock-chips.com wrote: This patch to add a generic PHY driver for ROCKCHIP usb PHYs

Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY

2014-12-15 Thread Doug Anderson
power at suspend time. Tested-by: Doug Anderson diand...@chromium.org -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.

2014-12-15 Thread Doug Anderson
. Tested-by: Doug Anderson diand...@chromium.org -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume quirk

2014-12-22 Thread Doug Anderson
about this and you can find a whole set of detailed discussion at: https://chromium-review.googlesource.com/#/c/232077/1/drivers/usb/host/ehci-platform.c Since I don't know the USB subsystem particularly well, my review isn't terribly meaningful, but just in case: Reviewed-by: Doug Anderson diand

Re: [PATCH 1/2] dt-bindings: usb-ehci: Add an optional property needs-reset-on-resume

2014-12-22 Thread Doug Anderson
give it anyway: Reviewed-by: Doug Anderson diand...@chromium.org -Doug -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume quirk

2014-12-22 Thread Doug Anderson
Hi, On Mon, Dec 22, 2014 at 1:04 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 22 Dec 2014, Doug Anderson wrote: Alan, On Mon, Dec 22, 2014 at 8:06 AM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 22 Dec 2014, Wu Liang feng wrote: The EHCI controller doesn't properly

Re: [PATCH v5 00/22] usb: third series of updates for dwc2 driver

2015-06-22 Thread Doug Anderson
Hi, On Thu, Jun 4, 2015 at 6:12 AM, Kaukab, Yousaf yousaf.kau...@intel.com wrote: Tested-by: Heiko Stuebner he...@sntech.de -- 8 -- [ 19.799200] BUG: sleeping function called from invalid context at mm/slab.c:2863 Will I see a patch for fixing this ?

Re: [PATCH v5 00/22] usb: third series of updates for dwc2 driver

2015-06-23 Thread Doug Anderson
John and Felipe, On Tue, Jun 23, 2015 at 10:56 AM, John Youn john.y...@synopsys.com wrote: On 6/22/2015 4:00 PM, Doug Anderson wrote: Hi, On Thu, Jun 4, 2015 at 6:12 AM, Kaukab, Yousaf yousaf.kau...@intel.com wrote: Tested-by: Heiko Stuebner he...@sntech.de -- 8

Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288

2015-07-06 Thread Doug Anderson
Felipe, On Mon, Jul 6, 2015 at 10:48 AM, Felipe Balbi ba...@ti.com wrote: On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote: This series of patches, together with https://patchwork.kernel.org/patch/6652341/ from Chris Zhong and a dts change allow us to wake up from a USB device

Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

2015-07-06 Thread Doug Anderson
Hi, On Mon, Jul 6, 2015 at 12:02 PM, Felipe Balbi ba...@ti.com wrote: On Mon, Jul 06, 2015 at 02:58:16PM -0400, Alan Stern wrote: On Mon, 6 Jul 2015, Douglas Anderson wrote: If the 'snps,need-phy-for-wake' is set in the device tree then: - We know that we can wakeup, so call

Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

2015-07-06 Thread Doug Anderson
Felipe, On Mon, Jul 6, 2015 at 11:34 AM, Felipe Balbi ba...@ti.com wrote: Hi, On Mon, Jul 06, 2015 at 11:27:04AM -0700, Douglas Anderson wrote: @@ -282,6 +296,28 @@ static int dwc2_driver_probe(struct platform_device *dev) return retval; } +static bool __maybe_unused

Re: [PATCH v2] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-08-18 Thread Doug Anderson
lyz, On Tue, Aug 18, 2015 at 2:40 AM, Yunzhi Li l...@rock-chips.com wrote: We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should be called before dwc2_get_hwparams() to reset core registers to default value. Without this the FIFO setting might be incorrect because calculating FIFO

Re: [PATCH 0/4] Patches to fix remote wakeup on rk3288 dwc2 "host" port

2015-10-24 Thread Doug Anderson
Rob, On Sat, Oct 24, 2015 at 11:10 AM, Rob Herring wrote: > On 10/23/2015 01:28 PM, Douglas Anderson wrote: >> The "host1" port (AKA the dwc2 port that isn't the OTG port) on rk3288 >> has a hardware errata that causes everything to get confused when we get >> a remote wakeup.

Re: [REPOST PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288

2015-10-21 Thread Doug Anderson
John, On Mon, Jul 6, 2015 at 11:27 AM, Douglas Anderson wrote: > This series of patches, together with > from Chris Zhong and a > dts change allow us to wake up from a USB device on rk3288 boards. > The patches were tested on

Re: [PATCH 0/4] Patches to fix remote wakeup on rk3288 dwc2 "host" port

2015-10-26 Thread Doug Anderson
Rob, On Mon, Oct 26, 2015 at 4:05 PM, Rob Herring wrote: >>> A DT reset controller seems like a bit of an overkill here. I think this >>> would be much more simple if we just add a phy reset hook to the phy >>> subsystem. >> >> Adding a reset hook in the PHY subsystem does seem

Re: [PATCH 0/4] Patches to fix remote wakeup on rk3288 dwc2 "host" port

2015-10-26 Thread Doug Anderson
Hi, On Mon, Oct 26, 2015 at 4:49 PM, Doug Anderson <diand...@chromium.org> wrote: > One note: the "full" PHY reset is actually not in the register map of > the PHY. It is amazingly enough in the CRU (clock reset unit). So if > we actually exposed the "full&qu

Re: [PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2

2015-10-29 Thread Doug Anderson
John, On Thu, Oct 22, 2015 at 1:05 PM, Douglas Anderson wrote: > In commit 734643dfbdde ("usb: dwc2: host: add flag to reflect bus > state") we changed dwc2_port_suspend() not to set the lx_state > anymore (instead it sets the new bus_suspended variable). This >

Re: [PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2

2015-10-29 Thread Doug Anderson
Hi, On Thu, Oct 29, 2015 at 3:49 PM, Heiko Stuebner wrote: > Am Donnerstag, 22. Oktober 2015, 13:05:03 schrieb Douglas Anderson: >> In commit 734643dfbdde ("usb: dwc2: host: add flag to reflect bus >> state") we changed dwc2_port_suspend() not to set the lx_state >> anymore

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-09 Thread Doug Anderson
Hi, On Mon, Nov 9, 2015 at 1:57 AM, Yunzhi Li wrote: > It seems that we are debugging two different issues, your new patch which > rewrite > the microframe scheduler doesn't resolve my problem. My patch fix chrome-os > issue > #46547 not related to the particular Microsoft

Re: [RFC PATCH] usb: dwc2: host: Rewrite the microframe scheduler

2015-11-09 Thread Doug Anderson
Hi, On Fri, Nov 6, 2015 at 5:50 PM, Douglas Anderson wrote: > The old microframe scheduler was terribly hard to follow and (it seemed > to me) that it had some bugs in it. > > Let's re-write it in a simpler, easier-to-read way. Hopefully this will > work better. > > Note:

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-11 Thread Doug Anderson
John, On Wed, Nov 11, 2015 at 8:29 PM, John Youn wrote: > I also feel it is not quite right as the SSPLIT should be able to > happen during the SSPLIT of another device. I tried to reproduce > and see the same scheduling but don't see any hang due to it. > > Yunzhi, any

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-13 Thread Doug Anderson
John, On Thu, Nov 12, 2015 at 9:05 PM, John Youn wrote: > It seems to be an issue with single TT hubs. I've tried several > multi-TT hubs with no issues. Agreed. > With a single TT hub I do see a problem though not the exact one > described. I see corrupted and dropped

Re: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 8:28 AM, Felipe Balbi wrote: > > Hi, > > Douglas Anderson writes: >> In general it is wise to clear interrupts before processing them. If >> you don't do that, you can get: >> 1. Interrupt happens >> 2. You look at system

Re: [PATCH] usb: dwc2: hcd: fix periodic transfer schedule sequence

2015-11-16 Thread Doug Anderson
Yunzhi On Mon, Nov 16, 2015 at 7:25 AM, Yunzhi Li wrote: > When checking dwc2 host channel interrupts, handle qh in > periodic_sched_queued list at first, then we could make sure CSPLIT > packets scheduled in the same order as SSPLIT packets. > > Signed-off-by: Yunzhi Li

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 10:22 AM, Felipe Balbi wrote: >> I added "force" in v2 of the patch in response to John's feedback to >> v1. He pointed out that when you unload the module when you have a >> device connected that my v1 patch would not properly disconnect the >>

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 9:44 AM, Felipe Balbi wrote: >> extern void dwc2_hcd_start(struct dwc2_hsotg *hsotg); >> #else >> static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) >> { return 0; } >> -static inline void dwc2_hcd_disconnect(struct dwc2_hsotg

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Alan, On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> --- >> >> usb: dwc2: host: Fix missing device insertions >> >> If you've got your interrupt signals bouncing a bit as yo

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-16 Thread Doug Anderson
John, On Wed, Nov 11, 2015 at 8:29 PM, John Youn <john.y...@synopsys.com> wrote: > On 11/11/2015 4:22 PM, Doug Anderson wrote: >> John, >> >> On Fri, Nov 6, 2015 at 2:04 AM, Yunzhi Li <l...@rock-chips.com> wrote: >>> hi John , >>> >>>

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Alan, On Mon, Nov 16, 2015 at 12:31 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> Alan, >> >> On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern <st...@rowland.harvard.edu> >> wrote: >

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
John, On Mon, Nov 16, 2015 at 5:53 PM, John Youn wrote: > Yup it's only available in host mode. The same with all the > host-mode registers. You will get a ModeMis interrupt if you > try to access them in device mode. > > I gave my test-by on the v2 patches earlier, no

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-11 Thread Doug Anderson
John, On Fri, Nov 6, 2015 at 2:04 AM, Yunzhi Li wrote: > hi John , > > As we talked yesterday, I tried to fix the split schedule sequence. This > patch will > avoid scheduling SSPLIT-IN packet for another device between > SSPLIT-OUT-begin and > SSPLIT-OUT-end, now the

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-17 Thread Doug Anderson
Alan, On Tue, Nov 17, 2015 at 7:40 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> > Fundamentally there's no difference between a "connect" interrupt and a >> > "disconnect" interrupt. They

Re: [PATCH v2 1/2] usb: dwc2: optionally assert phy "full reset" when waking up

2015-11-02 Thread Doug Anderson
Hi, On Mon, Nov 2, 2015 at 9:16 AM, Rob Herring <robh...@kernel.org> wrote: > On Mon, Nov 2, 2015 at 10:22 AM, Doug Anderson <diand...@chromium.org> wrote: >> Rob, >> >> On Mon, Nov 2, 2015 at 8:12 AM, Rob Herring <robh...@kernel.org> wrote: >>> O

Re: [REPOST PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288

2015-10-30 Thread Doug Anderson
John, On Mon, Oct 26, 2015 at 7:05 PM, John Youn <john.y...@synopsys.com> wrote: > On 10/21/2015 9:23 AM, Doug Anderson wrote: >> John, >> >> On Mon, Jul 6, 2015 at 11:27 AM, Douglas Anderson <diand...@chromium.org> >> wrote: >>>

Re: [PATCH 2/3] usb: dwc2: host: Giveback URB in tasklet context

2015-11-04 Thread Doug Anderson
Hi, On Wed, Nov 4, 2015 at 2:53 PM, Douglas Anderson wrote: > In commit 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet > context") support was added to give back the URB in tasklet context. > Let's take advantage of this in dwc2. > > This speeds up the dwc2

Re: [PATCH 2/3] usb: dwc2: host: Giveback URB in tasklet context

2015-11-06 Thread Doug Anderson
Alan, On Fri, Nov 6, 2015 at 7:40 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Thu, 5 Nov 2015, Doug Anderson wrote: > >> Alan, >> >> On Thu, Nov 5, 2015 at 7:19 AM, Alan Stern <st...@rowland.harvard.edu> wrote: >> > On Wed, 4 Nov 2015, Do

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-06 Thread Doug Anderson
lyz@, On Fri, Nov 6, 2015 at 1:36 AM, Yunzhi Li wrote: > Fix dwc2 split schedule sequence issue. Not schedule a SSPLIT_IN > packet between SSPLIT-begin and SSPLIT-end. > > Signed-off-by: Yunzhi Li > --- > drivers/usb/dwc2/hcd.c | 4 > 1 file

Re: [PATCH 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-03 Thread Doug Anderson
John, On Fri, Oct 30, 2015 at 1:38 PM, John Youn wrote: > On 10/16/2015 3:10 PM, Douglas Anderson wrote: >> If you've got your interrupt signals bouncing a bit as you insert your >> USB device, you might end up in a state when the device is connected but >> the driver

Re: [PATCH v2 1/2] usb: dwc2: optionally assert phy "full reset" when waking up

2015-11-02 Thread Doug Anderson
Rob, On Mon, Nov 2, 2015 at 8:12 AM, Rob Herring <robh...@kernel.org> wrote: > On Fri, Oct 30, 2015 at 3:17 PM, Douglas Anderson <diand...@chromium.org> > wrote: >> From: Doug Anderson <diand...@chromium.org> >> >> On the rk3288 USB host-only port (

Re: [PATCH 2/3] usb: dwc2: host: Giveback URB in tasklet context

2015-11-05 Thread Doug Anderson
Alan, On Thu, Nov 5, 2015 at 7:19 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Wed, 4 Nov 2015, Doug Anderson wrote: > >> In the ChromeOS gerrit >> <https://chromium-review.googlesource.com/#/c/310583/> Julius Werner >> points out that for EHCI it wa

Re: [PATCH v2 00/13] usb: dwc2: descriptor dma mode bug fixes

2015-11-05 Thread Doug Anderson
Hi, On Thu, Nov 5, 2015 at 12:41 AM, Gregory Herrero wrote: > Hi, > > This patchset contains bug fixes for host descriptor dma mode. > > Descriptor dma mode can't be used as the default mode since controller > does not support split transfers in this mode. > So we add

Re: [RFC PATCH] usb: dwc2: host: dwc2_check_qtd_still_ok() can be static

2015-10-14 Thread Doug Anderson
Hi, On Wed, Oct 14, 2015 at 1:44 PM, kbuild test robot wrote: > > Signed-off-by: Fengguang Wu > --- > hcd_intr.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c > index

Re: [PATCH v2] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-10-07 Thread Doug Anderson
John, On Mon, Oct 5, 2015 at 3:02 PM, John Youn <john.y...@synopsys.com> wrote: > On 10/1/2015 1:50 PM, Doug Anderson wrote: >> John, >> >> On Tue, Aug 18, 2015 at 5:19 PM, John Youn <john.y...@synopsys.com> wrote: >>> Hi Yunzhi, >>&g

Re: [PATCH 3/5] CHROMIUM: usb: dwc2: Avoid double-reset at boot time

2015-10-08 Thread Doug Anderson
Hi, On Wed, Oct 7, 2015 at 5:48 PM, Douglas Anderson wrote: > In (usb: dwc2: reset dwc2 core before dwc2_get_hwparams()) we added an > extra reset to the probe path for the dwc2 USB controllers. This > allowed proper detection of parameters even if the firmware had

Re: [PATCH v2] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-15 Thread Doug Anderson
John, On Thu, Oct 15, 2015 at 4:21 PM, John Youn wrote: > Passing a NULL qtd to some of the subcases will lead to a NULL > pointer dereference in that function or some function that it > calls. > > I think you could just check the qtd after each call and bail if > it's

Re: [PATCH v1 14/14] usb: dwc2: host: use kmem cache to allocate descriptors

2015-10-15 Thread Doug Anderson
Gregory, On Mon, Oct 12, 2015 at 2:17 AM, Gregory Herrero wrote: > - qh->desc_list = kzalloc(qh->desc_list_sz, flags | GFP_DMA32); > + qh->desc_list = kmem_cache_zalloc(desc_cache, flags | GFP_DMA32); I haven't gotten your series to work yet on Rockchip

Re: [PATCH v1 14/14] usb: dwc2: host: use kmem cache to allocate descriptors

2015-10-16 Thread Doug Anderson
Gregory, On Fri, Oct 16, 2015 at 1:44 PM, Herrero, Gregory wrote: > I can't reproduce this issue so far but using GFP_DMA32 is obviously > wrong here, so I will replace with GFP_DMA. With that, I can definitely boot up. :) >> When I reverted this patch and tried to

Re: [PATCH v4] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-19 Thread Doug Anderson
John, On Fri, Oct 16, 2015 at 9:14 PM, John Youn wrote: > I reviewed this some more and I think this should be ok. Most of > the handlers don't make sense without a qtd and/or channel. > > Although I am not completely sure on the desc dma case. I think > it will at least

Re: [PATCH v1 02/32] usb: dwc2: host: create a function to handle port_resume

2015-09-17 Thread Doug Anderson
Hi, On Thu, Sep 17, 2015 at 12:41 PM, Doug Anderson <diand...@chromium.org> wrote: >> + spin_unlock_irqrestore(>lock, flags); >> + >> + msleep(USB_RESUME_TIMEOUT); >> + >> + spin_lock_irqsave(>lock, flags); >> + hprt0 &am

Re: [PATCH v1 03/32] usb: dwc2: host: add flag to reflect bus state

2015-09-17 Thread Doug Anderson
Hi, On Wed, Sep 9, 2015 at 3:20 AM, Mian Yousaf Kaukab wrote: > /* Update lx_state */ > - hsotg->lx_state = DWC2_L2; > + hsotg->bus_suspended = 1; /* Update comment */ -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in

Re: [PATCH v1 02/32] usb: dwc2: host: create a function to handle port_resume

2015-09-17 Thread Doug Anderson
Hi, On Wed, Sep 9, 2015 at 3:20 AM, Mian Yousaf Kaukab wrote: > From: Gregory Herrero > > port resume sequence may be used in different places. Create a > function to handle it. Moreover, make hprt0 read-modify-write atomic. > > Signed-off-by:

Re: [PATCH v2] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-10-01 Thread Doug Anderson
John, On Tue, Aug 18, 2015 at 5:19 PM, John Youn wrote: > Hi Yunzhi, > > My concern is with the delays due to calling the dwc2_core_reset > during probe. You could factor out the assertion of the core > soft reset from the dwc2_core_reset and just use that before >

Re: [PATCH 13/18] usb: dwc2: Move reset into dwc2_get_hwparams()

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:14 AM, John Youn wrote: > The reset is required to get reset values of the hardware parameters but > the force mode is not. Move the base reset into dwc2_get_hwparams() and > do the reset and force mode afterwards. > > Signed-off-by: John

Re: [PATCH 00/18] usb: dwc2: Reduce probe delays

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:11 AM, John Youn wrote: > This series includes patches that were submitted earlier by Douglas > Anderson and Yunzhi Li to reduce delays during probe and get the > correct reset values of the hardware configuration registers. These > are

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:15 AM, John Youn wrote: > This commit adds separate functions for getting the host and device > specific hardware params. These functions check whether the parameters > need to be read at all, depending on dr_mode, and they force the mode >

Re: [PATCH 12/18] usb: dwc2: Move mode querying functions into core.h

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:14 AM, John Youn wrote: > These functions should go in core.h where they can be called from core, > device, or host. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.h | 12 >

Re: [PATCH 18/18] usb: dwc2: Reduce delay when forcing mode in reset

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:15 AM, John Youn wrote: > The delay for force mode is only 25ms according to the databook. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

  1   2   3   >