* [PATCH 0/1] usb: dwc2: fix hot plugging on Amlogic devices
@ 2018-12-09 19:01 Martin Blumenstingl
2018-12-09 19:01 ` [PATCH 1/1] usb: dwc2: disable power_down " Martin Blumenstingl
0 siblings, 1 reply; 4+ messages in thread
From: Martin Blumenstingl @ 2018-12-09 19:01 UTC (permalink / raw)
To: linux-usb, hminas, gregkh
Cc: Martin Blumenstingl, linux-amlogic, christianshewitt,
linux-kernel, Arthur.Petrosyan
This is a follow-up to an issue I had a while ago but never had the
time to debug it: [0]
Short summary:
- on Meson8b USB devices are only detected if they are plugged in
before booting Linux
- if they are plugged in after booting Linux they are not detected
(except when running "lsusb -v" as a workaround)
Christian Hewitt made me aware of a similar issue that was fixed for
Rockchip devices. This single patch applies the same fix to the
Amlogic devices as well.
[0] http://lists.infradead.org/pipermail/linux-amlogic/2018-May/007310.html
Martin Blumenstingl (1):
usb: dwc2: disable power_down on Amlogic devices
drivers/usb/dwc2/params.c | 1 +
1 file changed, 1 insertion(+)
--
2.19.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices
2018-12-09 19:01 [PATCH 0/1] usb: dwc2: fix hot plugging on Amlogic devices Martin Blumenstingl
@ 2018-12-09 19:01 ` Martin Blumenstingl
2018-12-10 6:04 ` Minas Harutyunyan
2018-12-10 13:20 ` Brad Harper
0 siblings, 2 replies; 4+ messages in thread
From: Martin Blumenstingl @ 2018-12-09 19:01 UTC (permalink / raw)
To: linux-usb, hminas, gregkh
Cc: Arthur.Petrosyan, Martin Blumenstingl, christianshewitt,
linux-kernel, stable, linux-amlogic
Disable power_down by setting the parameter to
DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic
Meson SoCs where USB devices are only recognized when plugged in before
booting Linux. A hot-plugged USB device was not detected even though the
device got power (my USB thumb drive for example has an LED which lit
up).
A similar fix was implemented for Rockchip SoCs in commit c216765d3a1def
("usb: dwc2: disable power_down on rockchip devices"). That commit
suggests that a change in the dwc2 driver is the cause because the
default value for the "hibernate" parameter (which then got renamed to
"power_down" to support other modes) was changed in the v4.17 merge
window with:
commit 6d23ee9caa6790 ("Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing").
Cc: <stable@vger.kernel.org> # 4.19
Suggested-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/usb/dwc2/params.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 7c1b6938f212..38c813b1d203 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -111,6 +111,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg)
p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI;
p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 <<
GAHBCFG_HBSTLEN_SHIFT;
+ p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
}
static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg)
--
2.19.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices
2018-12-09 19:01 ` [PATCH 1/1] usb: dwc2: disable power_down " Martin Blumenstingl
@ 2018-12-10 6:04 ` Minas Harutyunyan
2018-12-10 13:20 ` Brad Harper
1 sibling, 0 replies; 4+ messages in thread
From: Minas Harutyunyan @ 2018-12-10 6:04 UTC (permalink / raw)
To: Martin Blumenstingl, linux-usb, minas.harutyunyan, gregkh
Cc: linux-amlogic, christianshewitt, linux-kernel, stable, Arthur.Petrosyan
On 12/9/2018 11:01 PM, Martin Blumenstingl wrote:
> Disable power_down by setting the parameter to
> DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic
> Meson SoCs where USB devices are only recognized when plugged in before
> booting Linux. A hot-plugged USB device was not detected even though the
> device got power (my USB thumb drive for example has an LED which lit
> up).
>
> A similar fix was implemented for Rockchip SoCs in commit c216765d3a1def
> ("usb: dwc2: disable power_down on rockchip devices"). That commit
> suggests that a change in the dwc2 driver is the cause because the
> default value for the "hibernate" parameter (which then got renamed to
> "power_down" to support other modes) was changed in the v4.17 merge
> window with:
> commit 6d23ee9caa6790 ("Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing").
>
> Cc: <stable@vger.kernel.org> # 4.19
> Suggested-by: Christian Hewitt <christianshewitt@gmail.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
> drivers/usb/dwc2/params.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index 7c1b6938f212..38c813b1d203 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -111,6 +111,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg)
> p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI;
> p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 <<
> GAHBCFG_HBSTLEN_SHIFT;
> + p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
> }
>
> static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg)
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices
2018-12-09 19:01 ` [PATCH 1/1] usb: dwc2: disable power_down " Martin Blumenstingl
2018-12-10 6:04 ` Minas Harutyunyan
@ 2018-12-10 13:20 ` Brad Harper
1 sibling, 0 replies; 4+ messages in thread
From: Brad Harper @ 2018-12-10 13:20 UTC (permalink / raw)
To: Martin Blumenstingl, linux-usb, hminas, gregkh
Cc: Arthur.Petrosyan, christianshewitt, linux-kernel, stable, linux-amlogic
On 10/12/2018 6:01 am, Martin Blumenstingl wrote:
> Disable power_down by setting the parameter to
> DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic
> Meson SoCs where USB devices are only recognized when plugged in before
> booting Linux. A hot-plugged USB device was not detected even though the
> device got power (my USB thumb drive for example has an LED which lit
> up).
>
> A similar fix was implemented for Rockchip SoCs in commit c216765d3a1def
> ("usb: dwc2: disable power_down on rockchip devices"). That commit
> suggests that a change in the dwc2 driver is the cause because the
> default value for the "hibernate" parameter (which then got renamed to
> "power_down" to support other modes) was changed in the v4.17 merge
> window with:
> commit 6d23ee9caa6790 ("Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing").
>
> Cc: <stable@vger.kernel.org> # 4.19
> Suggested-by: Christian Hewitt <christianshewitt@gmail.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Fixed the issue on the Odroid C2 sbc with amlogic meson gxbb soc,
devices are now detected when connected after boot
Tested-by: Brad Harper <bjharper@gmail.com>
> ---
> drivers/usb/dwc2/params.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index 7c1b6938f212..38c813b1d203 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -111,6 +111,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg)
> p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI;
> p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 <<
> GAHBCFG_HBSTLEN_SHIFT;
> + p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
> }
>
> static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg)
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-10 13:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-09 19:01 [PATCH 0/1] usb: dwc2: fix hot plugging on Amlogic devices Martin Blumenstingl
2018-12-09 19:01 ` [PATCH 1/1] usb: dwc2: disable power_down " Martin Blumenstingl
2018-12-10 6:04 ` Minas Harutyunyan
2018-12-10 13:20 ` Brad Harper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).