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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 12ADAEB7EAC for ; Wed, 4 Mar 2026 09:51:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7613510E996; Wed, 4 Mar 2026 09:51:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=airkyi.com header.i=@airkyi.com header.b="KcNmD65u"; dkim-atps=neutral X-Greylist: delayed 501 seconds by postgrey-1.36 at gabe; Wed, 04 Mar 2026 09:51:48 UTC Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.74.132]) by gabe.freedesktop.org (Postfix) with ESMTPS id 712AC10E996 for ; Wed, 4 Mar 2026 09:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=airkyi.com; s=altu2504; t=1772617902; bh=Js8LohQ5FKnKhCP/1X+pjHvtWvmL3//jFEdtasdSj/c=; h=From:To:Subject:Date:Message-Id; b=KcNmD65uWfaBhSC1qEnrT4YCJSeyIWdRY3dH18gcIwTIm0DvrOqmJRGzNLvO6NqdV Me6Xra6P2Z0rWi30Xn/B3Hyu83XH9LXI22vA79mQlyWdXyxybV5fbcPtR3WVvCuEQn i79p01otBWbsnVSysO9QampkclJ4hJhvNk9Q2o1U= X-QQ-mid: esmtpsz11t1772617346t06159e3c X-QQ-Originating-IP: nbNoMgw+sJlbtFbTwzXrCmqsHBTzGYwt94vd+Sw6pgk= Received: from DESKTOP-8BT1A2O.localdomain ( [58.22.7.114]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 04 Mar 2026 17:42:19 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 5088075739087231184 From: Chaoyi Chen To: Heikki Krogerus , Greg Kroah-Hartman , Dmitry Baryshkov , Peter Chen , Luca Ceresoli , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Sandy Huang , Andy Yan , Yubing Zhang , Frank Wang , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Amit Sunil Dhamne , Dragan Simic , Johan Jonker , Diederik de Haas , Peter Robinson , Hugh Cole-Baker Cc: linux-usb@vger.kernel.org, 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, Chaoyi Chen Subject: [PATCH v15 3/9] dt-bindings: phy: rockchip: rk3399-typec-phy: Support mode-switch Date: Wed, 4 Mar 2026 17:41:46 +0800 Message-Id: <20260304094152.92-4-kernel@airkyi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260304094152.92-1-kernel@airkyi.com> References: <20260304094152.92-1-kernel@airkyi.com> X-QQ-SENDSIZE: 520 Feedback-ID: esmtpsz:airkyi.com:qybglogicsvrgz:qybglogicsvrgz6b-0 X-QQ-XMAILINFO: NMuAyYK0STFJhJgnwMokaUK4cPitEEj53Z3XQDMvzV+hxjLqS7gJhyQP 6RO7VMD0QVLLbaALhOqohcbQS7rcOTc5QnOMdqhZ5hwikqt3XlmzNX5zIDhNFMhj1QVEi0N ahQsUc5jsngi9IGZ18GerALMHhYEsEuNzfCAZFHTTZiXSeEon1pLVfgzzjr6pec6QVluDjf lMAkFp4WUOnHdVogoHi0DEyszJImIUUQsXA06dbRxAfWD71D1l1hFIvhSfVRqJljmU1jEwI ti72istEEeTUrAR5Zcjmrq+ZQ9QEVV88lsHa9/L+9vXNlA2eVh9CXDlUnnj9ZTrtr8NlTSC jeA5izOr5Y96ijE5brA8QvJ/kg5XRCSyoqUI2+SdIHLhCzQstv22DLq5vtPFomOtwPCqKWJ WfcwoZVWISd+UAEcoo/o93eLT44kk1GrK6PmaFBbmEjmEq+zghlLCby3/JZTagPxnZdxvar 4hFeNUJXGK6vnXyOiXWv4jvtfkwY+5AwI4ia5X/bU1qu3FZ1MyWWYEUy+S0gKtX+hZQYQGh 9HhhcuTpLMn9OvZfZe7JQVU4PGIBUZUvXX/dLpurJdiTDNHeICIAVgkiAY5iNx2b9NPfbV5 jqhm3iNR4xUc9sMW3OzPSpFsQvypX9fOcL/A/VtMJeo9LR8dHqHwg+4qjaiG9d51bPm9TIB 2zBp+9lzqGZjgaCxQ2EXQCyVvX522aimxUyk9+PVWd060o1rs0/go9PHW7qfbtFkqRu4so6 bSKnSLCkqxwn1Q2FOMVM5JrmYbTyvkfQJ9Elpg6AGppOL0GtrmffNteEC8GHiiCYZFogQNA YHGc7i72bFGLc5fl6G0EADjQgWgrWkwbcFkauWR2zrvqJCTo5srYdVP4I2HLRVJ+m2f1j6L oYyHFYfIbdJIQL3eABZwzSwDuEcBrr16tYwt3QJyjX7wjF2b5jG9NQ6sXWF0k+zspU/HrpZ 9QSKeJGZ8UOYfHCcuEShL69v1e5lYntRnPUP+7t9AubCZmhyejiLDuZkniynn7Fkj6Vlz9a vbwMuLzL73SNcxGn/0OjGxyfEc/24= X-QQ-XMRINFO: NyFYKkN4Ny6FuXrnB5Ye7Aabb3ujjtK+gg== X-QQ-RECHKSPAM: 0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chaoyi Chen The RK3399 SoC integrates two USB/DP combo PHYs, each of which supports software-configurable pin mapping and DisplayPort lane assignment. These capabilities enable the PHY itself to handle both mode switching and orientation switching, based on the Type-C plug orientation and USB PD negotiation results. While an external Type-C controller is still required to detect cable attachment and report USB PD events, the actual mode and orientation switching is performed internally by the PHY through software configuration. This allows the PHY to act as a Type-C multiplexer for both data role and DP altmode configuration. To reflect this hardware design, this patch introduces a new "mode-switch" property for the dp-port node in the device tree bindings. This property indicates that the connected PHY is capable of handling Type-C mode switching itself. Signed-off-by: Chaoyi Chen Acked-by: Krzysztof Kozlowski --- (no changes since v5) Changes in v4: - Remove "|" in description. Changes in v3: - Add more descriptions to clarify the role of the PHY in switching. Changes in v2: - Reuse dp-port/usb3-port in rk3399-typec-phy binding. --- .../devicetree/bindings/phy/rockchip,rk3399-typec-phy.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/rockchip,rk3399-typec-phy.yaml b/Documentation/devicetree/bindings/phy/rockchip,rk3399-typec-phy.yaml index 91c011f68cd0..83ebcde096ea 100644 --- a/Documentation/devicetree/bindings/phy/rockchip,rk3399-typec-phy.yaml +++ b/Documentation/devicetree/bindings/phy/rockchip,rk3399-typec-phy.yaml @@ -51,6 +51,12 @@ properties: '#phy-cells': const: 0 + mode-switch: + description: + Indicates the PHY can handle altmode switching. In this case, + requires an external USB Type-C controller to report USB PD message. + type: boolean + port: $ref: /schemas/graph.yaml#/properties/port description: Connection to USB Type-C connector -- 2.51.1