Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-28 Thread John Youn
On 11/22/2016 12:51 PM, Christian Lamparter wrote: > On Monday, November 21, 2016 7:32:30 PM CET John Youn wrote: >> On 11/21/2016 1:10 PM, Christian Lamparter wrote: >>> On Monday, November 21, 2016 12:16:31 PM CET John Youn wrote: >>>> On 11/18/2016 12:18

Re: [PATCH v2 2/3] Revert "usb: dwc2: gadget: fix TX FIFO size and address initialization"

2016-11-28 Thread John Youn
On 11/24/2016 1:15 PM, Stefan Wahren wrote: > Hi John, > >> John Youn <johny...@synopsys.com> hat am 18. Oktober 2016 um 02:36 >> geschrieben: >> >> >> This reverts commit aa381a7259c3 ("usb: dwc2: gadget: fix TX FIFO size >> and addres

[PATCH v2] usb: dwc3: pci: Add "linux,sysdev_is_parent" property

2016-11-28 Thread John Youn
Calling platform_device_add_properties() replaces existing properties so the "linux,sysdev_is_parent" property doesn't get set. Add this property to each platform. Fixes: d64ff406e51e ("usb: dwc3: use bus->sysdev for DMA configuration") Signed-off-by: John Youn <john

[no subject]

2016-11-28 Thread John Youn
linux-usb@vger.kernel.org Cc: John Youn <johny...@synopsys.com>, Sriram Dash <sriram.d...@nxp.com>, Baolin Wang <baolin.w...@linaro.org>, Arnd Bergmann <a...@arndb.de> Calling platform_device_add_properties() replaces existing properties so the "linux,sysdev_is_paren

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-21 Thread John Youn
On 11/21/2016 1:10 PM, Christian Lamparter wrote: > Hello John, > > On Monday, November 21, 2016 12:16:31 PM CET John Youn wrote: >> On 11/18/2016 12:18 PM, Christian Lamparter wrote: >>> On Friday, November 18, 2016 8:16:08 AM CET Rob Herring wrote: >>>> On T

Re: [RFC][PATCH 3/3] usb: dwc2: Make sure we disconnect the gadget state

2016-11-21 Thread John Youn
it, the gadget interface initializes properly on every > plug in. > > Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: Rob Herring <robh...@kernel.org> > Cc: John Youn <johny...

Re: [PATCH 0/5] usb: dwc2: fix parameter handling

2016-11-21 Thread John Youn
nged, 10 insertions(+), 22 deletions(-) > For this series: Acked-by: John Youn <johny...@synopsys.com> Felipe, This is too late for 4.10-rc1 right? Can you queue for 4.10 fixes. I can remind you after 4.10-rc1 if it's too early for that. Regards, John -- To unsubscribe from th

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-21 Thread John Youn
On 11/18/2016 12:18 PM, Christian Lamparter wrote: > On Friday, November 18, 2016 8:16:08 AM CET Rob Herring wrote: >> On Thu, Nov 17, 2016 at 04:35:10PM +0100, Stefan Wahren wrote: >>> Hi John, >>> >>> Am 17.11.2016 um 00:47 schrieb John Youn: >>&g

[PATCH v3 4/4] usb: dwc2: pci: Add AHB burst property for HAPS

2016-11-17 Thread John Youn
Set the AHB burst to INCR for HAPS. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index a23329e..146b7ce 100644 --- a/drivers/usb/dwc2/pci.c +++ b/drivers/us

[PATCH v3 3/4] usb: dwc2: Use the ahb_burst param

2016-11-17 Thread John Youn
Use the new ahb_burst (instead of ahbcfg) to program the GAHBCFG.HBSTLEN in both host and gadget mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c| 8 +++- drivers/usb/dwc2/params.c | 10 -- 3 files chan

[PATCH v3 0/4] usb: dwc2: Add AHB burst configuration

2016-11-17 Thread John Youn
: * Don't remove the bcm2835 ahbcfg param and document why. John Youn (4): Documentation: devictree: dwc2: Add AHB burst binding usb: dwc2: Read in the AHB burst property usb: dwc2: Use the ahb_burst param usb: dwc2: pci: Add AHB burst property for HAPS Documentation/devicetree/bindings/usb

[PATCH v3 2/4] usb: dwc2: Read in the AHB burst property

2016-11-17 Thread John Youn
Read in the "snps,ahb-burst" property and set the internal parameter. If this property is set, it overrides the legacy param value, except for BCM2835, which can't set this value. Cc: Stefan Wahren <stefan.wah...@i2se.com> Signed-off-by: John Youn <johny...@synopsys.com>

[PATCH v3 1/4] Documentation: devictree: dwc2: Add AHB burst binding

2016-11-17 Thread John Youn
platforms (such as the Canyonlands board) report that the default value causes system hangs. Signed-off-by: John Youn <johny...@synopsys.com> Cc: Christian Lamparter <chunk...@googlemail.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++ 1 file changed, 2 ins

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-17 Thread John Youn
On 11/17/2016 3:28 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Add the "snps,ahb-burst" binding and read it in. >> >> This property controls which burst type to perform on the AHB bus as a >> master in inte

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-17 Thread John Youn
On 11/17/2016 7:35 AM, Stefan Wahren wrote: > Hi John, > > Am 17.11.2016 um 00:47 schrieb John Youn: >> Add the "snps,ahb-burst" binding and read it in. >> >> This property controls which burst type to perform on the AHB bus as a >> master in interna

[PATCH v2 4/4] usb: dwc2: pci: Add AHB burst property for HAPS

2016-11-16 Thread John Youn
Set the AHB burst to INCR for HAPS. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index a23329e..146b7ce 100644 --- a/drivers/usb/dwc2/pci.c +++ b/drivers/us

[PATCH v2 1/4] usb: dwc2: Document the AHB burst value for bcm2835

2016-11-16 Thread John Youn
The BCM2835 has an alternate function for the GAHBCFG.HBSTLEN field. Document this difference in the code. Cc: Stefan Wahren <stefan.wah...@i2se.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/params.c | 7 +++ 1 file changed, 7 insertions(+) diff --g

[PATCH v2 0/4] usb: dwc2: Add AHB burst configuration

2016-11-16 Thread John Youn
This series adds a binding for AHB burst, reads it in, and configures the controller for the specified burst type. Tested on HAPS platform with DWC_hsotg IP version 3.30a. v2: * Don't remove the bcm2835 ahbcfg param and document why. John Youn (4): usb: dwc2: Document the AHB burst value

[PATCH v2 3/4] usb: dwc2: Use the ahb_burst param

2016-11-16 Thread John Youn
Use the new ahb_burst (instead of ahbcfg) to program the GAHBCFG.HBSTLEN in both host and gadget mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c| 8 +++- drivers/usb/dwc2/params.c | 10 -- 3 files chan

[PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-16 Thread John Youn
r or worse performance based on this value. The HAPS platform is one example where all INCRx have worse performance than INCR. Other platforms (such as the Canyonlands board) report that the default value causes system hangs. Signed-off-by: John Youn <johny...@synopsys.com> Cc: Christian

[PATCH 6/6] usb: dwc2: Move functions from header to source

2016-11-16 Thread John Youn
From: Razmik Karapetyan <raz...@synopsys.com> Removed extern specifier from dwc2_host_start(), dwc2_host_disconnect() and dwc2_host_hub_info() functions. Moved those functions from header to source. Then make them static. Signed-off-by: Razmik Karapetyan <raz...@synopsys.com> Signed-

[PATCH 4/6] usb: dwc2: Remove unnecessary request length checking

2016-11-16 Thread John Youn
o it's unnecessary. Signed-off-by: Razmik Karapetyan <raz...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 39eccbb..b95930f 10

[PATCH 5/6] usb: dwc2: Fix fifo_show() functionality

2016-11-16 Thread John Youn
From: Razmik Karapetyan <raz...@synopsys.com> NPTXFIFO's start address is showing 0x0300 instead of 0x0800. Replaced val & FIFOSIZE_DEPTH_MASK by val & FIFOSIZE_STARTADDR_MASK in fifo_show() function. Signed-off-by: Razmik Karapetyan <raz...@synopsys.com> Signed-off-

[PATCH 2/6] usb: dwc2: Don't program DMA address for 0 length request

2016-11-16 Thread John Youn
From: Razmik Karapetyan <raz...@synopsys.com> Check the request length in dwc2_hsotg_start_req() function. If length == 0, do not write DMA address to control register. Signed-off-by: Razmik Karapetyan <raz...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH 3/6] usb: dwc2: Fix Control Write issue in DMA mode

2016-11-16 Thread John Youn
petyan <raz...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 4dd5f1e..39eccbb 100644 --- a/drivers/usb/dwc2/gadget.c +++

[PATCH 1/6] usb: dwc2: Stop Complete Splits after Data PID == 0

2016-11-16 Thread John Youn
From: Sevak Arakelyan <sev...@synopsys.com> Stop sending complete split requests in case of ISOC IN split transfers after getting data with PID0. Otherwise we will get a NYET for each additional IN token. Signed-off-by: Sevak Arakelyan <sev...@synopsys.com> Signed-off-by: John

[PATCH 0/6] usb: dwc2: Minor fixes and cleanup

2016-11-16 Thread John Youn
This series includes some minor fixes and cleanup commits for dwc2 that we've had locally for some time. Razmik Karapetyan (5): usb: dwc2: Don't program DMA address for 0 length request usb: dwc2: Fix Control Write issue in DMA mode usb: dwc2: Remove unnecessary request length checking

Re: [PATCH 1/4] usb: dwc2: Fix AHB burst type for bcm2835

2016-11-16 Thread John Youn
On 11/16/2016 1:25 AM, Stefan Wahren wrote: > Hi John, > >> John Youn <johny...@synopsys.com> hat am 16. November 2016 um 01:36 >> geschrieben: >> >> >> The ahbcfg param for bcm2835 is specifying a HBSTLEN of 0x8 (0x10 >> 1) >> which

[PATCH 3/4] usb: dwc2: Use the ahb_burst param

2016-11-15 Thread John Youn
Use the new ahb_burst (instead of ahbcfg) to program the GAHBCFG.HBSTLEN in both host and gadget mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c| 8 +++- drivers/usb/dwc2/params.c | 10 -- 3 files chan

[PATCH 4/4] usb: dwc2: pci: Add AHB burst property for HAPS

2016-11-15 Thread John Youn
Set the AHB burst to INCR for HAPS. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index a23329e..146b7ce 100644 --- a/drivers/usb/dwc2/pci.c +++ b/drivers/us

[PATCH 2/4] usb: dwc2: Add binding for AHB burst

2016-11-15 Thread John Youn
r or worse performance based on this value. The HAPS platform is one example where all INCRx have worse performance than INCR. Other platforms (such as the Canyonlands board) report that the default value causes system hangs. Signed-off-by: John Youn <johny...@synopsys.com> Cc: Christian

[PATCH 0/4] usb: dwc2: Add AHB burst configuration

2016-11-15 Thread John Youn
This series adds a binding for AHB burst, reads it in, and configures the controller for the specified burst type. Tested on HAPS platform with DWC_hsotg IP version 3.30a. John Youn (4): usb: dwc2: Fix AHB burst type for bcm2835 usb: dwc2: Add binding for AHB burst usb: dwc2: Use

[PATCH 1/4] usb: dwc2: Fix AHB burst type for bcm2835

2016-11-15 Thread John Youn
The ahbcfg param for bcm2835 is specifying a HBSTLEN of 0x8 (0x10 >> 1) which is not a valid value for that field. Remove the param and default to using INCR4. Cc: Stefan Wahren <stefan.wah...@i2se.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/param

[PATCH v3] usb: dwc2: add amcc,dwc-otg support

2016-11-15 Thread John Youn
TA is used concurrently. Signed-off-by: Christian Lamparter <chunk...@gmail.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Sorry, the previous one broke compilation. This fixes it. Regards, John v3 [johnyoun]: * Fixed compilation issue v2 [johnyoun]: * Removed params struct *

[PATCH v2] usb: dwc2: add amcc,dwc-otg support

2016-11-15 Thread John Youn
TA is used concurrently. Signed-off-by: Christian Lamparter <chunk...@gmail.com> Signed-off-by: John Youn <johny...@synopsys.com> --- v2 [johnyoun]: * Removed params struct * Minor commit message formatting Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/params.

Re: [PATCH 0/3] usb: dwc2: params revert and rework

2016-11-15 Thread John Youn
On 11/15/2016 3:33 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Hi Felipe, >> >> This reverts and fixes a few commits that are queued on your >> testing/next, removing the previously added DT bindings, and the code

Re: [PATCH v4 2/3] usb: dwc3: Implement interrupt moderation

2016-11-15 Thread John Youn
On 11/15/2016 3:16 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Implement interrupt moderation which allows the interrupt rate to be >> throttled. To enable this feature the dwc->imod_interval must be set to >> 1 or gr

Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support

2016-11-15 Thread John Youn
On 11/14/2016 3:00 PM, John Youn wrote: > On 11/11/2016 3:12 PM, Christian Lamparter wrote: >> On Friday, November 11, 2016 2:20:42 PM CET John Youn wrote: >>> On 11/11/2016 2:05 PM, Christian Lamparter wrote: >>>> On Friday, November 11, 2016 1:22:16 PM CET John Youn

[PATCH v3 16/17] usb: dwc2: gadget: Program ep0_mps for LS

2016-11-14 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> When device is enumerated in LS we should program ep0_mps accordingly. USB2 spec says that in LS mode, control ep mps must be 8. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.co

[PATCH v3 15/17] usb: dwc2: gadget: Add IOT device IDs, configure core accordingly

2016-11-14 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Add new device IDs for IOT gadget. Done changes in probe to configure core accordingly depending on device ID value. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH v3 13/17] usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable

2016-11-14 Thread John Youn
before dwc2_hsotg_ep_enable and dwc2_hsotg_ep_disable function definitions. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 182 +++--- 1 file changed, 93 insertion

[PATCH v3 17/17] usb: dwc2: gadget: Add new core parameter for low speed

2016-11-14 Thread John Youn
yelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/gadget.c | 27 +-- drivers/usb/dwc2/hcd.c| 8 +--- drivers/usb/dwc2/params.c | 8 ++-- 4 files changed, 33 insertion

[PATCH v3 11/17] usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

2016-11-14 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index d2442f4..5930b1a 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers

[PATCH v3 12/17] usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function

2016-11-14 Thread John Youn
O mode, current endpoint is periodic or not. It does not clear EPDISBLD interrupt after programming of DXEPCTL_EPDIS, does not flush shared TX FIFO and tries to clear global out NAK in wrong manner instead of setting DCTL_CGOUTNAK. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-

[PATCH v3 02/17] usb: dwc2: gadget: DDMA transfer start and complete

2016-11-14 Thread John Youn
ete_in() interrupt handlers for DDMA mode to get information on transferred data from descriptors instead of DXEPTSIZ. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 96

[PATCH v3 05/17] usb: dwc2: gadget: Enable descriptor DMA mode

2016-11-14 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add DCFG register field macro for descriptor DMA mode and update core initialization routine to set that bit accordingly. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH v3 04/17] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-14 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index bcae58d..e5d0959 100644 --- a/drivers/usb/dwc2/gadget.c

[PATCH v3 09/17] usb: dwc2: gadget: Enable the BNA interrupt

2016-11-14 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Enable the BNA (Buffer Not Available) interrupt in descriptor DMA mode. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 drivers/usb

[PATCH v3 06/17] usb: dwc2: gadget: Add DDMA isoc related fields to dwc2_hsotg_ep

2016-11-14 Thread John Youn
of these fields in function dwc2_hsotg_ep_enable(). Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 5 + drivers/usb/dwc2/gadget.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/u

[PATCH v3 10/17] usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA

2016-11-14 Thread John Youn
ytes were received from the bus, after xfercomplete rx_bytes value is 3. Hence add this value to the amount of transferred bytes. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 1 file

[PATCH v3 00/17] usb: dwc2: Gadget descriptor DMA and IOT

2016-11-14 Thread John Youn
This series implements gadget-side descriptor DMA for the DWC_hsotg controller. It also includes support for DWC USB IOT controllers which use the descriptor DMA mode of operation exclusively. These are two new device-only USB controller IPs based on DWC_hsotg. Tested on HAPS platform with: *

[PATCH v3 08/17] usb: dwc2: gadget: Start and complete DDMA isoc transfers

2016-11-14 Thread John Youn
n is called once SW decides to start isochronous IN or OUT transfer depend on reception of NAK or OUTTknEPdis interrupts indicating first isochronous token arrival from host. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- dri

