Re: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-03 Thread Peter Chen
On Mon, Dec 3, 2018 at 4:34 AM Pawel Laszczak wrote: > > >> > >> Patch adds core.c and core.h file that implements initialization > >> of platform driver and adds function responsible for selecting, > >> switching and running appropriate Device/Host mode. > >> > >> Signed-off-by: Pawel Laszczak >

RE: [PATCH v2 2/3] usb: chipidea: imx: Warn if oc polarity isn't specified

2018-12-03 Thread PETER CHEN
> Signed-off-by: Uwe Kleine-König > --- > drivers/usb/chipidea/ci_hdrc_imx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c > b/drivers/usb/chipidea/ci_hdrc_imx.c > index 80b4e4ef9b68..3dcfd0d97f94 100644 > --- a/drivers/usb/chipidea/ci_hdrc_imx.

RE: RESEND: About VBUS glitch happen on DWC3 host mode enabling process.

2018-12-03 Thread Ran Wang
Hello Felipe, Felipe Balbi wrote: > > Hi Ran, > > Ran Wang writes: > >> > Then, DWC3 core driver continued to call function > >> > dwc3_host_init()->platform_device_add(xhci)… > >> > xhci_plat_probe()->usb_add_hcd()->xhci_plat_setup()->xhci_gen_set > >> > up > >> > -> xhci_reset(), which wou

Re: [PATCH v1 10/12] hikey960: Support usb functionality of Hikey960

2018-12-03 Thread Chen Yu
Hi, On 2018/12/3 17:23, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: >> >> This driver handles usb hub power on and typeC port event of HiKey960 board: >> 1)DP&DM switching between usb hub and typeC port base on typeC port >> state >> 2)Control power of usb hub on Hikey9

Re: [PATCH v1 11/12] usb: gadget: Add configfs attribuite for controling match_existing_only

2018-12-03 Thread Chen Yu
On 2018/12/3 17:25, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: >> >> Currently the "match_existing_only" of usb_gadget_driver in configfs is >> set to one which is not flexible. >> Dwc3 udc will be removed when usb core switch to host mode. This causes >> failure of

Re: [PATCH v1 08/12] usb: roles: Add usb role switch notifier.

2018-12-03 Thread Chen Yu
On 2018/12/3 20:38, Heikki Krogerus wrote: > On Mon, Dec 03, 2018 at 11:45:11AM +0800, Yu Chen wrote: >> This patch adds notifier for drivers want to be informed of the usb role >> switch. > > I think in this case it would be good to explain a little for what we > need the notifier for. > >>

Re: [PATCH 01/10] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-03 Thread Chen Yu
On 2018/12/4 0:01, Rob Herring wrote: > On Fri, Nov 16, 2018 at 8:29 PM Chen Yu wrote: >> >> Hi, >> >> On 2018/11/13 0:02, Rob Herring wrote: >>> On Sat, Oct 27, 2018 at 05:58:11PM +0800, Yu Chen wrote: This patch adds binding descriptions to support the dwc3 controller on HiSilicon S

RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests

2018-12-03 Thread Alan Stern
On Mon, 3 Dec 2018, Anurag Kumar Vulisha wrote: > >On Mon, 3 Dec 2018, Anurag Kumar Vulisha wrote: > > > >> >First of all, if some sort of deadlock causes a transfer to fail to > >> >complete, the host is expected to cancel and restart it. Not the > >> >gadget. > >> > > >> > >> Thanks for spendin

[PATCH] usb: musb: dsps: fix otg state machine

2018-12-03 Thread Bin Liu
Due to lack of ID pin interrupt event on AM335x devices, the musb dsps driver uses polling to detect usb device attach for dual-role port. But in the case if a micro-A cable adapter is attached without a USB device attached to the cable, the musb state machine gets stuck in a_wait_vrise state wait

Re: [PATCH v2 1/3] staging: typec: fusb302: Rename fcs,extcon-name to linux,extcon-name

