From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 950BD606A32C for ; Fri, 4 Dec 2026 23:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LZyc03T/; dkim=fail reason="signature verification failed" (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=gttHO4oL 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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=8pmnwgCxQ7kckcKp9RZqIe4zN3p4WWEAi8gf4bXFUu8=; b=LZyc03T/zwQoUEW7i7dUacqo8U mNobcLXK7cPCcZmKDdeARkAHUvNW7s2hHeosouvf7X5GUPPNSRav94rqPPL0jBf6DzbCfe/NyA+Mf fdeZiRInNZhUslXMYlt/PmDq/WmGgxr4ZgYSYWSf29Y7NcIXFa6f/S/1aDmyUkv77R7zAwlWKuNpd vlP9FrvVx0WbNwzZo00VCQHF66Rl7OkWFeyjNQg6v7GaYLSUJsghHy5U54C2T720Dg0gqwA6+Ounq nwa0tPC3qz6N6OBx5wrRPvY8yGitA38S9pAHLUPhiIkPl4ddCDQoUFfR0uF4xhKsnnn9bJtanFj7J PZOgxr0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZcHV-00000001iZx-05Vr; Fri, 04 Dec 2026 23:01:33 +0000 Received: from sender6-op-o11.zoho.com ([165.173.180.11]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZcHR-00000001iZ2-37B1; Fri, 04 Dec 2026 23:01:31 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1796425280; cv=none; d=zohomail.com; s=zohoarc; b=Jm7mDuzZTi/Sg5L5oePGrGtWP1lvlw2JspxOWv93U0ajp2PLnvs1FH/XYpk6cx9oz7pVImZarXZg0Rw0YsKT29fZpDb9WEDFfGDkllJ2TiPDordBOqAsRH/XcWADir32E0Q+gvAoQq+wzIHPd6nC0lLKT5oCp1O5U82HP+uRgxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796425280; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=8pmnwgCxQ7kckcKp9RZqIe4zN3p4WWEAi8gf4bXFUu8=; b=P2B07g6SAUFSyTGJJ/q+BNIxWFhRqPmWD6WVGOq9L0cyPJS6D0OagOJdYrTfHxsztxDaoL6H/Ll01KYslxqjauMBFfJToJZALOQ1TBpECVE08y7oe+ODA+lsZiIkaBDn8B1B5CltRAKrBXaYVFSU0Htj7nfNqsY+TkpF3YAtYVM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=sebastian.reichel@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=gttHO4oLzxs0pRBWh9BlhG5gJZd4M2zaRLUxDRU7Dj3/XegCh4gKEk7351xjd2HVorTx7sHpCl9mDMV8o32o6amFxN/nt07FWGoZFao/0tQBaLF6LU5NcJc4bSb0FJZGs75brmLj9n7A0pILDIevzF2OAwiRTimzTHhGR3+tYE0=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=8pmnwgCxQ7kckcKp9RZqIe4zN3p4WWEAi8gf4bXFUu8=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796425277650312.83747197888715; Fri, 4 Dec 2026 15:01:17 -0800 (PST) Received: by venus (Postfix, from userid 1000) id 5E5AD18205D; Sat, 05 Dec 2026 00:01:12 +0100 (CET) Date: Sat, 5 Dec 2026 00:01:12 +0100 From: Sebastian Reichel To: Jason Yang Cc: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Guochun Huang , Philipp Zabel , Michael Riesch , Bryan O'Donoghue , Quentin Schulz , 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, Krzysztof Kozlowski , Sashiko Subject: Re: [PATCH v9 00/10] phy: rockchip-samsung-dcphy: Add the MIPI D-PHY receiver Message-ID: References: <20261204-dcphy-rx-v1-v9-0-fad1cfe7f536@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a4qqh3ragpqzh5la" Content-Disposition: inline In-Reply-To: <20261204-dcphy-rx-v1-v9-0-fad1cfe7f536@gmail.com> X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.28.1.5.5/296.417.51 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_150129_872804_5B5CFDE4 X-CRM114-Status: GOOD ( 48.43 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --a4qqh3ragpqzh5la Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v9 00/10] phy: rockchip-samsung-dcphy: Add the MIPI D-PHY receiver MIME-Version: 1.0 Hi, On Fri, Dec 04, 2026 at 11:18:50AM +0800, Jason Yang wrote: > The Samsung MIPI D-/C-PHY block on RK3588 and RK3576 has a transmitter > for DSI and a receiver for CSI-2. Both can be used at the same time. >=20 > Mainline only supports the transmitter and models the block as a single > struct phy. The PHY core refcounts power_on() per struct phy, so the > receiver cannot be powered independently of it, and the single > devicetree cell selects the mode, so the provider cannot tell which of > the two a consumer refers to. >=20 > This series registers a struct phy for the PHY transmitter and one for > the PHY receiver, and implements the D-PHY receiver. As suggested in > the v5 review, the single cell of the binding now selects the PHY > transmitter or the PHY receiver. The cell values are the new generic > PHY_DIRECTION_TX and PHY_DIRECTION_RX constants. The PHY transmitter > and the PHY receiver cannot run in different modes. A phy-type property > of the PHY node therefore sets the mode of the whole block, D-PHY by > default. >=20 > 1/10 adds PHY_DIRECTION_TX and PHY_DIRECTION_RX to the generic header > 2/10 changes the single cell of the rockchip,rk3588-mipi-dcphy binding > to select PHY_DIRECTION_TX or PHY_DIRECTION_RX, adds phy-type for > the mode of the whole block, and keeps PHY_TYPE_DPHY and > PHY_TYPE_CPHY as deprecated values > 3/10 unwinds the PHY transmitter power-on when the PLL fails to lock > 4/10 always writes the rate-dependent registers of the PHY transmitter > 5/10 moves the block-level setup (APB reset, BIAS) to runtime resume > 6/10 explicitly requests exclusive reset controls (no functional chang= e) > 7/10 names the transmitter helpers and ops (no functional change) > 8/10 takes the PHY mode from phy-type and the PHY from the cell, and > keeps the deprecated cell values on the PHY transmitter > 9/10 registers the receiver's struct phy, takes PHY_DIRECTION_RX in > of_xlate() and implements the D-PHY receiver bring-up > 10/10 adds the MIPI CSI-2 receiver nodes on RK3588 and connects them > to VICAP >=20 > 10/10 has to wait for 1/10 to 9/10. It uses PHY_DIRECTION_RX from 1/10, > and the csi nodes need a PHY driver with receiver support. >=20 > Compatibility > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > In 2/10 and 8/10, the old cell values PHY_TYPE_DPHY and PHY_TYPE_CPHY > remain valid as deprecated values. They select the PHY transmitter, so > existing DTs keep working on a newer kernel. >=20 > New DTs following 1/10 and 2/10 are an ABI break on an older kernel. The > older kernel ignores phy-type and takes any cell value as the mode of > the block. A DSI node with PHY_DIRECTION_TX therefore gets no display, > and a CSI-2 node with PHY_DIRECTION_RX gets no camera. >=20 > In 10/10, the dsi nodes keep PHY_TYPE_DPHY, which older and newer kernels > both accept. With the csi nodes disabled, the display therefore keeps > working on either kernel. >=20 > The csi nodes in 10/10 have no older value to keep and have to use > PHY_DIRECTION_RX. Enabling csi0 or csi1 therefore needs a PHY driver > with receiver support. Since v7.0, a CSI-2 host driver probes the csi > nodes. An older PHY driver then gives the CSI-2 host the PHY transmitter > that drives the display. The camera gets no frames, and the display can > stop working as well. >=20 > Testing > =3D=3D=3D=3D=3D=3D=3D >=20 > Tested on an RK3588 board, with a DSI panel and an IMX219 camera on > DCPHY0, and an LVDS panel behind a DSI-to-LVDS bridge on DCPHY1. >=20 > - The PHY transmitter and the PHY receiver run at the same time: with > 9/10 and 10/10, both panels light from boot, and the camera stream is > shown live on the DCPHY0 panel. > - The two can be powered independently: the DCPHY0 panel is turned > off and back on during a 1200-frame capture, and the capture > completes. > - The PHY receiver does not need the PHY transmitter: with dsi0 > disabled, the camera alone brings the block up and streams, which > relies on 5/10 moving the block-level setup to runtime resume. > - Existing device trees keep working: with a single PHY_TYPE_DPHY > cell in dsi0 as before this series, the DCPHY0 panel lights. > - The DT of 10/10 keeps the display working on an older kernel: with > the csi nodes disabled and without this series, both panels light. > - The new cell works for the PHY transmitter: with PHY_DIRECTION_TX > in dsi0, with and without phy-type =3D , the DCPHY0 > panel lights. >=20 > No WARNING, underflow, "Internal error" or Oops in dmesg in any of > these. >=20 > Not covered: the receiver of DCPHY1 (tested by Quentin Schulz on v6), > the 3- and 4-lane receiver paths, and RK3576. 3/10 and 4/10 fix states > found by reading the code. Those states were not reproduced on > hardware. Tested-by: Sebastian Reichel # RK3588 EVB1 That's DCPHY0 with IMX415 (4 lane mode) with the DCPHY0 also driving a DSI panel in parallel. Greetings, -- Sebastian > This series was prepared with Claude through Claude Code: >=20 > - It checked the driver against the vendor driver and the TRM. > - It drafted the code. I reviewed and reworked it before committing it > to my tree. > - It checked the wording and spelling of the commit messages and this > cover letter. > - After I ran the basic pipeline tests, it generated more test cases > and ran them on my board. >=20 > --- > Changes in v9: > - New 6/10: use devm_reset_control_get_exclusive() for all four reset > controls instead of devm_reset_control_get(). (Philipp) > - Keep the Reviewed-by tags on 7/10 and 9/10, as the changes there only > follow the getter change of 6/10. > - Link to v8: https://patch.msgid.link/20261127-dcphy-rx-v1-v8-0-9ddfef99= 221d@gmail.com >=20 > Changes in v8: > - 1/9 and 2/9: drop the Tested-by tag. (Krzysztof) > - Link to v7: https://patch.msgid.link/20261118-dcphy-rx-v1-v7-0-8de1adac= 3a74@gmail.com >=20 > Changes in v7: > - Collect the Reviewed-by and Tested-by tags. Keep them on 6/9 and 8/9, > as the changes there only rename and move fields as Michael suggested. > - 6/9: also give the PLL helpers the tx_ prefix, and move the master > reset and the PLL state, which only the transmitter uses, into > struct samsung_mipi_phy. (Michael) > - 8/9: put the receiver-only and the transmitter-only fields of struct > samsung_mipi_phy in a union, and move the slave reset there as well. > (Michael) > - 8/9: use a single space before =3D in the receiver's phy_ops. (Michael) > - 9/9: restrict the commit message to what the patch does and how it > affects an older kernel. (Michael) > - Thanks to Quentin Schulz for testing v6 and for pointing out that the > U-Boot SPLL fix is merged. > - Test with mainline U-Boot v2027.01-rc2 and drop the note about the > SPLL fix. > - Link to v6: https://patch.msgid.link/20261110-dcphy-rx-v1-v6-0-d681ba20= b36a@gmail.com >=20 > Changes in v6: > - Rebase onto phy/next (v7.4-rc1). > - Collect the Reviewed-by tags on 1/9 and 6/9. > - 2/9: move the mode from the first cell to a phy-type property. > (Michael, Heiko, Rob) > - New 3/9: power_on relied on the APB reset, which 5/9 moves to > runtime resume, to clean up after a PLL lock failure. (Sashiko) > - New 4/9: power_on also relied on that reset to clear the > rate-dependent registers, found while checking power_on for 3/9. > - 5/9: keep BIAS_CON4 with the other BIAS writes. (Michael) > - New 7/9: support the new phy-type and direction binding of 2/9. > - 8/9: merge v5's 5/8 and 6/8. (Michael) > - 8/9: trim the comments and name the magic numbers. > - Drop v5's 7/8: the dsi nodes keep PHY_TYPE_DPHY. (Michael, Krzysztof) > - 9/9: use a single PHY_DIRECTION_RX cell in the csi nodes. > - Describe the ABI break of new DTs in 2/9, 9/9 and the cover letter. > (Rob, Krzysztof) > - Drop the Assisted-by tags. > - Link to v5: https://patch.msgid.link/20261016-dcphy-rx-v1-v5-0-e63b49ea= be2d@gmail.com >=20 > Changes in v5: > - Rebase onto phy/next. The runtime PM fix this series applied on top > of is now commit 261e84f9278f ("phy: rockchip-samsung-dcphy: Enable > runtime PM at PHY core level"), so it is no longer carried here. > - 1/8: use PHY_DIRECTION_TX and PHY_DIRECTION_RX instead of > PHY_TYPE_DSI and PHY_TYPE_CSI. (Michael) > - 2/8: use PHY_DIRECTION_* for the second cell and rewrite the > description. > - Drop v4's 5/7: it has no benefit over the switch, and it moved a > DC-PHY shared function into a D-PHY helper. (Michael) > - 5/8: rename protocol to direction in of_xlate() to follow 1/8. > - 6/8: use a switch in the receiver's power_on() and power_off(), as > the transmitter does. > - New patches 7/8 and 8/8: switch the RK3588 DC-PHYs to two cells and > add the MIPI CSI-2 receiver nodes. > - Link to v4: https://lore.kernel.org/r/20260821-dcphy-rx-v1-v4-0-f179763= 4233d@gmail.com >=20 > Changes in v4: > - Put the second cell back: the first cell selects the mode, the > second the transmitter or the receiver. > - Drop the private use count and mutex; the runtime PM usage count > does the same job. > - New patch 3/7: move the block-level setup to runtime resume. > - Split v3's 3/5 into 4/7 and 5/7. > - of_xlate() rejects a mix of D-PHY and C-PHY consumers. > - The runtime PM probe-order fix is now a separate patch [1] that this > series applies on top of. > - Bryan O'Donoghue's Reviewed-by from v2 is not carried over; that > patch was rewritten. > - Link to v3: https://lore.kernel.org/r/20260810-dcphy-rx-v1-v3-0-a2d25c2= 9adfc@gmail.com >=20 > --- > Jason Yang (10): > dt-bindings: phy: Add PHY_DIRECTION_TX/RX definitions > dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Select TX or RX, add = phy-type > phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure > phy: rockchip-samsung-dcphy: Always write the rate-dependent regist= ers > phy: rockchip-samsung-dcphy: Move block-level setup to runtime resu= me > phy: rockchip-samsung-dcphy: Explicitly request exclusive reset con= trols > phy: rockchip-samsung-dcphy: Name the transmitter helpers and ops > phy: rockchip-samsung-dcphy: Support the new phy-type and direction= binding > phy: rockchip-samsung-dcphy: Add MIPI D-PHY receiver support > arm64: dts: rockchip: add the dcphy mipi csi-2 receiver nodes to rk= 3588 >=20 > .../bindings/phy/rockchip,rk3588-mipi-dcphy.yaml | 18 +- > arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 68 +++ > drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 663 +++++++++++++++= ++---- > include/dt-bindings/phy/phy.h | 3 + > 4 files changed, 636 insertions(+), 116 deletions(-) > --- > base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 > change-id: 20260721-dcphy-rx-v1-9af57f3edfd9 >=20 > Best regards, > -- =20 > Jason Yang >=20 --a4qqh3ragpqzh5la Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmsTRjQACgkQ2O7X88g7 +ppBahAAoTvFw3NQeJSMT70vY17GfMK1XbvHQSE3V7XpATcLdgySRXB6tbLzBYku bqARSk3zv/B7wT8Ekr30YKpHHg3CBkeThS2KRQDZxJDlVy4laVuSV21ccEegNGi/ ASAnyaFIraN+KCHzduKM8qbpvGVqnzCbRCrYui6bs2PxB3kxejp1FPNYIpSWI0YW N62W6NDV2T3OGDnGxWAzdXkYeHPYE4xCj+D7tvlliJeIb27y4uST+iIsGQQkPH3P vJ9+uVaTgUCN3gHqEV6FV7nmVjAxw8mPpgn2bb5hLhB3HD8BPVFhzmmrpsspysYA rXJGlufTcyZ7uH6kFzOJbGJhdfZ6PyLT+l+z1wpeR0yzsaha+94Wo0C+arYLhHq1 w7A43boL65fSNgclES8OiCjFkSzxmo0A9dtHCrE4wBEMe87SjrJQ+oe0T9R5K9ic lkeEv59BTD3prd+3S0VqWNRVBx50upspme1KBtmTSq85Fa3Uocxh0hlM/jLVR6My yoTzsKAILGGPEU9r/ruleDj0WQfwO5Hp4dJtJK25TLsBQXVwUEeLeWofXppPVcWS O9il/sVykwMtL0hbH1cE7hEpUuM38LpQi7TlB+0KMCLNm5SldptB46TEvHF/8orF MEOVxB30QkG3o7m3SmTFjf9pK9psUiTDaU3lGad0BSY5PJmF3cg= =pMQ/ -----END PGP SIGNATURE----- --a4qqh3ragpqzh5la--