[PATCH v3 03/17] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

2016-11-14 Thread John Youn
commit. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 6c988

[PATCH v3 07/17] usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked

2016-11-14 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> In DDMA mode incompISOOUT should be masked, similar as Bulk Out - XferCompl and BNA should be handled. incompISOIN is not valid in DDMA and is not getting asserted. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

[PATCH v3 01/17] usb: dwc2: gadget: EP 0 specific DDMA programming

2016-11-14 Thread John Youn
illing DDMA chain for status phase as well - add calls of dwc2_gadget_set_ep0_desc_chain() and dwc2_gadget_config_nonisoc_xfer_ddma() functions. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/d

[PATCH 3/3] usb: dwc2: Remove reading in of invalid property

2016-11-14 Thread John Youn
This property was mistakenly added, then removed, so don't read it in. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/params.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 2

[PATCH 0/3] usb: dwc2: params revert and rework

2016-11-14 Thread John Youn
Hi Felipe, This reverts and fixes a few commits that are queued on your testing/next, removing the previously added DT bindings, and the code that reads them in. The feedback was that IP validation is not reason enough to add these. So we'll leave them out for now. Regards, John John Youn (3

[PATCH 2/3] Revert "Documentation: devicetree: dwc2: Add host DMA binding"

2016-11-14 Thread John Youn
This reverts commit 751089ecaab0 ("Documentation: devicetree: dwc2: Add host DMA binding"). Remove this binding as it is not needed by any hardware. Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 - 1 file changed, 1 d

[PATCH 1/3] Revert "usb: dwc2: Add bindings to disable gadget DMA modes"

2016-11-14 Thread John Youn
This reverts commit 9acc1ee2b723 ("usb: dwc2: Add bindings to disable gadget DMA modes"). Don't add bindings and don't read them in. These are not yet needed by any hardware. Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 2

Re: [PATCH v2 05/30] usb: dwc2: Add bindings to disable gadget DMA modes

2016-11-14 Thread John Youn
On 11/14/2016 5:11 PM, Rob Herring wrote: > On Wed, Nov 09, 2016 at 07:27:50PM -0800, John Youn wrote: >> Now that the gadget driver automatically detects DMA modes, we need to >> provide a way to disable them. Certain platforms may still have issues >> with DMA and requ

Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support

2016-11-14 Thread John Youn
On 11/11/2016 3:12 PM, Christian Lamparter wrote: > On Friday, November 11, 2016 2:20:42 PM CET John Youn wrote: >> On 11/11/2016 2:05 PM, Christian Lamparter wrote: >>> On Friday, November 11, 2016 1:22:16 PM CET John Youn wrote: >>>> On 11/11/2016 12:59

Re: [PATCH 2/2] usb: dwc2: fixes host_dma logic

2016-11-14 Thread John Youn
c2: Get host DMA device properties") This should probably be omitted since it's only in Felipe's testing/next. Otherwise looks good. Acked-by: John Youn <johny...@synopsys.com> Regards, John > > Cc: John Youn <johny...@synopsys.com> > Cc: Felipe Balbi <felipe.ba...@l

[PATCH v4 3/3] usb: dwc3: Workaround for irq mask issue

2016-11-14 Thread John Youn
is immediately deasserted and won't be asserted again until GEVNTCOUNT.EHB is cleared. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 8

[PATCH v4 1/3] usb: dwc3: gadget: Write GEVNTCOUNT in interrupt

2016-11-14 Thread John Youn
version 3.00a where the interrupt cannot be de-asserted in the normal way. However, if we enable interrupt moderation, we can also de-assert it by writing to GEVNTCOUNT. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 4 drivers/usb/dwc3/core.h

[PATCH v4 2/3] usb: dwc3: Implement interrupt moderation

2016-11-14 Thread John Youn
ies for DWC_usb3 version 3.00a and higher and for DWC_usb31 version 1.20a and higher. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 16 drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/gadget.c | 16 3 files ch

[PATCH v4 0/3] usb: dwc3: Interrupt moderation

2016-11-14 Thread John Youn
the devicetree binding Regards, John John Youn (3): usb: dwc3: gadget: Write GEVNTCOUNT in interrupt usb: dwc3: Implement interrupt moderation usb: dwc3: Workaround for irq mask issue drivers/usb/dwc3/core.c | 32 drivers/usb/dwc3/core.h | 17

Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support

2016-11-11 Thread John Youn
On 11/11/2016 2:05 PM, Christian Lamparter wrote: > Hello, > > On Friday, November 11, 2016 1:22:16 PM CET John Youn wrote: >> On 11/11/2016 12:59 PM, Christian Lamparter wrote: >>> This patch adds support for the "amcc,usb-otg" device >>> whi

Re: [PATCH v2 11/30] usb: dwc2: gadget: Add DDMA chain fill and parse functions

