From nobody Tue Feb 10 21:38:26 2026 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 794CA154432 for ; Mon, 22 Apr 2024 16:39:57 +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=1713804000; cv=none; b=h5WL1F40EJTmxDrlXqHqsiSBQ2YmyW8IJDZsVPE3UPftg3wE6mAz/B8UxtbWiI2sZnA0pK+VPM3FCroGzzRIn8B7RKcA/JoYRevd8CWD30o7qrnSkmwBRZa0FsiKt4BRCSfys4TSKbkj+hlVkEjxQeMboVUj/OlamWRwY9ZrJko= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804000; c=relaxed/simple; bh=lc8/NBQhJTYQcoxGBAazKCGVegY7WF0/Ta5NFBDlSBM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UrQ14pLzSsBlaUOqD7nNQevMplBmDsrFh7hq72VpL9kTlxbeBC+odcJcECwOac7XVKgJZVxIk4532LUv3bvAR+NlOApjk+ls0+7wjc1Tr3Oq62n85uQQ+HpJRPXLORerQDbKAjkonAU4/kTqrDIB6BG2bH49VAZwhcq7qtEWG5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i5e861d85.versanet.de ([94.134.29.133] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rywhu-0004gq-0t; Mon, 22 Apr 2024 18:39:54 +0200 From: Heiko Stuebner To: heiko@sntech.de Cc: quentin.schulz@theobroma-systems.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH v2 1/3] arm64: dts: rockchip: fix comment for upper usb3 port Date: Mon, 22 Apr 2024 18:39:49 +0200 Message-Id: <20240422163951.2604273-2-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422163951.2604273-1-heiko@sntech.de> References: <20240422163951.2604273-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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Heiko Stuebner The comment for the host2_xhci points to the wrong port on the board. The upper usb3 port is the correct one, so fix the comment to prevent confusion. Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz --- arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts b/arch/ar= m64/boot/dts/rockchip/rk3588-tiger-haikou.dts index 9bdd14799eff..2aa43e7430e5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts @@ -239,12 +239,12 @@ &uart5 { status =3D "okay"; }; =20 -/* host0 on Q7_USB_P2, lower usb3 port */ +/* host0 on Q7_USB_P2, upper usb3 port */ &usb_host0_ehci { status =3D "okay"; }; =20 -/* host0 on Q7_USB_P2, lower usb3 port */ +/* host0 on Q7_USB_P2, upper usb3 port */ &usb_host0_ohci { status =3D "okay"; }; @@ -259,7 +259,7 @@ &usb_host1_ohci { status =3D "okay"; }; =20 -/* host2 on Q7_USB_P2, lower usb3 port */ +/* host2 on Q7_USB_P2, upper usb3 port */ &usb_host2_xhci { status =3D "okay"; }; --=20 2.39.2 From nobody Tue Feb 10 21:38:26 2026 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 59188153BF2 for ; Mon, 22 Apr 2024 16:39:57 +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=1713803999; cv=none; b=YTr5wIlQlbTUSpoeWlaVdAZxitM+3i+IwD7+X7OeDvl6bZEOezOt5teDcHq+eWqMn+IfYx1+oJbhlPhHgnnto6v5ynVe7zuJslidlcOoQQcMkxSpF8jC09Xhyn/jJ7F/wEKZ8qX37sQ3BBfCZy4mQSHNGlMn7ZvhvFGK00ZL4Dc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713803999; c=relaxed/simple; bh=kZNavWYYidN/BDo0KlYmAF2Oswc+CdDFe5fZnkY1NZQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ijBLcGDVYe7EF38SmfKpBbQ+Y4XhHavAMnfx6kLcTArZMoDr4K6kkc4rEBlOWVzsv7AQBB5ClS/Jisx2+3OE/cAABJmrsVC/ihawNE+JCjIr0qlFBQCnTNeKcCQ0xK/aQ/b/8kqhLBfuSRtwdybgjCR5yw3gjt3oqmg8bLSZDOc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i5e861d85.versanet.de ([94.134.29.133] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rywhu-0004gq-B1; Mon, 22 Apr 2024 18:39:54 +0200 From: Heiko Stuebner To: heiko@sntech.de Cc: quentin.schulz@theobroma-systems.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH v2 2/3] arm64: dts: rockchip: add usb-id extcon on rk3588 tiger Date: Mon, 22 Apr 2024 18:39:50 +0200 Message-Id: <20240422163951.2604273-3-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422163951.2604273-1-heiko@sntech.de> References: <20240422163951.2604273-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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Heiko Stuebner The Q7 standard specifies a usb-id pin on the connector to distiuish between host and device mode. Model this via the usb-id extcon binding. While the pin is part of the Q7 standard, so part of the module, the extcon stays disabled in the som dtsi and will only be enabled in a baseboard using it. Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz --- arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi b/arch/arm64/bo= ot/dts/rockchip/rk3588-tiger.dtsi index 4984e36a8c2d..cafb40283882 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi @@ -23,6 +23,14 @@ emmc_pwrseq: emmc-pwrseq { reset-gpios =3D <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>; }; =20 + extcon_usb3: extcon-usb3 { + compatible =3D "linux,extcon-usb-gpio"; + id-gpios =3D <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&usb3_id>; + status =3D "disabled"; + }; + leds { compatible =3D "gpio-leds"; pinctrl-names =3D "default"; @@ -327,6 +335,13 @@ module_led_pin: module-led-pin { rockchip,pins =3D <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + usb3 { + usb3_id: usb3-id { + rockchip,pins =3D + <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; =20 &saradc { --=20 2.39.2 From nobody Tue Feb 10 21:38:26 2026 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 5913D15382E for ; Mon, 22 Apr 2024 16:39:57 +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=1713804000; cv=none; b=ZbBLclkjomCQhni9NjjFpaQ3N4iRZ4Mwh5frSo71ym9cGen+L9vYQmsEQe10b+xNrfi9n2XfBXabpSIECxedJKCc26tq0WqNTjbelnWgzRkrPAC4w3NNsjbLrFc2W5/u8L9ilnGu50s5Y/yAR0lYwoJj4PDd4o29spi7npekhY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804000; c=relaxed/simple; bh=eTJzE4ddILeETJjvUuFFbdH2Scx/iVqDMflf2dR101M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cC8lCXL9CInc4YNSMmAm+2QaxJplv1BOj8UoWm52UNIIgv8jNenmeoLzHHkEuyNTnT/6zMqI38zAZXMg9YxFwSr6d3BDIQFwKVEN29QYCYm7IdonUfI5/a8Sn74vddCThR/ooYDimzFTM70yfagHEM8OkQqcrbB2qgAc1qGyIbc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i5e861d85.versanet.de ([94.134.29.133] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rywhu-0004gq-MA; Mon, 22 Apr 2024 18:39:54 +0200 From: Heiko Stuebner To: heiko@sntech.de Cc: quentin.schulz@theobroma-systems.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH v2 3/3] arm64: dts: rockchip: add dual-role usb3 hosts to rk3588 Tiger-Haikou Date: Mon, 22 Apr 2024 18:39:51 +0200 Message-Id: <20240422163951.2604273-4-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422163951.2604273-1-heiko@sntech.de> References: <20240422163951.2604273-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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Heiko Stuebner Apart from the host-only usb3 controller (host2) the rk3588 also provides two dual-role controllers. On the Tiger-Haikou combination these are connected to the lower usb3-host port in host-only mode and the micro-usb3 port for dual-role operation. Add the necessary controllers, phys to the Tiger-Haikou board and enable the usb-id extcon. Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz --- .../boot/dts/rockchip/rk3588-tiger-haikou.dts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts b/arch/ar= m64/boot/dts/rockchip/rk3588-tiger-haikou.dts index 2aa43e7430e5..52695b6c113a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts @@ -113,6 +113,16 @@ vcc5v0_baseboard: vcc5v0-baseboard-regulator { vin-supply =3D <&dc_12v>; }; =20 + vcc5v0_otg: vcc5v0-otg-regulator { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&otg_vbus_drv>; + regulator-name =3D "vcc5v0_otg"; + regulator-always-on; + }; + vcc5v0_usb: vcc5v0-usb-regulator { compatible =3D "regulator-fixed"; regulator-name =3D "vcc5v0_usb"; @@ -137,6 +147,10 @@ &combphy2_psu { status =3D "okay"; }; =20 +&extcon_usb3 { + status =3D "okay"; +}; + &gmac0 { status =3D "okay"; }; @@ -199,6 +213,13 @@ haikou_keys_pin: haikou-keys-pin { <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + usb2 { + otg_vbus_drv: otg-vbus-drv { + rockchip,pins =3D + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; =20 &sdmmc { @@ -214,6 +235,23 @@ &sdmmc { status =3D "okay"; }; =20 +&u2phy0 { + status =3D "okay"; +}; + +&u2phy0_otg { + phy-supply =3D <&vcc5v0_otg>; + status =3D "okay"; +}; + +&u2phy1 { + status =3D "okay"; +}; + +&u2phy1_otg { + status =3D "okay"; +}; + &u2phy2 { status =3D "okay"; }; @@ -236,6 +274,13 @@ &uart2 { =20 &uart5 { rts-gpios =3D <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; +}; + +&usbdp_phy0 { + status =3D "okay"; +}; + +&usbdp_phy1 { status =3D "okay"; }; =20 @@ -249,6 +294,19 @@ &usb_host0_ohci { status =3D "okay"; }; =20 +/* host0_xhci on Q7_USB_P1, usb3-otg port */ +&usb_host0_xhci { + dr_mode =3D "otg"; + extcon =3D <&extcon_usb3>; + status =3D "okay"; +}; + +/* host1_xhci on Q7_USB_P0, lower usb3 port */ +&usb_host1_xhci { + dr_mode =3D "host"; + status =3D "okay"; +}; + /* host1 on Q7_USB_P3, usb2 port */ &usb_host1_ehci { status =3D "okay"; --=20 2.39.2