From nobody Tue Feb 10 01:31:22 2026 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 38F3183CBF; Fri, 9 Feb 2024 18:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707502720; cv=none; b=Jf/e0Kd+Xh5YMo3oIqQRnmB5sbVrywomPAjidMAxikDmgbqFl6XkyCNi4ij3nIltgDi7WdnYnWzmzNXPKp0xe9A8yBmjU3YiXBV8JEB/i2IYOtdKCNszlN8GBkCvU+Y0eEli61ROkuEXQglK3uIqtvJfNd5TyrjJFLnlu20PAL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707502720; c=relaxed/simple; bh=+bnYk1BYj3u3N4iOBFsXjnHlC1pJe00wOp5nI388mvs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AoH8KT/jkfUe0FEA8B8YlZen45Ctmy5Sy2fcggh5iUq4bGJ9hXsriad7Ky2w8FZmdgSASQdEuUMKTjsDrpqJKcsuAqV74EuL10BsnUeVpHrVg1cr5lREkTlvpDpYwFZTmw2yU+nxSn5IpMIqbra2P5i1lRDcf2Sy+b/oqYurA8Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=pjOZO6rx; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="pjOZO6rx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1707502713; bh=+bnYk1BYj3u3N4iOBFsXjnHlC1pJe00wOp5nI388mvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pjOZO6rxSLu/ROG0VFzDJ+dpaTg1u18L5IiQJJ6PPQw1RPjNZDRchOw8FkIPs9vk/ m5+MiLpM4uisZAhpnKeTFf7iRGkNAxymblpYLquA+cq56ZLYHiveXv1a4/Pl6lLsyJ OXHhSOTKV3Jh/rnVlVJWYR4VWr4LRXNazfZmbqqkZ39ON71hD4AIi3jTebxAAnZcV7 XxGoaDn1iVtKqiNHn0PDzmc12qMQokMXSTNGkrEz+SOrfdm2ua4GLS5kRwGOWxb3ZW XaHTIrVVu0OkC+nFhxFbVMmXDJdz+eGUlTRM4vZVs22a5VoGFNoEhvTJH72t7fBixI lY2vpWxteIrVg== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 905F237820B9; Fri, 9 Feb 2024 18:18:33 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 9B33C4800D6; Fri, 9 Feb 2024 19:18:32 +0100 (CET) From: Sebastian Reichel To: Heiko Stuebner , Vinod Koul , Kishon Vijay Abraham I , linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Frank Wang , Kever Yang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v1 08/10] arm64: dts: rockchip: add USB3 to rk3588-evb1 Date: Fri, 9 Feb 2024 19:17:24 +0100 Message-ID: <20240209181831.104687-9-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209181831.104687-1-sebastian.reichel@collabora.com> References: <20240209181831.104687-1-sebastian.reichel@collabora.com> 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" Add support for the board's USB3 connectors. It has 1x USB Type-A and 1x USB Type-C. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-evb1-v10.dts | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/= boot/dts/rockchip/rk3588-evb1-v10.dts index ac7c677b0fb9..6b7d54455ca1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts @@ -9,6 +9,7 @@ #include #include #include +#include #include "rk3588.dtsi" =20 / { @@ -224,6 +225,18 @@ vcc5v0_usb: vcc5v0-usb-regulator { regulator-max-microvolt =3D <5000000>; vin-supply =3D <&vcc5v0_usbdcin>; }; + + vbus5v0_typec: vbus5v0-typec { + compatible =3D "regulator-fixed"; + regulator-name =3D "vbus5v0_typec"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + enable-active-high; + gpio =3D <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>; + vin-supply =3D <&vcc5v0_usb>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&typec5v_pwren>; + }; }; =20 &combphy0_ps { @@ -284,6 +297,56 @@ &gmac0_rgmii_clk &i2c2 { status =3D "okay"; =20 + usbc0: usb-typec@22 { + compatible =3D "fcs,fusb302"; + reg =3D <0x22>; + interrupt-parent =3D <&gpio3>; + interrupts =3D ; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&usbc0_int>; + vbus-supply =3D <&vbus5v0_typec>; + status =3D "okay"; + + usb_con: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C"; + data-role =3D "dual"; + power-role =3D "dual"; + try-power-role =3D "source"; + op-sink-microwatt =3D <1000000>; + sink-pdos =3D + ; + source-pdos =3D + ; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + usbc0_orien_sw: endpoint { + remote-endpoint =3D <&usbdp_phy0_orientation_switch>; + }; + }; + + port@1 { + reg =3D <1>; + usbc0_role_sw: endpoint { + remote-endpoint =3D <&dwc3_0_role_switch>; + }; + }; + + port@2 { + reg =3D <2>; + dp_altmode_mux: endpoint { + remote-endpoint =3D <&usbdp_phy0_dp_altmode_mux>; + }; + }; + }; + }; + }; + hym8563: rtc@51 { compatible =3D "haoyu,hym8563"; reg =3D <0x51>; @@ -410,6 +473,16 @@ vcc5v0_host_en: vcc5v0-host-en { rockchip,pins =3D <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + usb-typec { + usbc0_int: usbc0-int { + rockchip,pins =3D <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + typec5v_pwren: typec5v-pwren { + rockchip,pins =3D <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; =20 &pwm2 { @@ -1040,6 +1113,22 @@ &sata0 { status =3D "okay"; }; =20 +&u2phy0 { + status =3D "okay"; +}; + +&u2phy0_otg { + status =3D "okay"; +}; + +&u2phy1 { + status =3D "okay"; +}; + +&u2phy1_otg { + status =3D "okay"; +}; + &u2phy2 { status =3D "okay"; }; @@ -1078,3 +1167,65 @@ &usb_host1_ehci { &usb_host1_ohci { status =3D "okay"; }; + +&usbdp_phy0 { + orientation-switch; + mode-switch; + sbu1-dc-gpios =3D <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; + sbu2-dc-gpios =3D <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; + status =3D "okay"; + + port { + #address-cells =3D <1>; + #size-cells =3D <0>; + + usbdp_phy0_orientation_switch: endpoint@0 { + reg =3D <0>; + remote-endpoint =3D <&usbc0_orien_sw>; + }; + + usbdp_phy0_dp_altmode_mux: endpoint@1 { + reg =3D <1>; + remote-endpoint =3D <&dp_altmode_mux>; + }; + }; +}; + +&usbdp_phy0_u3 { + status =3D "okay"; +}; + +&usbdp_phy1 { + /* + * USBDP PHY1 is wired to a female USB3 Type-A connector. Additionally + * the differential pairs 2+3 and the aux channel are wired to a RTD2166, + * which converts the DP signal into VGA. This is exposed on the + * board via a female VGA connector. + */ + rockchip,dp-lane-mux =3D <2 3>; + status =3D "okay"; +}; + +&usbdp_phy1_u3 { + status =3D "okay"; +}; + +&usb_host0_xhci { + dr_mode =3D "otg"; + usb-role-switch; + status =3D "okay"; + + port { + #address-cells =3D <1>; + #size-cells =3D <0>; + dwc3_0_role_switch: endpoint@0 { + reg =3D <0>; + remote-endpoint =3D <&usbc0_role_sw>; + }; + }; +}; + +&usb_host1_xhci { + dr_mode =3D "host"; + status =3D "okay"; +}; --=20 2.43.0