2016-11-11 Thread John Youn
On 11/11/2016 2:53 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Add dwc2_gadget_get_desc_params() function to define descriptor entry >>

Re: [PATCH v3 3/5] usb: dwc3: gadget: Write GEVNTCOUNT in interrupt

2016-11-11 Thread John Youn
On 11/11/2016 3:10 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Currently GEVNTCOUNT is written in the threaded interrupt handler while >> processing each event. This commit moves the GEVNTCOUNT write to the >> hard IRQ. W

Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support

2016-11-11 Thread John Youn
On 11/11/2016 12:59 PM, Christian Lamparter wrote: > This patch adds support for the "amcc,usb-otg" device > which is found in the PowerPC Canyonlands' dts. > > The device definition was added by: > commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands > board")' > but without

[PATCH 2/2] usb: dwc2: Fix coverity issue in hcd_queue.c

2016-11-10 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> This fixes the coverity issues related to unreachable code with debugging off. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc

[PATCH 1/2] usb: dwc2: Fix dead code in hcd.c

2016-11-10 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Because usb_pipetype() masks urb->pipe, the default case can never be hit. Remove it. This cleans up a coverity warning. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com>

[PATCH] usb: dwc3: gadget: Fix dead code writing GCTL.RAMCLKSEL

2016-11-10 Thread John Youn
if needed in the future. This fixes dead code warnings in coverity. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/gadget.c | 35 --- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/ga

[PATCH v3 1/5] usb: dwc3: Add a check for the DWC_usb3 core

2016-11-10 Thread John Youn
Add a helper function to check if we are running on a DWC_usb3 core. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index b9903c6..354de24

[PATCH v3 2/5] usb: dwc3: Add a function to check properties

2016-11-10 Thread John Youn
Add a function to check properties and call it from probe. This will allow us to add check code without bloating the probe function. This needs to be done after dwc3_get_properties() and dwc3_core_init() so that all the properties and hardware configs are available. Signed-off-by: John Youn

[PATCH v3 3/5] usb: dwc3: gadget: Write GEVNTCOUNT in interrupt

2016-11-10 Thread John Youn
version 3.00a where the interrupt cannot be de-asserted in the normal way. However, if we enable interrupt moderation, we can also de-assert it by writing to GEVNTCOUNT. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 4 drivers/usb/dwc3/core.h

[PATCH v3 4/5] usb: dwc3: Implement interrupt moderation

2016-11-10 Thread John Youn
ies for DWC_usb3 version 3.00a and higher and for DWC_usb31 version 1.20a and higher. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 16 drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/gadget.c | 16 3 files ch

[PATCH v3 5/5] usb: dwc3: Workaround for irq mask issue

2016-11-10 Thread John Youn
is immediately deasserted and won't be asserted again until GEVNTCOUNT.EHB is cleared. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index d

[PATCH v3 0/5] usb: dwc3: Interrupt moderation

2016-11-10 Thread John Youn
and bh v2: * Remove the devicetree binding Regards, John John Youn (5): usb: dwc3: Add a check for the DWC_usb3 core usb: dwc3: Add a function to check properties usb: dwc3: gadget: Write GEVNTCOUNT in interrupt usb: dwc3: Implement interrupt moderation usb: dwc3: Workaround for irq

Re: [PATCH v2 03/30] usb: dwc2: Make the DMA descriptor structure packed

2016-11-10 Thread John Youn
On 11/10/2016 4:28 AM, David Laight wrote: > From: John Youn >> Sent: 10 November 2016 03:28 >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Make the DMA descriptor structure packed to guarantee alignment and size >> in memory. >> >&

Re: [PATCH 1/2] usb: dwc3: gadget: Remove descriptor arguments to ep_enable

2016-11-10 Thread John Youn
On 11/10/2016 3:15 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h >> index 2322863..b9903c6 100644 >> --- a/drivers/usb/dwc3/core.h >> +++ b/drivers/usb

[PATCH v2 25/30] usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function

2016-11-09 Thread John Youn
O mode, current endpoint is periodic or not. It does not clear EPDISBLD interrupt after programming of DXEPCTL_EPDIS, does not flush shared TX FIFO and tries to clear global out NAK in wrong manner instead of setting DCTL_CGOUTNAK. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-

