从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt ModeUSB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One


AI free token/AI免费积分

本文来源: https://www.collabora.com/news-and-blog/news-and-events/usb-c-displayport-alt-mode-on-rockchip-rk3588-and-rk3576-starting-with-the-flipper-one.html 若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

主页

新闻与博客

新闻

Rockchip RK3588 和 RK3576 上的 USB-C DisplayPort 替代模式,从 Flipper One 开始

Sebastian Reichel avatar

Sebastian Reichel 2026年10月06日

分享此帖子:从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt Mode从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt Mode从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt Mode从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt Mode从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt Mode

阅读时间:

Collabora Flipper Driving Screen Via USB-C

今年早些时候,我们宣布与 Flipper 合作以支持他们的下一代设备 Flipper One。今天我们将重点介绍我们一直在解决的一个问题:使 USB-C DisplayPort 替代模式正常工作,以便单个 USB-C 端口可以驱动显示器。

在布拉格现场观看!

您打算参加 OSS + ELC EU 2026 吗?请在几天之后前往 ELC Tech Showcase 观看 Flipper One 的现场演示。然后返回此处了解我们是如何实现的细节!

USB 电力传输

要使 USB 替代模式正常工作的关键是 USB 电力传输协议(USB-PD)。正如其名称所示,它用于协商电压和电流以及电力的方向。除此之外,该协议还用于识别和设置所谓的 USB-C 替代模式。使用这些模式意味着连接器上的某些引脚用于非 USB 功能。

USB 替代模式是如何工作的?

要解释 USB-C 替代模式,必须对 USB-C 连接器有良好的理解。

Collabora - USB-C pinout

如您所见,它总共有 24 个引脚。某些功能被故意分配到多个引脚;例如,VBUS (voltage supply, red background) 和 GND (ground, black background) 在镜像设置中分布在 4 个引脚上。这样无论插头方向如何,它们始终位于相同位置。多出的引脚也是必要的,以使连接器能够承受足够的电流。同样,D+ 和 D- (green background) 在连接器中间以镜像布局出现两次,以始终位于相同位置。这里只使用了两个引脚,另外两个实际上被忽略。这些引脚承载 USB2 信号,只要连接器获得良好的物理连接,就不需要特殊技巧即可工作。

对于 RX 和 TX 引脚(黄色背景),它们承载 USB3 和替代模式(AltMode),其工作方式不同。它们不是镜像的(否则会导致一半的引脚未被使用)。相反,USB-C 设备应具备通过开关电路将其切换回正常方向的功能,当连接器反向插入时。显然,这意味着设备必须首先感知连接器的方向。这也是通过 USB-PD 协议来实现的。

USB-PD 通信在 CC 引脚(蓝色背景)之一进行,而另一个引脚即使在 VBUS 较高时也提供 5V。最后,SBU 引脚仅用于侧带,在简单的 USB 中未被使用。稍后将详细说明。

现在 USB-C 连接器的基本引脚分配已经清楚,USB-PD 协议负责以下事项:

确定连接器方向

协商数据流方向(哪一边是主机/设备)

协商电力流方向和配置

协商替代模式和配件模式

一旦 USB-PD 完成 AltMode 协商,硬件需要将涉及的引脚从 USB 控制器复用到替代功能,例如 DisplayPort (DP)。

Rockchip RK3588/RK3576 硬件设置

Collabora - Rockchip USB-C

Rockchip SoC 使得从硬件角度来看,实现这一相当复杂的设置变得相对容易。它们配备了 Synopsys DesignWare SuperSpeed USB 3.0 控制器,由 DWC3 驱动程序处理,并且也被许多其他 SoC 使用。它们还具有一个 Synopsys DesignWare DisplayPort 控制器。就像任何涉及快速 IO 的现代控制器一样,它们需要物理层(PHY)来生成正确的电气信号。这里这两个控制器共享一个组合 PHY(从现在起称为 USBDP),这提供了将 4 对差分对自由复用到任意控制器的选项。这样可以在不需要任何外部元件的情况下实现前一节讨论的方向切换和复用。

所需的唯一外部组件是一个 USB-PD 控制器(由于电压隔离要求,Rockchip 可能未将其集成)。因此,Rockchip 上的完整 USB-C 设置通常如下所示:

USB-C 的 RX1、RX2、TX1、TX2 以及 SBU1 和 SBU2 路由到 USBDP

D- 和 D+ 路由到 USB2 PHY

CC1 和 CC2 路由到外部 USB-PD 芯片,例如 fusb302

电源路由超出本博客文章的范围

有不同类型的 USB-PD 控制器。基本上可以分为自包含型,这类通常出现在笔记本电脑中。它们具有固件,其中包含一个大的状态机,并自动处理 USB-PD 通信。

另一种常见于 Rockchip 开发板的方案是不自行通信的芯片。这些芯片需要被明确告知应做什么。内核中包含一个名为 TCPM(Type-C 端口管理器)的巨大状态机,负责协商电源、数据和 AltModes。本文聚焦于此硬件设置。

USB-PD 软件支持

基本上所有软件都位于内核中,内核需要知道硬件拓扑。在 Rockchip 平台上,这来自设备树。为了实现正常工作的设置,需要许多内容。首先,内核需要知道 USB-C 控制器,该控制器具有 USB-C 连接器作为子节点,并链接到所涉及的不同控制器:

另一方面,USBDP PHY 也在 DT 中有描述,外观如下:

TCPM - 步骤 1

Collabora - TCPM initial sequence

当电缆连接到开发板时,TCPM 状态机启动并尝试确定如何处理它。确切的步骤取决于远程设备,但会类似于该图示,该图示来自 Dell U2725QE。在此阶段如果出现任何问题,USB-C AltModes 将不可用。USB3 可能正常工作也可能不工作,这取决于具体问题。USB2 是独立的且通常可以工作。问题可以通过 debugfs 中提供的特殊日志文件进行调试。确切路径取决于 PD 控制器;在本例中,可以在 /sys/kernel/debug/usb/tcpm-2-0022/log 找到。请注意,读取该文件会自动清空其内容。此步骤结束时,电源和数据角色已经协商完成。换句话说,以下问题已经得到解答:

哪些方提供电源?

使用哪种电压?

最大电流是多少?

哪一方是 USB 主机?

如您所见,这与 AltModes 无关,但这是协议中的必需第一步。

TCPM - 步骤 2

Collabora - TCPM data role swap

初始设置完成后,仍然可以更改某些内容。例如,前文提到的 Dell 显示器最初接受任何数据角色(DR)或电源角色(PR),然后在初始协商完成后请求将其互换。这当然也可以从 Rockchip 端进行控制。对于第一个 USB-C 连接器,控制开关是 /sys/class/typec/port0/data_role 。该目录还包含其他可能用于调试问题的文件。

TCPM - 步骤 3

Collabora - TCPM for DP Altmode

一切就绪后,TCPM 将尝试通过供应商定义的消息(VDM)请求 SVID(标准或供应商 ID)来确定额外功能。为此,第二个状态机在基本状态机之上运行。远程端支持的每种替代模式都会被注册,并且可以在 /sys/class/typec/port0/port0-partner/port0-partner.* 中找到。常见的 SVID 包含 0x8087(Thunderbolt)和 0xff01(DisplayPort)。

进入 AltModes 会触发匹配的内核驱动程序被探测,该驱动程序处理一些事务。对于 DisplayPort,它是 typec_displayport,并导致额外的子目录 displayport ,其中包含一些带有额外信息的文件:

configuration - sink 或 source(Rockchip 平台不支持 DP 输入,因此为 source)

pin_assignment - DP AltMode 支持不同的引脚模式,例如 "D"(2x USB3, 2x DP)

irq_hpd - 热插拔检测中断(主要与 DP 多流传输相关)

hpd - 热插拔检测状态(对于已连接的显示器应为 "1",例如当显示器未连接到 USB-C -> DP 适配器时可能为 "0")