2018-12-03 Thread Andy Shevchenko
On Thu, Nov 15, 2018 at 04:53:03PM +0200, Heikki Krogerus wrote: > On Thu, Nov 15, 2018 at 03:16:19PM +0200, Andy Shevchenko wrote: > > Since we are going to use the same in Designware USB 3 driver, > > rename the property to be consistent across the drivers. > > > > No functional change intended.

USB OF device node "compatible" property

2018-12-03 Thread Thomas Preston
Hi, I'm trying to understand how the "compatible" property might be used in USB device nodes. The document "Open Firmware Recommended Practice: Universal Serial Bus Version 1" [0] defines a "compatible" property format for USB device nodes. At present, the kernel does not check this property and

Re: [PATCH v2 1/3] usb: chipidea: imx: support configuring for active low oc signal

2018-12-03 Thread Uwe Kleine-König
On Mon, Dec 03, 2018 at 04:10:37PM +, Matthew Starr wrote: > > -Original Message- > > From: Uwe Kleine-König [mailto:u.kleine-koe...@pengutronix.de] > > Sent: Sunday, December 02, 2018 3:33 PM > > > > The status quo on i.MX6 is that if "over-current-active-high" is > > specified in the

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-03 Thread Hans de Goede
Hi, On 03-12-18 17:21, Stephan Gerhold wrote: On Mon, Dec 03, 2018 at 11:50:53AM +0100, Hans de Goede wrote: Hi, On 02-12-18 18:08, Stephan Gerhold wrote: Hi, thanks for the quick reply! :) On Sun, Dec 02, 2018 at 03:41:29PM +0100, Hans de Goede wrote: Hi, On 01-12-18 13:22, Stephan Gerho

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-03 Thread Stephan Gerhold
On Mon, Dec 03, 2018 at 11:50:53AM +0100, Hans de Goede wrote: > Hi, > > On 02-12-18 18:08, Stephan Gerhold wrote: > > Hi, > > > > thanks for the quick reply! :) > > > > On Sun, Dec 02, 2018 at 03:41:29PM +0100, Hans de Goede wrote: > > > Hi, > > > > > > On 01-12-18 13:22, Stephan Gerhold wrote

RE: [PATCH v2 1/3] usb: chipidea: imx: support configuring for active low oc signal

2018-12-03 Thread Matthew Starr
> -Original Message- > From: Uwe Kleine-König [mailto:u.kleine-koe...@pengutronix.de] > Sent: Sunday, December 02, 2018 3:33 PM > > The status quo on i.MX6 is that if "over-current-active-high" is > specified in the device tree this is configured as expected. If > the property is missing p

RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests

2018-12-03 Thread Anurag Kumar Vulisha
Hi Alan, >-Original Message- >From: Alan Stern [mailto:st...@rowland.harvard.edu] >Sent: Monday, December 03, 2018 8:21 PM >To: Anurag Kumar Vulisha >Cc: Felipe Balbi ; Greg Kroah-Hartman >; Shuah Khan ; Johan Hovold >; Jaejoong Kim ; Benjamin >Herrenschmidt ; Roger Quadros ; Manu >Gaut

Re: [PATCH 01/10] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-03 Thread Rob Herring
On Fri, Nov 16, 2018 at 8:29 PM Chen Yu wrote: > > Hi, > > On 2018/11/13 0:02, Rob Herring wrote: > > On Sat, Oct 27, 2018 at 05:58:11PM +0800, Yu Chen wrote: > >> This patch adds binding descriptions to support the dwc3 controller > >> on HiSilicon SoCs and boards like the HiKey960. > >> > >> Cc:

RE: [PATCH 1/1] usb: chipidea: imx: improve the over current handling

2018-12-03 Thread Matthew Starr
> -Original Message- > From: Uwe Kleine-König [mailto:u.kleine-koe...@pengutronix.de] > > On Mon, Dec 03, 2018 at 09:02:05AM +, PETER CHEN wrote: > > > > > > > > On Mon, Dec 03, 2018 at 03:13:01AM +, PETER CHEN wrote: > > > > The current OC (Over Current) handling does not consider

RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests

2018-12-03 Thread Alan Stern
On Mon, 3 Dec 2018, Anurag Kumar Vulisha wrote: > >First of all, if some sort of deadlock causes a transfer to fail to > >complete, the host is expected to cancel and restart it. Not the > >gadget. > > > > Thanks for spending your time in reviewing this patch. The deadlock > is a very rare cas

Re: [PATCH v1 09/12] usb: dwc3: Registering a role switch in the DRD code.

2018-12-03 Thread Heikki Krogerus
On Mon, Dec 03, 2018 at 11:45:12AM +0800, Yu Chen wrote: > The Type-C drivers use USB role switch API to inform the > system about the negotiated data role, so registering a role > switch in the DRD code in order to support platforms with > USB Type-C connectors. > > Cc: Felipe Balbi > Cc: Greg K

Re: [PATCH v1 08/12] usb: roles: Add usb role switch notifier.

2018-12-03 Thread Heikki Krogerus
On Mon, Dec 03, 2018 at 11:45:11AM +0800, Yu Chen wrote: > This patch adds notifier for drivers want to be informed of the usb role > switch. I think in this case it would be good to explain a little for what we need the notifier for. > Cc: Greg Kroah-Hartman > Cc: Heikki Krogerus > Cc: Hans d

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2018-12-03 Thread Heikki Krogerus
Hi, On Mon, Dec 03, 2018 at 10:17:20AM +0200, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:45 AM Yu Chen wrote: > > > > This patch adds code for supporting find usb role switch by matching against > > the device node described using of_graph. > > > #include > > #include > > #include >

Re: USB driver resets

2018-12-03 Thread Richard van der Hoff
Does anybody have any suggestions as to how I could set about debugging this? I'm seeing the same symptoms on a 4.19 kernel. On 19/11/2018 15:27, Richard van der Hoff wrote: I have a USB-3.1 dock, which I use for video (via displayport alt mode) and power delivery, as well as keyboard, mouse,

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-03 Thread Hans de Goede
Hi, On 02-12-18 18:08, Stephan Gerhold wrote: Hi, thanks for the quick reply! :) On Sun, Dec 02, 2018 at 03:41:29PM +0100, Hans de Goede wrote: Hi, On 01-12-18 13:22, Stephan Gerhold wrote: Hi, I have been updating my Intel Baytrail tablet from 4.14 to 4.19 and noticed that the tusb1210 PH

[PATCH v4] USB: Don't enable LPM if it's already enabled

2018-12-03 Thread Kai-Heng Feng
USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working after S3: [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110) After some experiments, I found that disabling LPM can workaround the issue

RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests

2018-12-03 Thread Anurag Kumar Vulisha
Hi Alan, >-Original Message- >From: Alan Stern [mailto:st...@rowland.harvard.edu] >Sent: Sunday, December 02, 2018 10:06 PM >To: Anurag Kumar Vulisha >Cc: Felipe Balbi ; Greg Kroah-Hartman >; Shuah Khan ; Johan Hovold >; Jaejoong Kim ; Benjamin >Herrenschmidt ; Roger Quadros ; Manu >Gauta

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-03 Thread Pawel Laszczak
Hi >>> + >>> +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, >>> + struct usb_endpoint_descriptor >>> *desc, >>> + struct usb_ss_ep_comp_descriptor >>> *comp_desc) >>> +{ >>> + struct cdns3_devic

Re: [PATCH v1 11/12] usb: gadget: Add configfs attribuite for controling match_existing_only

2018-12-03 Thread Krzysztof Opasiak
On 03.12.2018 04:45, Yu Chen wrote: > Currently the "match_existing_only" of usb_gadget_driver in configfs is > set to one which is not flexible. > Dwc3 udc will be removed when usb core switch to host mode. This causes > failure of writing name of dwc3 udc to configfs's UDC attribuite. > To fix

Re: [PATCH v1 09/12] usb: dwc3: Registering a role switch in the DRD code.

2018-12-03 Thread Chen Yu
On 2018/12/3 17:15, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: >> >> The Type-C drivers use USB role switch API to inform the >> system about the negotiated data role, so registering a role >> switch in the DRD code in order to support platforms with >> USB Type-C con

[PATCH v1] usb: dwc3: trace: Refactor nested switch to make compiler happy

2018-12-03 Thread Andy Shevchenko
The missed break statement in the outer switch makes the code fall through always and thus always same value will be printed. Besides that, compiler warns about missed fall through marker: drivers/usb/dwc3/./trace.h: In function ‘trace_raw_output_dwc3_log_trb’: drivers/usb/dwc3/./trace.h:246:4: w

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-03 Thread Chen Yu
Hi, On 2018/12/3 16:59, Sergei Shtylyov wrote: > On 03.12.2018 11:51, Chen Yu wrote: > This patch adds binding descriptions to support the dwc3 controller on HiSilicon SoCs and boards like the HiKey960. Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland

Re: [PATCH v1 11/12] usb: gadget: Add configfs attribuite for controling match_existing_only

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: > > Currently the "match_existing_only" of usb_gadget_driver in configfs is > set to one which is not flexible. > Dwc3 udc will be removed when usb core switch to host mode. This causes > failure of writing name of dwc3 udc to configfs's UDC attribuite

Re: [PATCH v1 10/12] hikey960: Support usb functionality of Hikey960

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: > > This driver handles usb hub power on and typeC port event of HiKey960 board: > 1)DP&DM switching between usb hub and typeC port base on typeC port > state > 2)Control power of usb hub on Hikey960 > 3)Control vbus of typeC port > +config HISI_HIKEY

Re: [PATCH v1 09/12] usb: dwc3: Registering a role switch in the DRD code.

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: > > The Type-C drivers use USB role switch API to inform the > system about the negotiated data role, so registering a role > switch in the DRD code in order to support platforms with > USB Type-C connectors. > + pr_info("%s:set role %d\n", __fu

Re: [PATCH 1/1] usb: chipidea: imx: improve the over current handling

2018-12-03 Thread Uwe Kleine-König
On Mon, Dec 03, 2018 at 09:02:05AM +, PETER CHEN wrote: > > > > > On Mon, Dec 03, 2018 at 03:13:01AM +, PETER CHEN wrote: > > > The current OC (Over Current) handling does not consider the default > > > and bootloader OC setting well, in this commit, we reset OC setting > > > according t

RE: [PATCH 1/1] usb: chipidea: imx: improve the over current handling

2018-12-03 Thread PETER CHEN
> > On Mon, Dec 03, 2018 at 03:13:01AM +, PETER CHEN wrote: > > The current OC (Over Current) handling does not consider the default > > and bootloader OC setting well, in this commit, we reset OC setting > > according to dts value: > > - If property "disable-over-current" is set, we will di

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-03 Thread Sergei Shtylyov
On 03.12.2018 11:51, Chen Yu wrote: This patch adds binding descriptions to support the dwc3 controller on HiSilicon SoCs and boards like the HiKey960. Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: John Stultz Signed-off-by: Yu Chen ---   .../devicetree/bindings/usb/dwc3-his

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-03 Thread Chen Yu
Hi, On 2018/12/3 16:35, Sergei Shtylyov wrote: > Hello! > > On 03.12.2018 6:45, Yu Chen wrote: > >> This patch adds binding descriptions to support the dwc3 controller >> on HiSilicon SoCs and boards like the HiKey960. >> >> Cc: Greg Kroah-Hartman >> Cc: Rob Herring >> Cc: Mark Rutland >> Cc:

Re: [PATCH v3] USB: Don't enable LPM if it's already enabled

2018-12-03 Thread Kai Heng Feng
> On Dec 3, 2018, at 4:32 PM, Kai-Heng Feng wrote: > > USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working > after S3: > [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin > [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110) > > After

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-03 Thread Sergei Shtylyov
Hello! On 03.12.2018 6:45, Yu Chen wrote: This patch adds binding descriptions to support the dwc3 controller on HiSilicon SoCs and boards like the HiKey960. Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: John Stultz Signed-off-by: Yu Chen --- .../devicetree/bindings/usb/dw

[PATCH v3] USB: Don't enable LPM if it's already enabled

2018-12-03 Thread Kai-Heng Feng
USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working after S3: [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110) After some experiments, I found that disabling LPM can workaround the issue

Re: [PATCH v1 04/12] usb: dwc3: dwc3-hisi: Add code for dwc3 of Hisilicon Soc Platform

2018-12-03 Thread Chen Yu
Hi, On 2018/12/3 16:12, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:48 AM Yu Chen wrote: >> >> This driver handles the poweron and shutdown of dwc3 core >> on Hisilicon Soc Platform. > >> +config USB_DWC3_HISI >> + tristate "HiSilicon Kirin Platforms" >> + depends on ((ARCH_HIS

Re: [PATCH v1 05/12] usb: dwc3: Add two quirks for Hisilicon Kirin Soc Platform

2018-12-03 Thread Chen Yu
On 2018/12/3 16:02, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:48 AM Yu Chen wrote: >> >> There are tow quirks for DesignWare USB3 DRD Core of Hisilicon Kirin Soc. >> 1)SPLIT_BOUNDARY_DISABLE should be set for Host mode >> 2)A GCTL soft reset should be executed when switch mode > >> +st

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:45 AM Yu Chen wrote: > > This patch adds code for supporting find usb role switch by matching against > the device node described using of_graph. > #include > #include > #include > +#include > +#include Keep it ordered. > +static int __switch_match_by_of_node(st

Re: [PATCH v1 06/12] phy: Add usb phy support for hi3660 Soc of Hisilicon

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:47 AM Yu Chen wrote: > > This driver handles usb phy power on and shutdown for hi3660 Soc of > Hisilicon. > +// SPDX-License-Identifier: GPL-2.0+ Ambigous license through the code reading. > +#define PERI_CRG_CLK_EN4 (0x40) > +#define PERI_CRG_CLK

Re: [PATCH v1 04/12] usb: dwc3: dwc3-hisi: Add code for dwc3 of Hisilicon Soc Platform

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:48 AM Yu Chen wrote: > > This driver handles the poweron and shutdown of dwc3 core > on Hisilicon Soc Platform. > +config USB_DWC3_HISI > + tristate "HiSilicon Kirin Platforms" > + depends on ((ARCH_HISI && ARM64) || COMPILE_TEST) && OF It would be easy to re

Re: [PATCH 1/1] usb: chipidea: imx: improve the over current handling

2018-12-03 Thread Uwe Kleine-König
Hello, On Mon, Dec 03, 2018 at 03:13:01AM +, PETER CHEN wrote: > The current OC (Over Current) handling does not consider the default > and bootloader OC setting well, in this commit, we reset OC setting > according to dts value: > - If property "disable-over-current" is set, we will disable O

Re: [PATCH v1 05/12] usb: dwc3: Add two quirks for Hisilicon Kirin Soc Platform

2018-12-03 Thread Andy Shevchenko
On Mon, Dec 3, 2018 at 5:48 AM Yu Chen wrote: > > There are tow quirks for DesignWare USB3 DRD Core of Hisilicon Kirin Soc. > 1)SPLIT_BOUNDARY_DISABLE should be set for Host mode > 2)A GCTL soft reset should be executed when switch mode > +static void dwc3_gctl_core_soft_reset(struct dwc3 *dwc) >