All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
@ 2019-09-09 18:52 ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2019-09-09 18:52 UTC (permalink / raw)
  To: u-boot

This quirk is necessary for the Amlogic GXL SoCs otherwise the
Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:

XHCI timeout on event type 33... cannot recover.
BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
BUG!

This quirk is also handled in the dwc3 core code, but until the
xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
to fix USB support on the Amlogic libretech-cc and libretech-ac board
when a device is only plugged in the OTG port.

Cc: Yuri Frolov <crashing.kernel@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/usb/host/xhci-dwc3.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 9e8cae7ae4..55a1b22cf6 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -150,6 +150,9 @@ static int xhci_dwc3_probe(struct udevice *dev)
 	if (dev_read_bool(dev, "snps,dis-u2-freeclk-exists-quirk"))
 		reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS;
 
+	if (dev_read_bool(dev, "snps,dis_u2_susphy_quirk"))
+		reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
+
 	writel(reg, &dwc3_reg->g_usb2phycfg[0]);
 
 	dr_mode = usb_get_dr_mode(dev_of_offset(dev));
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
@ 2019-09-09 18:52 ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2019-09-09 18:52 UTC (permalink / raw)
  To: marex; +Cc: bmeng.cn, u-boot, u-boot-amlogic, Neil Armstrong, Yuri Frolov

This quirk is necessary for the Amlogic GXL SoCs otherwise the
Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:

XHCI timeout on event type 33... cannot recover.
BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
BUG!

This quirk is also handled in the dwc3 core code, but until the
xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
to fix USB support on the Amlogic libretech-cc and libretech-ac board
when a device is only plugged in the OTG port.

Cc: Yuri Frolov <crashing.kernel@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/usb/host/xhci-dwc3.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 9e8cae7ae4..55a1b22cf6 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -150,6 +150,9 @@ static int xhci_dwc3_probe(struct udevice *dev)
 	if (dev_read_bool(dev, "snps,dis-u2-freeclk-exists-quirk"))
 		reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS;
 
+	if (dev_read_bool(dev, "snps,dis_u2_susphy_quirk"))
+		reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
+
 	writel(reg, &dwc3_reg->g_usb2phycfg[0]);
 
 	dr_mode = usb_get_dr_mode(dev_of_offset(dev));
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
  2019-09-09 18:52 ` Neil Armstrong
@ 2019-09-10  1:56   ` Bin Meng
  -1 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2019-09-10  1:56 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 10, 2019 at 2:52 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> This quirk is necessary for the Amlogic GXL SoCs otherwise the
> Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:
>
> XHCI timeout on event type 33... cannot recover.
> BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
> BUG!
>
> This quirk is also handled in the dwc3 core code, but until the
> xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
> to fix USB support on the Amlogic libretech-cc and libretech-ac board
> when a device is only plugged in the OTG port.
>
> Cc: Yuri Frolov <crashing.kernel@gmail.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/usb/host/xhci-dwc3.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Thanks for your efforts tracing this down!

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
@ 2019-09-10  1:56   ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2019-09-10  1:56 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Marek Vasut, U-Boot Mailing List, u-boot-amlogic, Yuri Frolov

On Tue, Sep 10, 2019 at 2:52 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> This quirk is necessary for the Amlogic GXL SoCs otherwise the
> Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:
>
> XHCI timeout on event type 33... cannot recover.
> BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
> BUG!
>
> This quirk is also handled in the dwc3 core code, but until the
> xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
> to fix USB support on the Amlogic libretech-cc and libretech-ac board
> when a device is only plugged in the OTG port.
>
> Cc: Yuri Frolov <crashing.kernel@gmail.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/usb/host/xhci-dwc3.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Thanks for your efforts tracing this down!

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
  2019-09-10  1:56   ` Bin Meng
@ 2019-09-10  7:58     ` Neil Armstrong
  -1 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2019-09-10  7:58 UTC (permalink / raw)
  To: u-boot

Hi Bin, Marek,

On 10/09/2019 03:56, Bin Meng wrote:
> On Tue, Sep 10, 2019 at 2:52 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> This quirk is necessary for the Amlogic GXL SoCs otherwise the
>> Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:
>>
>> XHCI timeout on event type 33... cannot recover.
>> BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
>> BUG!
>>
>> This quirk is also handled in the dwc3 core code, but until the
>> xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
>> to fix USB support on the Amlogic libretech-cc and libretech-ac board
>> when a device is only plugged in the OTG port.
>>
>> Cc: Yuri Frolov <crashing.kernel@gmail.com>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>  drivers/usb/host/xhci-dwc3.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
> 
> Thanks for your efforts tracing this down!
> 
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> 

Should I take it into my amlogic tree or you'll handle it ?

Thanks,
Neil

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
@ 2019-09-10  7:58     ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2019-09-10  7:58 UTC (permalink / raw)
  To: Bin Meng; +Cc: Marek Vasut, U-Boot Mailing List, u-boot-amlogic, Yuri Frolov

Hi Bin, Marek,

On 10/09/2019 03:56, Bin Meng wrote:
> On Tue, Sep 10, 2019 at 2:52 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> This quirk is necessary for the Amlogic GXL SoCs otherwise the
>> Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:
>>
>> XHCI timeout on event type 33... cannot recover.
>> BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
>> BUG!
>>
>> This quirk is also handled in the dwc3 core code, but until the
>> xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
>> to fix USB support on the Amlogic libretech-cc and libretech-ac board
>> when a device is only plugged in the OTG port.
>>
>> Cc: Yuri Frolov <crashing.kernel@gmail.com>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>  drivers/usb/host/xhci-dwc3.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
> 
> Thanks for your efforts tracing this down!
> 
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> 

Should I take it into my amlogic tree or you'll handle it ?

Thanks,
Neil

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
  2019-09-10  7:58     ` Neil Armstrong
@ 2019-09-10  8:00       ` Bin Meng
  -1 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2019-09-10  8:00 UTC (permalink / raw)
  To: u-boot

Hi Neil,

On Tue, Sep 10, 2019 at 3:58 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> Hi Bin, Marek,
>
> On 10/09/2019 03:56, Bin Meng wrote:
> > On Tue, Sep 10, 2019 at 2:52 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> >>
> >> This quirk is necessary for the Amlogic GXL SoCs otherwise the
> >> Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:
> >>
> >> XHCI timeout on event type 33... cannot recover.
> >> BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
> >> BUG!
> >>
> >> This quirk is also handled in the dwc3 core code, but until the
> >> xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
> >> to fix USB support on the Amlogic libretech-cc and libretech-ac board
> >> when a device is only plugged in the OTG port.
> >>
> >> Cc: Yuri Frolov <crashing.kernel@gmail.com>
> >> Cc: Bin Meng <bmeng.cn@gmail.com>
> >> Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
> >> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> >> ---
> >>  drivers/usb/host/xhci-dwc3.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >
> > Thanks for your efforts tracing this down!
> >
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> >
>
> Should I take it into my amlogic tree or you'll handle it ?
>

I think you can take it via your tree. Thanks!

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk
@ 2019-09-10  8:00       ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2019-09-10  8:00 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Marek Vasut, U-Boot Mailing List, u-boot-amlogic, Yuri Frolov

Hi Neil,

On Tue, Sep 10, 2019 at 3:58 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> Hi Bin, Marek,
>
> On 10/09/2019 03:56, Bin Meng wrote:
> > On Tue, Sep 10, 2019 at 2:52 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> >>
> >> This quirk is necessary for the Amlogic GXL SoCs otherwise the
> >> Port 2 PHY doesn't get out of suspend and U-Boot resets the board after:
> >>
> >> XHCI timeout on event type 33... cannot recover.
> >> BUG: failure at drivers/usb/host/xhci-ring.c:474/xhci_wait_for_event()!
> >> BUG!
> >>
> >> This quirk is also handled in the dwc3 core code, but until the
> >> xhci-dwc3 driver uses the dwc3 core, the quirk must be handled here
> >> to fix USB support on the Amlogic libretech-cc and libretech-ac board
> >> when a device is only plugged in the OTG port.
> >>
> >> Cc: Yuri Frolov <crashing.kernel@gmail.com>
> >> Cc: Bin Meng <bmeng.cn@gmail.com>
> >> Fixes: dc9cdf859e ("usb: dwc3: Add DWC3 controller driver support")
> >> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> >> ---
> >>  drivers/usb/host/xhci-dwc3.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >
> > Thanks for your efforts tracing this down!
> >
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> >
>
> Should I take it into my amlogic tree or you'll handle it ?
>

I think you can take it via your tree. Thanks!

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-10  8:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 18:52 [U-Boot] [PATCH] usb: xhci-dwc3: Add support for dis_u2_susphy_quirk Neil Armstrong
2019-09-09 18:52 ` Neil Armstrong
2019-09-10  1:56 ` [U-Boot] " Bin Meng
2019-09-10  1:56   ` Bin Meng
2019-09-10  7:58   ` [U-Boot] " Neil Armstrong
2019-09-10  7:58     ` Neil Armstrong
2019-09-10  8:00     ` [U-Boot] " Bin Meng
2019-09-10  8:00       ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.