From nobody Sat Feb 7 21:15:53 2026 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 41A623016F2 for ; Wed, 7 Jan 2026 12:05:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767787553; cv=none; b=cbylijK3UTnIZfLOehT9Slc/rjO02q/X+K8BacIrr3mJtS4qj+oJoCSYXFrAW+QE74AI+EOXEKCknVVlm79DCWYqM2GY5ZE2VO71wzU6Fdp1m4s9jkGmkW9j4XLsrI4u+aOnb4fddJ+abXQcNF2Yw+8izhXjfHJC4Z/HTq+MNXw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767787553; c=relaxed/simple; bh=OkFD2HGSr1MsKeR9yPZO9Cd8GOid74MlNIlt7D1ODFU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=doX624r4+T92CTkQuj9GaGyhIim2UTVh04wicFnDrAL5vHe8ayQ6K7vsK9TyofrfqOOz5y0dwOf38MtsFL/VWxrGCZ8qdEEox0syyyjb8QBdTkUlAscE6c6+KVyYGTyL3YYR+2xWSWawyEasebK5ft+M5NToDN8imW5C0jSVTdk= 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=q4/nq7B6; arc=none smtp.client-ip=91.218.175.178 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="q4/nq7B6" 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=1767787549; 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=566hMGT2wOOA5i+sdnfFimS5EhXjb0N0TBNQUsy89Yo=; b=q4/nq7B6E4RcYURvpHQREu2j9zJUbPBVRCJ1Cu8AhJNwUvQ0rKBfCdum7ERsZ17j/WDTyG wW830z6gT7woKYuJc9sV483zDBSJVqs3Nqlll5Tz2XBVfO0+ESnnyztMUeMP8aeVB173Ey tRmQBcO8yn+dhiInQhPKeGTlMT58kf0= From: Ze Huang Date: Wed, 07 Jan 2026 20:05:30 +0800 Subject: [PATCH v2 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: <20260107-k1-usb3dts-v2-v2-1-e659b0f8fe1a@linux.dev> References: <20260107-k1-usb3dts-v2-v2-0-e659b0f8fe1a@linux.dev> In-Reply-To: <20260107-k1-usb3dts-v2-v2-0-e659b0f8fe1a@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 , Aurelien Jarno X-Developer-Signature: v=1; a=ed25519-sha256; t=1767787540; l=1040; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=OkFD2HGSr1MsKeR9yPZO9Cd8GOid74MlNIlt7D1ODFU=; b=HpdeK6+Nr+eUrCnN9iBwK47Glc0PqrEWYUV4cy9um0niaOAVYDCNVIK31PSF8S5DlTqm5lgu5 aUMVIhbHbi3DN49MlZtmUgAjCn1Hrlqx+dkXKk8a8E7aDdsNOMLL1cF 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). Tested-by: Aurelien Jarno Signed-off-by: Ze Huang --- 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 86d1db14e2ee..b44149f4f076 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -424,6 +424,14 @@ i2c5: i2c@d4013800 { status =3D "disabled"; }; =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.52.0 From nobody Sat Feb 7 21:15:53 2026 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 9AA1D30FC34 for ; Wed, 7 Jan 2026 12:05:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767787558; cv=none; b=dsZUrBkqsg0Nfjzy8H4JG2lcUviQn6gvCc5Ugira6VXWa+keIMgs2KEG0OFK6sdQ7ovsUCuMHeMwnp/G01Lx99DXdOn/fmg1JGK7q8F+djMTyWw8Jh4Jhbixq/DkX/AmC6IFfkppv0UtyvKDwCmoSUT/n3v9h9XBId9VpQ2sXxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767787558; c=relaxed/simple; bh=HZkN9hR2jiRoT5bv5LK/hpbCK9BnZnJ7CoVhUSI/eb0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h1MR3iwdOf950DNvNOyo90nwIP9l4vUSgCsm7H+llvcXWFT2/BO88I50tsOWBFmi0gzQlUDnkWgXO3xhEoKDJvjCKqnbfN/TtemPQi3g2HXavDD/sRzBLEq7pN7gjvyHtUF/Jwgu1hfWI8yrFjKfahX0mQZvyP+C8PiXFzxBlis= 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=AqqM5smT; arc=none smtp.client-ip=91.218.175.186 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="AqqM5smT" 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=1767787554; 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=Oi6LsbmDb8inhEq8SGuocpOwkdm2plqw8DXlm9DfGJY=; b=AqqM5smT9VBFq/xIK9bguxUl+EIObs691EzsqSrxtGTr0z7eANlfCxB3u7aLP4mYU9qh/X 69tycrSGjz2YnZUxMlHqKAtCvrmovgQh4j7glLqQJbP2piioEuCA9GOVxEWHXIhMxIYCZp 1V6YWjWez7akULlp6cEN2P6wNQiAzY4= From: Ze Huang Date: Wed, 07 Jan 2026 20:05:31 +0800 Subject: [PATCH v2 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: <20260107-k1-usb3dts-v2-v2-2-e659b0f8fe1a@linux.dev> References: <20260107-k1-usb3dts-v2-v2-0-e659b0f8fe1a@linux.dev> In-Reply-To: <20260107-k1-usb3dts-v2-v2-0-e659b0f8fe1a@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 , Aurelien Jarno X-Developer-Signature: v=1; a=ed25519-sha256; t=1767787540; l=1634; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=HZkN9hR2jiRoT5bv5LK/hpbCK9BnZnJ7CoVhUSI/eb0=; b=LOOTGYpu4r1GeF1+ZyS58DJw/1hbywP9N3DkzYgZCvwDdcZBS6KFSIqjsGwaDh4edroramK/v AcnkUB4tACAD88XyGYZuQnNMf8JPOsb00KvtY2T7kYUufGDMmMdGvt2 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. Tested-by: Aurelien Jarno Signed-off-by: Ze Huang --- 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 b44149f4f076..f40c2ce6d0b8 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -1162,6 +1162,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.52.0 From nobody Sat Feb 7 21:15:53 2026 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 8E2F030CD85 for ; Wed, 7 Jan 2026 12:06:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767787562; cv=none; b=JhLf2T3raazgnYStwFeuYy6fZroA5c6H7rx4mY9nVTVJdggSKQERwnekiLtCuqH5O+d5ohus0H2P3ofb34ro0eBUmuFK4ZXFcw4/GJhEtMrcPnFTLXyTK7Nbc5o3tJIrzId6W0fBpXtqE+PcISeyqWls/2iQfuhC10cW/J5bbpU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767787562; c=relaxed/simple; bh=nVRiEQf0Hh/YzDLl2mmNv+fKT8Qk/IAVG8tDqFYpKSs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DVU7nmL0dfDVX3pGu+tBCA2YlPn1VSehrmzk33A5s12XcJRun6uO2KOxmhHXOB2/MmVrSr7DNJK0gQFpTqLtoL9hTYepvoQABrivPTqzMoW9uNcRWjjoqKMAOYy97ZIDoGFa0AIcLLnS54I1LRFuDsQtwFQpq8US/YZYcAkI4MY= 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=Gwf3bGle; arc=none smtp.client-ip=91.218.175.186 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="Gwf3bGle" 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=1767787558; 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=mq9uhddNWpxDAmVHij7TLry3eiH2O8cUCAEcdtnNtMo=; b=Gwf3bGlewiuQh2xLdaaS/qsu6JoSDtLugf8ufN80Wz/crPRYKJGF3pw7hY3jMAY44aDvBN U3D3x+ZB6GxcURMmwBMsbJc5JGjNOARpKv4AVxG5OAHKCHOHF9VoFrn9/5Z770MmY392gl FW++DsRvud8K7zZYSBSon+4KnW1KiKs= From: Ze Huang Date: Wed, 07 Jan 2026 20:05:32 +0800 Subject: [PATCH v2 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: <20260107-k1-usb3dts-v2-v2-3-e659b0f8fe1a@linux.dev> References: <20260107-k1-usb3dts-v2-v2-0-e659b0f8fe1a@linux.dev> In-Reply-To: <20260107-k1-usb3dts-v2-v2-0-e659b0f8fe1a@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 , Aurelien Jarno X-Developer-Signature: v=1; a=ed25519-sha256; t=1767787540; l=2157; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=nVRiEQf0Hh/YzDLl2mmNv+fKT8Qk/IAVG8tDqFYpKSs=; b=MReNNYtvWmEVP8eQa2CesjnaU8ruj/M4WdplYWUic5GhkraYuN276YmGEmGqv6IqPxfq+/whB Y5YM5We/Vo6DMoxfmZ1VEbmJ9O4ffxJSVpJEAb6obLa+wj1VyDxEqic 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. Tested-by: Aurelien Jarno Signed-off-by: Ze Huang --- arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 48 +++++++++++++++++++++= ++++ 1 file changed, 48 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 3f10efd925dc..013df91c6a4c 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -59,6 +59,26 @@ reg_vcc_4v: vcc-4v { regulator-always-on; vin-supply =3D <®_dc_in>; }; + + 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>; + regulator-always-on; + gpio =3D <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; =20 &combo_phy { @@ -67,6 +87,34 @@ &combo_phy { status =3D "okay"; }; =20 +&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>; + }; +}; + &emmc { bus-width =3D <8>; mmc-hs400-1_8v; --=20 2.52.0