From nobody Sat Feb 7 19:41:19 2026 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB757230D14 for ; Sat, 1 Nov 2025 09:03:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761987835; cv=none; b=KwlAq9gX4s9ht+qvpjXggw/5neFzsmdxHdX9664XuufWDoFjQdxrfNe4eit0Jt/5ejMJe0kmuUPAZZ2N+sVqvR+Am0tnwyWoxTZdgmIOLiRqW3G0BmTKekf6s6YETF0UlhyrEXxjieNrBaZVBJUXic8VKTkYbqZijwRA5s5MGCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761987835; c=relaxed/simple; bh=iK6NFFg71Y3pBdM4TPnuBRO0crmy9qkQcmoBmFiBFnE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pluRVJJUXP/UwLeorNuWXHb2hghZd/JxVBmWU0DJtryo3kkJIvOODa9JizvV4bMiJMEXrSFs7hQgnrUhuxqeg0uTxxqPIcFxFO8scubQtTfs+AsWQc3ozsz4nWFvjE1SkBFjQHz/jP1hO+EsED3PSuw89kJzK03GsdbV3Ry3gzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Yv6pYiC5; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Yv6pYiC5" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1761987831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jL4/scEEwi4e7mOZI7uuOmCx+7fcglvb5U5Neoz+89g=; b=Yv6pYiC5r6tE1hrg3gHCTyG9Nkakvc9Hq/JvK9HlKRP9PmABcH5hLZS20SbHc9ysPJ8C9i +okkUlZIY+Wn9bRoNX8QHCKh/DGp+3TSaROOfUZJa/Ov18SalGILrE60f7hVe+W1XTKdev jxaEtvYvIIDINo5zdpH2bnZROug0Mf0= From: Ze Huang Date: Sat, 01 Nov 2025 17:03:25 +0800 Subject: [PATCH 1/3] riscv: dts: spacemit: Add USB2 PHY node for K1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251101-k1-usb3dts-v1-1-dd2660e5740b@linux.dev> References: <20251101-k1-usb3dts-v1-0-dd2660e5740b@linux.dev> In-Reply-To: <20251101-k1-usb3dts-v1-0-dd2660e5740b@linux.dev> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, Ze Huang X-Developer-Signature: v=1; a=ed25519-sha256; t=1761987811; l=1011; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=iK6NFFg71Y3pBdM4TPnuBRO0crmy9qkQcmoBmFiBFnE=; b=G8YkVCNHulhtoJwbGg7NTInbtIZtNJD/kNzSn0M8Ufi7GxFVdPpXMgI8ACePRVhXoa3bepzzy vOq8XvE+3ZoC5GJRYPk5HtJwMcBI3Aot7fBXve+mKKiD6Iz4slbZNqN X-Developer-Key: i=huang.ze@linux.dev; a=ed25519; pk=Kzc4PMu5PTo8eZZQ5xmTNL9jeXcQ9Wml0cs+vlQpBkg= X-Migadu-Flow: FLOW_OUT K1's DWC3 USB 3.0 controller requires two separate PHYs to function: the USB 3.0 combophy (for SuperSpeed) and a USB 2.0 PHY (for High-Speed, Full-Speed, etc.). Add node for this second USB 2.0 PHY (usbphy2). Signed-off-by: Ze Huang Tested-by: Aurelien Jarno --- arch/riscv/boot/dts/spacemit/k1.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spa= cemit/k1.dtsi index 214216fdecd3..d4d3c6d88a29 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -359,6 +359,14 @@ syscon_rcpu2: system-controller@c0888000 { #reset-cells =3D <1>; }; =20 + usbphy2: phy@c0a30000 { + compatible =3D "spacemit,k1-usb2-phy"; + reg =3D <0x0 0xc0a30000 0x0 0x200>; + clocks =3D <&syscon_apmu CLK_USB30>; + #phy-cells =3D <0>; + status =3D "disabled"; + }; + combo_phy: phy@c0b10000 { compatible =3D "spacemit,k1-combo-phy"; reg =3D <0x0 0xc0b10000 0x0 0x1000>; --=20 2.51.2 From nobody Sat Feb 7 19:41:19 2026 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 205442BEC43 for ; Sat, 1 Nov 2025 09:04:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761987844; cv=none; b=CWGc4tmOCNAlR20Lwv0F+Ha5EkOpSvq0/0tv5uJYLEmpEOEe/vXG6XSxnGtWqDGctpjtOuLzco4RApX926wQgPgDpt+S7AiJoD2Gez1rGTy81l+7ppHqoZRFf+zIVUzghF2Pb3QxeHnxi1mMOGWrZIWh2tvynWysNDHVTM9jm8w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761987844; c=relaxed/simple; bh=3YiLR57+6Dxa5xB+On0XN2AuxKYOGj2xQbXtnep93Hc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fgb32TbLmTqLQm7JYsTwdEi+pbrHTfQ13nb6mrDg+fEn620R62m6BjHMtS3abQ7FME+u5uK8i3jK/KXGYO50/Yn+79cBVmtufU5KPx6CTkoD+Qcg6m/oQc6beBxU9ARmJaVzzoXDTdiobGbVNdfGiP7Cfga6n8A+ikzFnDxA4i8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=eKcrB4lf; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eKcrB4lf" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1761987840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YBiJs2WQjHw8UYmAw8T778QlQ1tMZTE4odg9x5Nma9s=; b=eKcrB4lf7+ICg25rkrUi1rF6Ld0go7A3Zu3w+BzvbL5UK9y5J35vB3+FTZkvdynrMASvDA 1u0XTIMTdm2uEOmnGQH/+PCetg0c0VcSB91MNyNKpCQK0TYHOG2qD8jyzS6/nwnpQOK2Ac mNMN2cCH4/mxbA9SLpEPBuKbwN0Dx0Q= From: Ze Huang Date: Sat, 01 Nov 2025 17:03:26 +0800 Subject: [PATCH 2/3] riscv: dts: spacemit: Add DWC3 USB 3.0 controller node for K1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251101-k1-usb3dts-v1-2-dd2660e5740b@linux.dev> References: <20251101-k1-usb3dts-v1-0-dd2660e5740b@linux.dev> In-Reply-To: <20251101-k1-usb3dts-v1-0-dd2660e5740b@linux.dev> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, Ze Huang X-Developer-Signature: v=1; a=ed25519-sha256; t=1761987811; l=1584; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=3YiLR57+6Dxa5xB+On0XN2AuxKYOGj2xQbXtnep93Hc=; b=RO46HnnWwT5Ud1pKk+OX7GYV++DZhj9XZff79ejdHzVGBoGqcQkQE+0tDK7JexlUvfaAjLgJM L2D8gdD/x7YBgwvzqJLmGowi92qLrPqw1qgxKu+ypEpEq3orMojnQUe X-Developer-Key: i=huang.ze@linux.dev; a=ed25519; pk=Kzc4PMu5PTo8eZZQ5xmTNL9jeXcQ9Wml0cs+vlQpBkg= X-Migadu-Flow: FLOW_OUT Add node for the Synopsys DWC3 USB 3.0 host controller on the K1 SoC. The controller resides on the 'storage-bus' and uses its DMA translations. Signed-off-by: Ze Huang Tested-by: Aurelien Jarno --- arch/riscv/boot/dts/spacemit/k1.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spa= cemit/k1.dtsi index d4d3c6d88a29..1d1c6276e9d0 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -1010,6 +1010,30 @@ storage-bus { #size-cells =3D <2>; dma-ranges =3D <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>; =20 + usb_dwc3: usb@c0a00000 { + compatible =3D "spacemit,k1-dwc3"; + reg =3D <0x0 0xc0a00000 0x0 0x10000>; + clocks =3D <&syscon_apmu CLK_USB30>; + clock-names =3D "usbdrd30"; + interrupts =3D <125>; + phys =3D <&usbphy2>, <&combo_phy PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + phy_type =3D "utmi"; + resets =3D <&syscon_apmu RESET_USB30_AHB>, + <&syscon_apmu RESET_USB30_VCC>, + <&syscon_apmu RESET_USB30_PHY>; + reset-names =3D "ahb", "vcc", "phy"; + reset-delay =3D <2>; + snps,hsphy_interface =3D "utmi"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,dis_rxdet_inp3_quirk; + status =3D "disabled"; + }; + emmc: mmc@d4281000 { compatible =3D "spacemit,k1-sdhci"; reg =3D <0x0 0xd4281000 0x0 0x200>; --=20 2.51.2 From nobody Sat Feb 7 19:41:19 2026 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED98723AE9A for ; Sat, 1 Nov 2025 09:04:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761987857; cv=none; b=Geh85HsW3PNdWQQMtsQgJ0961KphyIGPWMC2mDPECzW1uAJ1T64r9jI3Vatm3Hr/RwQU5EBGTyE8IflapXlyi1R5Wz8+vr2Hw/eMYBjiqw+FsCusisJhWm1SHt+f6fUPtGM/3GjBkYMoKyjqskmGdk3f6HXsd3XUbA8rNbtWKeY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761987857; c=relaxed/simple; bh=d303GJdP3RFLY+pATJhr/H7FKmjHD6dDsiJZY3bUP94=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gKgd7Emley5CoSmY8SrFncEkXdfmwNCCvmMlRq1ArGV3w0AtOVx75z89SX/JT5wdFalalg9SZ41krCB4oyRjY8UFQUgRgnIx5rs+MQe9c0o2OKqq+UqzrxXF0Ms8837l+02fO421G6w7SBflrbORqZNxsIIZqwpOp9pn47zA3Ew= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=lu9GOlqP; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lu9GOlqP" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1761987853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tkHzUy7kWIFbe9fiN7GijSrGSeSfQnU7pR3fbcrTN3Q=; b=lu9GOlqPBQzBWJbcG2tonlAj0AS/5leITLacAUTIfQn3dEqjBc8fyor8LNfJbr+3POOxk6 C48id8aJY/HCv6jtpxh1WJr9CPLfZCzfLoMiTtrOF78EhP4fcdXyHdadRiJJchW8VdWett 2mTNbKYKd1vGPwReqbvAbI3+lzBj3aE= From: Ze Huang Date: Sat, 01 Nov 2025 17:03:27 +0800 Subject: [PATCH 3/3] riscv: dts: spacemit: Enable USB3.0 on BananaPi-F3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251101-k1-usb3dts-v1-3-dd2660e5740b@linux.dev> References: <20251101-k1-usb3dts-v1-0-dd2660e5740b@linux.dev> In-Reply-To: <20251101-k1-usb3dts-v1-0-dd2660e5740b@linux.dev> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, Ze Huang X-Developer-Signature: v=1; a=ed25519-sha256; t=1761987811; l=2076; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=d303GJdP3RFLY+pATJhr/H7FKmjHD6dDsiJZY3bUP94=; b=VFRENH/Ogtq/hy2xA8HZYruIT7VtqjnWGTznxmuPT5OGizcVa1ougYQwSZ9u5+nMhgFTh9gG2 xOBwKXcN1E8Cy6Q/wbEYK4GKaSNphpT/lpoOnoDUp/V2erfx+1KpoLB X-Developer-Key: i=huang.ze@linux.dev; a=ed25519; pk=Kzc4PMu5PTo8eZZQ5xmTNL9jeXcQ9Wml0cs+vlQpBkg= X-Migadu-Flow: FLOW_OUT Enable the DWC3 USB 3.0 controller and its associated usbphy2 on the Banana Pi F3 board. The board utilizes a VLI VL817 hub, which requires two separate power supplies: one VBUS and one for hub itself. Add two GPIO-controlled fixed-regulators to manage this. Signed-off-by: Ze Huang Tested-by: Aurelien Jarno --- arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 47 +++++++++++++++++++++= ++++ 1 file changed, 47 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/b= oot/dts/spacemit/k1-bananapi-f3.dts index 6d566780aed9..4b67f44c7863 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -38,6 +38,25 @@ pcie_vcc_3v3: pcie-vcc3v3 { regulator-max-microvolt =3D <3300000>; regulator-always-on; }; + + usb3_vbus: regulator-vbus-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "USB30_VBUS"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-always-on; + gpio =3D <&gpio K1_GPIO(97) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + usb3_vhub: regulator-vhub-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "USB30_VHUB"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + gpio =3D <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; =20 &combo_phy { @@ -135,3 +154,31 @@ &uart0 { pinctrl-0 =3D <&uart0_2_cfg>; status =3D "okay"; }; + +&usbphy2 { + status =3D "okay"; +}; + +&usb_dwc3 { + dr_mode =3D "host"; + vbus-supply =3D <&usb3_vbus>; + #address-cells =3D <1>; + #size-cells =3D <0>; + status =3D "okay"; + + hub_2_0: hub@1 { + compatible =3D "usb2109,2817"; + reg =3D <0x1>; + vdd-supply =3D <&usb3_vhub>; + peer-hub =3D <&hub_3_0>; + reset-gpios =3D <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>; + }; + + hub_3_0: hub@2 { + compatible =3D "usb2109,817"; + reg =3D <0x2>; + vdd-supply =3D <&usb3_vhub>; + peer-hub =3D <&hub_2_0>; + reset-gpios =3D <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>; + }; +}; --=20 2.51.2