Re: [PATCH RESEND] PCI: Check for USB xHCI class for HAPS platform

2019-02-05 Thread John Youn
On 02/05/2019 03:32 PM, Bjorn Helgaas wrote: [+cc Richard, Lucas] On Tue, Feb 05, 2019 at 01:04:28PM -0800, Thinh Nguyen wrote: The Synopsys HAPS USB controller has a VID PID (16c3,abcd) that matches to an existing PCIe controller. This quirk is intended for USB HAPS devices only. To fix this,

Re: [PATCH] usb: dwc2: gadget: Use true and false for boolean values

2018-02-05 Thread John Youn
n = 0; + hs_ep->frame_overrun = false; } } +Felipe Acked-by: John Youn Regards, John

Re: [PATCH] usb: dwc2: add optional usb ecc reset bit

2017-12-05 Thread John Youn
return ret; > + } > + > + reset_control_deassert(hsotg->reset_ecc); > + > /* Set default UTMI width */ > hsotg->phyif = GUSBCFG_PHYIF16; > > @@ -318,6 +327,7 @@ static int dwc2_driver_remove(struct platform_device *dev) > dwc2_lowlevel_hw_disable(hsotg); > > reset_control_assert(hsotg->reset); > + reset_control_assert(hsotg->reset_ecc); > > return 0; > } > Acked-by: John Youn John

Re: [PATCH] usb: dwc2: Fix TxFIFOn sizes and total TxFIFO size issues

2017-12-05 Thread John Youn
>num_dev_in_eps = (hwcfg4 & GHWCFG4_NUM_IN_EPS_MASK) >> > + GHWCFG4_NUM_IN_EPS_SHIFT; > hw->dma_desc_enable = !!(hwcfg4 & GHWCFG4_DESC_DMA); > hw->power_optimized = !!(hwcfg4 & GHWCFG4_POWER_OPTIMIZ); > hw->utmi_phy_data_width = (hwcfg4 & GHWCFG4_UTMI_PHY_DATA_WIDTH_MASK) >> > @@ -704,6 +706,13 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg) > /* fifo sizes */ > hw->rx_fifo_size = (grxfsiz & GRXFSIZ_DEPTH_MASK) >> > GRXFSIZ_DEPTH_SHIFT; > + /* > + * Host specific hardware parameters. Reading these parameters > + * requires the controller to be in host mode. The mode will > + * be forced, if necessary, to read these values. > + */ > + dwc2_get_host_hwparams(hsotg); > + dwc2_get_dev_hwparams(hsotg); > > return 0; > } > Acked-by: John Youn John

Re: [PATCH v3 1/2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-12-05 Thread John Youn
o as far is as easy) >> >> Changes in v2: >> - Address >> https://urldefense.proofpoint.com/v2/url?u=http-3A__crosreview.com_737520&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=U3o8uKoKhWme5_V9D-eeCkB11BFwt4KvWztBgdE9ZpA&m=Y_xpJ6Ks0XAK5_bQgmeQEvgKThZtPBQJ3cejNCGfEvM&s=olyPwyYvn_072esVwYxrCduKOKKJPUgc1YHX-CNhM1s&e= >> feedback >> > > does it need a resend? > You can add my acked-by: Acked-by: John Youn Regards, John

Re: [PATCHv2 2/7] usb: dwc2: add support for STM32F7 USB OTG HS

2017-09-30 Thread John Youn
e_id dwc2_of_match_table[] = { >> { .compatible = "st,stm32f4x9-fsotg", >>.data = dwc2_set_stm32f4x9_fsotg_params }, >> { .compatible = "st,stm32f4x9-hsotg" }, >> +{ .compatible = "st,stm32f7-hsotg", >> + .data = dwc2_set_stm32f7_hsotg_params }, >> {}, >> }; >> MODULE_DEVICE_TABLE(of, dwc2_of_match_table); >> Acked-by: John Youn John

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-09-30 Thread John Youn
I'd love to get some feedback on the patches and consideration > to be merged upstream. > > thanks > -john > > Cc: Wei Xu > Cc: Guodong Xu > Cc: Amit Pundir > Cc: YongQin Liu > Cc: John Youn > Cc: Minas Harutyunyan > Cc: Douglas Anderson > Cc: Chen Yu >

Re: [PATCH] usb: dwc2: gadget: On USB RESET reset device address to zero

2017-07-17 Thread John Youn
EVADDR_MASK); > + > if (usb_status & GOTGCTL_BSESVLD && connected) > dwc2_hsotg_core_init_disconnected(hsotg, true); > } > Acked-by: John Youn John

Re: bug? dwc2: insufficient fifo memory

2017-06-05 Thread John Youn
On 6/5/2017 5:32 AM, Minas Harutyunyan wrote: > On 6/2/2017 10:20 PM, John Stultz wrote: >> On Mon, Apr 17, 2017 at 3:36 PM, John Stultz wrote: >>> On Fri, Feb 24, 2017 at 2:46 PM, John Stultz wrote: Hey John, So after the USB tree landed in 4.11-rc, I've been seeing the followin

Re: [PATCH v2 3/4] usb: dwc3: add dual-role support

2017-04-02 Thread John Youn
On 03/30/2017 02:27 AM, Felipe Balbi wrote: > > Hi > > Roger Quadros writes: > For something that simple, we wouldn't even need to use OTG FSM layer > because that brings no benefit for such a simple requirement. no no. I think you got it wrong. I'm not using the OTG FSM layer at

Re: dwc2_hc_chhltd_intr_dma - ChHltd set errors?

2017-04-02 Thread John Youn
On 03/31/2017 04:04 PM, John Stultz wrote: > On Thu, Mar 2, 2017 at 12:00 PM, John Stultz wrote: >> Hey John, >> We've noticed that when using usb ethernet adapters on HiKey, we >> occasionally see errors like: >> >> dwc2 f72c.usb: dwc2_hc_chhltd_intr_dma: Channel 0 - ChHltd set, >> but reas

Re: [PATCH v2] usb: dwc2: Make sure we disconnect the gadget state

2017-04-02 Thread John Youn
as a gadget > every other time the OTG port is connected. > > So this patch adds a call to dwc2_hsotg_disconnect() in the > reset path so the state is properly cleared. > > With it, the gadget interface initializes properly on every > plug in. > > Cc: Wei Xu > Cc: Guo

Re: bug? dwc2: insufficient fifo memory

2017-03-07 Thread John Youn
+linux-usb On 2/24/2017 2:46 PM, John Stultz wrote: > Hey John, > So after the USB tree landed in 4.11-rc, I've been seeing the > following warning at bootup. > > It seems the fifo_mem/total_fifo_size value on hikey is 1920, but I'm > seeing the addresses zip upward quickly as the txfsz values a

Re: bug? dwc2: insufficient fifo memory

2017-02-24 Thread John Youn
On 2/24/2017 2:46 PM, John Stultz wrote: > Hey John, > So after the USB tree landed in 4.11-rc, I've been seeing the > following warning at bootup. > > It seems the fifo_mem/total_fifo_size value on hikey is 1920, but I'm > seeing the addresses zip upward quickly as the txfsz values are all > 204

Re: [RESEND PATCH v2 0/2] add multiple clock handling for dwc2 driver

2017-02-22 Thread John Youn
On 2/21/2017 5:30 PM, Frank Wang wrote: > Hi John and Greg, > > Friendly ping... :-) > Hi Frank, We'll take a look at this and get back to you soon. Regards, John > On 2017/2/10 11:06, Frank Wang wrote: >> Resend this series to involve device tree maintainer and add 'Reviewed-by' >> tag for d

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

2017-02-15 Thread John Youn
greatly appreciated! > It looks good to me. Acked-by: John Youn Regards, John > thanks > -john > > > I had seen some odd behavior with HiKey's usb-gadget interface > that I finally seemed to have chased down. Basically every other > time I pluged in the OTG po

Re: [RESEND PATCH 1/1] usb: dwc2: add multiple clock handling

2017-02-07 Thread John Youn
On 2/6/2017 7:18 PM, Frank Wang wrote: > Hi Heiko, John and Greg, > > On 2017/2/7 8:06, Heiko Stuebner wrote: >> Hi Frank, >> >> Am Sonntag, 5. Februar 2017, 10:51:01 CET schrieb Frank Wang: >>> Originally, dwc2 just handle one clock named otg, however, it may have >>> two or more clock need to man

Re: [PATCH 12/14] usb: dwc2: simplify optional reset handling

2017-01-30 Thread John Youn
On 1/30/2017 4:28 PM, John Youn wrote: > Hi Philipp, > > On 1/30/2017 3:42 AM, Philipp Zabel wrote: >> As of commit bb475230b8e5 ("reset: make optional functions really > > Where can I find this? It's not in mainline. > Never mind. I found on arm-soc per your rep

Re: [PATCH 12/14] usb: dwc2: simplify optional reset handling

2017-01-30 Thread John Youn
n-present reset controls. > > This allows to return errors from devm_reset_control_get_optional and to > call reset_control_(de)assert unconditionally. > > Signed-off-by: Philipp Zabel > Cc: Dinh Nguyen > Cc: John Youn > Cc: Felipe Balbi > Cc: Greg Kroah

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-18 Thread John Youn
On 1/18/2017 7:12 PM, Baolin Wang wrote: > Hi John, > > On 19 January 2017 at 09:33, John Youn wrote: >> On 1/16/2017 2:38 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn writes: >>>>> Baolin Wang writes: >>>>

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-18 Thread John Youn
On 1/16/2017 2:38 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> Baolin Wang writes: >>>>> Baolin Wang writes: >>>>>> When dwc3 controller acts as host role with attaching slow speed device >>>>>> (like mouse

Re: [PATCH 1/4 v3] usb: dwc2: Avoid sleeping while holding hsotg->lock

2017-01-16 Thread John Youn
0x370 >>> [ 86.341035] [] worker_thread+0x48/0x498 >>> [ 86.346473] [] kthread+0xd0/0xe8 >>> [ 86.351299] [] ret_from_fork+0x10/0x50 >>> >>> This seems to be caused by the dwc2_wait_for_mode() calling >>> usleep_range() while the hstog->

Re: [PATCH] usb: dwc2: host: use true/false for boolean

2017-01-12 Thread John Youn
0; > + hsotg->bus_suspended = false; > spin_unlock_irqrestore(&hsotg->lock, flags); > } > > @@ -5000,7 +5000,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq) > hsotg->dev->dma_mask == NULL) { > dev_warn(hsotg->dev,

Re: [PATCH] usb: dwc2: host: use msleep() for long delays

2017-01-12 Thread John Youn
> /* Clear reset bit in 10ms (FS/LS) or 50ms (HS) */ > - usleep_range(5, 7); > + msleep(50); > hprt0 &= ~HPRT0_RST; > dwc2_writel(hprt0, hsotg->regs + HPRT0); > hsotg->lx_state = DWC2_L0; /* Now back to On state */ > +Felipe Acked-by: John Youn I've also fixed this up locally to apply against recent dwc2 patches for next. Hi Felipe, If/when you queue the pending dwc2 patches on testing/next I can resend this to you. Regards, John

Re: [PATCH RFC] usb: dwc2: host: use msleep() for long delay

2017-01-12 Thread John Youn
4 > --- a/drivers/usb/dwc2/core.c > +++ b/drivers/usb/dwc2/core.c > @@ -455,7 +455,7 @@ void dwc2_clear_force_mode(struct dwc2_hsotg *hsotg) > dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG); > > if (dwc2_iddig_filter_enabled(hsotg)) > - usleep_range(10, 11); > + msleep(100); > } > > /* > +Felipe Acked-by: John Youn John

Re: [PATCH V2] usb: dwc2: host: fix Wmaybe-uninitialized warning

2017-01-12 Thread John Youn
+4489,8 @@ static void dwc2_dump_urb_info(struct usb_hcd *hcd, > struct urb *urb, > { > #ifdef VERBOSE_DEBUG > struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); > - char *pipetype; > - char *speed; > + char *pipetype = NULL; > + char *speed = NULL;

Re: [PATCH] usb: dwc2: gadget: Fix GUSBCFG.USBTRDTIM value

2017-01-12 Thread John Youn
On 1/12/2017 7:41 AM, Amelie DELAUNAY wrote: > Hi all, > Sorry, I did not see Pengcheng Li patch which is exactly the same: > https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_9347979_&d=DgIC-g&c=DPL6_X_6JkXFx7AXWqB0tg&r=U3o8uKoKhWme5_V9D-eeCkB11BFwt4KvWztBgdE9ZpA&m=6V

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-12 Thread John Youn
On 1/11/2017 11:51 PM, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >>> Baolin Wang writes: When dwc3 controller acts as host role with attaching slow speed device (like mouse or keypad). Then if we plugged out the slow speed device, it will timeout to run the deconfigurat

Re: [PATCH 0/4 v3] Fixes and workarounds for dwc2 on HiKey board (rebased to synopsys-usb/next)

2017-01-12 Thread John Youn
On 1/12/2017 12:07 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> On 1/11/2017 4:22 PM, John Stultz wrote: >>> Just wanted to resend my patches for dwc2 controller on the >>> HiKey board for consideration for the 4.11 merge window. >>> >

Re: [PATCH 0/4 v3] Fixes and workarounds for dwc2 on HiKey board (rebased to synopsys-usb/next)

2017-01-11 Thread John Youn
till exclude my patchset[1] to add extcon support to > dwc2, which John Youn suspects a pending rework of the dwc2 fifo > init logic might make unnecssary. > > thanks > -john > > [1] > https://urldefense.proofpoint.com/v2/url?u=https-3A__lkml.org_lkml_2016_12_6_69&

Re: [PATCH 0/5 v2] Fixes and workarounds for dwc2 on HiKey board

2017-01-11 Thread John Youn
On 1/11/2017 3:10 PM, John Stultz wrote: > On Wed, Jan 11, 2017 at 2:58 PM, John Youn wrote: >> On 1/11/2017 2:39 PM, John Stultz wrote: >>> On Wed, Jan 11, 2017 at 2:08 PM, John Youn wrote: >>>> On 1/3/2017 11:52 AM, John Stultz wrote: >>>>> Hope

Re: [PATCH 0/5 v2] Fixes and workarounds for dwc2 on HiKey board

2017-01-11 Thread John Youn
On 1/11/2017 2:39 PM, John Stultz wrote: > On Wed, Jan 11, 2017 at 2:08 PM, John Youn wrote: >> On 1/3/2017 11:52 AM, John Stultz wrote: >>> Hope everyone had a happy new years! >>> >>> I just wanted to send out my current queue of patches for dwc2 &

Re: [PATCH 0/5 v2] Fixes and workarounds for dwc2 on HiKey board

2017-01-11 Thread John Youn
xtcon support to dwc2, > which John Youn suspects a pending rework of the dwc2 fifo init > logic might make unnecssary. > > Any feedback would be greatly appreciated! > Hi John, Do you need these in 4.10-rc or is 4.11 ok? John

Re: [PATCH] usb: dwc2: use u32 for DT binding parameters

2017-01-06 Thread John Youn
On 1/6/2017 1:52 PM, John Stultz wrote: > On Fri, Jan 6, 2017 at 4:45 AM, Leo Yan wrote: >> Commit 05ee799f2021 ("usb: dwc2: Move gadget settings into core_params") >> changes to type u16 for DT binding "g-rx-fifo-size" and >> "g-np-tx-fifo-size" but use type u32 for "g-tx-fifo-size". Finally the

[PATCH] usb: dwc2: use u32 for DT binding parameters

2017-01-06 Thread John Youn
ssed successfully with wrong data format. This is found the data transferring broken on 96boards Hikey. This patch is to change all parameters to u32 type, and verified on Hikey board the DT parameters can pass successfully. [johnyoun: minor rebase] Signed-off-by: Leo Yan Signed-off-by: John Youn

Re: [PATCH] usb: dwc3: gadget: Avoid race between dwc3 interrupt handler and irq thread handler

2017-01-05 Thread John Youn
On 12/28/2016 5:29 PM, John Youn wrote: > > >> Janusz Dziedzic writes: >>>>>> On some platfroms(like x86 platform), when one core is running the >> USB gadget >>>>>> irq thread handler by dwc3_thread_interrupt(), meanwhile another >

Re: [PATCH 0/5 v2] Fixes and workarounds for dwc2 on HiKey board

2017-01-03 Thread John Youn
>> merge window. >> >> This does exclude my patchset[1] to add extcon support to dwc2, >> which John Youn suspects a pending rework of the dwc2 fifo init >> logic might make unnecssary. > > John/Vardan: Just as a heads up, along with these patches, I'

RE: [PATCH] usb: dwc3: gadget: Avoid race between dwc3 interrupt handler and irq thread handler

2016-12-28 Thread John Youn
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Felipe Balbi > Sent: Wednesday, December 28, 2016 8:19 AM > To: Janusz Dziedzic > Cc: Lu Baolu ; Baolin Wang > ; Greg KH ; USB > ; LKML ; Linaro > Kernel Mailman List ; M

Re: [PATCH 1/2] usb: dwc3: gadget: Fix full speed mode

2016-12-16 Thread John Youn
On 12/7/2016 7:06 PM, John Youn wrote: > On 12/7/2016 4:44 AM, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >>>>> Roger Quadros writes: >>>>>> DCFG.DEVSPD == 0x3 is not valid and we need to set >>>>>> D

Re: [RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-08 Thread John Youn
On 12/8/2016 2:43 PM, John Stultz wrote: > On Tue, Dec 6, 2016 at 7:52 PM, John Youn wrote: >> On 12/6/2016 5:48 PM, John Stultz wrote: >>> Hey John, >>> Just wanted to send this by you, as it seems something is >>> slightly off with the GOTGCTL state when r

Re: [PATCH 1/2] usb: dwc3: gadget: Fix full speed mode

2016-12-07 Thread John Youn
On 12/7/2016 4:44 AM, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: Roger Quadros writes: > DCFG.DEVSPD == 0x3 is not valid and we need to set > DCFG.DEVSPD to 0x1 for full speed mode. seems like it has been made invalid somewhere between 1.73a and 2.60a. Can

Re: [RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-06 Thread John Youn
h peripheral and host modes? > > I suspect this isn't the best solution, but it seems to work > well for me. > The workaround seems fine, but still, this indicates that something wrong is going on somwhere. You can add my ack: Acked-by: John Youn Regards, John > Feedbac

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Youn
On 12/6/2016 4:05 PM, John Stultz wrote: > On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: >> On 12/6/2016 12:06 AM, John Stultz wrote: >>> This patch wires up extcon support to the dwc2 driver >>> so that devices that use a modern generic phy driver >>> and

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Youn
dong Xu > Cc: Amit Pundir > Cc: Rob Herring > Cc: John Youn > Cc: Douglas Anderson > Cc: Chen Yu > Cc: Kishon Vijay Abraham I > Cc: Felipe Balbi > Cc: Greg Kroah-Hartman > Cc: linux-...@vger.kernel.org > Signed-off-by: John Stultz > --- > v2: > * Move

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

2016-12-06 Thread John Youn
On 12/6/2016 4:00 AM, Ayaka wrote: > Hello John > I still waiting them be merged, but I still can't find it at next-20161206. > Can you resubmit this fixing the checkpatch issues? You can add my ack: Acked-by: John Youn Regards, John > 從我的 iPad 傳送 > >> John You

Re: [PATCH] usb: dwc2: fix flags for DMA descriptor allocation in dwc2_hsotg_ep_enable

2016-12-02 Thread John Youn
SC_NUM_GENERIC * > sizeof(struct dwc2_dma_desc), > - &hs_ep->desc_list_dma, GFP_KERNEL); > + &hs_ep->desc_list_dma, GFP_ATOMIC); > if (!hs_ep->desc_list) { > ret = -ENOMEM; > goto error2; > Acked-by: John Youn Regards, John

Re: [RFC][PATCH 1/3] phy: phy-hi6220-usb: Wire up extconn support to hikey's phy driver

2016-12-02 Thread John Youn
to the usb UDC layer via a usb_phy structure. >>> >>> Not sure if this is the right way to connect phy -> UDC, >>> but I'm lacking a clear example. >>> >>> Cc: Wei Xu >>> Cc: Guodong Xu >>> Cc: Amit Pundir >>> Cc: Rob

Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver

2016-11-30 Thread John Youn
On 11/30/2016 4:47 AM, Felipe Balbi wrote: > > Hi, > > Raviteja Garimella writes: >> Hi Balbi, >> >> On Wed, Nov 30, 2016 at 4:10 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Raviteja Garimella writes: This is driver for Synopsys Designware Cores USB Device Controller (UDC) Subsystem

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

2016-11-21 Thread John Youn
properly cleared. > > With it, the gadget interface initializes properly on every > plug in. > > Cc: Wei Xu > Cc: Guodong Xu > Cc: Amit Pundir > Cc: Rob Herring > Cc: John Youn > Cc: Douglas Anderson > Cc: Chen Yu > Cc: Felipe Balbi > Cc: Greg Kr

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

2016-11-21 Thread John Youn
1 file changed, 10 insertions(+), 22 deletions(-) > For this series: Acked-by: John Youn 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

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

2016-11-15 Thread John Youn
. Signed-off-by: Christian Lamparter Signed-off-by: John Youn --- Sorry, the previous one broke compilation. This fixes it. Regards, John v3 [johnyoun]: * Fixed compilation issue v2 [johnyoun]: * Removed params struct * Minor commit message formatting Documentation/devicetree/bindings/

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

2016-11-15 Thread John Youn
. Signed-off-by: Christian Lamparter Signed-off-by: John Youn --- v2 [johnyoun]: * Removed params struct * Minor commit message formatting Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/params.c | 1 + 2 files changed, 2 insertions(+) diff --git a/D

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

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 PM, Christi

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 Regards, John > > Cc: John Youn > Cc: Felipe Balbi > Signed-off-by: Christian Lamparter > --- > drivers/usb

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 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 a

Re: [PATCH] usb: dwc2: gadget: simplify list handling

2016-11-07 Thread John Youn
On 11/7/2016 11:06 AM, Nicholas Mc Guire wrote: > The current code is effectively equivalent to list_first_entry_or_null() > so simply switch and simplify the code. > > Fixes: 9c39ddc60ee9 ("USB: s3c-hsotg: Fix stall condition processing") > Signed-off-by: Nicholas Mc Guire > --- > Found by simpl

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

2016-10-31 Thread John Youn
gt;> With it, the gadget interface initializes properly on every >> plug in. >> >> I don't know if this is actually the right fix, but it seems >> to work well. Feedback would be greatly appreciated! >> >> Cc: Wei Xu >> Cc: Guodong Xu >> C

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 phase.

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 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 have chased down. Basically

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

2016-10-25 Thread John Youn
t know if this is actually the right fix, but it seems > to work well. Feedback would be greatly appreciated! > > Cc: Wei Xu > Cc: Guodong Xu > Cc: Chen Yu > Cc: Amit Pundir > Cc: Rob Herring > Cc: Mark Rutland > Cc: John Youn > Cc: Douglas Anderson > Cc: Greg

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 Fixes: cac18ecb6f44 ("phy: Add reset callback") Tested-by: John Youn Hi Kishon, Can you take this for 4.9-rc? Thanks, Jo

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

2016-10-24 Thread John Youn
On 10/23/2016 2:33 AM, ayaka wrote: > > > On 10/22/2016 03:27 AM, John Youn wrote: >> On 10/20/2016 11:38 AM, 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 i

Re: [RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-21 Thread John Youn
On 10/20/2016 5:43 PM, Chen Yu wrote: > On 2016/10/19 6:21, John Youn wrote: >> On 10/16/2016 7:42 PM, Chen Yu wrote: >>> >>> >>> On 2016/10/15 3:37, John Youn wrote: >>>> On 10/13/2016 4:36 PM, John Stultz wrote: >>>>> From: Chen Yu

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

2016-10-21 Thread John Youn
On 10/20/2016 11:38 AM, 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 b

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

2016-10-19 Thread John Youn
On 10/15/2016 8:07 AM, 陈豪 wrote: > 2016-09-25 2:50 GMT+08:00 Randy Li : >> 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).

Re: [RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-18 Thread John Youn
On 10/16/2016 7:42 PM, Chen Yu wrote: > > > On 2016/10/15 3:37, John Youn wrote: >> On 10/13/2016 4:36 PM, John Stultz wrote: >>> From: Chen Yu >>> >>> The Hi6220's usb controller is limited in that it does not >>> automatically autonegot

Re: [RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-14 Thread John Youn
On 10/13/2016 4:36 PM, John Stultz wrote: > From: Chen Yu > > The Hi6220's usb controller is limited in that it does not > automatically autonegotiate the usb speed. Thus it requires a > quirk so that we can manually negotiate the best usb speed for > the attached device. Hi, Could you expand m

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 log

[PATCH] include/linux/property.h: fix typo/compile error

2016-09-28 Thread John Youn
nux/property.h: fix build issues with gcc-4.4.4") Signed-off-by: John Youn --- include/linux/property.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/property.h b/include/linux/property.h index 3a2f9ae..856e50b 100644 --- a/include/linux/property.h

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

2016-09-26 Thread John Youn
*/ > + if (of_device_is_compatible(np, "rockchip,rk3288-usb")) > + phy_reset(hsotg->phy); > + > mod_timer(&hsotg->wkp_timer, > jiffies + msecs_to_jiffies(71)); > } else { > Acked-by: John Youn Regards, John

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

2016-09-22 Thread John Youn
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 Thanks, John

Re: [PATCH] usb: cleanup with list_first_entry_or_null()

2016-09-13 Thread John Youn
; > Care to split this into two patches (one for dwc2 and one for dwc3)? > > thanks > For the dwc2 portion, you can add my acked-by. Acked-by: John Youn John

Re: [PATCH 2/2] usb: dwc3: Added a property to set GFLADJ register

2016-09-13 Thread John Youn
On 9/12/2016 8:30 AM, Rob Herring wrote: > On Thu, Sep 01, 2016 at 02:32:33PM -0700, John Youn wrote: >> From: Thinh Nguyen >> >> Added gfladj variable to control the core behavior with respect to >> SOF, ITP, and frame timer functionality. >> >> Currently

Re: [PATCH 1/2] usb: dwc3: Add ref clock period setting

2016-09-13 Thread John Youn
On 9/12/2016 7:09 AM, Rob Herring wrote: > On Thu, Sep 01, 2016 at 02:32:30PM -0700, John Youn wrote: >> From: Thinh Nguyen >> >> Added ref_clk_per for writing to GUCTL.RefClkPer which >> sets the period of ref_clk in nano second. >> >> Signed-off-by: Th

Re: [PATCH v2 1/1] usb: dwc3: fix Clear Stall EP command failure

2016-09-09 Thread John Youn
On 9/9/2016 12:47 AM, Felipe Balbi wrote: > > Hi John, > > Lu Baolu writes: >> Commit 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear >> Stall EP command") sets ClearPendIN bit for all IN endpoints of >> v2.60a+ cores. This causes ClearStall command fails on 2.60+ cores >> operating

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

2016-09-08 Thread John Youn
On 9/8/2016 7:27 AM, 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 bad

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

2016-09-07 Thread John Youn
On a clear force mode, since we don't know what mode to poll for, delay for a fixed 100 ms. This is the maximum delay based on the slowest PHY clock speed. Tested-by: Stefan Wahren Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 31 ++- 1 file c

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

2016-09-07 Thread John Youn
110ms. * Removed tested-by for patch 2 since I have changed the delays. 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: gadget: Only initi

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

2016-09-07 Thread John Youn
IDDIG debounce filter will occur before going back to host mode. Tested-by: Stefan Wahren Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 95 + drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hw.h | 1 + 3 files changed, 97 insertions

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

2016-09-07 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 Tested-by: Stefan Wahren Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH v2] usb: dwc3: Fix dr_mode validation

2016-09-06 Thread John Youn
otgany : dr_mode Signed-off-by: Thinh Nguyen Signed-off-by: John Youn --- v2: * Use the cached hwparams * Use a switch statement drivers/usb/dwc3/core.c | 65 - drivers/usb/dwc3/core.h | 5 +++- 2 files changed, 58 insertions(+), 12

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

2016-09-06 Thread John Youn
On 9/6/2016 6:19 PM, Ayaka wrote: > > > 從我的 iPad 傳送 > >> John Youn 於 2016年9月7日 上午2:54 寫道: >> >>> On 9/5/2016 10:15 PM, Kishon Vijay Abraham I wrote: >>> Hi, >>> >>>> On Sunday 04 September 2016 03:25 AM, Randy Li wrote: >>&g

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

2016-09-06 Thread John Youn
On 9/5/2016 10:15 PM, Kishon Vijay Abraham I wrote: > Hi, > > On Sunday 04 September 2016 03:25 AM, 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 sus

[PATCH] usb: dwc3: Fix dr_mode validation

2016-09-01 Thread John Youn
otgany : dr_mode Signed-off-by: Thinh Nguyen Signed-off-by: John Youn --- drivers/usb/dwc3/core.c | 84 ++--- drivers/usb/dwc3/core.h | 5 ++- 2 files changed, 77 insertions(+), 12 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/driver

[PATCH 1/2] usb: dwc3: Add ref clock period setting

2016-09-01 Thread John Youn
From: Thinh Nguyen Added ref_clk_per for writing to GUCTL.RefClkPer which sets the period of ref_clk in nano second. Signed-off-by: Thinh Nguyen Signed-off-by: John Youn --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ drivers/usb/dwc3/core.c| 21

[PATCH 2/2] usb: dwc3: Added a property to set GFLADJ register

2016-09-01 Thread John Youn
should be set to 0 with ref_clk period of 50. Signed-off-by: Thinh Nguyen Signed-off-by: John Youn --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ drivers/usb/dwc3/core.c| 5 + drivers/usb/dwc3/core.h| 1 + drivers/usb/dwc3/d

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

2016-09-01 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 Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb

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

2016-09-01 Thread John Youn
On a clear force mode, since we don't know what mode to poll for, delay for a fixed 100 ms. This is the maximum delay based on the slowest PHY clock speed. Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 31 ++- 1 file changed, 14 insertions(+), 17

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

2016-09-01 Thread John Youn
IDDIG debounce filter will occur before going back to host mode. Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 95 + drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hw.h | 1 + 3 files changed, 97 insertions(+) diff --git a/drivers

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

2016-09-01 Thread John Youn
changed the delays. 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: gadget: Only initialize device if in device mode usb: dwc2: Add

[PATCH 0/6] usb: dwc2: gadget: Fix TX FIFO handling

2016-08-29 Thread John Youn
. I've added a patch at the end of the series to document that. Regards, John John Youn (1): Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size Robert Baldyga (5): usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers usb: dwc2: gadget: fix TX FIFO size and

[PATCH 3/6] usb: dwc2: gadget: change variable name to more meaningful

2016-08-29 Thread John Youn
From: Robert Baldyga Since we handle FIFOs and endpoint separately, using variable named 'ep' in context of FIFO is misleading, hence we rename it to 'fifo'. Signed-off-by: Robert Baldyga Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 8 1 file changed

[PATCH 5/6] usb: dwc2: gadget: free TX FIFO after killing requests

2016-08-29 Thread John Youn
From: Robert Baldyga As kill_all_requests() potentially flushes TX FIFO, we should should free FIFO after calling it. Otherwise FIFO could stay unflushed properly. Signed-off-by: Robert Baldyga Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 8 1 file changed, 4 insertions

[PATCH 6/6] Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size

2016-08-29 Thread John Youn
This property is not needed because the periodic fifos are not configurable. So it was incorrect to add this property in the first place. Signed-off-by: John Youn --- Documentation/devicetree/bindings/usb/dwc2.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a

[PATCH 4/6] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable()

2016-08-29 Thread John Youn
From: Robert Baldyga Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is never executed. Signed-off-by: Robert Baldyga Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 13 + 1 f

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

2016-08-29 Thread John Youn
ialization. Signed-off-by: Robert Baldyga Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 7 --- drivers/usb/dwc2/gadget.c | 47 --- 2 files changed, 8 insertions(+), 46 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/d

[PATCH 1/6] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers

2016-08-29 Thread John Youn
From: Robert Baldyga In context of FIFO registers we use ep->fifo_index instead of ep->index. Signed-off-by: Robert Baldyga Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drive

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

2016-08-29 Thread John Youn
On 8/29/2016 12:51 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: > > [...] > >>>>> + */ >>>>> + if (of_device_is_compatible(np, "rockchip,rk3288-usb")) >>>>> +

  1   2   3   >