[PATCH v2 09/30] usb: dwc2: gadget: Transfer length limit checking for DDMA

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add dwc2_gadget_get_chain_limit() function and its call in transfer start routine to correctly estimate one go on transfer size if descriptor DMA mode is selected. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John

[PATCH v2 24/30] usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

2016-11-09 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index d2442f4..5930b1a 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers

[PATCH v2 12/30] usb: dwc2: gadget: EP 0 specific DDMA programming

2016-11-09 Thread John Youn
illing DDMA chain for status phase as well - add calls of dwc2_gadget_set_ep0_desc_chain() and dwc2_gadget_config_nonisoc_xfer_ddma() functions. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/

[PATCH v2 13/30] usb: dwc2: gadget: DDMA transfer start and complete

2016-11-09 Thread John Youn
ete_in() interrupt handlers for DDMA mode to get information on transferred data from descriptors instead of DXEPTSIZ. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 66

[PATCH v2 22/30] usb: dwc2: gadget: Enable the BNA interrupt

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Enable the BNA (Buffer Not Available) interrupt in descriptor DMA mode. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 drivers/usb

[PATCH v2 17/30] usb: dwc2: gadget: Add DDMA isoc related fields to dwc2_hsotg_ep

2016-11-09 Thread John Youn
of these fields in function dwc2_hsotg_ep_enable(). Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 5 + drivers/usb/dwc2/gadget.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/u

[PATCH v2 21/30] usb: dwc2: gadget: Add start and complete calls for DDMA ISOC

2016-11-09 Thread John Youn
t_ddma() and dwc2_gadget_start_next_isoc_ddma() in XferCompl interrupt handler. Add call of dwc2_gadget_start_next_isoc_ddma() in BNA interrupt handler to restart OUT endpoint once it gets disabled due to BNA interrupt assertion. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John

[PATCH v2 16/30] usb: dwc2: gadget: Enable descriptor DMA mode

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add DCFG register field macro for descriptor DMA mode and update core initialization routine to set that bit accordingly. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH v2 30/30] usb: dwc2: gadget: Add new core parameter for low speed

2016-11-09 Thread John Youn
yelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/gadget.c | 27 +-- drivers/usb/dwc2/hcd.c| 8 +--- drivers/usb/dwc2/params.c | 8 ++-- 4 files changed, 33 insertion

[PATCH v2 18/30] usb: dwc2: gadget: Fill isoc descriptor and start transfer in DDMA

2016-11-09 Thread John Youn
ronyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 133 ++ 1 file changed, 133 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index c32520d..6351b3c 10

[PATCH v2 23/30] usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA

2016-11-09 Thread John Youn
ytes were received from the bus, after xfercomplete rx_bytes value is 3. Hence add this value to the amount of transferred bytes. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 1 file

[PATCH v2 20/30] usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> In DDMA mode incompISOOUT should be masked, similar as Bulk Out - XferCompl and BNA should be handled. incompISOIN is not valid in DDMA and is not getting asserted. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

[PATCH v2 26/30] usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable

2016-11-09 Thread John Youn
before dwc2_hsotg_ep_enable and dwc2_hsotg_ep_disable function definitions. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 182 +++--- 1 file changed, 93 insertion

[PATCH v2 28/30] usb: dwc2: gadget: Add IOT device IDs, configure core accordingly

2016-11-09 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Add new device IDs for IOT gadget. Done changes in probe to configure core accordingly depending on device ID value. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH v2 27/30] usb: dwc2: Add support of dedicated full-speed PHY interface

2016-11-09 Thread John Youn
s well. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadg

[PATCH v2 29/30] usb: dwc2: gadget: Program ep0_mps for LS

2016-11-09 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> When device is enumerated in LS we should program ep0_mps accordingly. USB2 spec says that in LS mode, control ep mps must be 8. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.co

[PATCH v2 19/30] usb: dwc2: gadget: Add completions for DDMA isoc transfers

2016-11-09 Thread John Youn
ahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 105 ++ 1 file changed, 105 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 6351b3c..696529a 100644 --- a/dri

[PATCH v2 05/30] usb: dwc2: Add bindings to disable gadget DMA modes

2016-11-09 Thread John Youn
Now that the gadget driver automatically detects DMA modes, we need to provide a way to disable them. Certain platforms may still have issues with DMA and require it to be disabled. It is also needed for IP validation purposes. Signed-off-by: John Youn <johny...@synopsys.com> --- Documen

<    1   2   3   4   5   6   7   8   9   10   >