diff mbox series

usb: misc: onboard_usb_hub: extend gl3510 reset duration

Message ID 20231006101028.1973730-1-jbrunet@baylibre.com
State New
Headers show
Series usb: misc: onboard_usb_hub: extend gl3510 reset duration | expand

Commit Message

Jerome Brunet Oct. 6, 2023, 10:10 a.m. UTC
Initial tests with the gl3510 has been done on libretech aml-a311d-cc.
A 50us reset was fine as long as the hub node was under the usb phy node it
DT. DT schema does not allow that. Moving the hub under the dwc3 controller
caused issues, such as:

onboard-usb-hub 1-1: Failed to suspend device, error -32
onboard-usb-hub 1-1: can't set config #1, error -71
onboard-usb-hub 1-1: Failed to suspend device, error -32
onboard-usb-hub 1-1: USB disconnect, device number 2

Extending the reset duration solves the problem.
Since there is no documentation available for this hub, it is difficult to
know the actual required reset duration. 200us seems to work fine so far.

Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
Fixes: 65009ccf7e8f ("usb: misc: onboard_usb_hub: add Genesys Logic gl3510 hub support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/usb/misc/onboard_usb_hub.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Greg KH Oct. 10, 2023, 6:56 a.m. UTC | #1
On Fri, Oct 06, 2023 at 12:10:28PM +0200, Jerome Brunet wrote:
> Initial tests with the gl3510 has been done on libretech aml-a311d-cc.
> A 50us reset was fine as long as the hub node was under the usb phy node it
> DT. DT schema does not allow that. Moving the hub under the dwc3 controller
> caused issues, such as:
> 
> onboard-usb-hub 1-1: Failed to suspend device, error -32
> onboard-usb-hub 1-1: can't set config #1, error -71
> onboard-usb-hub 1-1: Failed to suspend device, error -32
> onboard-usb-hub 1-1: USB disconnect, device number 2
> 
> Extending the reset duration solves the problem.
> Since there is no documentation available for this hub, it is difficult to
> know the actual required reset duration. 200us seems to work fine so far.
> 
> Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
> Fixes: 65009ccf7e8f ("usb: misc: onboard_usb_hub: add Genesys Logic gl3510 hub support")

I can't find this git id, what tree is it in?

thanks,

greg k-h
Greg KH Oct. 10, 2023, 11:32 a.m. UTC | #2
On Tue, Oct 10, 2023 at 10:27:32AM +0200, Jerome Brunet wrote:
> 
> On Tue 10 Oct 2023 at 08:56, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
> > On Fri, Oct 06, 2023 at 12:10:28PM +0200, Jerome Brunet wrote:
> >> Initial tests with the gl3510 has been done on libretech aml-a311d-cc.
> >> A 50us reset was fine as long as the hub node was under the usb phy node it
> >> DT. DT schema does not allow that. Moving the hub under the dwc3 controller
> >> caused issues, such as:
> >> 
> >> onboard-usb-hub 1-1: Failed to suspend device, error -32
> >> onboard-usb-hub 1-1: can't set config #1, error -71
> >> onboard-usb-hub 1-1: Failed to suspend device, error -32
> >> onboard-usb-hub 1-1: USB disconnect, device number 2
> >> 
> >> Extending the reset duration solves the problem.
> >> Since there is no documentation available for this hub, it is difficult to
> >> know the actual required reset duration. 200us seems to work fine so far.
> >> 
> >> Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
> >> Fixes: 65009ccf7e8f ("usb: misc: onboard_usb_hub: add Genesys Logic gl3510 hub support")
> >
> > I can't find this git id, what tree is it in?
> 
> Silly mistake. I must have taken the git id I had before you merged it. Sorry.
> The correct tag with usb-next is
> 
> Fixes: b447e9efe50a ("usb: misc: onboard_usb_hub: add Genesys Logic gl3510 hub support")
> 
> Should I resend it ?

Please do.
diff mbox series

Patch

diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h
index a9e2f6023c1c..38de22452963 100644
--- a/drivers/usb/misc/onboard_usb_hub.h
+++ b/drivers/usb/misc/onboard_usb_hub.h
@@ -31,6 +31,11 @@  static const struct onboard_hub_pdata cypress_hx3_data = {
 	.num_supplies = 2,
 };
 
+static const struct onboard_hub_pdata genesys_gl3510_data = {
+	.reset_us = 200,
+	.num_supplies = 1,
+};
+
 static const struct onboard_hub_pdata genesys_gl850g_data = {
 	.reset_us = 3,
 	.num_supplies = 1,
@@ -56,7 +61,7 @@  static const struct of_device_id onboard_hub_match[] = {
 	{ .compatible = "usb5e3,608", .data = &genesys_gl850g_data, },
 	{ .compatible = "usb5e3,610", .data = &genesys_gl852g_data, },
 	{ .compatible = "usb5e3,620", .data = &genesys_gl852g_data, },
-	{ .compatible = "usb5e3,626", .data = &genesys_gl852g_data, },
+	{ .compatible = "usb5e3,626", .data = &genesys_gl3510_data, },
 	{ .compatible = "usbbda,411", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,5411", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,414", .data = &realtek_rts5411_data, },