* [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817
2026-11-13 3:16 [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Hung-Chun Tseng
@ 2026-11-13 3:16 ` Hung-Chun Tseng
2026-11-13 3:45 ` Marek Vasut
2026-11-13 6:15 ` Yixun Lan
2026-11-13 3:16 ` [PATCH v2 2/2] configs: spacemit_k1: Enable onboard USB hub support Hung-Chun Tseng
` (2 subsequent siblings)
3 siblings, 2 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-11-13 3:16 UTC (permalink / raw)
To: Marek Vasut, Yixun Lan
Cc: Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov, Guodong Xu,
Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
The VL817 is a USB 3.1 Gen 1 hub controller with one supply and a reset
pin. Use the same reset time as Linux.
The Milk-V Jupiter and the Banana Pi BPI-F3 have one in front of all
their USB ports. Without this, U-Boot leaves the hub unpowered and in
reset, so no USB device is found.
Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
Tested-by: Zixian Zeng <sycamoremoon376@gmail.com> # Babanapi-F3
---
common/usb_onboard_hub.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c
index 0684f7bfd..0ed70a6ba 100644
--- a/common/usb_onboard_hub.c
+++ b/common/usb_onboard_hub.c
@@ -289,9 +289,21 @@ static const struct onboard_hub_data usbhx3_data = {
.supply_names = { "vdd-supply", "vdd2-supply" },
};
+static const struct onboard_hub_data vialab_vl817_data = {
+ .reset_us = 10,
+ .num_supplies = 1,
+ .supply_names = { "vdd-supply" },
+};
+
static const struct udevice_id usb_onboard_hub_ids[] = {
/* Use generic usbVID,PID dt-bindings (usb-device.yaml) */
- { .compatible = "usb3431,6241", /* Corechips SL6341 USB 2.0 */
+ { .compatible = "usb2109,2817", /* VIA Labs VL817 USB 2.0 */
+ .data = (ulong)&vialab_vl817_data,
+ }, {
+ .compatible = "usb2109,817", /* VIA Labs VL817 USB 3.0 */
+ .data = (ulong)&vialab_vl817_data,
+ }, {
+ .compatible = "usb3431,6241", /* Corechips SL6341 USB 2.0 */
.data = (ulong)&corechips_sl6341_data,
}, {
.compatible = "usb3431,6341", /* Corechips SL6341 USB 3.0 */
--
2.56.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817
2026-11-13 3:16 ` [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817 Hung-Chun Tseng
@ 2026-11-13 3:45 ` Marek Vasut
2026-11-13 6:15 ` Yixun Lan
1 sibling, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2026-11-13 3:45 UTC (permalink / raw)
To: Hung-Chun Tseng, Marek Vasut, Yixun Lan
Cc: Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov, Guodong Xu,
Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
On 11/13/26 4:16 AM, Hung-Chun Tseng wrote:
> The VL817 is a USB 3.1 Gen 1 hub controller with one supply and a reset
> pin. Use the same reset time as Linux.
>
> The Milk-V Jupiter and the Banana Pi BPI-F3 have one in front of all
> their USB ports. Without this, U-Boot leaves the hub unpowered and in
> reset, so no USB device is found.
>
> Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
> Tested-by: Zixian Zeng <sycamoremoon376@gmail.com> # Babanapi-F3
Reviewed-by: Marek Vasut <marek.vasut+usb@mailbox.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817
2026-11-13 3:16 ` [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817 Hung-Chun Tseng
2026-11-13 3:45 ` Marek Vasut
@ 2026-11-13 6:15 ` Yixun Lan
1 sibling, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2026-11-13 6:15 UTC (permalink / raw)
To: Marek Vasut, Hung-Chun Tseng
Cc: Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov, Guodong Xu,
Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
Hi Marek,
On 11:16 Fri 13 Nov , Hung-Chun Tseng wrote:
> The VL817 is a USB 3.1 Gen 1 hub controller with one supply and a reset
> pin. Use the same reset time as Linux.
>
> The Milk-V Jupiter and the Banana Pi BPI-F3 have one in front of all
> their USB ports. Without this, U-Boot leaves the hub unpowered and in
> reset, so no USB device is found.
>
> Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
> Tested-by: Zixian Zeng <sycamoremoon376@gmail.com> # Babanapi-F3
> ---
> common/usb_onboard_hub.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
would you prefer to take this patch via usb tree?
or I could queue it in spacemit custodian tree,
either way works for me, just let me know
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] configs: spacemit_k1: Enable onboard USB hub support
2026-11-13 3:16 [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Hung-Chun Tseng
2026-11-13 3:16 ` [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817 Hung-Chun Tseng
@ 2026-11-13 3:16 ` Hung-Chun Tseng
2026-11-18 7:54 ` Yixun Lan
2026-11-13 6:07 ` [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Yixun Lan
2026-11-18 12:15 ` (subset) " Yixun Lan
3 siblings, 1 reply; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-11-13 3:16 UTC (permalink / raw)
To: Marek Vasut, Yixun Lan
Cc: Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov, Guodong Xu,
Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
The Milk-V Jupiter and the Banana Pi BPI-F3 need the VL817 hub to be
powered and taken out of reset before their USB ports work.
Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
---
configs/spacemit_k1_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/spacemit_k1_defconfig b/configs/spacemit_k1_defconfig
index b8f777e89..31e429c03 100644
--- a/configs/spacemit_k1_defconfig
+++ b/configs/spacemit_k1_defconfig
@@ -117,4 +117,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_USB_ONBOARD_HUB=y
CONFIG_SPL_LIB_RATIONAL=y
--
2.56.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] configs: spacemit_k1: Enable onboard USB hub support
2026-11-13 3:16 ` [PATCH v2 2/2] configs: spacemit_k1: Enable onboard USB hub support Hung-Chun Tseng
@ 2026-11-18 7:54 ` Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2026-11-18 7:54 UTC (permalink / raw)
To: Hung-Chun Tseng
Cc: Marek Vasut, Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov,
Guodong Xu, Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
On 11:16 Fri 13 Nov , Hung-Chun Tseng wrote:
> The Milk-V Jupiter and the Banana Pi BPI-F3 need the VL817 hub to be
> powered and taken out of reset before their USB ports work.
>
> Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
Reviewed-by: Yixun Lan <dlan@kernel.org>
> ---
> configs/spacemit_k1_defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/configs/spacemit_k1_defconfig b/configs/spacemit_k1_defconfig
> index b8f777e89..31e429c03 100644
> --- a/configs/spacemit_k1_defconfig
> +++ b/configs/spacemit_k1_defconfig
> @@ -117,4 +117,5 @@ CONFIG_USB_XHCI_HCD=y
> CONFIG_USB_DWC3=y
> CONFIG_USB_DWC3_GENERIC=y
> CONFIG_USB_STORAGE=y
> +CONFIG_USB_ONBOARD_HUB=y
> CONFIG_SPL_LIB_RATIONAL=y
> --
> 2.56.1
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards
2026-11-13 3:16 [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Hung-Chun Tseng
2026-11-13 3:16 ` [PATCH v2 1/2] usb: onboard-hub: Add support for VIA Labs VL817 Hung-Chun Tseng
2026-11-13 3:16 ` [PATCH v2 2/2] configs: spacemit_k1: Enable onboard USB hub support Hung-Chun Tseng
@ 2026-11-13 6:07 ` Yixun Lan
2026-11-18 12:15 ` (subset) " Yixun Lan
3 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2026-11-13 6:07 UTC (permalink / raw)
To: Hung-Chun Tseng
Cc: Marek Vasut, Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov,
Guodong Xu, Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
Hi Hung-Chun,
On 11:16 Fri 13 Nov , Hung-Chun Tseng wrote:
> The Milk-V Jupiter and the Banana Pi BPI-F3 put a VIA Labs VL817 hub in
> front of all their USB ports. Its supply and reset are GPIOs, so
> `usb start` only finds the root hub until someone powers the hub by
> hand.
>
> This adds the VL817 to the onboard hub driver and enables it for K1.
>
> Tested on a Milk-V Jupiter, cold boot from SD: `usb start` finds both
> VL817 hubs and a USB 3 stick at 5 Gb/s, with no manual GPIO setup.
> That test capped DRAM at 4 GiB to avoid the K1 DRAM sizing bug, which
> is now fixed in main by commit e6308cc14 ("spacemit: k1: drop the CS1
> DRAM map on single-rank boards").
>
> Changes in v2:
> - Rebased on main.
> - Added Zixian's Tested-by to 1/2.
>
> v1: <20261026092432.769146-1-alan.tseng.cs@gmail.com>
>
> Hung-Chun Tseng (2):
> usb: onboard-hub: Add support for VIA Labs VL817
> configs: spacemit_k1: Enable onboard USB hub support
>
> common/usb_onboard_hub.c | 14 +++++++++++++-
> configs/spacemit_k1_defconfig | 1 +
> 2 files changed, 14 insertions(+), 1 deletion(-)
The series looks good, with
Reviewed-by: Yixun Lan <dlan@kernel.org>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: (subset) [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards
2026-11-13 3:16 [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Hung-Chun Tseng
` (2 preceding siblings ...)
2026-11-13 6:07 ` [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Yixun Lan
@ 2026-11-18 12:15 ` Yixun Lan
3 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2026-11-18 12:15 UTC (permalink / raw)
To: Marek Vasut, Hung-Chun Tseng
Cc: Yixun Lan, Tom Rini, Huan Zhou, Eric Chung, Alexey Charkov,
Guodong Xu, Raymond Mao, Zixian Zeng, u-boot-spacemit, u-boot
On Fri, 13 Nov 2026 11:16:11 +0800, Hung-Chun Tseng wrote:
> The Milk-V Jupiter and the Banana Pi BPI-F3 put a VIA Labs VL817 hub in
> front of all their USB ports. Its supply and reset are GPIOs, so
> `usb start` only finds the root hub until someone powers the hub by
> hand.
>
> This adds the VL817 to the onboard hub driver and enables it for K1.
>
> [...]
Applied, thanks! Queued in SpacemiT custodian tree, for-main branch
[2/2] configs: spacemit_k1: Enable onboard USB hub support
https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/d28d5f8162865bf76d6fab677a926b3797a0ff8d
Best regards,
--
Yixun Lan <dlan@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread