From nobody Fri Oct 3 05:27:01 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 56CD7342CAD; Thu, 4 Sep 2025 18:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757010374; cv=none; b=euuKVrCyxDrYk6LfhadVYfmvIBOiOceJlKRC+r2THbVIr5nKazdAYD3VdpdLUgAshvq4BG4EgORGIzadE54PoKsYcZ8nfa2L4uD1kRAsgNpV8x8tIZx2CmFrQwA70x2hC72ydA7PoC7QBJqa9BGrnqAACSUyBGq/7tQxCajcuOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757010374; c=relaxed/simple; bh=xYV/jhtksKq4lVUs85jfHk2X62icSbuXC1EZccF5b3I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LvxLKkKXZ5Td74Zk+BDpoRvGOMz/Ta+ANbDkgijTSlDOkuYmHIj2mESxsdYeuMkDAmjDMkHgqr8Sr9FyNe6f3P2VjxdFKsQbZAK4X0ZknE5TnCwkWicq8eg4nlu26FglVuR45fbcYuckWvA1kzFZ054yG6migmLxpo0frP7MzNk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=K85Qajxb; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="K85Qajxb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1757010370; bh=xYV/jhtksKq4lVUs85jfHk2X62icSbuXC1EZccF5b3I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=K85QajxbTBd2Ihz0ZcqdrCig0I/7kyxGnXAwoDvP0lyaOHG16x18uUoz8aLMQxmFV DnMRoThOmbrQ8vHm+f8QMeoxncUQ/1W8kGAFaYKy0OFjbV1box0ouyG93X4uQj/LSP 8HwN8dpdSrTDyk4Ez4HPey9nUuD0jQ0PD9hxTeu4JH1nmbEbdHOwFg8ZlTwzFNGy4D S5h8MDwWOR4wg5nw2X881aTrvcuGzvtxvcLf9ubqGgy376mr2sXfUvYBqsDIJ3YahS vX0Y/pI6Ii1vBwzqkVII0c3VCgUIf7XRCPnEowJOg2401SetEfvKM1yibj2r/sSPdX RcZMesB184t/w== Received: from jupiter.universe (dyndsl-091-248-191-002.ewe-ip-backbone.de [91.248.191.2]) (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 bali.collaboradmins.com (Postfix) with ESMTPSA id 9813117E10C8; Thu, 4 Sep 2025 20:26:10 +0200 (CEST) Received: by jupiter.universe (Postfix, from userid 1000) id 3EEBF480041; Thu, 04 Sep 2025 20:26:10 +0200 (CEST) From: Sebastian Reichel Date: Thu, 04 Sep 2025 20:26:02 +0200 Subject: [PATCH RFC 1/2] dt-bindings: phy: rockchip-usbdp: add improved ports scheme 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: <20250904-rock5b-dp-alt-mode-v1-1-23df726b31ce@collabora.com> References: <20250904-rock5b-dp-alt-mode-v1-0-23df726b31ce@collabora.com> In-Reply-To: <20250904-rock5b-dp-alt-mode-v1-0-23df726b31ce@collabora.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Frank Wang , Zhang Yubing Cc: Andy Yan , Maud Spierings , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Sebastian Reichel X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2234; i=sebastian.reichel@collabora.com; h=from:subject:message-id; bh=xYV/jhtksKq4lVUs85jfHk2X62icSbuXC1EZccF5b3I=; b=owJ4nAFtApL9kA0DAAoB2O7X88g7+poByyZiAGi52cLhj3jKlAVRnMAW3LugrZurm8z0D9P/V RrhnhbRafEXUokCMwQAAQoAHRYhBO9mDQdGP4tyanlUE9ju1/PIO/qaBQJoudnCAAoJENju1/PI O/qaOhYP/i2I1Ced4+um4xbadx4569zlypDyvVfIQP8me5BtiZAX3WbjxXSJQLHHu3zwDtbJ3t6 4vQ3u5uJpqHyKk13qeFyfzhcXKFCSvrcEvyFJyCGJzCOjZr12Bc2Z6Im2xP2V3GX3Hy2K1Ofj0Y sj71gpzf6ZoqUnrGdQ+qq+s89Bh1RtcghRo/TGT4QTuadsKzhl0RcmIV3MBi1QfC8JiqE4nSds5 QwdAZgSB0pCZ4DuK7rI4pfL9X8P2qNjUzS5bJBinS5+ZD290kBQnqUTXvEQgiz3T8Lw1ycpGy81 qK0ijINMkwXT5apiLa02leLZLFf7yg9k+H5VEtLxSMQBQXiD2eMgAVZRtwVocIptadh4C2e2BgH sgsKa5KXDhPxFWF/iQ+2l8YUEmiNuLFXGBpIFBDYIvRGTqt41khcOgBQWDeWWZFQM9gOTLDQ9jg /Byz5XBT85pAQVqBSNsqtTVl+f8wSjbKL0a8lSU9dV/QJvTOoX8Oq1MhxnFVcoxANjzbbUYWtLR 6Hpjtx2L9RXltUi0bEs3PDifkcTJTWr47qFN617uQ3AaKEGoMo48THtX+te4LX0R60SzfEwNWfz OaDfdKP//w90lwNx+JB+nqQKke3BzXDJJClFiIUX6C0OxuSOvE3ilDmoN8W2SjN49Kmsd8fWi4a Atafc3j3sv3sdSI6SdbU0xw== X-Developer-Key: i=sebastian.reichel@collabora.com; a=openpgp; fpr=EF660D07463F8B726A795413D8EED7F3C83BFA9A Currently the Rockchip USBDP PHY as a very simply port scheme: It just offers a single port, which is supposed to point towards the connector. Usually with 2 endpoints, one for the USB-C superspeed port and one for the USB-C SBU port. This scheme is not good enough to properly handle DP AltMode, so add a new scheme, which has separate ports for everything. This has been modelled after the Qualcomm QMP USB4-USB3-DP PHY controller binding with a slight difference that there is an additional port for the USB-C SBU port as the Rockchip USB-DP PHY also contains the mux. Signed-off-by: Sebastian Reichel --- .../bindings/phy/phy-rockchip-usbdp.yaml | 23 ++++++++++++++++++= ++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml = b/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml index 8b7059d5b1826fdec5170cf78d6e27f2bd6766bb..f728acf057e4046a4d254ee687a= f3451f17bcd01 100644 --- a/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml @@ -114,6 +114,29 @@ properties: A port node to link the PHY to a TypeC controller for the purpose of handling orientation switching. =20 + ports: + $ref: /schemas/graph.yaml#/properties/ports + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: + Output endpoint of the PHY for USB (or DP when configured into 4= lane + mode), which should point to the superspeed port of a USB connec= tor. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Incoming endpoint from the USB controller + + port@2: + $ref: /schemas/graph.yaml#/properties/port + description: Incoming endpoint from the DisplayPort controller + + port@3: + $ref: /schemas/graph.yaml#/properties/port + description: + Output endpoint of the PHY for DP, which should either point to = the + SBU port of a USB-C connector or a DisplayPort connector input p= ort. + required: - compatible - reg --=20 2.50.1 From nobody Fri Oct 3 05:27:01 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 4A48E342CA5; Thu, 4 Sep 2025 18:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757010374; cv=none; b=nrUKDSnue+JGVObTk9Lbz0sJL8PgjKw+bgZsjzhwGuwarV2r0dkfErsmHoanJcn8sofEyesS+WIw8JWDSC85vC3GafCfGSKOVqeJW/EpqCd51Io0yaJn163jSRVKoEif4294XrHDu/1Rj/tJ3mh1l4v8/SMik6jJ8gfBof67rXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757010374; c=relaxed/simple; bh=ZVdFeXDHFTGKIbHi47qBjTijLaJeWpzS+AmwXx8Vgko=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Zm0ZRat6bANy0jC/w+raA0mizBBU0pcCmpbIEF/bQalhK6X8poYmD6PZB3Xkn6U3M2qEonGshiw83NdIbVGEnUqFjums2J7SfMFDP1d3+wvUBOtr+7vLYt0WuOHZTPv86CfHYOdJPxk9Dku8S+T2dTlspfh9QCcgFglaYLK+yFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=JIrxRGq3; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="JIrxRGq3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1757010370; bh=ZVdFeXDHFTGKIbHi47qBjTijLaJeWpzS+AmwXx8Vgko=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JIrxRGq3SWliP09Sjp2aJF+aVSU4eXyl5sFSGJpZ+LY1h4oR33D6cP15Hlf30yTju fcfimSXRPWisGH/8Saa8V3Y+wo1h5bZLrsUWgVyJp8u5u957qzsPJV12ocye3b+I3i ppDmLp32p5vdqyK2u4xuZS+lb1IjK0eYS2VvFm9UCRBwP75BGKm7p5VvgfNb16RBNP m2b9+SrHTYymy8qOqQMdm5ZkV/LXjWs55XWS0dIX5weiBzNZkgLhrwv2SGjI1AR4fD wY0HQVESiosKOK8/McwjxwxxCXyunCF1og6X3KCZIcKp+HJP6FKq/thEJjb2DZ2s7n rsONdHfyE5Z9g== Received: from jupiter.universe (dyndsl-091-248-191-002.ewe-ip-backbone.de [91.248.191.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by bali.collaboradmins.com (Postfix) with ESMTPSA id 7FEBD17E013C; Thu, 4 Sep 2025 20:26:10 +0200 (CEST) Received: by jupiter.universe (Postfix, from userid 1000) id 3F47E480048; Thu, 04 Sep 2025 20:26:10 +0200 (CEST) From: Sebastian Reichel Date: Thu, 04 Sep 2025 20:26:03 +0200 Subject: [PATCH RFC 2/2] arm64: dts: rockchip: add USB-C DP AltMode for ROCK 5B family 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: <20250904-rock5b-dp-alt-mode-v1-2-23df726b31ce@collabora.com> References: <20250904-rock5b-dp-alt-mode-v1-0-23df726b31ce@collabora.com> In-Reply-To: <20250904-rock5b-dp-alt-mode-v1-0-23df726b31ce@collabora.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Frank Wang , Zhang Yubing Cc: Andy Yan , Maud Spierings , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Sebastian Reichel X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3114; i=sebastian.reichel@collabora.com; h=from:subject:message-id; bh=ZVdFeXDHFTGKIbHi47qBjTijLaJeWpzS+AmwXx8Vgko=; b=owJ4nAFtApL9kA0DAAoB2O7X88g7+poByyZiAGi52cIp7eVpQA0Sd4OgFJVSHe8qO0vCnXosU qmEq3m50tCTH4kCMwQAAQoAHRYhBO9mDQdGP4tyanlUE9ju1/PIO/qaBQJoudnCAAoJENju1/PI O/qay8wQAJH3PDFyf3UnbO0a1rGWzh1hcXe50Z/5Q1MxNcHheOwdmwHkWa70/uVf/bhf/mOicjJ Yb2DRUJalYIkOrr8fwHXOwMTSZTnyrrukuxOlhgF0hjZuP0/CAFuyTyx8G0ji35rO7PeSSXxwI/ BY4F+r1+hBuzIcKOI+SkSYKLdYlGXdvtyzsqw3oAYbT8m+WLu4Tr00vMvm1QJ9swLh/WM4AjXMj OYgySJ7dJ5Pe0fwernjaqEWWuBFDKuW98HRTuPOzXGz2RFBVyBzt6qXlrStDEWAivYHV7FwdN7S t1y7YbS1KUMM09NTb3QY+ghMjs/5wy/swkSpBHSkimghnfvlXTpi/Di0zPOBDKVOI5oqz68c4cr O/Z5RMikQ2cG1IH7OtIAeCXLNNb2U+B/EuXqLPHu95zesY+d1hitUTwVF8nNUVGO2rgqxky3Sq1 EXXpguMKIDUQdKLHYolIpUWj/CpRFwZV2qyIqAtvJiKjl7mD870NKvGgPPbBEBzNYWpfxVPS1a6 Vxomx6Oqk6pEKz0cp/ABN8JxICgmpehOKIHs3a+lZG5TZbkUfHJgJYUvHyamG3gk6WcD8B4prky p1DOplrdMbLPaGmt8bYVlYETLJ+vncOcrVyMDrz2/ShMEqjkjjTfypZXpgMsjtieLG9IvbgWzLK diBXhm+Yz/GW3rBTPE7Y3Dg== X-Developer-Key: i=sebastian.reichel@collabora.com; a=openpgp; fpr=EF660D07463F8B726A795413D8EED7F3C83BFA9A Enable support for USB-C DP AltMode to the ROCK 5B/5B+/5T. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi | 83 ++++++++++++++++++= +--- 1 file changed, 72 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi b/arch= /arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi index 3bbe78810ec6f279a36d51d2fcef4a0f3f53036b..1e284dc48bd3fc2009f5f261e11= 6bf8dbb96d7bd 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi @@ -177,6 +177,22 @@ &cpu_l3 { cpu-supply =3D <&vdd_cpu_lit_s0>; }; =20 +&dp0 { + status =3D "okay"; +}; + +&dp0_in { + dp0_in_vp2: endpoint { + remote-endpoint =3D <&vp2_out_dp0>; + }; +}; + +&dp0_out { + dp0_out_con: endpoint { + remote-endpoint =3D <&usbdp_phy0_dp_in>; + }; +}; + &gpu { mali-supply =3D <&vdd_gpu_s0>; status =3D "okay"; @@ -352,21 +368,21 @@ ports { port@0 { reg =3D <0>; usbc0_hs: endpoint { - remote-endpoint =3D <&usb_host0_xhci_to_usbc0>; + remote-endpoint =3D <&usb_host0_xhci_hs>; }; }; =20 port@1 { reg =3D <1>; usbc0_ss: endpoint { - remote-endpoint =3D <&usbdp_phy0_ss>; + remote-endpoint =3D <&usbdp_phy0_ss_out>; }; }; =20 port@2 { reg =3D <2>; usbc0_sbu: endpoint { - remote-endpoint =3D <&usbdp_phy0_sbu>; + remote-endpoint =3D <&usbdp_phy0_dp_out>; }; }; }; @@ -993,18 +1009,41 @@ &usbdp_phy0 { orientation-switch; status =3D "okay"; =20 - port { + ports { #address-cells =3D <1>; #size-cells =3D <0>; =20 - usbdp_phy0_ss: endpoint@0 { + + port@0 { reg =3D <0>; - remote-endpoint =3D <&usbc0_ss>; + + usbdp_phy0_ss_out: endpoint { + remote-endpoint =3D <&usbc0_ss>; + }; }; =20 - usbdp_phy0_sbu: endpoint@1 { + port@1 { reg =3D <1>; - remote-endpoint =3D <&usbc0_sbu>; + + usbdp_phy0_ss_in: endpoint { + remote-endpoint =3D <&usb_host0_xhci_ss>; + }; + }; + + port@2 { + reg =3D <2>; + + usbdp_phy0_dp_in: endpoint { + remote-endpoint =3D <&dp0_out_con>; + }; + }; + + port@3 { + reg =3D <3>; + + usbdp_phy0_dp_out: endpoint { + remote-endpoint =3D <&usbc0_sbu>; + }; }; }; }; @@ -1025,9 +1064,24 @@ &usb_host0_xhci { usb-role-switch; status =3D "okay"; =20 - port { - usb_host0_xhci_to_usbc0: endpoint { - remote-endpoint =3D <&usbc0_hs>; + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + usb_host0_xhci_hs: endpoint { + remote-endpoint =3D <&usbc0_hs>; + }; + }; + + port@1 { + reg =3D <1>; + + usb_host0_xhci_ss: endpoint { + remote-endpoint =3D <&usbdp_phy0_ss_in>; + }; }; }; }; @@ -1066,3 +1120,10 @@ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { remote-endpoint =3D <&hdmi1_in_vp1>; }; }; + +&vp2 { + vp2_out_dp0: endpoint@a { + reg =3D ; + remote-endpoint =3D <&dp0_in_vp2>; + }; +}; --=20 2.50.1