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

2018-02-05 Thread John Youn
hs_ep->frame_overrun = 0; + hs_ep->frame_overrun = false; } } +Felipe Acked-by: John Youn <johny...@synopsys.com> Regards, John

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

2017-12-05 Thread John Youn
ce *dev) > dwc2_lowlevel_hw_disable(hsotg); > > reset_control_assert(hsotg->reset); > + reset_control_assert(hsotg->reset_ecc); > > return 0; > } > Acked-by: John Youn <johny...@synopsys.com> John

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

2017-12-05 Thread John Youn
HWCFG4_NUM_DEV_PERIO_IN_EP_SHIFT; > + hw->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 <johny...@synopsys.com> John

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

2017-12-05 Thread John Youn
- Sent to Felipe Balbi as candiate to land this. >> - Add Cc for stable (it's always been broken so go as far is as easy) >> >> Changes in v2: >> - Address >> https://urldefense.proofpoint.com/v2/url?u=http-3A__crosreview.com_737520=DwICaQ=DPL6_X_6JkXFx7AXWqB0tg=U3o8uKoKhWme5_V9D-eeCkB11BFwt4KvWztBgdE9ZpA=Y_xpJ6Ks0XAK5_bQgmeQEvgKThZtPBQJ3cejNCGfEvM=olyPwyYvn_072esVwYxrCduKOKKJPUgc1YHX-CNhM1s= >> feedback >> > > does it need a resend? > You can add my acked-by: Acked-by: John Youn <johny...@synopsys.com> Regards, John

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

2017-09-30 Thread John Youn
ice_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 <johny...@synopsys.com> John

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

2017-09-30 Thread John Youn
get some feedback on the patches and consideration > to be merged upstream. > > thanks > -john > > Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: YongQin Liu <yongqin@linaro.org

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

2017-07-17 Thread John Youn
->regs + DCFG, DCFG_DEVADDR_MASK); > + > if (usb_status & GOTGCTL_BSESVLD && connected) > dwc2_hsotg_core_init_disconnected(hsotg, true); > } > Acked-by: John Youn <johny...@synopsys.com> 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

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

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

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

2017-04-02 Thread John Youn
Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: Rob Herring <robh...@kernel.org> > Cc: John Youn <johny...@synopsys.com> > Cc: Douglas Anderson <diand...@chromium.org> > Cc: Chen Yu <cheny...@huawei.com> &

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

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 >

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

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

2017-02-15 Thread John Youn
reatly appreciated! > It looks good to me. Acked-by: John Youn <johny...@synopsys.com> 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 pl

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

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 reply el

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

2017-01-30 Thread John Youn
sent 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 <p.za...@pengutronix.de> > Cc: Dinh Nguyen <dingu...@opensource.altera.com> > Cc: John Youn &

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 <john.y...@synopsys.com> wrote: >> On 1/16/2017 2:38 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <john.y...@synopsys.co

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 <john.y...@synopsys.com> writes: >>> Baolin Wang <baolin.w...@linaro.org> writes: >>>>> Baolin Wang <baolin.w...@linaro.org> writes: >>>>>> When dwc3 controll

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

2017-01-16 Thread John Youn
2_conn_id_status_change+0x130/0x250 >>> [ 86.335254] [] process_one_work+0x118/0x370 >>> [ 86.341035] [] worker_thread+0x48/0x498 >>> [ 86.346473] [] kthread+0xd0/0xe8 >>> [ 86.351299] [] ret_from_fork+0x10/0x50 >>> >>> This seems to be

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

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

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

2017-01-12 Thread John Youn
000, 4); > + msleep(20); > spin_lock_irqsave(>lock, flags); > } > > @@ -3691,7 +3691,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg > *hsotg, u16 typereq, > } > > /* Clear reset bit in 10ms

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

2017-01-12 Thread John Youn
rs/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 <johny...@synopsys.com> John

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

2017-01-12 Thread John Youn
peed = NULL; > > dev_vdbg(hsotg->dev, "%s, urb %p\n", fn_name, urb); > dev_vdbg(hsotg->dev, " Device address: %d\n", > +Felipe Acked-by: John Youn <johny...@synopsys.com> John

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

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

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 <john.y...@synopsys.com> 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 th

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

2017-01-11 Thread John Youn
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=Dg

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 <john.y...@synopsys.com> wrote: >> On 1/11/2017 2:39 PM, John Stultz wrote: >>> On Wed, Jan 11, 2017 at 2:08 PM, John Youn <john.y...@synopsys.com> wrote: >>>> On 1/3/20

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 <john.y...@synopsys.com> 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 curren

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

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

2017-01-06 Thread John Youn
t two parameters cannot be passed 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

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 <janusz.dzied...@gmail.com> writes: >>>>>> On some platfroms(like x86 platform), when one core is running the >> USB gadget >>>>>> irq thread handler by dwc3_thread_interrup

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

2017-01-03 Thread John Youn
rd for consideration for the 4.11 >> 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, al

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 >

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 <rog...@ti.com> writes: >>>>> Roger Quadros <rog...@ti.com> writes: >>>>>> DCFG.DEVSPD == 0x3 is no

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 <john.y...@synopsys.com> 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

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

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

2016-12-06 Thread John Youn
d 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 <johny...@synopsys.com> Regards, John > Fe

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 <john.y...@synopsys.com> 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 gen

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

2016-12-06 Thread John Youn
com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: Rob Herring <robh...@kernel.org> > Cc: John Youn <johny...@synopsys.com> > Cc: Douglas Anderson <diand...@chromium.org> > Cc: Chen Yu <cheny...@

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 <johny...@synopsys.com> Regards, John > 從我的 iPad

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

2016-12-02 Thread John Youn
ev, > MAX_DMA_DESC_NUM_GENERIC * > sizeof(struct dwc2_dma_desc), > - _ep->desc_list_dma, GFP_KERNEL); > + _ep->desc_list_dma, GFP_ATOMIC); > if (!hs_ep->desc_list) { > ret = -ENOMEM; > goto error2; > Acked-by: John Youn <johny...@synopsys.com> 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
ong...@linaro.org> >>> Cc: Amit Pundir <amit.pun...@linaro.org> >>> Cc: Rob Herring <robh...@kernel.org> >>> Cc: John Youn <johny...@synopsys.com> >>> Cc: Douglas Anderson <diand...@chromium.org> >>> Cc: Chen Yu <che

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:

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

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

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

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

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 >

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

2016-10-31 Thread John Youn
t; >> Cc: Guodong Xu <guodong...@linaro.org> >> Cc: Chen Yu <cheny...@huawei.com> >> Cc: Amit Pundir <amit.pun...@linaro.org> >> Cc: Rob Herring <robh...@kernel.org> >> Cc: Mark Rutland <mark.rutl...@arm.com> >> Cc: John Youn <johny...@synopsys

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

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: [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] 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

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 is ass

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 Y

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

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

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 <cheny...@huawei.com> >>> >>> The Hi6220's usb controller is limited in that it does not >>> au

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.

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

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

2016-09-28 Thread John Youn
ty.h: fix build issues with gcc-4.4.4") Signed-off-by: John Youn <johny...@synopsys.com> --- 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/linu

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)); > } else { > Acked-by: John Youn <johny...@synopsys.com> Regards, John

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: [PATCH] usb: cleanup with list_first_entry_or_null()

2016-09-13 Thread John Youn
gned-off-by: Masahiro Yamada <yamada.masah...@socionext.com> >> --- > > 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 <johny...@synopsys.com> 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 <thi...@synopsys.com> >> >> Added gfladj variable to control the core behavior with respect to >> SOF, ITP, and frame timer functionality. &g

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 <thi...@synopsys.com> >> >> Added ref_clk_per for writing to GUCTL.RefClkPer which >> sets the period of ref_clk in nano second. >&

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

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 <stefan.wah...@i2se.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2

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

2016-09-07 Thread John Youn
. * 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 initialize

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

2016-09-07 Thread John Youn
the IDDIG debounce filter will occur before going back to host mode. Tested-by: Stefan Wahren <stefan.wah...@i2se.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 95 + drivers/usb/dwc2/core.h | 1 + driv

[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 <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb

[PATCH v2] usb: dwc3: Fix dr_mode validation

2016-09-06 Thread John Youn
otg devany : dev otg otgany : dr_mode Signed-off-by: Thinh Nguyen <thi...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- v2: * Use the cached hwparams * Use a switch statement drivers/usb/dwc3/core.c | 65 --

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 <john.y...@synopsys.com> 於 2016年9月7日 上午2:54 寫道: >> >>> On 9/5/2016 10:15 PM, Kishon Vijay Abraham I wrote: >>> Hi, >>> >>>> On Sunday 04 September 2016 03:

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

[PATCH] usb: dwc3: Fix dr_mode validation

2016-09-01 Thread John Youn
otg devany : dev otg otgany : dr_mode Signed-off-by: Thinh Nguyen <thi...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 84 ++--- drivers/usb/dwc3/core.h | 5 ++- 2 files c

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

2016-09-01 Thread John Youn
From: Thinh Nguyen <thi...@synopsys.com> Added ref_clk_per for writing to GUCTL.RefClkPer which sets the period of ref_clk in nano second. Signed-off-by: Thinh Nguyen <thi...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings

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

2016-09-01 Thread John Youn
mple, the value for GFLADJ_REFCLK_LPM_SEL should be set to 0 with ref_clk period of 50. Signed-off-by: Thinh Nguyen <thi...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ drivers/usb/dwc3/core.c| 5 +++

[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 <he...@sntech.de> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+),

[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 <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 31 ++- 1 file changed, 14 inse

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

2016-09-01 Thread John Youn
the IDDIG debounce filter will occur before going back to host mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 95 + drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hw.h | 1 + 3 files changed, 97 inse

[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 addr

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

2016-08-29 Thread John Youn
From: Robert Baldyga <r.bald...@samsung.com> 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 <r.bald...@samsung.com> Signed-off-by: John Youn <johny.

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

2016-08-29 Thread John Youn
From: Robert Baldyga <r.bald...@samsung.com> 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 <r.bald...@samsung.com> Signed-off-by: John Youn <johny.

[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 <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 5 - 1 file changed, 4 insertions(+), 1 de

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

2016-08-29 Thread John Youn
From: Robert Baldyga <r.bald...@samsung.com> 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 <r.bald...@samsung.com> Signed-off-by: J

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

2016-08-29 Thread John Youn
ted to incorrect FIFO size initialization. Signed-off-by: Robert Baldyga <r.bald...@samsung.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 7 --- drivers/usb/dwc2/gadget.c | 47 --- 2 files changed, 8

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

2016-08-29 Thread John Youn
From: Robert Baldyga <r.bald...@samsung.com> In context of FIFO registers we use ep->fifo_index instead of ep->index. Signed-off-by: Robert Baldyga <r.bald...@samsung.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 5 +++-- 1 fi

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 <john.y...@synopsys.com> writes: > > [...] > >>>>> + */ >>>>> + if (of_device_is_compatible(np, "rockchip,rk3288-usb")

[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

  1   2   3   >