From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19BCEC83F17 for ; Fri, 18 Jul 2025 06:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dD7S/9jrpbO7wi9evN/rU/qJwNhrCfMsWdgkxrLTbf4=; b=MvzzPYBrfnsYdy ajUjZwcixPAt0cuNPJ1Nnl5WXf3GjGA0ZvPXJCY+K03pcDL2wUaL//xNKyYT59EqA1qS2lFi5ZxvJ 51Qi49VkKCl7LGMeUBVSpSDDfTxc4+y/+Oba3/g8N3x7sXyBQLAmMVrTi9jqyIAaB5VYUBnozgZdQ eUO96hKobWxAHDYHjzeTNf1QUbErn+fJvWflnfeExL+6GPQ7VojQ+K0kNu19vaO0rI8e8GLHGnG6y tWCpGDBuPnmUBfG44Vf6cz9OdiqPHfPaSN11XlYo3wO8soSy+enC8W0dShZrfcs65k+Se9LVkS+NZ Qxk4MadtFFeoxEBXGeQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ucege-0000000Bmc2-3UhQ; Fri, 18 Jul 2025 06:35:16 +0000 Received: from smtpbg154.qq.com ([15.184.224.54]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uceZL-0000000Blk5-05DK; Fri, 18 Jul 2025 06:27:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=airkyi.com; s=altu2504; t=1752819995; bh=67zBKAFFwPEqpjYU6DUQenOYYuvrA+r8ErnMRmV64A0=; h=From:To:Subject:Date:Message-Id; b=Zik/9s7G/mB+ZJRyzq0gd1LAQlJ/GxR3TNUCml4tWdsq6A62IAieqoMlUk9NWoZJ+ pDgrar2vx+ZqparqxSVspR0RJ2TvNY5XQzLdPleGKoBP/xk29oRLG0g3kY3DZknah9 bpXf75JTd9YKfCmtOSTVsh6gJZTEFhFMJg4NKEkc= X-QQ-mid: zesmtpgz7t1752819986td7cbe615 X-QQ-Originating-IP: r5wfY5yuY9UU3ArV/GPId12LkrXTc5e4liuG9amroX4= Received: from DESKTOP-8BT1A2O.localdomain ( [58.22.7.114]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 18 Jul 2025 14:26:23 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13786534937215164042 From: Chaoyi Chen To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Sandy Huang , Andy Yan , Yubing Zhang , Frank Wang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Amit Sunil Dhamne , Greg Kroah-Hartman , Chaoyi Chen , Dragan Simic , Johan Jonker , Diederik de Haas , Dmitry Baryshkov Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 0/5] Add Type-C DP support for RK3399 EVB IND board Date: Fri, 18 Jul 2025 14:26:14 +0800 Message-Id: <20250718062619.99-1-kernel@airkyi.com> X-Mailer: git-send-email 2.17.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h a3L6Kz95X9ntNqHNj5G73g1qh4FVUf9jEsc4AZlmjaZd7WNROxoSHQy8x X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= X-QQ-RECHKSPAM: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250717_232743_698361_37280AEE X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Chaoyi Chen The RK3399 has two USB/DP combo PHY and one CDN-DP controller. And the CDN-DP can be switched to output to one of the PHYs. For USB Type-C interfaces, an external chip assists the PHY in handling altmode switching and orientation switching. Their connection diagram is shown below: external Type-C Chip0 ---> USB/DP PHY0 ---+ | <----> CDN-DP controller external Type-C Chip1 ---> USB/DP PHY1 ---+ The RK3399 EVB IND board has a Type-C interface DisplayPort. It use fusb302 chip as Type-C controller. The connection diagram is shown below: fusb302 chip ---> USB/DP PHY0 <----> CDN-DP controller This series focuses on adding TCPM support for USBDP PHY and DP driver. Before this, the USBDP PHY and DP controller of RK3399 sensed state changes through extcon, and devices such as the RK3399 Gru-Chromebook rely on them. This series should not break them. BTW, one of the important things to do is to implement extcon-like notifications. I found include/drm/bridge/aux-bridge.h , but if the aux-bridge is used, the bridge chain would look like this: PHY0 aux-bridge ---+ | ----> CDN-DP bridge PHY1 aux-bridge ---+ Oh, CDN-DP bridge has two previous aux-bridge! Now, I try to use drm_connector_oob_hotplug_event() to notify HPD state between PHY and CDN-DP controller. Patch1 add new Type-C mode switch for RK3399 USBDP phy binding. Patch2 add typec_mux and typec_switch for RK3399 USBDP PHY. Patch3 drops CDN-DP's extcon dependency when Type-C is present. Patch4 add missing dp_out port for RK3399 CDN-DP. Patch5 add Type-C DP support for RK3399 EVB IND board. Changes in v2: - Link to V1: https://lore.kernel.org/all/20250715112456.101-1-kernel@airkyi.com/ - Reuse dp-port/usb3-port in rk3399-typec-phy binding. - Fix compile error when CONFIG_TYPEC is not enabled. - Notify DP HPD state by USB/DP PHY. - Ignore duplicate HPD events. - Add endpoint to link DP PHY and DP controller. - Fix devicetree coding style. Chaoyi Chen (5): dt-bindings: phy: rockchip: rk3399-typec-phy: Support mode-switch phy: rockchip: phy-rockchip-typec: Add typec_mux/typec_switch support drm/rockchip: cdn-dp: Support handle lane info and HPD without extcon arm64: dts: rockchip: Add missing dp_out port for RK3399 CDN-DP arm64: dts: rockchip: rk3399-evb-ind: Add support for DisplayPort .../phy/rockchip,rk3399-typec-phy.yaml | 4 + arch/arm64/boot/dts/rockchip/rk3399-base.dtsi | 12 +- .../boot/dts/rockchip/rk3399-evb-ind.dts | 133 ++++++ drivers/gpu/drm/rockchip/cdn-dp-core.c | 37 +- drivers/phy/rockchip/phy-rockchip-typec.c | 403 +++++++++++++++++- 5 files changed, 564 insertions(+), 25 deletions(-) -- 2.49.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy