public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: misc: onboard_usb_hub: extend gl3510 reset duration
@ 2023-10-06 10:10 Jerome Brunet
  2023-10-10  6:56 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Jerome Brunet @ 2023-10-06 10:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Jerome Brunet, linux-kernel, linux-usb, Neil Armstrong

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(-)

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, },
-- 
2.40.1


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

end of thread, other threads:[~2023-10-10 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 10:10 [PATCH] usb: misc: onboard_usb_hub: extend gl3510 reset duration Jerome Brunet
2023-10-10  6:56 ` Greg Kroah-Hartman
2023-10-10  8:27   ` Jerome Brunet
2023-10-10 11:32     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox