From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 049DD3FADE7 for ; Fri, 29 May 2026 19:04:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780081448; cv=none; b=sZDuyw3lUsBoKciYr/WZRMCj+BHe/XdxrNY/IoqxUbXDiXeMFJ+9BFhSAKq8fMUm7Ydmj+hXlG1UupvqPn3NMFlcNbQSuNLElFHGLis9w++OIXKm03Lhcj9XNmo8DjYXWvN5Whp4vsIu26dsvzeDRF1VuUuNOgDGIMQ4SlCcCUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780081448; c=relaxed/simple; bh=IQYVoKwy6vmNSmRhEgYuOHl9lg1UmsG/DQ9nZEQ8Kbg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MR2OKa4O7FZ3N9PW4TQSIiV8ai88J4iZQ5hPY2e64ZM3AA6BhRj37I50QuUtiy7kD9rYG/MfPYB5ajWPbUWCbcml86/EOum5VcLAOzwPCL2quEDx5oCY6/feYGnir9axePrF9PdTPTyyUN6BYtDDee2i3lje8V45gyegtnpyRuA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=se9JJd8d; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="se9JJd8d" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type; bh=PuK6NVNMTXhBUvWleeSyVltH3yscmbFx5tnFc8nvfME=; b=se9JJd8dIhYf5+PzZNlR5+NIIS OSFW/pR74ZCSY1ZcHlcwQN+pD1YHKqEK5UZAT1HWAflAdkYkhAuxSGQWwKGqMyFlqj9J8Ci4OBURz 134RHM2yDG7mwMGDRl8kUTrAvt2lJeP4/pL9R0VhDZWlj0YzZIV2sXlyRxR6Yow2NBaCgZGB/btr5 0KEP/Zf7x/IngSdxe1v2XYJr+QV/A10frp/0KSi6OBGxIvoDyTKhIlJSQicstAau+Z+HO1PbdDl3b U71DbhiPbLflfDISvMAcTMU/yGu9G6H0xgqajWWHeSHBs3GozSVmEnGJ5JfhIX/CAvxrpZoB1PsUC h0MBEDuQ==; From: Heiko Stuebner To: heiko@sntech.de Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, amadeus@jmu.edu.cn, jonas@kwiboo.se Subject: [PATCH v4 2/5] arm64: dts: rockchip: Enable USB 2.0 ports on Radxa E20C Date: Fri, 29 May 2026 21:03:52 +0200 Message-ID: <20260529190355.4148175-3-heiko@sntech.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529190355.4148175-1-heiko@sntech.de> References: <20260529190355.4148175-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jonas Karlman The Radxa E20C has one USB2.0 Type-A HOST port and one USB2.0 Type-C port. The Type-C port is conneced to a FE1.1s_QFN USB hub on the board, with its ports being connected to the XHCI usb controller and an usb-uart bridge. This also means, the XHCI controller can only be used in device-mode. Add support for using the USB 2.0 ports on Radxa E20C. Signed-off-by: Jonas Karlman [set xhci to peripheral and add comment about the outward-facing hub] Signed-off-by: Heiko Stuebner --- .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts index b32452756155..f872b8d20ebc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts @@ -134,6 +134,18 @@ vcc5v0_sys: regulator-5v0-vcc-sys { regulator-max-microvolt = <5000000>; }; + vcc5v0_usb20: regulator-5v0-vcc-usb20 { + compatible = "regulator-fixed"; + enable-active-high; + gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_host_en>; + regulator-name = "vcc5v0_usb20"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v0_sys>; + }; + vccio_sd: regulator-vccio-sd { compatible = "regulator-gpio"; gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; @@ -273,6 +285,12 @@ sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h { rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + usb { + usb_host_en: usb-host-en { + rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm1 { @@ -320,3 +338,45 @@ &uart0 { pinctrl-0 = <&uart0m0_xfer>; status = "okay"; }; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +/* + * The usb controller can only work in peripheral mode, as it is + * connected to one of the ports of an outward-facing usb hub. + * + * type_c-port (hub-input) + * | + * usb-hub + * | | + * uart-usb usb-host0 + * | + * uart0 + */ +&usb_host0_xhci { + dr_mode = "peripheral"; + extcon = <&usb2phy>; + maximum-speed = "high-speed"; + phys = <&usb2phy_otg>; + phy-names = "usb2-phy"; + status = "okay"; +}; + +&usb2phy { + status = "okay"; +}; + +&usb2phy_host { + phy-supply = <&vcc5v0_usb20>; + status = "okay"; +}; + +&usb2phy_otg { + status = "okay"; +}; -- 2.47.3