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