From: Frank Li <Frank.li@nxp.com>
To: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
Cc: Michael Riesch <michael.riesch@collabora.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH 3/5] media: synopsys: Add PHY stopstate wait for i.MX93
Date: Fri, 17 Apr 2026 04:51:03 -0400 [thread overview]
Message-ID: <aeH0d1Bbp0agLPto@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260415-csi2_imx95-v1-3-7d63f3508719@oss.nxp.com>
On Wed, Apr 15, 2026 at 11:46:54AM +0800, Guoniu Zhou wrote:
> Implement waiting for D-PHY lanes to enter stop state on i.MX93. This
> ensures proper PHY initialization by verifying that the clock lane and
> all active data lanes have entered the stop state before proceeding with
> further operations.
>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
> ---
...
>
> +static int imx93_csi2rx_wait_for_phy_stopstate(struct dw_mipi_csi2rx_device *csi2)
> +{
> + struct device *dev = csi2->dev;
> + void __iomem *addr;
> + u32 stopstate_mask;
> + u32 val;
> + int ret;
> +
> + if (!dw_mipi_csi2rx_has_reg(csi2, DW_MIPI_CSI2RX_PHY_STOPSTATE)) {
> + dev_err(dev, "phy_stopstate register not available\n");
> + return -ENXIO;
> + }
Needn't this check, you just implment this specfic callback for imx93, so
DW_MIPI_CSI2RX_PHY_STOPSTATE must be there.
> +
> + stopstate_mask = DPHY_STOPSTATE_CLK_LANE | GENMASK(csi2->lanes_num - 1, 0);
> + addr = dw_mipi_csi2rx_get_regaddr(csi2, DW_MIPI_CSI2RX_PHY_STOPSTATE);
> +
> + ret = readl_poll_timeout(addr, val, (val & stopstate_mask) != stopstate_mask,
> + 1000, 2000000);
There are dw_mipi_csi2rx_read() helper function. So you already use
read_poll_timeout(dw_mipi_csi2rx_read, ...)
Frank
next prev parent reply other threads:[~2026-04-17 8:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 3:46 [PATCH 0/5] media: synopsys: enhancements and i.MX95 support Guoniu Zhou
2026-04-15 3:46 ` [PATCH 1/5] media: synopsys: Add support for RAW16 Bayer formats Guoniu Zhou
2026-04-17 8:31 ` Frank Li
2026-04-15 3:46 ` [PATCH 2/5] media: synopsys: Add support for multiple streams Guoniu Zhou
2026-04-17 8:38 ` Frank Li
2026-04-15 3:46 ` [PATCH 3/5] media: synopsys: Add PHY stopstate wait for i.MX93 Guoniu Zhou
2026-04-17 8:51 ` Frank Li [this message]
2026-04-15 3:46 ` [PATCH 4/5] media: dt-bindings: add NXP i.MX95 compatible string Guoniu Zhou
2026-04-15 8:10 ` Krzysztof Kozlowski
2026-04-15 9:21 ` G.N. Zhou (OSS)
2026-04-17 10:30 ` Frank Li
2026-04-15 3:46 ` [PATCH 5/5] media: synopsys: Add support for i.MX95 Guoniu Zhou
2026-04-17 9:45 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aeH0d1Bbp0agLPto@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=guoniu.zhou@oss.nxp.com \
--cc=heiko@sntech.de \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=michael.riesch@collabora.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox