From: Chaoyi Chen <kernel@airkyi•com>
To: "Andrzej Hajda" <andrzej.hajda@intel•com>,
"Neil Armstrong" <neil.armstrong@linaro•org>,
"Robert Foss" <rfoss@kernel•org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard•com>,
"Jonas Karlman" <jonas@kwiboo•se>,
"Jernej Skrabec" <jernej.skrabec@gmail•com>,
"Maarten Lankhorst" <maarten.lankhorst@linux•intel.com>,
"Maxime Ripard" <mripard@kernel•org>,
"Thomas Zimmermann" <tzimmermann@suse•de>,
"David Airlie" <airlied@gmail•com>,
"Simona Vetter" <simona@ffwll•ch>,
"Sandy Huang" <hjc@rock-chips•com>,
"Heiko Stübner" <heiko@sntech•de>,
"Andy Yan" <andy.yan@rock-chips•com>,
"Vinod Koul" <vkoul@kernel•org>
Cc: Heikki Krogerus <heikki.krogerus@linux•intel.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss•qualcomm.com>,
Luca Ceresoli <luca.ceresoli@bootlin•com>,
linux-kernel@vger•kernel.org, dri-devel@lists•freedesktop.org,
linux-arm-kernel@lists•infradead.org,
linux-rockchip@lists•infradead.org,
linux-phy@lists•infradead.org,
Chaoyi Chen <chaoyi.chen@rock-chips•com>
Subject: [PATCH 3/5] phy: rockchip: phy-rockchip-typec: Add DRM AUX bridge
Date: Thu, 21 May 2026 11:28:52 +0800 [thread overview]
Message-ID: <20260521032854.103-4-kernel@airkyi.com> (raw)
In-Reply-To: <20260521032854.103-1-kernel@airkyi.com>
From: Chaoyi Chen <chaoyi.chen@rock-chips•com>
Using the DRM_AUX_BRIDGE helper to create the transparent DRM bridge
device.
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips•com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro•org>
---
drivers/phy/rockchip/Kconfig | 2 ++
drivers/phy/rockchip/phy-rockchip-typec.c | 13 +++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/rockchip/Kconfig b/drivers/phy/rockchip/Kconfig
index 14698571b607..9173d3b4fef4 100644
--- a/drivers/phy/rockchip/Kconfig
+++ b/drivers/phy/rockchip/Kconfig
@@ -119,6 +119,8 @@ config PHY_ROCKCHIP_SNPS_PCIE3
config PHY_ROCKCHIP_TYPEC
tristate "Rockchip TYPEC PHY Driver"
depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST)
+ depends on DRM || DRM=n
+ select DRM_AUX_BRIDGE if DRM_BRIDGE
select EXTCON
select GENERIC_PHY
select RESET_CONTROLLER
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index d9701b6106d5..48070b50416e 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -54,6 +54,7 @@
#include <linux/mfd/syscon.h>
#include <linux/phy/phy.h>
+#include <drm/bridge/aux-bridge.h>
#define CMN_SSM_BANDGAP (0x21 << 2)
#define CMN_SSM_BIAS (0x22 << 2)
@@ -1162,16 +1163,24 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
for_each_available_child_of_node(np, child_np) {
struct phy *phy;
+ ret = 0;
- if (of_node_name_eq(child_np, "dp-port"))
+ if (of_node_name_eq(child_np, "dp-port")) {
phy = devm_phy_create(dev, child_np,
&rockchip_dp_phy_ops);
- else if (of_node_name_eq(child_np, "usb3-port"))
+ ret = drm_aux_bridge_register_from_node(dev, child_np);
+ } else if (of_node_name_eq(child_np, "usb3-port"))
phy = devm_phy_create(dev, child_np,
&rockchip_usb3_phy_ops);
else
continue;
+ if (ret) {
+ pm_runtime_disable(dev);
+ of_node_put(child_np);
+ return ret;
+ }
+
if (IS_ERR(phy)) {
dev_err(dev, "failed to create phy: %pOFn\n",
child_np);
--
2.53.0
next prev parent reply other threads:[~2026-05-21 3:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 3:28 [PATCH 0/5] drm/bridge: Implement generic USB Type-C DP HPD bridge Chaoyi Chen
2026-05-21 3:28 ` [PATCH 1/5] " Chaoyi Chen
2026-06-01 22:08 ` Sebastian Reichel
2026-06-02 1:28 ` Chaoyi Chen
2026-05-21 3:28 ` [PATCH 2/5] drm/bridge: aux: Add drm_aux_bridge_register_from_node() Chaoyi Chen
2026-06-01 22:27 ` Sebastian Reichel
2026-05-21 3:28 ` Chaoyi Chen [this message]
2026-05-21 9:06 ` [PATCH 3/5] phy: rockchip: phy-rockchip-typec: Add DRM AUX bridge Heiko Stuebner
2026-06-01 22:28 ` Sebastian Reichel
2026-05-21 3:28 ` [PATCH 4/5] drm/rockchip: cdn-dp: Support handle lane info without extcon Chaoyi Chen
2026-05-21 3:28 ` [PATCH 5/5] drm/rockchip: cdn-dp: Add multiple bridges to support PHY port selection Chaoyi Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260521032854.103-4-kernel@airkyi.com \
--to=kernel@airkyi$(echo .)com \
--cc=Laurent.pinchart@ideasonboard$(echo .)com \
--cc=airlied@gmail$(echo .)com \
--cc=andrzej.hajda@intel$(echo .)com \
--cc=andy.yan@rock-chips$(echo .)com \
--cc=chaoyi.chen@rock-chips$(echo .)com \
--cc=dmitry.baryshkov@oss$(echo .)qualcomm.com \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=heikki.krogerus@linux$(echo .)intel.com \
--cc=heiko@sntech$(echo .)de \
--cc=hjc@rock-chips$(echo .)com \
--cc=jernej.skrabec@gmail$(echo .)com \
--cc=jonas@kwiboo$(echo .)se \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-phy@lists$(echo .)infradead.org \
--cc=linux-rockchip@lists$(echo .)infradead.org \
--cc=luca.ceresoli@bootlin$(echo .)com \
--cc=maarten.lankhorst@linux$(echo .)intel.com \
--cc=mripard@kernel$(echo .)org \
--cc=neil.armstrong@linaro$(echo .)org \
--cc=rfoss@kernel$(echo .)org \
--cc=simona@ffwll$(echo .)ch \
--cc=tzimmermann@suse$(echo .)de \
--cc=vkoul@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox