* [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
2026-11-13 6:07 ` [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Yixun Lan
2 siblings, 2 replies; 6+ 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] 6+ 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-13 6:07 ` [PATCH v2 0/2] usb: onboard-hub: VL817 support for SpacemiT K1 boards Yixun Lan
2 siblings, 0 replies; 6+ 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] 6+ 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
2 siblings, 0 replies; 6+ 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] 6+ messages in thread