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 B4E70CCA464 for ; Fri, 16 Oct 2026 08:56:59 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E4TUIOfzj2a4cwhuW/11E1wpHnMLWwupEr8JlyCfwxk=; b=G2/Os8lTuHK7yl w+3XNm4QnYON1imlScOlwHjMqKxSZmnZpGRIdMCzONoLwbiy2ViKcA3zp0zReHuLlKoUCokP3xIi0 uqETuDbmPMcIQNb4tv/n3aBGluggNr/lxZI60QEz4D1v+Nw/FZraWxmCMgWMgI9DGUxGi+DWYpNZI ewOXASTgLhWTUuSVbklCdjLX4udpps9JbQejNJVCOYhpJ1bPdbQL/+LSpTrnozdlr/agLRNS3fYtb QS4aN39gnQR5IDR3i+xBQVrcK6Fa++oj44ilXq03POHDLUjRpw3IHH6Q8C4e0XtScRjFjhKRsh1eh Bt18F3969YvsAL5+vUwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHdkJ-00000002OAH-1g5f; Fri, 16 Oct 2026 08:56:59 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHdkG-00000002O6z-18CJ for linux-phy@lists.infradead.org; Fri, 16 Oct 2026 08:56:58 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2df8e3c664cso5255815ad.3 for ; Fri, 16 Oct 2026 01:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792141015; x=1792745815; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=kesv9qN8nrGzZVbX54cBziZiJOOAdgVVNlzTkbG5JQ4tiMhUS5FYakMAX364ETAr9I iFvZq16ES6f5FPXmuw7WIsoIi/wpkOeCzY1YVZ9xo7iLONw3K1BSEsfQga6HQKfCAC5I 6NQ1VBtGbb4SR36Msy3lh6leTYLFREuFoWLg+GdnP+jHduYvEtun27EzlXZ4n3MnPunh T193nFAlW0yPYLREdSDpp6qOlQJwM7SzSBvr1DPoT2neBk4W3iDAMh/w7piVJtECZC6b +4Dmp3TwXNIeQc+SHJJ6iGe922nG+IHUHFr5l8L3LVk53fxyd+p6ATcb8DZ4TJVFFzWe 0peA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792141015; x=1792745815; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=sOnxi4aIXDcGU48ueXqM7UjJHB9/9qqG3YnKBTeGZo0ZOCR1trZ4aaub0QK17MNMQj v6MT1EBdeNPKNpoyH0Z81G7PwwNVpLI/wognaaNN7nWP/90rNUxs3qR2jgRP6AJbGh90 mEpZ16Gz3QBhU5nPizSg7vrbvECMaU/bPFwpo7CJvD4KLHr7wxIlD0j+0yOa/3rFJKtq TjIkVQWThPZtpX311p6+6RJTNgL1TPHW86Hl6LvPBt034FY9Qin9cT9GKS074UN+Y9uP +YMt9ZwiujPpDX/T8Vf2fPsbccL+1whZAsnB7kz3WBeaiTeHyS+Wi5/ATftZBqEgXr1c j7nQ== X-Forwarded-Encrypted: i=1; AKwUvBxZDcxwxOW9qY6UWXHmeu8MA6BdTxv7aMReHN3oDU+lAdAoKHSc5lB+bzWCsdWDUWZwHg87cE9em7Q=@lists.infradead.org X-Gm-Message-State: AFq9FYKprGYwOAS1bWdH0PKbxnw3kksZLIqewlnQL1SDaZHP3P/U4RFd aKpSzT3yfvhYrNeYMPDgA7+LkvHvtvigU3iPmG6xPHLF+HSP+dzu3wZ0 X-Gm-Gg: AYBFou3qNGsrOvBd6S32dTc81kOM6MOzBXVp/p29KOAoxErlATxElbHOtfywXnY23fJ sK0BL5KduFPw7/C1wtvvcz26Hs7m5GFR3tmlxWjzAUy7ephejgW0kWi107qnfhqLEgsep/4saxW 7c4UXl2Cu5mGoaazgtDAjVACmQBUQddvU2M6qF3lAsmqqIA0p4z5Bi0eAUF+/BqfJrs422mao5d wttyqU5t68gf2fr+cKzNVrIh90myi7IWJWkpIpCouvRLlaDSGA6AXmv92BfY5GAgjoDNKdcEJ4R N0Snhi1g4uMq7nAZeDtcOer6AAv/8UNEq7cLD6x+baA0eGGy2KjGJrhjLLYWFfczWPX0cJw9rls YJvuORqbZY6J14TRnSpg4ry171RcUfImrrEhYhFLNv1dSap42paRycSEfAFWY+FFqQ809dxcake lZmrnGAr+++W7FHbgw8NbjT7BPz6ichYHwjNgUmC/HhyUfCn296eF7gfSW/WJD0wRxhjlH7/3t4 1rZCBk7ulRB+UGmbReph1Jup94v3p0= X-Received: by 2002:a17:902:cf0b:b0:2e9:6788:937d with SMTP id d9443c01a7336-2e967889666mr61137945ad.4.1792141014917; Fri, 16 Oct 2026 01:56:54 -0700 (PDT) Received: from [127.0.1.1] (211-23-39-77.hinet-ip.hinet.net. [211.23.39.77]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e97e882a20sm6971025ad.62.2026.10.16.01.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2026 01:56:54 -0700 (PDT) From: Jason Yang Date: Fri, 16 Oct 2026 16:56:36 +0800 Subject: [PATCH v5 2/8] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Add a cell to select TX or RX MIME-Version: 1.0 Message-Id: <20261016-dcphy-rx-v1-v5-2-e63b49eabe2d@gmail.com> References: <20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com> In-Reply-To: <20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com> To: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Guochun Huang , Philipp Zabel Cc: Michael Riesch , Sebastian Reichel , Bryan O'Donoghue , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jason Yang X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1792141002; l=2767; i=jason98166@gmail.com; s=20260721; h=from:subject:message-id; bh=ce8JdNOJs5zvcQeCguszU9j59LCLfLXe7OkJrHqM/YE=; b=xGmXf0uJmuCFnGX4LXl2EMMZ1WvsxT2sntwv+hZwzx8NB5XgYmF4wB3TO71KHkIhWamdIBqA9 3a8QSp0sv7LDJnLqs4+VROT8Z2H8vmMinUmvM0gz379mPKwncWtik5A X-Developer-Key: i=jason98166@gmail.com; a=ed25519; pk=xQmD001Q/ooHl39PxyQtusbUQmgbOsSfpFryRVWZ/k4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261016_015656_332610_CA620FF1 X-CRM114-Status: GOOD ( 12.78 ) 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: , 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 The Samsung MIPI D-/C-PHY block on RK3588 and RK3576 has a transmitter for DSI and a receiver for CSI-2, and two consumers can use them at the same time. The single cell of this binding selects the mode and refers to the transmitter, so the receiver cannot be described. Allow a second cell that selects the transmitter or the receiver. With D-PHY: /* the MIPI DSI host, driving the transmitter */ phys = <&mipidcphy0 PHY_TYPE_DPHY PHY_DIRECTION_TX>; /* the MIPI CSI-2 host, driving the receiver */ phys = <&mipidcphy0 PHY_TYPE_DPHY PHY_DIRECTION_RX>; and with C-PHY: phys = <&mipidcphy0 PHY_TYPE_CPHY PHY_DIRECTION_TX>; phys = <&mipidcphy0 PHY_TYPE_CPHY PHY_DIRECTION_RX>; The transmitter and the receiver cannot operate in different modes [1], so the first cell must match in both consumers. Two cells describe the receiver as well. A single cell keeps referring to the transmitter, so existing device trees are unaffected. [1] RK3588 TRM: section 22.1 (overview): "The TX and RX only support operate in the same PHY mode." Signed-off-by: Jason Yang --- .../bindings/phy/rockchip,rk3588-mipi-dcphy.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml index c8ff5ba22a86..6e8cc56e4986 100644 --- a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml +++ b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml @@ -20,11 +20,25 @@ properties: maxItems: 1 "#phy-cells": - const: 1 + enum: [1, 2] description: | - Argument is mode to operate in. Supported modes are: + The first cell selects the mode to operate in: - PHY_TYPE_DPHY - PHY_TYPE_CPHY + + A single cell refers to the transmitter and is kept for existing + device trees. + + The second cell selects the transmitter or the receiver, so that a + MIPI DSI host and a MIPI CSI-2 host can be described as independent + consumers of the same PHY node: + - PHY_DIRECTION_TX + - PHY_DIRECTION_RX + + The transmitter and the receiver cannot operate in different modes, + so when both are described, the first cell must match in both + consumers. + See include/dt-bindings/phy/phy.h for constants. clocks: @@ -82,6 +96,6 @@ examples: <&cru SRST_S_MIPI_DCPHY0>; reset-names = "m_phy", "apb", "grf", "s_phy"; rockchip,grf = <&mipidcphy0_grf>; - #phy-cells = <1>; + #phy-cells = <2>; }; }; -- 2.43.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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 8CF9ACCA48B for ; Fri, 16 Oct 2026 08:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=EC9X81bdE/c5N/SKGRaF/DV4DW a/K/HqmjwUPZgJ6YKrATcGw0ZKlWgttvKlQWwRKuRwxAyUlM7CMg/Jnv/UD0zbgC3gcEFAsWJyE0H U4eeH+JbrbSNNpMorwyew2AETU6PSqV6NooajD0cn1npUqNqm5Pe2Mg9gmehZksB6rXH36P2dE2cu 1XHIV8KPwa5KZgoXx3tEso5U/wFs9AyvGwTYB+y5YViwr65Ia2tw0BoJNrxbjI4/L46RHKZNl4YPk KfG39QeUTBHhka18P4UvR+ef0JQ2bszfwW01OjPDkle800wtk4CsqKgDbQGq/OW7LDptxEcAT5LrW 7uuu0vSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHdkJ-00000002OA7-1IsC; Fri, 16 Oct 2026 08:56:59 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHdkG-00000002O6y-0nxU for linux-arm-kernel@lists.infradead.org; Fri, 16 Oct 2026 08:56:57 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2df9c3719f6so4754935ad.2 for ; Fri, 16 Oct 2026 01:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792141015; x=1792745815; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=kesv9qN8nrGzZVbX54cBziZiJOOAdgVVNlzTkbG5JQ4tiMhUS5FYakMAX364ETAr9I iFvZq16ES6f5FPXmuw7WIsoIi/wpkOeCzY1YVZ9xo7iLONw3K1BSEsfQga6HQKfCAC5I 6NQ1VBtGbb4SR36Msy3lh6leTYLFREuFoWLg+GdnP+jHduYvEtun27EzlXZ4n3MnPunh T193nFAlW0yPYLREdSDpp6qOlQJwM7SzSBvr1DPoT2neBk4W3iDAMh/w7piVJtECZC6b +4Dmp3TwXNIeQc+SHJJ6iGe922nG+IHUHFr5l8L3LVk53fxyd+p6ATcb8DZ4TJVFFzWe 0peA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792141015; x=1792745815; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=wMg0RXLjdG3ROCuQIMYG+ZD36dqxcx9wv3vI4dHHkMItOx9QXAV+IIKpTANfegHrBo 7OEUYBaX80kOuDUX+yyNpvvn52saWKJne6tpUk50znWXxCQaSOyqkGY9+LDdeHt4XbLQ SLI4/DG+T4FB6/JYphl7j3SBGkyhUgqJLNLp37tk7kenb6kvz2IHiI8oEp9OVZ336M7B /9YqokCWnx8DJx4MBZMOdIps7QgKnbgEbHABKIPja2R26rjBouz/Vl5QSAQ/INYu3NkK YP3Le9S1gkC6d4WSev2c06jV9pl2pZGknh2bDJ1bDpnbuGF1O1zWmnsq6FG43YNr5efX gm3A== X-Forwarded-Encrypted: i=1; AKwUvBz5SN3tQ5/HrdxyhkAEbQWujkEizuO/QSpjoP6cTooQBP9uQlUmgPvRKv4yVbdKMCQlq/B0d4HbQ1ofm9w1jdYz@lists.infradead.org X-Gm-Message-State: AFq9FYJaCakC0YtBKjQADLp5vU19wl5//9b/K4w20JpRj4gyj/XySNg3 PTF19BDaCCAT0+XqzMC6HIcv7zdnVaAVyRVuVB2j1oye442dO3IlT/8m X-Gm-Gg: AYBFou16MbGMhwCyHs5oFL7FXPIvLSSbDy0M7WHaxaS6RHshnHivcHS/EJExLIYiYtd 9/xaKvxYD+u/CC0YgS7hZFna4jUP3LMao70Lw0AuLbaffCyIzeZPbRZGipRB7boHqAaAigxWSGV n5Up4aUGs60YQRf/OkpzlFlvJhbGej8UYFvdWQLpLt9EDe15OeadY21K4YSTxh6Ld7j8ibwbNoR YnxOMX5mDArzjxjwyB7WIXYEHB3RKHuExtqoTCAUuZEeQj4Vu4Hu9D1r9+iTVNmaYXgwCVT2EHc uivb+J76rQQbbmLNvOBspNtTf0Wv/s1I477jRdYfN3WOG25bgcpdfYlRT9aDqulCHQkbpOOpNk7 UKy5SJPc0O2e0N12VIyM6NlIUDx0PDZMXly+mX/EsL7zC9Bf7rkiTIivcq/83DTTlGXo7YERCRv y3f9jbO1eTJtE6iwXH/qmCxiebvMENqfLoQnwagqoP/UF8Ji8VMeHeXk6/wpj8vCbEaG12lICYc w2Gq15/QeuSvjJhLA+pHM096qPus4o= X-Received: by 2002:a17:902:cf0b:b0:2e9:6788:937d with SMTP id d9443c01a7336-2e967889666mr61137945ad.4.1792141014917; Fri, 16 Oct 2026 01:56:54 -0700 (PDT) Received: from [127.0.1.1] (211-23-39-77.hinet-ip.hinet.net. [211.23.39.77]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e97e882a20sm6971025ad.62.2026.10.16.01.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2026 01:56:54 -0700 (PDT) From: Jason Yang Date: Fri, 16 Oct 2026 16:56:36 +0800 Subject: [PATCH v5 2/8] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Add a cell to select TX or RX MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261016-dcphy-rx-v1-v5-2-e63b49eabe2d@gmail.com> References: <20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com> In-Reply-To: <20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com> To: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Guochun Huang , Philipp Zabel Cc: Michael Riesch , Sebastian Reichel , Bryan O'Donoghue , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jason Yang X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1792141002; l=2767; i=jason98166@gmail.com; s=20260721; h=from:subject:message-id; bh=ce8JdNOJs5zvcQeCguszU9j59LCLfLXe7OkJrHqM/YE=; b=xGmXf0uJmuCFnGX4LXl2EMMZ1WvsxT2sntwv+hZwzx8NB5XgYmF4wB3TO71KHkIhWamdIBqA9 3a8QSp0sv7LDJnLqs4+VROT8Z2H8vmMinUmvM0gz379mPKwncWtik5A X-Developer-Key: i=jason98166@gmail.com; a=ed25519; pk=xQmD001Q/ooHl39PxyQtusbUQmgbOsSfpFryRVWZ/k4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261016_015656_251627_98420EFA X-CRM114-Status: GOOD ( 14.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Samsung MIPI D-/C-PHY block on RK3588 and RK3576 has a transmitter for DSI and a receiver for CSI-2, and two consumers can use them at the same time. The single cell of this binding selects the mode and refers to the transmitter, so the receiver cannot be described. Allow a second cell that selects the transmitter or the receiver. With D-PHY: /* the MIPI DSI host, driving the transmitter */ phys = <&mipidcphy0 PHY_TYPE_DPHY PHY_DIRECTION_TX>; /* the MIPI CSI-2 host, driving the receiver */ phys = <&mipidcphy0 PHY_TYPE_DPHY PHY_DIRECTION_RX>; and with C-PHY: phys = <&mipidcphy0 PHY_TYPE_CPHY PHY_DIRECTION_TX>; phys = <&mipidcphy0 PHY_TYPE_CPHY PHY_DIRECTION_RX>; The transmitter and the receiver cannot operate in different modes [1], so the first cell must match in both consumers. Two cells describe the receiver as well. A single cell keeps referring to the transmitter, so existing device trees are unaffected. [1] RK3588 TRM: section 22.1 (overview): "The TX and RX only support operate in the same PHY mode." Signed-off-by: Jason Yang --- .../bindings/phy/rockchip,rk3588-mipi-dcphy.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml index c8ff5ba22a86..6e8cc56e4986 100644 --- a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml +++ b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml @@ -20,11 +20,25 @@ properties: maxItems: 1 "#phy-cells": - const: 1 + enum: [1, 2] description: | - Argument is mode to operate in. Supported modes are: + The first cell selects the mode to operate in: - PHY_TYPE_DPHY - PHY_TYPE_CPHY + + A single cell refers to the transmitter and is kept for existing + device trees. + + The second cell selects the transmitter or the receiver, so that a + MIPI DSI host and a MIPI CSI-2 host can be described as independent + consumers of the same PHY node: + - PHY_DIRECTION_TX + - PHY_DIRECTION_RX + + The transmitter and the receiver cannot operate in different modes, + so when both are described, the first cell must match in both + consumers. + See include/dt-bindings/phy/phy.h for constants. clocks: @@ -82,6 +96,6 @@ examples: <&cru SRST_S_MIPI_DCPHY0>; reset-names = "m_phy", "apb", "grf", "s_phy"; rockchip,grf = <&mipidcphy0_grf>; - #phy-cells = <1>; + #phy-cells = <2>; }; }; -- 2.43.0 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 916FBCCA462 for ; Fri, 16 Oct 2026 08:57:12 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fucXbAsPNUBtF1TMcdmgXifxNPw6RteQb2/9ZDA6YRA=; b=ZnmcSRRsC55OxZ QP1x7uGO+T6b1c7thy8tGOe2ClM35Fa33JTKKnSeyTSqyAnicTZJ8aDg2Q1fWpMx92hNaGTejTM6w hh9Prjksjf6f1jVhzM0CB3SFhGK4NgxZhCbitxw81l2qbfAoH0sLYQ9EeGX6IDrTs+Z2ag7WR1fzf JjpdAooyFDKD0wgvARO4E4jLbln4q9lEi3xlOjcN+Xnkhlw9vQKVfW9NX6DGxpNt4qWxcz1yO0mpk NyFNDU6KoJzF7WKJ3VidnSvSADDUoml1lBaasApDZJXP+DqFFkeWMfJntjo/+PbJZ5M/HQiTO2AeS G4udroew+UWvxwmCTkAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHdkK-00000002OCP-2V5w; Fri, 16 Oct 2026 08:57:00 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHdkG-00000002O70-18yN for linux-rockchip@lists.infradead.org; Fri, 16 Oct 2026 08:56:58 +0000 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2dd4b3c311fso5485865ad.1 for ; Fri, 16 Oct 2026 01:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792141015; x=1792745815; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=kesv9qN8nrGzZVbX54cBziZiJOOAdgVVNlzTkbG5JQ4tiMhUS5FYakMAX364ETAr9I iFvZq16ES6f5FPXmuw7WIsoIi/wpkOeCzY1YVZ9xo7iLONw3K1BSEsfQga6HQKfCAC5I 6NQ1VBtGbb4SR36Msy3lh6leTYLFREuFoWLg+GdnP+jHduYvEtun27EzlXZ4n3MnPunh T193nFAlW0yPYLREdSDpp6qOlQJwM7SzSBvr1DPoT2neBk4W3iDAMh/w7piVJtECZC6b +4Dmp3TwXNIeQc+SHJJ6iGe922nG+IHUHFr5l8L3LVk53fxyd+p6ATcb8DZ4TJVFFzWe 0peA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792141015; x=1792745815; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VtLGyN+PdzUpUTcE98Aumqo/hwiyHlck/gS/TT4kqGo=; b=oxok6/xQkOn5Tvkd3Txcuosibv0oKRnqtKiqfzgB6ja9JhSeI89SRpnojNM7UcT97/ BpHJxhftGkhhULSbycmg2cgkzbsYuFN6Om3hwV5DQfWYYvvjUUQewnT9tCCO05Xgl7vs EvfqFM+xtRs7BtrfyMZjBsHUEiUz8iP6aCsq2+jv/xaPOkQly9Fq2U/6wzhrkyJz7veg oOxbdabXGl641HC4TOn7N1v2g5JkwKbHuvb2rQRbTDJe8x2d7PdAfrfN29Q/vBrusG17 S+IgC+T2sdIx45/7vJUBspuZxJOFqJ0WmBAVcPR8dyoTeIy31Cq1D01Im7akscDT6dMj UV9w== X-Forwarded-Encrypted: i=1; AKwUvBznO9EDiuZ0KCEKJnzh8I80dXv9uJC0PjvLEAx7X7VRGb6+2SVUdmUgHV9ilMyZPaANGQjVIk0ih8FD7tAdEA==@lists.infradead.org X-Gm-Message-State: AFq9FYLx9LNEGFAMjbAvAZKux6B8GsglcC2C7fj6msmxtbwh3RN4juh0 hZzFqOvwziq7aI2Ow/mKXP5Rk3bBo5IXUsS7+pxdHgnv3+4rJ//ubMs0 X-Gm-Gg: AYBFou2MolhzPm/T39DFr3Q7MyAKDpRqLNWpqfSi6uB+9KoTgr6RuHJeR6WverPZBg3 p5vpZWNOisQ8dW0zsJnDhjyXjSGx4zbfN4ikHYhaWo1WiLCJo3gs3bzvkmYFjat7Gy/UpGyWXjW GZsJKb8LjTGXFOHknXxqWsp8SqN/gUJ3j4OlemHjY1iS9Iuly/qLiQB95wLnOZrc9YDSDxa+pyW BZf5lblRB0/mIWLvPJG2U3kP1d8GKzzXSVlkNJFOFARQ0HvAJzPx0/NyQj77HMA5Y8xhqzWjREA /QvXvYX+9qqJiwpfMIQ9iU937SBUaLOoah3I37ofc1xS7aB+aa0XBsQS+XHS1nNvLKWc6q+i4PS 1TDrLMBDXlYoStAbvjeNZueR1PLUAixIjZ6FZCYkDHhK6ZC3JrnBjSVX4z06GHyHyDyAjMjixRW qzHamJRfF1eg/X/mGl/XzxAemcLTJin7CiuuVrwjGbXbpN4elYgoK1rodfrknYWAV3ac0srbvmw Loj0WUZe047ll0EZBnqShEE4Noh3U0= X-Received: by 2002:a17:902:cf0b:b0:2e9:6788:937d with SMTP id d9443c01a7336-2e967889666mr61137945ad.4.1792141014917; Fri, 16 Oct 2026 01:56:54 -0700 (PDT) Received: from [127.0.1.1] (211-23-39-77.hinet-ip.hinet.net. [211.23.39.77]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e97e882a20sm6971025ad.62.2026.10.16.01.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2026 01:56:54 -0700 (PDT) From: Jason Yang Date: Fri, 16 Oct 2026 16:56:36 +0800 Subject: [PATCH v5 2/8] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Add a cell to select TX or RX MIME-Version: 1.0 Message-Id: <20261016-dcphy-rx-v1-v5-2-e63b49eabe2d@gmail.com> References: <20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com> In-Reply-To: <20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com> To: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Guochun Huang , Philipp Zabel Cc: Michael Riesch , Sebastian Reichel , Bryan O'Donoghue , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jason Yang X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1792141002; l=2767; i=jason98166@gmail.com; s=20260721; h=from:subject:message-id; bh=ce8JdNOJs5zvcQeCguszU9j59LCLfLXe7OkJrHqM/YE=; b=xGmXf0uJmuCFnGX4LXl2EMMZ1WvsxT2sntwv+hZwzx8NB5XgYmF4wB3TO71KHkIhWamdIBqA9 3a8QSp0sv7LDJnLqs4+VROT8Z2H8vmMinUmvM0gz379mPKwncWtik5A X-Developer-Key: i=jason98166@gmail.com; a=ed25519; pk=xQmD001Q/ooHl39PxyQtusbUQmgbOsSfpFryRVWZ/k4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261016_015656_335708_299BE3E1 X-CRM114-Status: GOOD ( 12.98 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The Samsung MIPI D-/C-PHY block on RK3588 and RK3576 has a transmitter for DSI and a receiver for CSI-2, and two consumers can use them at the same time. The single cell of this binding selects the mode and refers to the transmitter, so the receiver cannot be described. Allow a second cell that selects the transmitter or the receiver. With D-PHY: /* the MIPI DSI host, driving the transmitter */ phys = <&mipidcphy0 PHY_TYPE_DPHY PHY_DIRECTION_TX>; /* the MIPI CSI-2 host, driving the receiver */ phys = <&mipidcphy0 PHY_TYPE_DPHY PHY_DIRECTION_RX>; and with C-PHY: phys = <&mipidcphy0 PHY_TYPE_CPHY PHY_DIRECTION_TX>; phys = <&mipidcphy0 PHY_TYPE_CPHY PHY_DIRECTION_RX>; The transmitter and the receiver cannot operate in different modes [1], so the first cell must match in both consumers. Two cells describe the receiver as well. A single cell keeps referring to the transmitter, so existing device trees are unaffected. [1] RK3588 TRM: section 22.1 (overview): "The TX and RX only support operate in the same PHY mode." Signed-off-by: Jason Yang --- .../bindings/phy/rockchip,rk3588-mipi-dcphy.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml index c8ff5ba22a86..6e8cc56e4986 100644 --- a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml +++ b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml @@ -20,11 +20,25 @@ properties: maxItems: 1 "#phy-cells": - const: 1 + enum: [1, 2] description: | - Argument is mode to operate in. Supported modes are: + The first cell selects the mode to operate in: - PHY_TYPE_DPHY - PHY_TYPE_CPHY + + A single cell refers to the transmitter and is kept for existing + device trees. + + The second cell selects the transmitter or the receiver, so that a + MIPI DSI host and a MIPI CSI-2 host can be described as independent + consumers of the same PHY node: + - PHY_DIRECTION_TX + - PHY_DIRECTION_RX + + The transmitter and the receiver cannot operate in different modes, + so when both are described, the first cell must match in both + consumers. + See include/dt-bindings/phy/phy.h for constants. clocks: @@ -82,6 +96,6 @@ examples: <&cru SRST_S_MIPI_DCPHY0>; reset-names = "m_phy", "apb", "grf", "s_phy"; rockchip,grf = <&mipidcphy0_grf>; - #phy-cells = <1>; + #phy-cells = <2>; }; }; -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip