Re: [PATCH 3/3] usb: gadget: default U1/U2 exit latencies to maximum

2016-09-15 Thread John Youn
On 9/14/2016 11:53 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>>> John Youn <john.y...@synopsys.com> writes: >>>>> On 8/31/2016 2:38 AM, Felipe Balbi wrote: >>>>>> If we don't know what are

Re: [PATCH v5 3/3] usb: dwc2: Properly account for the force mode delays

2016-09-15 Thread John Youn
On 9/14/2016 7:05 AM, Heiko Stübner wrote: > Am Dienstag, 13. September 2016, 12:04:12 schrieb John Youn: >> On 9/13/2016 11:39 AM, Heiko Stübner wrote: >>> Am Dienstag, 13. September 2016, 20:07:25 schrieb Stefan Wahren: >>>> Hi Heiko, >>>> >&g

Re: [PATCH v8 2/3] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-09-26 Thread John Youn
he best we can do. > + */ > + if (of_device_is_compatible(np, "rockchip,rk3288-usb")) > + phy_reset(hsotg->phy); > + > mod_timer(>wkp_timer, > jiffies + msecs_to_jiffies(71)); &g

Re: [REGRESSION] "dwc2: gadget: fix TX FIFO size and address initialization" breaks "adb logcat" on hikey

2016-10-06 Thread John Youn
On 10/5/2016 11:33 PM, John Stultz wrote: > Hey folks, >So I've run into some trouble that I've narrowed down to commit > aa381a7259c3 ("usb: dwc2: gadget: fix TX FIFO size and address > initialization"). > > After booting up android on HiKey, if I run "adb logcat", I get about > a page of

Re: [PATCH] usb: dwc2: add USBTrdTim to initial value

2016-09-22 Thread John Youn
ase clean up the subject and message Subject: usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting Description: The USBTRDTIM field needs to be cleared before setting a new value. Otherwise it will result in an incorrect value if phyif == GUSBCFG_PHYIF8. With that Acked-by: John Youn <johny.

Re: UAS and f_tcm -- is anyone using it?

2016-09-22 Thread John Youn
On 9/22/2016 12:25 AM, Andrzej Pietrasiewicz wrote: > W dniu 20.09.2016 o 21:19, John Youn pisze: > > > >> Hi Sebastian, Andrzej, >> >> If possible, could you share how you are using it? Such as in what >> speed, mode, and with what controllers/platforms an

Re: UAS and f_tcm -- is anyone using it?

2016-09-20 Thread John Youn
On 9/20/2016 1:29 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>>>>> There's also a TCM python tool somewhere which helps with this. I >>>>>> haven't used f_tcm in a long while, but Sebastian an

Re: UAS and f_tcm -- is anyone using it?

2016-09-20 Thread John Youn
On 9/20/2016 11:35 AM, John Youn wrote: > On 9/20/2016 1:29 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn <john.y...@synopsys.com> writes: >>>>>>> There's also a TCM python tool somewhere which helps with this. I >>>>>&g

Re: UAS and f_tcm -- is anyone using it?

2016-09-19 Thread John Youn
On 8/29/2016 11:26 AM, John Youn wrote: > On 8/29/2016 12:33 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn <john.y...@synopsys.com> writes: >>> On 8/26/2016 12:48 AM, Felipe Balbi wrote: >>>> >>>> Hi, >>>> >>&g

Re: [PATCH 3/3] usb: gadget: default U1/U2 exit latencies to maximum

2016-09-16 Thread John Youn
On 9/16/2016 12:55 AM, Felipe Balbi wrote: > > Hi John, > > John Youn <john.y...@synopsys.com> writes: >>> John Youn <john.y...@synopsys.com> writes: >>>>>> John Youn <john.y...@synopsys.com> writes: >>>>>>> On 8/31/2

Re: [PATCH v3] usb: dwc3: gadget: add remaining sg entries to ring

2016-08-25 Thread John Youn
; - none > > Changes since v2: > - fix regression found by John Youn > > drivers/usb/dwc3/gadget.c | 33 - > 1 file changed, 24 insertions(+), 9 deletions(-) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c

Re: [RESEND PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-08-25 Thread John Youn
On 8/24/2016 1:54 AM, Randy Li wrote: > > > On 08/24/2016 04:46 AM, John Youn wrote: >> On 8/21/2016 12:32 PM, Randy Li wrote: >>> On the rk3288 USB host-only port (the one that's not the OTG-enabled >>> port) the PHY can get into a bad state when a wakeup is ass

[PATCH] Revert "usb: dwc3: gadget: always decrement by 1"

2016-08-26 Thread John Youn
is not among the free slots then it should not be decremented. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/gadget.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 7a8d3d8..122e64d 1

Re: [PATCH 4/4] usb: dwc3: gadget: always decrement by 1

2016-08-26 Thread John Youn
On 8/26/2016 3:06 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 8/25/2016 12:38 AM, Felipe Balbi wrote: >>> We need to decrement in both cases (enq > deq and >>> enq < deq) >>> >

Re: UAS and f_tcm -- is anyone using it?

2016-08-26 Thread John Youn
On 8/26/2016 7:09 AM, Alan Stern wrote: > On Fri, 26 Aug 2016, Felipe Balbi wrote: > >> Hi, >> >> John Youn <john.y...@synopsys.com> writes: >>> I was wondering if anyone is using the f_tcm function? Specifically >>> for UAS in supers

Re: UAS and f_tcm -- is anyone using it?

2016-08-26 Thread John Youn
On 8/26/2016 12:48 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> I was wondering if anyone is using the f_tcm function? Specifically >> for UAS in superspeed with streams? Any idea if it is being using in >> production for t

Re: [Bug] usb: dwc2: host function broken in OTG mode on bcm283x

2016-08-23 Thread John Youn
On 8/22/2016 9:41 PM, Stefan Wahren wrote: > Hi John, > >> John Youn <john.y...@synopsys.com> hat am 23. August 2016 um 00:08 >> geschrieben: >> >> >> On 8/22/2016 1:47 PM, Stefan Wahren wrote: >>> Hi John, >>> >>>

Re: [Bug] usb: dwc2: host function broken in OTG mode on bcm283x

2016-08-22 Thread John Youn
On 8/22/2016 1:47 PM, Stefan Wahren wrote: > Hi John, > >> John Youn <john.y...@synopsys.com> hat am 22. August 2016 um 22:06 >> geschrieben: >> >> >> On 8/20/2016 6:03 AM, Stefan Wahren wrote: >>> Hi John, >>> >>> &

Re: [RESEND PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-08-23 Thread John Youn
On 8/21/2016 12:32 PM, Randy Li wrote: > On the rk3288 USB host-only port (the one that's not the OTG-enabled > port) the PHY can get into a bad state when a wakeup is asserted (not > just a wakeup from full system suspend but also a wakeup from > autosuspend). > > We can get the PHY out of its

Re: [PATCH 2/2] usb: dwc3: Add ENDXFER command polling

2016-08-22 Thread John Youn
On 8/22/2016 12:49 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> ENDXFER polling is available on version 3.10a and later of the >> DWC_usb3 (USB 3.0) controller. With this feature, the software can poll >> the CMDACT bit

[RFT PATCH v3 2/3] usb: dwc2: Add delay to core soft reset

2016-08-25 Thread John Youn
the IDDIG debounce filter will occur before going back to host mode. Tested-by: Heiko Stuebner <he...@sntech.de> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 97 + drivers/usb/dwc2/core.h | 1 + drivers/u

[RFT PATCH v3 0/3] usb: dwc2: Fix core reset and force mode delays

2016-08-25 Thread John Youn
. Patch 3 should solve RPi issues, but has problems in RK3188 that need to be debugged. v3: * Added tested-bys for patch 1-2 * Fixed an issue where a function was not returning a value * Dropped patch 4 v2: * Broke up the last patch of the original series Regards, John John Youn (3): usb: dwc2

[RFT PATCH v3 1/3] usb: dwc2: gadget: Only initialize device if in device mode

2016-08-25 Thread John Youn
In dwc2_hsotg_udc_start(), don't initialize the controller for device mode unless we are actually in device mode. Tested-by: Heiko Stuebner <he...@sntech.de> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+),

[RFT PATCH v3 3/3] usb: dwc2: Properly account for the force mode delays

2016-08-25 Thread John Youn
. On a clear force mode, since we don't know what mode to poll for, delay for a fixed 50 ms. This is the maximum delay based on the slowest PHY clock speed. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 31 ++- 1 file changed, 14 inse

Re: [PATCH v2 4/6] usb: dwc3: gadget: add remaining sg entries to ring

2016-08-25 Thread John Youn
On 8/25/2016 12:45 AM, Felipe Balbi wrote: > > Hi, > > Felipe Balbi writes: >>> On your testing/next, I see considerable slow down and file >>> corruption in mass storage. >>> >>> After bisecting, this patch seems to be the first one that shows >>> problems. The

Re: [PATCH 4/4] usb: dwc3: gadget: always decrement by 1

2016-08-25 Thread John Youn
On 8/25/2016 12:38 AM, Felipe Balbi wrote: > We need to decrement in both cases (enq > deq and > enq < deq) > > Signed-off-by: Felipe Balbi > --- > drivers/usb/dwc3/gadget.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git

UAS and f_tcm -- is anyone using it?

2016-08-25 Thread John Youn
Hi, I was wondering if anyone is using the f_tcm function? Specifically for UAS in superspeed with streams? Any idea if it is being using in production for this anywhere? I've been trying to get the tcm gadget running without success. It seems I need to configure the target system via configfs

Re: [RFT PATCH v2 3/4] usb: dwc2: Properly account for the force mode delays

2016-08-25 Thread John Youn
On 8/25/2016 3:01 AM, Heiko Stübner wrote: > Hi John, > > Am Mittwoch, 24. August 2016, 16:20:01 schrieb John Youn: >> When a force mode bit is set and the IDDIG debounce filter is enabled, >> there is a delay for the forced mode to take effect. This delay is due >> t

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

2016-09-30 Thread John Youn
ppropriate to simply remove this initialization as it might break existing behavior. Also, some cores might not have enough fifo space to handle the programming method used in the reverted patch, resulting in fifo initialization failure. Signed-off-by: John Youn <johny...@synopsys.com> Cc: Robert

[PATCH 3/3] Revert "Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size"

2016-09-30 Thread John Youn
t;Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size"). Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentati

[PATCH 1/3] Revert "usb: dwc2: gadget: change variable name to more meaningful"

2016-09-30 Thread John Youn
This reverts commit ba48eab8866c ("usb: dwc2: gadget: change variable name to more meaningful"). This is needed to cleanly revert commit aa381a7259c3 ("usb: dwc2: gadget: fix TX FIFO size and address initialization") which may cause regressions on some platforms. Signed-off-

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-25 Thread John Youn
On 10/25/2016 2:56 PM, John Stultz wrote: > On Tue, Oct 25, 2016 at 2:29 PM, John Youn <john.y...@synopsys.com> wrote: >> On 10/19/2016 11:00 PM, John Stultz wrote: >>> I had seen some odd behavior with HiKey's usb-gadget interface >>> that I finally seemed to

Re: [PATCH] phy: Add reset callback for not generic phy

2016-10-25 Thread John Youn
On 10/25/2016 7:15 AM, Randy Li wrote: > I forget to add a dummy function in case the CONFIG_GENERIC_PHY > is disabled. > > Signed-off-by: Randy Li <ay...@soulik.info> Fixes: cac18ecb6f44 ("phy: Add reset callback") Tested-by: John Youn <johny...@synopsys

[PATCH 0/6] usb: dwc3: Interrupt moderation

2016-10-25 Thread John Youn
This patch series implements interrupt moderation and also uses it in implementing a workaround for STAR 9000961433. John Youn (6): usb: dwc3: Add a check for the DWC_usb3 core usb: dwc3: Add a function to check properties Documentation: devicetree: dwc3: Add interrupt moderation usb

[PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-25 Thread John Youn
Add interrupt moderation interval binding for dwc3. Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc3.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/us

[PATCH 5/6] usb: dwc3: Implement interrupt moderation

2016-10-25 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 | 18 ++ drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/gadget.c | 16 3 files ch

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

2016-10-25 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 6

[PATCH 4/6] usb: dwc3: gadget: Write the event count in interrupt

2016-10-25 Thread John Youn
were the interrupt line cannot be masked between the hard/soft interrupt handler. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c

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

2016-10-25 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 1/6] usb: dwc3: Add a check for the DWC_usb3 core

2016-10-25 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 180239f..4f15c23

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-25 Thread John Youn
y the right fix, but it seems > to work well. Feedback would be greatly appreciated! > > Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Chen Yu <cheny...@huawei.com> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-27 Thread John Youn
On 10/26/2016 3:57 AM, Mark Rutland wrote: > On Tue, Oct 25, 2016 at 12:42:46PM -0700, John Youn wrote: >> Add interrupt moderation interval binding for dwc3. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> Documentation/devicetree/binding

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-27 Thread John Youn
On 10/26/2016 3:22 AM, Sergei Shtylyov wrote: > Hello. > > On 10/25/2016 10:42 PM, John Youn wrote: > >> Add interrupt moderation interval binding for dwc3. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> Documentation/devicetre

Re: [PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding

2016-10-27 Thread John Youn
On 10/26/2016 3:07 PM, Rob Herring wrote: > On Wed, Oct 19, 2016 at 06:22:52PM -0700, John Youn wrote: >> Add the host-dma property to devicetree. This controls whether to use >> DMA in host mode. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-27 Thread John Youn
On 10/27/2016 3:47 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Add interrupt moderation interval binding for dwc3. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> Documentation/device

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

2016-10-28 Thread John Youn
On 10/28/2016 8:52 AM, Leo Yan wrote: > This reverts commit aa381a7259c3f53727bcaa8c5f9359e940a0e3fd. > > Reverting this patch, as it incorrectly assumes TX FIFO size is fixed > and cannot change FIFO size; it removes all related dt binding code > and have no chance to set FIFO size at init

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

2016-11-07 Thread John Youn
with: * HSOTG IP version 3.30a * FS/LS IOT IP version 1.00a * HS IOT IP version 1.00a This series should be applied on top of: http://marc.info/?l=linux-usb=147822095118860=2 Regards, John John Youn (2): usb: dwc2: Deprecate g-use-dma binding usb: dwc2: Enable gadget DDMA by default for HAPS Vahram

[PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-07 Thread John Youn
Add a vendor prefix and make the name more consistent by renaming it to "snps,gadget-dma-enable". Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 5 - arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot

[PATCH 13/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

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

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

2016-11-07 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 12/30] usb: dwc2: gadget: DDMA transfer start and complete

2016-11-07 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 30/30] usb: dwc2: gadget: Add new core parameter for low speed

2016-11-07 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 22/30] usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA

2016-11-07 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 21/30] usb: dwc2: gadget: Add start and complete calls for DDMA ISOC

2016-11-07 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 27/30] usb: dwc2: Add support of dedicated full-speed PHY interface

2016-11-07 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 28/30] usb: dwc2: gadget: Add IOT device IDs, configure core accordingly

2016-11-07 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 24/30] usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

2016-11-07 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 71f57de..8ade249 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers

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

2016-11-07 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 23/30] usb: dwc2: gadget: Adjustments in debug prints

2016-11-07 Thread John Youn
Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 095af16..71f57de 100644 --- a/drivers

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

2016-11-07 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 25/30] usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function

2016-11-07 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 10/30] usb: dwc2: gadget: Add DDMA chain fill and parse functions

2016-11-07 Thread John Youn
ed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 138 ++ 1 file changed, 138 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c inde

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

2016-11-07 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 09/30] usb: dwc2: gadget: Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add DMA descriptor members to the dwc2_hsotg_ep structure. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 7 +++ drivers/usb/

[PATCH 05/30] usb: dwc2: gadget: Enable BNA interrupt in descriptor DMA mode

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Update endpoint related register descriptions to add DOEPMSK_BNAMSK. Add BNA interrupt's unmasking during gadget initalization if descriptor DMA mode is selected. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John

[PATCH 07/30] usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT as it stores value of host DMA descriptor transfer bytes' limit. Values are different in case of gadget DMA descriptors. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

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

2016-11-07 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 20/30] usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked

2016-11-07 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 18/30] usb: dwc2: gadget: Fill isoc descriptor and start transfer in DDMA

2016-11-07 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 336c799..93657e2 10

[PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename DMA descriptor structure from dwc2_hcd_dma_desc to dwc2_dma_desc as it is applies to both host and gadget. Also make it __packed. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny.

[PATCH 03/30] usb: dwc2: gadget: Add descriptor DMA binding

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add the devicetree binding to enable descriptor DMA and read it in to the corresponding parameter during probe. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Docume

[PATCH 04/30] usb: dwc2: gadget: Add DMA descriptor status quadlet fields

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add device mode DMA transfer descriptor status quadlet field notations. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hw.h | 37 ++

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

2016-11-07 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 14/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-07 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 e866edc..4e84862 100644 --- a/drivers/usb/dwc2/gadget.c

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

2016-11-07 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 93657e2..4314e4d 100644 --- a/dri

[PATCH 16/30] usb: dwc2: Enable gadget DDMA by default for HAPS

2016-11-07 Thread John Youn
Enables the gadget descriptor DMA mode by default in the HAPS PCI driver. 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 46a9d2b..57e4d82f 100644 --- a/d

[PATCH 06/30] usb: dwc2: gadget: Add DMA descriptor chains for EP 0

2016-11-07 Thread John Youn
Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 13 +++ drivers/usb/dwc2/gadget.c | 56 +++ 2 files changed, 69 insertions(+) diff --git a/drivers

[PATCH v2] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-08 Thread John Youn
<mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- v2: * Set the ep.maxpacket to the correct value for EP0 drivers/usb/dwc2/gadget.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc2/gadg

Re: [PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-08 Thread John Youn
On 11/8/2016 1:12 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Add a vendor prefix and make the name more consistent by renaming it to >> "snps,gadget-dma-enable". >> >> Signed-off-by: John Youn <joh

Re: [PATCH 23/30] usb: dwc2: gadget: Adjustments in debug prints

2016-11-08 Thread John Youn
On 11/8/2016 1:29 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> During USB CV tests found timing issues in Slave mode caused by amount >> of data prin

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-08 Thread John Youn
On 11/8/2016 6:09 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 11/4/2016 2:13 AM, Janusz Dziedzic wrote: >>> On 4 November 2016 at 07:41, Janusz Dziedzic <janusz.dzied...@tieto.com> >>> wrote: &g

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-08 Thread John Youn
On 11/8/2016 2:48 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> John Youn <john.y...@synopsys.com> writes: >>>>>> @@ -1812,17 +1812,17 @@ static u32 dwc2_hsotg_ep0_mps(unsigned int mps) >>>>&g

Re: [PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-08 Thread John Youn
On 11/8/2016 1:14 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Rename DMA descriptor structure from dwc2_hcd_dma_desc to dwc2_dma_desc >> as it is applies to b

Re: [PATCH 03/30] usb: dwc2: gadget: Add descriptor DMA binding

2016-11-08 Thread John Youn
On 11/8/2016 1:15 AM, Felipe Balbi wrote: > John Youn <johny...@synopsys.com> writes: > >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Add the devicetree binding to enable descriptor DMA and read it in to >> the corresponding parameter during pr

Re: [PATCH 14/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-08 Thread John Youn
On 11/8/2016 1:27 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> In DDMA mode of operation IN status phase of control write transfer >> should start aft

Re: [PATCH 05/30] usb: dwc2: gadget: Enable BNA interrupt in descriptor DMA mode

2016-11-08 Thread John Youn
On 11/8/2016 1:16 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Update endpoint related register descriptions to add DOEPMSK_BNAMSK. >> >> Add

Re: [PATCH 13/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

2016-11-08 Thread John Youn
On 11/8/2016 1:25 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Corrected unmasking of StsPhseRcvd interrupt not to be performed during >> gadget initializat

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-04 Thread John Youn
On 11/4/2016 2:13 AM, Janusz Dziedzic wrote: > On 4 November 2016 at 07:41, Janusz Dziedzic <janusz.dzied...@tieto.com> > wrote: >> On 4 November 2016 at 02:31, John Youn <johny...@synopsys.com> wrote: >>> >>> Since we are saving the event count a

Re: [PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-09 Thread John Youn
On 11/9/2016 4:18 AM, David Laight wrote: > From: John Youn >> Sent: 08 November 2016 22:30 > ... >>>> Also make it __packed. >>> >>> why are you making it packed? Does it _have_ to be packed? If it must, >>> why wasn't it before? >> >

Re: [PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-09 Thread John Youn
On 11/8/2016 11:54 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 11/8/2016 1:12 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <johny...@synopsys.com> writes: >>>> Add

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-09 Thread John Youn
On 11/9/2016 12:02 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> John Youn <john.y...@synopsys.com> writes: >>>>> John Youn <john.y...@synopsys.com> writes: >>>>>>>> @@ -1812,17 +

[PATCH 2/2] usb: dwc3: gadget: Remove descriptor arguments to ep_config

2016-11-09 Thread John Youn
This function has access to the descriptors via the usb_ep. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/gadget.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0e73383..4

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

2016-11-09 Thread John Youn
The __dwc3_gadget_endpoint_enable() function has access to the endpoint descriptors via the usb_ep. So we don't need to pass them in as arguments. The descriptors should be set by the caller prior to calling usb_ep_enable(). Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/us

[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 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 08/30] usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT as it stores value of host DMA descriptor transfer bytes' limit. Values are different in case of gadget DMA descriptors. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

<    2   3   4   5   6   7   8   9   10   >