切换到 DP AltMode 还会导致 TCPM 通知模式切换有关该变化。对于 Rockchip 而言,这是 USBDP(参见上面的 DT 片段)。因此,它将获取引脚分配信息,并将引脚正确地路由到 DP 和 USB3 控制器。

除了这一点,HPD很有趣:在普通的DisplayPort连接器上,HPD是一个物理引脚。但使用USB-C DP AltMode时引脚不足。因此,HPD信息通过PD协议使用VDMs提供。

DisplayPort控制器

Collabora - Rockchip Displayport HPD

Rockchip DP 控制器在其 HPD 线上有一个多路复用器,允许在硬件引脚(如前所述,这在 USB-C 上不可用)和从可通过软件设置的寄存器获取 HPD 状态之间进行选择。因此,对于 USB-C,必须将多路复用器配置为从此寄存器获取 HPD,然后将带有 DP 热插拔信息的 USB-PD 消息存储到该寄存器中。

在厂商内核中,这些复用器由 USBDP 配置。这虽然可行,但带来一个有趣的问题:如果没有连接任何设备,整个 DP 控制器可能会自行关闭。但向复用器写入数据需要 DP 控制器上电,因为寄存器与 DP 控制器位于同一电源域。通过采用高通和联发科已经使用的设计来解决这一问题:USB-C 控制器将自身设置为 DRM 桥接器,将热插拔信号转发给链条中的下一个桥接器(USBDP),后者同样执行此操作。这样,软件事件会到达 DP 控制器的驱动程序,该驱动程序可以在配置复用器之前先给控制器上电。

一旦有热插拔信号,DP 控制器将尝试建立链接。在此阶段,它将使用 DP 辅助通道(通过 USB-C 的 SBU 引脚路由)与显示器进行双向通信。此时情况不再专属于 USB-C,与普通的 DP 连接无异。如果 DP AUX 链路测试成功,/sys/class/drm/card1-DP-1/status 将显示 "connected"。

此时,还会从显示器查询 EDID 数据,可用模式应位于 /sys/class/drm/card1-DP-1/modes。

有趣的副问题

在实现所有这些补丁的过程中,出现了一些有趣的问题:

此外,更改复用器配置和/或上电 PHY 的部分部分需要重新初始化 USBDP PHY,这会中断正在进行的连接。这在模式更改时通常不是大问题,因为模式更改通常意味着设备被(拔)插且没有正在进行的连接。但这意味着,如果当前 USB-C 硬件通过 USB-PD 协商了 DP 方向,则即使软件当前未使用它,USBDP PHY 的 DP 侧也必须保持上电状态。否则以后启用 DP 侧会导致活动的 USB 连接被中断。例如,以下情形在未提前启用 DP 侧的情况下将非常不利:步骤 1:连接一个带有 USB 和 HDMI 端口的 USB-C 扩展坞;步骤 2:将磁盘连接到 USB;步骤 3:挂载磁盘并复制一些文件;步骤 4:将显示器连接到扩展坞的 HDMI 端口。此时重置 USBDP PHY 以启用 DP 功能会重置 USB 连接并中断正在进行的数据传输。为了避免这种情况,需要在扩展坞连接时且在 USB 积极使用之前启用 DP。

除此之外,在 DWC3 USB 控制器已经运行时重启 USBDP PHY 可能导致启动失败。这特定于 Rockchip 的集成,但遗憾的是没有恰当的 errata 或 TRM 说明这种行为。经过若干次试错后,发现当 PHY 复位期间 USB3 控制器的接口保持在复位状态时,可以可靠地重启 PHY。

某些模式(即,特定刷新率下的分辨率)无法正常工作。这与本工作无关,而是视频控制器无法产生匹配的像素时钟导致的问题。偏差越大,显示器拒绝接受输入视频流的概率就越高。此问题与 USB-C 无关,也会出现在使用原生 DP 连接器的 DP 控制器的开发板上。需要单独处理。

这何时会进入主线内核?

您可以在我们的 git 仓库中查看 rockchip-devel 分支。它包含 ArmSom 的 Sige 5 所需的所有必要内容。

USB 控制器侧的所有更改已进入主线内核。USBDP PHY 和 DRM 侧的更改已被发送,目前正处于审查阶段。所需时间很大程度上取决于上游维护者的审查能力。如果您希望加速进程,帮助社区进行测试和审查将大有裨益。在这篇博客发表的时候,PHY 的补丁除了 DP 控制器系列外,已被拆分为 4 个独立的系列:

PATCHv15 用于 USBDP PHY 更改的第 1 部分

PATCHv15 用于 USBDP PHY 更改的第 2 部分

PATCHv16 用于新增的 Rockchip 专用 DWC3 胶水驱动程序

PATCHv16 用于 USBDP PHY 更改的第 3 部分

PATCHv11 系列用于准备 DP 控制器

相关文章

Collabora + Flipper:开启 RK3576Collabora + Flipper: Opening up the RK3576

Panfrost、Kraid、Tyr 等在 XDC 2026Panfrost, Kraid, Tyr, and more at XDC 2026

Embedded Week 在 Nice 回归!Embedded Week in Nice is back!

相关文章

Collabora + Flipper:开启 RK3576Collabora + Flipper: Opening up the RK3576

Panfrost、Kraid、Tyr 等在 XDC 2026Panfrost, Kraid, Tyr, and more at XDC 2026

Embedded Week 在 Nice 回归!Embedded Week in Nice is back!

搜索新闻室

最新新闻与活动

USB-C DisplayPort Alt Mode 在 Rockchip RK3588 和 RK3576 上,从 Flipper One 开始。

06/10/2026

看一下使 USB-C DisplayPort 替代模式在 RK3588/RK3576 上工作所涉及的 USB-PD、PHY、热插拔和 DRM 更改,以及……

布拉格的开源:一周的演讲、实操演示和社区活动!

02/10/2026

下周我们将在布拉格参加为期一周的开源活动!我们将在 Linux Plumbers 大会和 GStreamer 大会发表演讲,并展示……

法兰克福的 AMD 嵌入式计算峰会 2026

29/09/2026

我们将在此周四前往法兰克福参加 AMD 嵌入式计算峰会!观看我们的 AI 魔镜现场演示,实现无触控、实时……

从 Flipper One 开始,Rockchip RK3588 与 RK3576 支持 USB-C DisplayPort Alt Mode

本文来源:https://www.collabora.com/news-and-blog/news-and-events/usb-c-displayport-alt-mode-on-rockchip-rk3588-and-rk3576-starting-with-the-flipper-one.html
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One

USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One

Sebastian Reichel avatar

Sebastian Reichel
October 06, 2026

Share this post: USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One

Reading time:

Collabora Flipper Driving Screen Via USB-C

Earlier this year, we announced our partnership with Flipper to support their next device, the Flipper One. Today we're zooming in on one problem we've been tackling: making USB-C DisplayPort Alternate Mode work properly, so that a single USB-C port can drive a display.

See it live in Prague!

Heading to OSS + ELC EU 2026? Stop by the ELC Tech Showcase in a couple of days to see a live demo on the Flipper One. Then come back here for the details of how we got there!

USB Power Delivery

The secret sauce to get USB Alternate Modes working is the USB power delivery protocol (USB-PD). As the name implies it is used to negotiate the voltage and current as well as the direction of the power. But apart from that, the protocol is also used to identify and set up the so-called USB-C Alternate Modes. Using these modes means that some pins on the connector are used for non-USB functionality.

How do USB Alternate Modes work?

To explain USB-C Alternate modes it is necessary to have a good understanding of the USB-C connector.

Collabora - USB-C pinout

As you can see it has a total of 24 pins. Some functionality is intentionally assigned to multiple pins; for example, VBUS (voltage supply, red background) and GND (ground, black background) are on 4 pins in a mirrored setup. This way they always end up on the same position independent of the plug orientation. Having them multiple times is necessary anyway to allow the connector to carry enough current. Similarly, D+ and D- (green background) are available twice in the middle of the connector in a mirrored layout to always end up in the same position. Here only two pins are used and the other two are effectively ignored. These pins carry the USB2 signals and don't need special tricks to work (as long as the connector gets a proper physical connection).

For the RX and TX pins (yellow background), which carry USB3 and the Alternate Modes (AltMode), things work differently. They are not mirrored (which would result in half of the pins being unused). Instead the USB-C device is supposed to have the functionality of swapping them back to normal orientation with a switch circuit if the connector is plugged in the reverse direction. Obviously that means the device must be aware of the connector orientation in the first place. This is also figured out via the USB-PD protocol.

The USB-PD communication happens on one of the CC pins (blue background) with the other providing 5V even when VBUS carries a higher one. Last but not least the SBU pins are just for sideband and unused for simple USB. More on them later.

Now that the basic pinout of the USB-C connector is clear, the USB-PD protocol takes care of the following:

  • figure out the connector orientation
  • negotiate the data flow direction (which side is the host/gadget)
  • negotiate the power flow direction and configuration
  • negotiate the alternate and accessory modes

Once the AltMode negotiation is done by USB-PD, the hardware needs to multiplex the involved pins from the USB controller to the alternative function, e.g., DisplayPort (DP).

The Rockchip RK3588/RK3576 hardware setup

Collabora - Rockchip USB-C

The Rockchip SoCs allow implementing this quite complex setup relatively easy from a hardware perspective. They come with a Synopsys DesignWare SuperSpeed USB 3.0 Controller, which is handled by the DWC3 driver and also used by many other SoCs. They also have a Synopsys DesignWare DisplayPort controller. Like any modern controllers involving fast IO, they need a physical layer (PHY) to generate the correct electrical signals. Here both of these controllers share a combined PHY (from now on called USBDP), which provides options for relatively free multiplexing of 4 differential pairs to either of these controllers. This allows doing the orientation swap and the multiplexing discussed in the previous section without any external components.

The only external component needed is a USB-PD controller (probably not integrated by Rockchip due to voltage isolation requirements). Thus a complete USB-C setup on Rockchip typically looks like this:

  • USB-C's RX1, RX2, TX1, TX2 as well as SBU1 and SBU2 routed to USBDP
  • D- and D+ routed to USB2 PHY
  • CC1 and CC2 routed to an external USB-PD chip, e.g., fusb302
  • power routing is out of scope for this blog post

There are different types of USB-PD controllers. Basically they can be divided into self-contained ones, which are typically found in laptops. These have a firmware, which contains a big state machine and automatically handles the USB-PD communication.

The alternative, which is usually found on Rockchip boards, is chips that do not communicate on their own. These chips need to be explicitly told what to do. The kernel contains a huge state machine called TCPM (Type-C Port Manager) that takes care of negotiating power, data, and AltModes. This article focuses on this hardware setup.

USB-PD Software Support

Basically all of the software lives in the kernel, which needs to know the hardware topology. On Rockchip platforms this is sourced from the device tree. For a working setup, quite a few things are needed. First of all, the kernel needs to know about the USB-C controller, which has the USB-C connector as a subnode with links to the different controllers involved:

&i2c2
	typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <22>;
		/* ... */

		connector {
			compatible = "usb-c-connector";
			data-role = "dual"; /* USB data can go both directions */
			power-role = "dual"; /* can receive or provide power */
			try-power-role = "source"; /* prefer providing power */
			/* ... */

			/* AltModes support on this connector */
			altmodes {
				displayport {
					/*
					 * Standard or Vendor ID
					 * 0xff01 = DisplayPort
					 */
					svid = /bits/ 16 <0xff01>;
					/*
					 * Vendor Defined Message Data Object
					 * This provides extra information about the DP implementation,
					 * such as the direction (output only in this case) or the supported
					 * pin configurations
					 */
					vdo = <0x00001c46>;
				};
			};

			ports {
				/* ... */
				port@0 {
					/* this links to the destination of the USB2 pins (USB2 PHY/controller) */
				};
				port@1 {
					/* this links to the destination of the RX1/RX2/TX1/TX2 pins (USBDP) */
				};
				port@2 {
					/* this links to the destination of the SBU pins (USBDP) */
				};
			};
		};
	};
};

The USBDP PHY, on the other hand, is also described in DT and looks like this:

usbdp_phy {
	mode-switch;
	orientation-switch;
	/* ... */

	ports {
		/* ... */

		port@0 {
			/* outgoing differential lanes */
		};

		port@1 {
			/* incoming connection from USB3 controller */
		};

		port@2 {
			/* incoming connection from DP controller */
		};

		port@3 {
			/* outgoing connection for DP aux (SBU) */
		};
	};
};

TCPM - Step 1

Collabora - TCPM initial sequence

When a cable is connected to the board, the TCPM state machine gets going and tries to figure out how to handle it. The exact steps depend on the remote device, but will look similar to the diagram, which is from a Dell U2725QE. If anything goes wrong during this phase, USB-C AltModes will not be available. USB3 may or may not work depending on the exact problem. USB2 is independent and usually works. Issues can be debugged via a special log file available in debugfs. The exact path depends on the PD controller; in this example it can be found at /sys/kernel/debug/usb/tcpm-2-0022/log. Be aware that reading the file automatically clears it. At the end of this step, power and data roles have been negotiated. In other words, the following questions have been answered:

  • Which sides provide power?
  • Which voltage is being used?
  • What's the maximum current?
  • Which side is the USB host?

As you can see, it has nothing to do with AltModes, but this is a mandatory first step in the protocol.

TCPM - Step 2

Collabora - TCPM data role swap

After the initial setup took place, it is still possible to change things. For example the mentioned Dell display initially accepts any data role (DR) or power role (PR) and then asks for it to be swapped once the initial negotiation happened. This is also something that can be controlled from the Rockchip side, of course. For the first USB-C connector the control knob is /sys/class/typec/port0/data_role. The directory also contains other files possibly interesting for debugging problems.

TCPM - Step 3

Collabora - TCPM for DP Altmode

Once everything has settled, TCPM will try to figure out extra capabilities, which work by requesting SVIDs (Standard or Vendor IDs) via vendor-defined messages (VDM). For this a second state machine runs on top of the basic one. Each alternate mode supported by the remote side is registered and can be found in /sys/class/typec/port0/port0-partner/port0-partner.*. Commonly found SVIDs are 0x8087 (Thunderbolt) and 0xff01 (DisplayPort).

Entering the AltModes results in a matching kernel driver being probed, which handles some things. For DisplayPort it is typec_displayport and results in an extra subdirectory displayport, which contains a few files with extra information:

  • configuration - sink or source (Rockchip platform does not support DP input and thus source)
  • pin_assignment - DP AltMode supports different pin modes, e.g. "D" (2x USB3, 2x DP)
  • irq_hpd - hotplug detect interrupt (mostly relevant for DP multi-stream transport)
  • hpd - hotplug detect state (should be "1" for a connected display, could be "0" when e.g., a display is not connected to a USB-C -> DP adapter)

Switching into DP AltMode also results in TCPM informing the mode-switch about the change. In case of Rockchip this is the USBDP (see DT snippet above). So that will take the pin assignment information and route the pins correctly to the DP and USB3 controller.

Apart from that HPD is interesting: On a normal DisplayPort connector, HPD is a physical pin. But with the USB-C DP AltMode there are not enough pins. Thus the HPD information is provided via the PD protocol using VDMs.

The DisplayPort controller

Collabora - Rockchip Displayport HPD

The Rockchip DP controller has a multiplexer on its HPD line, which allows to select between the hardware pin (as mentioned this is not available on USB-C) or getting the HPD status from a register that can be set in software. Thus for USB-C the multiplexer must be configured to get HPD from this register and then the USB-PD messages with DP hotplug info must be stored into the register.

In the vendor kernel, the muxes are configured by USBDP. This works, but brings an interesting problem: If nothing is connected, the whole DP controller can turn itself off. But writing into the mux requires that the DP controller is powered as the registers are in the same power domain as the DP controller itself. This is solved by following the design Qualcomm and MediaTek already use: The USB-C controller sets itself as a DRM bridge, which forwards hotplug signals to the next bridge in the chain (USBDP), which does the same. This way the software events lands in the driver for the DP controller, which can power on the controller before configuring the mux.

Once the hotplug signal is there, the DP controller will try to establish a link. In this phase it will use the DP auxiliary channel (routed via USB-C's SBU pins) to do bi-directional communication with the display. At this point things are no longer USB-C specific and it is no different from a normal DP connection. If the DP AUX link test succeeded, /sys/class/drm/card1-DP-1/status will show "connected".

At this point the EDID data will also be queried from the display and the available modes should be available in /sys/class/drm/card1-DP-1/modes

Interesting side issues

While working on the patches to get all of this implemented, a few interesting problems turned up:

  1. Changing the mux configuration and/or powering parts of the PHY requires re-initializing the USBDP PHY, which breaks running connections. This is not a big deal when the mode changes, which usually means a device is (un)plugged and there is no running connection.

    But it means that the DP side of the USBDP PHY must be powered on if the current USB-C hardware negotiated it via USB-PD even when the software is currently not using it. Otherwise enabling the DP side later on would kill an active USB connection.

    For example the following scenario would be really bad without enabling the DP side ahead of time:

    Step 1: you connect a USB-C dock with USB and HDMI ports

    Step 2: you connect a disk to USB

    Step 3: you mount the disk and copy some files

    Step 4: you connect a display to the dock's HDMI port

    Resetting the USBDP PHY at this point to enable DP functionality would reset the USB connection and abort the ongoing data transfer. To avoid this it is necessary to enable DP when the dock is connected and before USB is actively being used.

  2. Apart from that, restarting the USBDP PHY while the DWC3 USB controller is already running may result in a bringup failure. This is specific to the Rockchip integration, but unfortunately there is no proper errata or TRM description for this behavior. After some trial-and-error cycles, it turned out that the PHY can be reliably restarted when the USB3 controller's interface is kept in reset state during the PHY reset.

  3. Some modes (i.e., resolutions at specific refresh rates) do not work properly. This is independent of this work and a problem with the video controller not being able to come up with a matching pixel clock. The further it diverts, the higher the chance of the display not accepting the incoming video stream. This problem is independent of USB-C and would also appear on boards using the DP controller with a native DP connector. It needs to be worked on separately.

When will this arrive in the mainline kernel?

You can check out the rockchip-devel branch in our git repository. It contains all the necessary bits for ArmSom's Sige 5.

All changes on the USB controller side have reached the mainline kernel. Changes for the USBDP PHY and the DRM side have been sent and are currently in the review phase. How long it takes depends a lot on the upstream maintainers' review capacity. If you want to speed things up, it helps tremendously to assist the community with testing and reviews. At the point of this blog post the patches for the PHY got split into 4 separate series in addition to the DP controller series:

Search the newsroom

Latest News & Events

USB-C DisplayPort Alt Mode on Rockchip RK3588 and RK3576, starting with the Flipper One

06/10/2026

A look at the USB-PD, PHY, hotplug, and DRM changes involved in making USB-C DisplayPort Alternate Mode work on RK3588/RK3576, and where…

Open Source in Prague: A week of talks, hands-on demos, and community!

02/10/2026

Next week we'll be in Prague for a packed Open Source week! We’ll speak at the Linux Plumbers Conference and GStreamer Conference, and present…

AMD Embedded Computing Summit 2026 in Frankfurt

29/09/2026

We’ll be in Frankfurt this Thursday for the AMD Embedded Computing Summit! See a live demo of our AI Magic Mirror for a touchless, real-time…

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry