Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support
@ 2026-11-27 10:51 Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 01/11] arm64: dts: rockchip: Fix USB-C DP AltMode vdo Sebastian Reichel
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel, stable

The current upstream situation for Rockchip USB-C is quite messy. Many
boards got upstreamed using the vendor-style bindings, a missunderstood
version of the upstream binding (before it landed upstream), or
something weird in between. This fixes the worst offenders to properly
describe their USB-C port incl. DP AltMode. Getting DP AltMode working
requires three more patch series for the kernel, which do not affect the
DT binding (so this series has no dependencies):

 * https://lore.kernel.org/linux-phy/20261114-b4-rockchip-dwc3-rockchip-glue-v19-0-b79fb5f4b42a@collabora.com/
 * https://lore.kernel.org/linux-phy/20261119-b4-rockchip-usbdp-cleanup-part3-v18-0-fb325e336494@collabora.com/
 * https://lore.kernel.org/dri-devel/20261114-synopsys-dw-dp-improvements-v12-0-d42d3dc5bdd4@collabora.com/

Without these driver patches, the DP connectors will be exposed, but
always stay in a disconnected state. This works because the existing
upstream DP driver does not yet support any follow-up bridges.

To have functional DP AltMode Anbernic RG Vita Pro in addition also
needs support for generic USB Type-C DP HPD bridge from Chaoyi Chen, as
the "richtek,rt1711h" driver does not have a manually registered one:

 * https://lore.kernel.org/linux-rockchip/20261020072816.180-1-kernel@airkyi.com/

The other boards all use fusb302 and that driver registers the bridge
manually. Having the generic patch series is not necessary for them.

All patches from the series can be applied individually and the grouping
was only done as they touch the same topic and apply to the same tree.

Short summary of the different patches:

patch 1: Fix VDO from 0xffffffff to 0x00001c46; the incorrect 0xffffffff
is used by vendor kernel and has been copied by everyone.

patches 2-3: LubanCat 5IO + Indiedroid Nova tried to follow the upstream
style, but got it quite wrong as all endpoints in USBDP are routed to
the first port instead of having one port per endpoint. I did not test
them due to lack of boards.

patches 4-6: RK3588 EVB1, ROCK 5B+ and Sige5: These boards were tested
by me. They are the reference used during development of the previously
mentioned driver support series.

patches 7-9: These boards had DP AltMode described in DT to some degree,
but with all kind of issues that definetly prevent them from working. I
converted them over to a proper description instead of having the
current half-baked upstream state. I did not test them due to lack of
boards.

patches 10-11: I had a closer look at the DT of these boards, since they
had a orientation-switch, but no mode-switch in the USBDP PHY. I'm
investigating, if we can make it mandatory in the binding to have either
both or none of the properties. For these two boards, mode-switch is
actually required for DP AltMode. Upstream never had properly working
orientation-switch only mode either (i.e. runtime orientation switch
change does not work). I've added proper DP AltMode for these and added
the missing mode-switch. I did not test these either due to lack of
boards.

Changes in v2:
- Link to v1: https://patch.msgid.link/20261126-rockchip-usb-c-dp-altmode-v1-0-7991eb5bb426@collabora.com
- Add missing DP AltMode in RK3588s Gameforce Ace DT (Sashiko)
- Add missing DP AltMode in RK3588 Jaguar DT (Sashiko)
- Collect Tested-by from Cunhao Lu for LubanCat 5IO patch

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
Sebastian Reichel (11):
      arm64: dts: rockchip: Fix USB-C DP AltMode vdo
      arm64: dts: rockchip: Fix USBDP ports for LubanCat 5IO board
      arm64: dts: rockchip: Fix USBDP ports for Indiedroid Nova
      arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 EVB1
      arm64: dts: rockchip: Add USB-C DP AltMode for ROCK 5B family
      arm64: dts: rockchip: Add USB-C DP AltMode for ArmSom Sige5
      arm64: dts: rockchip: Add USB-C DP AltMode for Gameforce Ace
      arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro
      arm64: dts: rockchip: Add USB-C DP AltMode for CM5-IO
      arm64: dts: rockchip: Add USB-C DP AltMode for Firefly ITX 3588J
      arm64: dts: rockchip: Add USB-C DP AltMode for  RK3588 Jaguar

 .../dts/rockchip/rk3576-anbernic-rg-vita-pro.dts   |  80 +++++++--
 .../boot/dts/rockchip/rk3576-armsom-cm5-io.dts     |  88 ++++++++--
 .../boot/dts/rockchip/rk3576-armsom-sige5.dts      |  78 +++++++--
 arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts   |  92 +++++++++--
 .../boot/dts/rockchip/rk3588-firefly-itx-3588j.dts |  93 +++++++++--
 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts     | 182 ++++++++++++++++++---
 .../boot/dts/rockchip/rk3588-lubancat-5io.dts      |  32 ++--
 .../boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi   |  84 ++++++++--
 .../boot/dts/rockchip/rk3588s-gameforce-ace.dts    |  94 +++++++++--
 .../boot/dts/rockchip/rk3588s-indiedroid-nova.dts  |  33 ++--
 .../arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts |   2 +-
 11 files changed, 722 insertions(+), 136 deletions(-)
---
base-commit: 0202125a80af9dad6d762dfe52572b95ca7699db
change-id: 20261123-rockchip-usb-c-dp-altmode-a4fc7383d04b

Best regards,
--  
Sebastian Reichel <sebastian.reichel@collabora.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 01/11] arm64: dts: rockchip: Fix USB-C DP AltMode vdo
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 02/11] arm64: dts: rockchip: Fix USBDP ports for LubanCat 5IO board Sebastian Reichel
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Set sensible VDO for DP AltMode. The new value is commonly used by other
boards and dissects into the following:

  0x0002 DP_CAP_DFP_D
+ 0x0004 DP_CAP_SIGNALLING_HBR3
+ 0x0040 DP_CAP_RECEPTACLE
+ 0x1c00 DP_CAP_PIN_ASSIGN_DFP_D(DP_PIN_ASSIGN_C |
				 DP_PIN_ASSIGN_D |
				 DP_PIN_ASSIGN_E)
  ------
  0x1c46

DP_CAP_DFP_D: the RK3588 and RK3576 only have a DisplayPort transmitter,
but no receiver

DP_CAP_SIGNALLING_HBR3: HBR3 is the limit of the DisplayPort controller
in RK3588 and RK3576

DP_CAP_RECEPTACLE: The DisplayPort interface is presented on a
receptacle (disabled bit means plug)

DP_CAP_USB: This is not set, which means USB2 "may be required". My
understanding is, that unsetting this means USB2 is not available
at all.

DP_CAP_PIN_ASSIGN_DFP_D(DP_PIN_ASSIGN_C | DP_PIN_ASSIGN_D |
DP_PIN_ASSIGN_E): The USBDP PHY can handle muxing any of these

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts | 2 +-
 arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts        | 2 +-
 arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts         | 2 +-
 arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts         | 2 +-
 arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi      | 2 +-
 arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts     | 2 +-
 arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts          | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts b/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
index 4ac849329ea1..85576a437f7b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
@@ -922,7 +922,7 @@ connector {
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts
index 72ca49ec3026..f6ab189a0578 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts
@@ -205,7 +205,7 @@ PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM)
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
index 45a4489863bf..48e5ad169722 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
@@ -712,7 +712,7 @@ connector {
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts b/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
index eb5d27bf2004..b0f262599cc8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
@@ -515,7 +515,7 @@ connector {
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 
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 e8a3eb33e402..0cf6da8d8f1c 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
@@ -348,7 +348,7 @@ usb_con: connector {
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
index f212453686a1..c775f82c0624 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
@@ -394,7 +394,7 @@ usb_con: connector {
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts b/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts
index 73f8e3f1750e..b0b2d6fa73ec 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts
@@ -325,7 +325,7 @@ usb_con: connector {
 			altmodes {
 				displayport {
 					svid = /bits/ 16 <0xff01>;
-					vdo = <0xffffffff>;
+					vdo = <0x00001c46>;
 				};
 			};
 

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 02/11] arm64: dts: rockchip: Fix USBDP ports for LubanCat 5IO board
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 01/11] arm64: dts: rockchip: Fix USB-C DP AltMode vdo Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 03/11] arm64: dts: rockchip: Fix USBDP ports for Indiedroid Nova Sebastian Reichel
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel, stable

Fix the USBDP PHY ports description for the LubanCat 5IO, so that it
follows the documented ABI. The current binding confuses endpoints with
ports and makes no sense at all.

Cc: stable@vger.kernel.org
Fixes: f7b576f35356 ("arm64: dts: rockchip: Add LubanCat 5IO board")
Tested-by: Cunhao Lu <1579567540@qq.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3588-lubancat-5io.dts      | 30 +++++++++++++++-------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts b/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
index b0f262599cc8..71d640c939c6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-lubancat-5io.dts
@@ -915,28 +915,40 @@ &usbdp_phy0 {
 	sbu2-dc-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_ss_out: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_ss>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_ss_in: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&usb_host0_xhci_ss>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
 		};
 
-		usbdp_phy0_dp_in: endpoint@2 {
+		port@2 {
 			reg = <2>;
-			remote-endpoint = <&dp0_out_con>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
 		};
 
-		usbdp_phy0_dp_out: endpoint@3 {
+		port@3 {
 			reg = <3>;
-			remote-endpoint = <&usbc0_sbu>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 03/11] arm64: dts: rockchip: Fix USBDP ports for Indiedroid Nova
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 01/11] arm64: dts: rockchip: Fix USB-C DP AltMode vdo Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 02/11] arm64: dts: rockchip: Fix USBDP ports for LubanCat 5IO board Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 04/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 EVB1 Sebastian Reichel
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel, stable

Fix the USBDP PHY ports description for the Indiedroid Nova, so that it
follows the documented ABI. The current binding confuses endpoints with
ports and makes no sense at all.

While at it drop the rockchip,dp-lane-mux property, which makes no sense
for USB-C as the DP lanes are routed dynamically based on negotiation
via the USB-PD protocol.

Cc: stable@vger.kernel.org
Fixes: 7230cdc1fc3c ("arm64: dts: rockchip: Enable USB-C DP Alt for Indiedroid Nova")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3588s-indiedroid-nova.dts  | 31 +++++++++++++++-------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
index c775f82c0624..59b95461df57 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
@@ -1059,31 +1059,42 @@ &usbdp_phy0 {
 	mode-switch;
 	sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
 	sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
-	rockchip,dp-lane-mux = <2 3>;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_ss_out: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_ss>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_ss_in: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&usb_host0_xhci_ss>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
 		};
 
-		usbdp_phy0_dp_in: endpoint@2 {
+		port@2 {
 			reg = <2>;
-			remote-endpoint = <&dp0_out_con>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
 		};
 
-		usbdp_phy0_dp_out: endpoint@3 {
+		port@3 {
 			reg = <3>;
-			remote-endpoint = <&usbc0_sbu>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 04/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 EVB1
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (2 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 03/11] arm64: dts: rockchip: Fix USBDP ports for Indiedroid Nova Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 05/11] arm64: dts: rockchip: Add USB-C DP AltMode for ROCK 5B family Sebastian Reichel
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Fix the USB-C connector description, so that it follows the binding:

port@0 is the high-speed lanes
port@1 is the super-speed lanes
port@2 is the SBU lanes

This also updates the port naming, so that it describes the hardware
instead of how the drivers are using the information. These are
effectively the same, but the DT should describe hardware and not
software.

Last but not least it now correctly describes the DP side of things,
so that DP AltMode starts working once the kernel has support for it.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 92 ++++++++++++++++++++----
 1 file changed, 78 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
index f578e7dd5aa1..2c560d376f46 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
@@ -384,6 +384,22 @@ dsi0_out_panel: endpoint {
 	};
 };
 
+&dp0 {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy0_dp_in>;
+	};
+};
+
 &gmac0 {
 	clock_in_out = "output";
 	phy-handle = <&rgmii_phy>;
@@ -497,6 +513,13 @@ usb_con: connector {
 				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
 			try-power-role = "source";
 
+			altmodes {
+				displayport {
+					svid = /bits/ 16 <0xff01>;
+					vdo = <0x00001c46>;
+				};
+			};
+
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -504,24 +527,24 @@ ports {
 				port@0 {
 					reg = <0>;
 
-					usbc0_orien_sw: endpoint {
-						remote-endpoint = <&usbdp_phy0_orientation_switch>;
+					usbc0_hs: endpoint {
+						remote-endpoint = <&usb_host0_xhci_hs>;
 					};
 				};
 
 				port@1 {
 					reg = <1>;
 
-					usbc0_role_sw: endpoint {
-						remote-endpoint = <&dwc3_0_role_switch>;
+					usbc0_ss: endpoint {
+						remote-endpoint = <&usbdp_phy0_ss_out>;
 					};
 				};
 
 				port@2 {
 					reg = <2>;
 
-					dp_altmode_mux: endpoint {
-						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
+					usbc0_sbu: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -1582,18 +1605,40 @@ &usbdp_phy0 {
 	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_orientation_switch: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_orien_sw>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_dp_altmode_mux: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&dp_altmode_mux>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
@@ -1614,13 +1659,25 @@ &usb_host0_xhci {
 	usb-role-switch;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		dwc3_0_role_switch: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_role_sw>;
+
+			usb_host0_xhci_hs: endpoint {
+				remote-endpoint = <&usbc0_hs>;
+			};
+		};
+
+
+		port@1 {
+			reg = <1>;
+
+			usb_host0_xhci_ss: endpoint {
+				remote-endpoint = <&usbdp_phy0_ss_in>;
+			};
 		};
 	};
 };
@@ -1652,6 +1709,13 @@ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
 	};
 };
 
+&vp2 {
+	vp2_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp2>;
+	};
+};
+
 &vp3 {
 	#address-cells = <1>;
 	#size-cells = <0>;

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 05/11] arm64: dts: rockchip: Add USB-C DP AltMode for ROCK 5B family
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (3 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 04/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 EVB1 Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 06/11] arm64: dts: rockchip: Add USB-C DP AltMode for ArmSom Sige5 Sebastian Reichel
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Enable support for USB-C DP AltMode to the ROCK 5B/5B+/5T.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi   | 82 +++++++++++++++++++---
 1 file changed, 71 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 0cf6da8d8f1c..aa0de092626c 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
@@ -178,6 +178,22 @@ &cpu_l3 {
 	cpu-supply = <&vdd_cpu_lit_s0>;
 };
 
+&dp0 {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy0_dp_in>;
+	};
+};
+
 &gpu {
 	mali-supply = <&vdd_gpu_s0>;
 	status = "okay";
@@ -359,21 +375,21 @@ ports {
 				port@0 {
 					reg = <0>;
 					usbc0_hs: endpoint {
-						remote-endpoint = <&usb_host0_xhci_to_usbc0>;
+						remote-endpoint = <&usb_host0_xhci_hs>;
 					};
 				};
 
 				port@1 {
 					reg = <1>;
 					usbc0_ss: endpoint {
-						remote-endpoint = <&usbdp_phy0_ss>;
+						remote-endpoint = <&usbdp_phy0_ss_out>;
 					};
 				};
 
 				port@2 {
 					reg = <2>;
 					usbc0_sbu: endpoint {
-						remote-endpoint = <&usbdp_phy0_sbu>;
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -1033,18 +1049,40 @@ &usbdp_phy0 {
 	orientation-switch;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_ss: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_ss>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_sbu: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&usbc0_sbu>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
@@ -1065,9 +1103,24 @@ &usb_host0_xhci {
 	usb-role-switch;
 	status = "okay";
 
-	port {
-		usb_host0_xhci_to_usbc0: endpoint {
-			remote-endpoint = <&usbc0_hs>;
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			usb_host0_xhci_hs: endpoint {
+				remote-endpoint = <&usbc0_hs>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			usb_host0_xhci_ss: endpoint {
+				remote-endpoint = <&usbdp_phy0_ss_in>;
+			};
 		};
 	};
 };
@@ -1106,3 +1159,10 @@ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
 		remote-endpoint = <&hdmi1_in_vp1>;
 	};
 };
+
+&vp2 {
+	vp2_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp2>;
+	};
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 06/11] arm64: dts: rockchip: Add USB-C DP AltMode for ArmSom Sige5
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (4 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 05/11] arm64: dts: rockchip: Add USB-C DP AltMode for ROCK 5B family Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 07/11] arm64: dts: rockchip: Add USB-C DP AltMode for Gameforce Ace Sebastian Reichel
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Enable USB-C DP AltMode for the ArmSom Sige5.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3576-armsom-sige5.dts      | 76 +++++++++++++++++++---
 1 file changed, 66 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
index 48e5ad169722..047dd0def3e3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
@@ -272,6 +272,22 @@ &cpu_l3 {
 	cpu-supply = <&vdd_cpu_lit_s0>;
 };
 
+&dp {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp1: endpoint {
+		remote-endpoint = <&vp1_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy_dp_in>;
+	};
+};
+
 &gmac0 {
 	phy-mode = "rgmii-id";
 	clock_in_out = "output";
@@ -722,20 +738,22 @@ ports {
 
 				port@0 {
 					reg = <0>;
-					usbc0_hs_ep: endpoint {
+					usbc0_hs: endpoint {
 						remote-endpoint = <&usb_drd0_hs_ep>;
 					};
 				};
+
 				port@1 {
 					reg = <1>;
-					usbc0_ss_ep: endpoint {
-						remote-endpoint = <&usb_drd0_ss_ep>;
+					usbc0_ss: endpoint {
+						remote-endpoint = <&usbdp_phy_ss_out>;
 					};
 				};
+
 				port@2 {
 					reg = <2>;
-					usbc0_dp_ep: endpoint {
-						remote-endpoint = <&usbdp_phy_ep>;
+					usbc0_sbu: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -999,14 +1017,14 @@ ports {
 		port@0 {
 			reg = <0>;
 			usb_drd0_hs_ep: endpoint {
-				remote-endpoint = <&usbc0_hs_ep>;
+				remote-endpoint = <&usbc0_hs>;
 			};
 		};
 
 		port@1 {
 			reg = <1>;
 			usb_drd0_ss_ep: endpoint {
-				remote-endpoint = <&usbc0_ss_ep>;
+				remote-endpoint = <&usbdp_phy_ss_in>;
 			};
 		};
 	};
@@ -1026,9 +1044,40 @@ &usbdp_phy {
 	sbu2-dc-gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 
-	port {
-		usbdp_phy_ep: endpoint {
-			remote-endpoint = <&usbc0_dp_ep>;
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			usbdp_phy_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			usbdp_phy_ss_in: endpoint {
+				remote-endpoint = <&usb_drd0_ss_ep>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
@@ -1047,3 +1096,10 @@ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
 		remote-endpoint = <&hdmi_in_vp0>;
 	};
 };
+
+&vp1 {
+	vp1_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp1>;
+	};
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 07/11] arm64: dts: rockchip: Add USB-C DP AltMode for Gameforce Ace
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (5 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 06/11] arm64: dts: rockchip: Add USB-C DP AltMode for ArmSom Sige5 Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 08/11] arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro Sebastian Reichel
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Fix the USBDP PHY ports description for the Gameforce Ace, so that it
follows the documented ABI. The current binding confuses endpoints with
ports and makes no sense at all.

While at it drop the rockchip,dp-lane-mux property, which makes no sense
for USB-C as the DP lanes are routed dynamically based on negotiation
via the USB-PD protocol.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3588s-gameforce-ace.dts    | 94 ++++++++++++++++++----
 1 file changed, 79 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts b/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
index 5ffc94b70813..27b696b4b945 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
@@ -504,6 +504,22 @@ dsi0_out_panel: endpoint {
 	};
 };
 
+&dp0 {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy0_dp_in>;
+	};
+};
+
 &gpu {
 	mali-supply = <&vdd_gpu_s0>;
 	status = "okay";
@@ -679,28 +695,35 @@ PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM)
 			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
 			try-power-role = "sink";
 
+			altmodes {
+				displayport {
+					svid = /bits/ 16 <0xff01>;
+					vdo = <0x00001c46>;
+				};
+			};
+
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
 
 				port@0 {
 					reg = <0>;
-					usbc0_orien_sw: endpoint {
-						remote-endpoint = <&usbdp_phy0_orientation_switch>;
+					usbc0_hs: endpoint {
+						remote-endpoint = <&usb_host0_xhci_hs>;
 					};
 				};
 
 				port@1 {
 					reg = <1>;
-					usbc0_role_sw: endpoint {
-						remote-endpoint = <&dwc3_0_role_switch>;
+					usbc0_ss: endpoint {
+						remote-endpoint = <&usbdp_phy0_ss_out>;
 					};
 				};
 
 				port@2 {
 					reg = <2>;
-					dp_altmode_mux: endpoint {
-						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
+					usbc0_sbu: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -1466,12 +1489,24 @@ &usb_host0_xhci {
 	usb-role-switch;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		dwc3_0_role_switch: endpoint@0 {
+
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_role_sw>;
+
+			usb_host0_xhci_hs: endpoint {
+				remote-endpoint = <&usbc0_hs>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			usb_host0_xhci_ss: endpoint {
+				remote-endpoint = <&usbdp_phy0_ss_in>;
+			};
 		};
 	};
 };
@@ -1483,23 +1518,45 @@ &usbdp_phy0 {
 	pinctrl-names = "default";
 	sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
 	sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
-	rockchip,dp-lane-mux = <2 3>;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_orientation_switch: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_orien_sw>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_dp_altmode_mux: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&dp_altmode_mux>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
+
 };
 
 &vop {
@@ -1520,6 +1577,13 @@ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
 	};
 };
 
+&vp2 {
+	vp2_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp2>;
+	};
+};
+
 &vp3 {
 	#address-cells = <1>;
 	#size-cells = <0>;

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 08/11] arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (6 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 07/11] arm64: dts: rockchip: Add USB-C DP AltMode for Gameforce Ace Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 11:05   ` sashiko-bot
  2026-11-27 10:51 ` [PATCH v2 09/11] arm64: dts: rockchip: Add USB-C DP AltMode for CM5-IO Sebastian Reichel
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Properly describe the USB-C setup incl. DP AltMode support, which also
fixes the USBDP PHY ports description for the RG-Vita-Pro, so that it
follows the documented ABI.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../dts/rockchip/rk3576-anbernic-rg-vita-pro.dts   | 78 +++++++++++++++++++---
 1 file changed, 68 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts b/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
index 85576a437f7b..5da90f3792a1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
@@ -469,6 +469,22 @@ mipi_out_panel: endpoint {
 	};
 };
 
+&dp {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy_dp_in>;
+	};
+};
+
 &gpu {
 	mali-supply = <&vdd_gpu_s0>;
 	status = "okay";
@@ -932,22 +948,25 @@ ports {
 
 				port@0 {
 					reg = <0>;
-					usbc0_hs_ep: endpoint {
+					usbc0_hs: endpoint {
 						remote-endpoint = <&usb_drd0_hs_ep>;
 					};
 				};
+
 				port@1 {
 					reg = <1>;
-					usbc0_ss_ep: endpoint {
-						remote-endpoint = <&usb_drd0_ss_ep>;
+					usbc0_ss: endpoint {
+						remote-endpoint = <&usbdp_phy_ss_out>;
 					};
 				};
+
 				port@2 {
 					reg = <2>;
-					usbc0_dp_ep: endpoint {
-						remote-endpoint = <&usbdp_phy_ep>;
+					usbc0_sbu: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
+
 			};
 		};
 	};
@@ -1221,6 +1240,13 @@ vp1_out_dsi: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
 	};
 };
 
+&vp2 {
+	vp2_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp2>;
+	};
+};
+
 &u2phy0 {
 	status = "okay";
 };
@@ -1258,9 +1284,40 @@ &usbdp_phy {
 	sbu2-dc-gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 
-	port {
-		usbdp_phy_ep: endpoint {
-			remote-endpoint = <&usbc0_dp_ep>;
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			usbdp_phy_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			usbdp_phy_ss_in: endpoint {
+				remote-endpoint = <&usb_drd0_ss_ep>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
@@ -1277,15 +1334,16 @@ ports {
 		port@0 {
 			reg = <0>;
 			usb_drd0_hs_ep: endpoint {
-				remote-endpoint = <&usbc0_hs_ep>;
+				remote-endpoint = <&usbc0_hs>;
 			};
 		};
 
 		port@1 {
 			reg = <1>;
 			usb_drd0_ss_ep: endpoint {
-				remote-endpoint = <&usbc0_ss_ep>;
+				remote-endpoint = <&usbdp_phy_ss_in>;
 			};
 		};
 	};
+
 };

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 09/11] arm64: dts: rockchip: Add USB-C DP AltMode for CM5-IO
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (7 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 08/11] arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 10/11] arm64: dts: rockchip: Add USB-C DP AltMode for Firefly ITX 3588J Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 11/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 Jaguar Sebastian Reichel
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Properly describe the USB-C setup incl. DP AltMode support, which also
fixes the USBDP PHY ports description for the CM5-IO, so that it
follows the documented ABI.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3576-armsom-cm5-io.dts     | 86 ++++++++++++++++++----
 1 file changed, 72 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts
index f6ab189a0578..5170eb4d2589 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-cm5-io.dts
@@ -150,6 +150,22 @@ &combphy1_psu {
 	status = "okay";
 };
 
+&dp {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp1: endpoint {
+		remote-endpoint = <&vp1_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy_dp_in>;
+	};
+};
+
 &hdmi {
 	status = "okay";
 };
@@ -215,22 +231,22 @@ ports {
 
 				port@0 {
 					reg = <0>;
-					usbc0_orien_sw: endpoint {
-						remote-endpoint = <&usbdp_phy_orientation_switch>;
+					usbc0_hs: endpoint {
+						remote-endpoint = <&usb_drd0_hs_ep>;
 					};
 				};
 
 				port@1 {
 					reg = <1>;
-					usbc0_role_sw: endpoint {
-						remote-endpoint = <&usb_drd0_role_switch>;
+					usbc0_ss: endpoint {
+						remote-endpoint = <&usbdp_phy_ss_out>;
 					};
 				};
 
 				port@2 {
 					reg = <2>;
-					dp_altmode_mux: endpoint {
-						remote-endpoint = <&usbdp_phy_dp_altmode_mux>;
+					usbc0_sbu: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -330,9 +346,22 @@ &usb_drd0_dwc3 {
 	usb-role-switch;
 	status = "okay";
 
-	port {
-		usb_drd0_role_switch: endpoint {
-			remote-endpoint = <&usbc0_role_sw>;
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			usb_drd0_hs_ep: endpoint {
+				remote-endpoint = <&usbc0_hs>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			usb_drd0_ss_ep: endpoint {
+				remote-endpoint = <&usbdp_phy_ss_in>;
+			};
 		};
 	};
 };
@@ -350,18 +379,40 @@ &usbdp_phy {
 	sbu1-dc-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
 	sbu2-dc-gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy_orientation_switch: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_orien_sw>;
+
+			usbdp_phy_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy_dp_altmode_mux: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&dp_altmode_mux>;
+
+			usbdp_phy_ss_in: endpoint {
+				remote-endpoint = <&usb_drd0_ss_ep>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
@@ -380,3 +431,10 @@ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
 		remote-endpoint = <&hdmi_in_vp0>;
 	};
 };
+
+&vp1 {
+	vp1_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp1>;
+	};
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 10/11] arm64: dts: rockchip: Add USB-C DP AltMode for Firefly ITX 3588J
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (8 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 09/11] arm64: dts: rockchip: Add USB-C DP AltMode for CM5-IO Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  2026-11-27 10:51 ` [PATCH v2 11/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 Jaguar Sebastian Reichel
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Properly describe the USB-C setup incl. DP AltMode support, which also
fixes the USBDP PHY ports description for the Firefly ITX 3588J, so that
it follows the documented ABI.

This also adds the missing mode-switch property to the usbdp PHY.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../boot/dts/rockchip/rk3588-firefly-itx-3588j.dts | 93 ++++++++++++++++++----
 1 file changed, 79 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts b/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts
index 8dac069f8351..57d8f193f186 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts
@@ -285,6 +285,22 @@ &combphy2_psu {
 	status = "okay";
 };
 
+&dp0 {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy0_dp_in>;
+	};
+};
+
 &gmac0 {
 	clock_in_out = "output";
 	phy-handle = <&rgmii_phy0>;
@@ -397,6 +413,13 @@ usb_con: connector {
 				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
 			try-power-role = "source";
 
+			altmodes {
+				displayport {
+					svid = /bits/ 16 <0xff01>;
+					vdo = <0x00001c46>;
+				};
+			};
+
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -404,24 +427,24 @@ ports {
 				port@0 {
 					reg = <0>;
 
-					usbc0_orien_sw: endpoint {
-						remote-endpoint = <&usbdp_phy0_orientation_switch>;
+					usbc0_hs: endpoint {
+						remote-endpoint = <&usb_host0_xhci_hs>;
 					};
 				};
 
 				port@1 {
 					reg = <1>;
 
-					usbc0_role_sw: endpoint {
-						remote-endpoint = <&dwc3_0_role_switch>;
+					usbc0_ss: endpoint {
+						remote-endpoint = <&usbdp_phy0_ss_out>;
 					};
 				};
 
 				port@2 {
 					reg = <2>;
 
-					dp_altmode_mux: endpoint {
-						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
+					usbc0_sbu: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -635,13 +658,25 @@ &usb_host0_xhci {
 	dr_mode = "otg";
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		dwc3_0_role_switch: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_role_sw>;
+
+			usb_host0_xhci_hs: endpoint {
+				remote-endpoint = <&usbc0_hs>;
+			};
+		};
+
+
+		port@1 {
+			reg = <1>;
+
+			usb_host0_xhci_ss: endpoint {
+				remote-endpoint = <&usbdp_phy0_ss_in>;
+			};
 		};
 	};
 };
@@ -656,23 +691,46 @@ &usb_host2_xhci {
 };
 
 &usbdp_phy0 {
+	mode-switch;
 	orientation-switch;
 	sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
 	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_orientation_switch: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_orien_sw>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_dp_altmode_mux: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&dp_altmode_mux>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
@@ -712,3 +770,10 @@ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
 		remote-endpoint = <&hdmi0_in_vp0>;
 	};
 };
+
+&vp2 {
+	vp2_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp2>;
+	};
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 11/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 Jaguar
  2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
                   ` (9 preceding siblings ...)
  2026-11-27 10:51 ` [PATCH v2 10/11] arm64: dts: rockchip: Add USB-C DP AltMode for Firefly ITX 3588J Sebastian Reichel
@ 2026-11-27 10:51 ` Sebastian Reichel
  10 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2026-11-27 10:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Cunhao Lu, Chris Morgan
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel, Sebastian Reichel

Properly describe the USB-C setup incl. DP AltMode support, which also
fixes the USBDP PHY ports description for the RK3588 Jaguar, so that it
follows the documented ABI.

This also adds the missing mode-switch property to the usbdp PHYs.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 182 ++++++++++++++++++++++---
 1 file changed, 160 insertions(+), 22 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
index 0446834e84d5..f79b2281ff4c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
@@ -247,6 +247,38 @@ &cpu_l3 {
 	cpu-supply = <&vdd_cpu_lit_s0>;
 };
 
+&dp0 {
+	status = "okay";
+};
+
+&dp0_in {
+	dp0_in_vp1: endpoint {
+		remote-endpoint = <&vp1_out_dp0>;
+	};
+};
+
+&dp0_out {
+	dp0_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy0_dp_in>;
+	};
+};
+
+&dp1 {
+	status = "okay";
+};
+
+&dp1_in {
+	dp1_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp1>;
+	};
+};
+
+&dp1_out {
+	dp1_out_con: endpoint {
+		remote-endpoint = <&usbdp_phy1_dp_in>;
+	};
+};
+
 &gmac0 {
 	clock_in_out = "output";
 	phy-handle = <&rgmii_phy>;
@@ -367,6 +399,13 @@ connector {
 				<PDO_FIXED(5000, 1500, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM)>;
 			vbus-supply = <&vcc_5v0_usb_c1>;
 
+			altmodes {
+				displayport {
+					svid = /bits/ 16 <0xff01>;
+					vdo = <0x00001c46>;
+				};
+			};
+
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -375,7 +414,7 @@ port@0 {
 					reg = <0>;
 
 					usbc0_hs: endpoint {
-						remote-endpoint = <&usb_host0_xhci_drd_sw>;
+						remote-endpoint = <&usb_host0_xhci_hs>;
 					};
 				};
 
@@ -383,7 +422,7 @@ port@1 {
 					reg = <1>;
 
 					usbc0_ss: endpoint {
-						remote-endpoint = <&usbdp_phy0_typec_ss>;
+						remote-endpoint = <&usbdp_phy0_ss_out>;
 					};
 				};
 
@@ -391,7 +430,7 @@ port@2 {
 					reg = <2>;
 
 					usbc0_sbu: endpoint {
-						remote-endpoint = <&usbdp_phy0_typec_sbu>;
+						remote-endpoint = <&usbdp_phy0_dp_out>;
 					};
 				};
 			};
@@ -480,6 +519,13 @@ connector {
 				<PDO_FIXED(5000, 1500, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM)>;
 			vbus-supply = <&vcc_5v0_usb_c2>;
 
+			altmodes {
+				displayport {
+					svid = /bits/ 16 <0xff01>;
+					vdo = <0x00001c46>;
+				};
+			};
+
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -488,7 +534,7 @@ port@0 {
 					reg = <0>;
 
 					usbc1_hs: endpoint {
-						remote-endpoint = <&usb_host1_xhci_drd_sw>;
+						remote-endpoint = <&usb_host1_xhci_hs>;
 					};
 				};
 
@@ -496,7 +542,7 @@ port@1 {
 					reg = <1>;
 
 					usbc1_ss: endpoint {
-						remote-endpoint = <&usbdp_phy1_typec_ss>;
+						remote-endpoint = <&usbdp_phy1_ss_out>;
 					};
 				};
 
@@ -504,7 +550,7 @@ port@2 {
 					reg = <2>;
 
 					usbc1_sbu: endpoint {
-						remote-endpoint = <&usbdp_phy1_typec_sbu>;
+						remote-endpoint = <&usbdp_phy1_dp_out>;
 					};
 				};
 			};
@@ -1102,6 +1148,7 @@ &uart7 {
 
 /* Type-C on P11 */
 &usbdp_phy0 {
+	mode-switch;
 	orientation-switch;
 	pinctrl-names = "default";
 	pinctrl-0 = <&typec0_sbu_dc_pins>;
@@ -1109,24 +1156,47 @@ &usbdp_phy0 {
 	sbu2-dc-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; /* Q7_USB_C0_SBU2_DC */
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy0_typec_ss: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc0_ss>;
+
+			usbdp_phy0_ss_out: endpoint {
+				remote-endpoint = <&usbc0_ss>;
+			};
 		};
 
-		usbdp_phy0_typec_sbu: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&usbc0_sbu>;
+
+			usbdp_phy0_ss_in: endpoint {
+				remote-endpoint = <&usb_host0_xhci_ss>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy0_dp_in: endpoint {
+				remote-endpoint = <&dp0_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy0_dp_out: endpoint {
+				remote-endpoint = <&usbc0_sbu>;
+			};
 		};
 	};
 };
 
 /* Type-C on P12 */
 &usbdp_phy1 {
+	mode-switch;
 	orientation-switch;
 	pinctrl-names = "default";
 	pinctrl-0 = <&typec1_sbu_dc_pins>;
@@ -1134,18 +1204,40 @@ &usbdp_phy1 {
 	sbu2-dc-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; /* Q7_USB_C1_SBU2_DC */
 	status = "okay";
 
-	port {
+	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbdp_phy1_typec_ss: endpoint@0 {
+		port@0 {
 			reg = <0>;
-			remote-endpoint = <&usbc1_ss>;
+
+			usbdp_phy1_ss_out: endpoint {
+				remote-endpoint = <&usbc1_ss>;
+			};
 		};
 
-		usbdp_phy1_typec_sbu: endpoint@1 {
+		port@1 {
 			reg = <1>;
-			remote-endpoint = <&usbc1_sbu>;
+
+			usbdp_phy1_ss_in: endpoint {
+				remote-endpoint = <&usb_host1_xhci_ss>;
+			};
+		};
+
+		port@2 {
+			reg = <2>;
+
+			usbdp_phy1_dp_in: endpoint {
+				remote-endpoint = <&dp1_out_con>;
+			};
+		};
+
+		port@3 {
+			reg = <3>;
+
+			usbdp_phy1_dp_out: endpoint {
+				remote-endpoint = <&usbc1_sbu>;
+			};
 		};
 	};
 };
@@ -1165,9 +1257,25 @@ &usb_host0_xhci {
 	usb-role-switch;
 	status = "okay";
 
-	port {
-		usb_host0_xhci_drd_sw: endpoint {
-			remote-endpoint = <&usbc0_hs>;
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			usb_host0_xhci_hs: endpoint {
+				remote-endpoint = <&usbc0_hs>;
+			};
+		};
+
+
+		port@1 {
+			reg = <1>;
+
+			usb_host0_xhci_ss: endpoint {
+				remote-endpoint = <&usbdp_phy0_ss_in>;
+			};
 		};
 	};
 };
@@ -1177,9 +1285,25 @@ &usb_host1_xhci {
 	usb-role-switch;
 	status = "okay";
 
-	port {
-		usb_host1_xhci_drd_sw: endpoint {
-			remote-endpoint = <&usbc1_hs>;
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			usb_host1_xhci_hs: endpoint {
+				remote-endpoint = <&usbc1_hs>;
+			};
+		};
+
+
+		port@1 {
+			reg = <1>;
+
+			usb_host1_xhci_ss: endpoint {
+				remote-endpoint = <&usbdp_phy1_ss_in>;
+			};
 		};
 	};
 };
@@ -1208,3 +1332,17 @@ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
 		remote-endpoint = <&hdmi0_in_vp0>;
 	};
 };
+
+&vp1 {
+	vp1_out_dp0: endpoint@a {
+		reg = <ROCKCHIP_VOP2_EP_DP0>;
+		remote-endpoint = <&dp0_in_vp1>;
+	};
+};
+
+&vp2 {
+	vp2_out_dp1: endpoint@b {
+		reg = <ROCKCHIP_VOP2_EP_DP1>;
+		remote-endpoint = <&dp1_in_vp2>;
+	};
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 08/11] arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro
  2026-11-27 10:51 ` [PATCH v2 08/11] arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro Sebastian Reichel
@ 2026-11-27 11:05   ` sashiko-bot
  0 siblings, 0 replies; 13+ messages in thread
From: sashiko-bot @ 2026-11-27 11:05 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] arm64: dts: rockchip: connecting vp2 on RK3576 fails in
  vop2_create_crtcs()
--

commit 99a502d224b0a9ebbacac11ac289a2bf3c184e45
Author: Sebastian Reichel <sebastian.reichel@collabora.com>

arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro

This commit enables DisplayPort over USB-C AltMode on the Anbernic
RG-Vita-Pro and updates the USBDP PHY and USB-C connector port graphs.

> diff --git a/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts b/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
> index 85576a437f7bf..5da90f3792a14 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3576-anbernic-rg-vita-pro.dts
> @@ -469,6 +469,22 @@ mipi_out_panel: endpoint {
>  	};
>  };
>  
> +&dp {
> +	status = "okay";
> +};
> +
> +&dp0_in {
> +	dp0_in_vp2: endpoint {
> +		remote-endpoint = <&vp2_out_dp0>;
> +	};
> +};

[ ... ]

> @@ -1221,6 +1240,13 @@ vp1_out_dsi: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
>  	};
>  };
>  
> +&vp2 {
> +	vp2_out_dp0: endpoint@a {
> +		reg = <ROCKCHIP_VOP2_EP_DP0>;
> +		remote-endpoint = <&dp0_in_vp2>;
> +	};
> +};

[Severity: High]
Does enabling vp2 alongside vp0 (HDMI) and vp1 (DSI) cause
vop2_create_crtcs() to fail with -ENOENT ("no primary plane for vp 2")?

In rk3576_vop_win_data[], only Cluster0-win0 and Cluster1-win0 have
DRM_PLANE_TYPE_PRIMARY, and their possible_vp_mask is BIT(0) | BIT(1).
All four windows that can feed vp2 (Esmart0-win0 through Esmart3-win0,
with BIT(2) in possible_vp_mask) are marked DRM_PLANE_TYPE_OVERLAY:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:rk3576_vop_win_data[] {
	{
		.name = "Cluster0-win0",
		...
		.possible_vp_mask = BIT(0) | BIT(1),
		...
		.type = DRM_PLANE_TYPE_PRIMARY,
	}, {
		.name = "Esmart0-win0",
		...
		.possible_vp_mask = BIT(0) | BIT(2),
		...
		.type = DRM_PLANE_TYPE_OVERLAY,
	...
}

drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:vop2_create_crtcs() {
	...
			if (win->type == DRM_PLANE_TYPE_PRIMARY) {
				possible_crtcs = BIT(nvp);
				vp->primary_plane = win;
				ret = vop2_plane_init(vop2, win, possible_crtcs);
				...
				break;
			}
		}

		if (!vp->primary_plane)
			return dev_err_probe(drm->dev, -ENOENT,
					     "no primary plane for vp %d\n", i);
}

When vop2_create_crtcs() reaches vp2, no window matches
DRM_PLANE_TYPE_PRIMARY, so vop2_bind() fails and breaks all display
outputs on the board.  In addition, because vop2_plane_init() has already
linked the primary planes for vp0 and vp1 onto
drm->mode_config.plane_list, freeing the devm-allocated vop2 struct on
component_bind() failure leaves dangling plane pointers that trigger a
use-after-free during drm_mode_config_cleanup().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-rockchip-usb-c-dp-altmode-v2-0-77ee78869307@collabora.com?part=8

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-11-27 11:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 10:51 [PATCH v2 00/11] arm64: dts: rockchip: USB-C DP AltMode support Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 01/11] arm64: dts: rockchip: Fix USB-C DP AltMode vdo Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 02/11] arm64: dts: rockchip: Fix USBDP ports for LubanCat 5IO board Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 03/11] arm64: dts: rockchip: Fix USBDP ports for Indiedroid Nova Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 04/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 EVB1 Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 05/11] arm64: dts: rockchip: Add USB-C DP AltMode for ROCK 5B family Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 06/11] arm64: dts: rockchip: Add USB-C DP AltMode for ArmSom Sige5 Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 07/11] arm64: dts: rockchip: Add USB-C DP AltMode for Gameforce Ace Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 08/11] arm64: dts: rockchip: Add USB-C DP AltMode for RG-Vita-Pro Sebastian Reichel
2026-11-27 11:05   ` sashiko-bot
2026-11-27 10:51 ` [PATCH v2 09/11] arm64: dts: rockchip: Add USB-C DP AltMode for CM5-IO Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 10/11] arm64: dts: rockchip: Add USB-C DP AltMode for Firefly ITX 3588J Sebastian Reichel
2026-11-27 10:51 ` [PATCH v2 11/11] arm64: dts: rockchip: Add USB-C DP AltMode for RK3588 Jaguar Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox