Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Riesch <michael.riesch@collabora.com>
To: Amin Gattout <amin.gattout@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org
Subject: Re: [PATCH 3/4] phy: rockchip: phy-rockchip-inno-csidphy: add support for rk3576 variant
Date: Mon, 7 Sep 2026 13:02:09 +0200	[thread overview]
Message-ID: <0ab0b4f4-ab5d-413b-9446-5d747c59a32a@collabora.com> (raw)
In-Reply-To: <20260820-rk3576-dphy-v1-3-70e25e8d5e78@gmail.com>

Hi Amin,

Thanks for your patches!

On 8/20/26 16:01, Amin Gattout wrote:
> The two RK3576 MIPI CSI-2 DPHYs can be supported using the existing
> phy-rockchip-inno-csidphy driver, the notable difference with the
> RK3588 variant being that each PHY instance only has an APB reset
> line.
> 
> Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
> ---
>  drivers/phy/rockchip/phy-rockchip-inno-csidphy.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
> index c79fb53d8ee5..24aefdcd6361 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
> @@ -30,6 +30,7 @@
>  #define RK3568_GRF_VI_CON0		0x0340
>  #define RK3568_GRF_VI_CON1		0x0344
>  
> +#define RK3576_CSIDPHY_GRF_CON0		0x0000

This, ...

>  #define RK3588_CSIDPHY_GRF_CON0		0x0000
>  
>  /* PHY */
> @@ -119,6 +120,12 @@ static const struct dphy_reg rk3568_grf_dphy_regs[] = {
>  	[GRF_DPHY_CSIPHY_CLKLANE_EN] = PHY_REG(RK3568_GRF_VI_CON0, 1, 8),
>  };
>  
> +static const struct dphy_reg rk3576_grf_dphy_regs[] = {
> +	[GRF_DPHY_CSIPHY_FORCERXMODE] = PHY_REG(RK3576_CSIDPHY_GRF_CON0, 4, 0),
> +	[GRF_DPHY_CSIPHY_DATALANE_EN] = PHY_REG(RK3576_CSIDPHY_GRF_CON0, 4, 4),
> +	[GRF_DPHY_CSIPHY_CLKLANE_EN] = PHY_REG(RK3576_CSIDPHY_GRF_CON0, 1, 8),
> +};
> +

and this look pretty identical to RK3588, can't we just drop these two
and ...

>  static const struct dphy_reg rk3588_grf_dphy_regs[] = {
>  	[GRF_DPHY_CSIPHY_FORCERXMODE] = PHY_REG(RK3588_CSIDPHY_GRF_CON0, 4, 0),
>  	[GRF_DPHY_CSIPHY_DATALANE_EN] = PHY_REG(RK3588_CSIDPHY_GRF_CON0, 4, 4),
> @@ -403,6 +410,17 @@ static const struct dphy_drv_data rk3568_mipidphy_drv_data = {
>  	.resets_num = ARRAY_SIZE(rk3368_reset_names),
>  };
>  
> +static const struct dphy_drv_data rk3576_mipidphy_drv_data = {
> +	.pwrctl_offset = -1,
> +	.ths_settle_offset = RK3568_CSIDPHY_CLK_WR_THS_SETTLE,
> +	.calib_offset = RK3568_CSIDPHY_CLK_CALIB_EN,
> +	.hsfreq_ranges = rk1808_mipidphy_hsfreq_ranges,
> +	.num_hsfreq_ranges = ARRAY_SIZE(rk1808_mipidphy_hsfreq_ranges),
> +	.grf_regs = rk3576_grf_dphy_regs,

... use rk3588_grf_dphy_regs here?

> +	.resets = rk3368_reset_names,

So that the reset names are the only difference to RK3588 (which seems
to be the case as per commit message)?

> +	.resets_num = ARRAY_SIZE(rk3368_reset_names),
> +};
> +
>  static const struct dphy_drv_data rk3588_mipidphy_drv_data = {
>  	.pwrctl_offset = -1,
>  	.ths_settle_offset = RK3568_CSIDPHY_CLK_WR_THS_SETTLE,
> @@ -435,6 +453,10 @@ static const struct of_device_id rockchip_inno_csidphy_match_id[] = {
>  		.compatible = "rockchip,rk3568-csi-dphy",
>  		.data = &rk3568_mipidphy_drv_data,
>  	},
> +	{
> +		.compatible = "rockchip,rk3576-csi-dphy",
> +		.data = &rk3576_mipidphy_drv_data,
> +	},
>  	{
>  		.compatible = "rockchip,rk3588-csi-dphy",
>  		.data = &rk3588_mipidphy_drv_data,
> 

Apart from that LGTM!

Best regards,
Michael



  reply	other threads:[~2026-09-07 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 14:01 [PATCH 0/4] phy: rockchip: add support for the RK3576 MIPI CSI-2 DPHYs Amin Gattout
2026-08-20 14:01 ` [PATCH 1/4] dt-bindings: soc: rockchip: add rk3576 csidphy grf syscon Amin Gattout
2026-08-20 18:16   ` Conor Dooley
2026-08-20 14:01 ` [PATCH 2/4] dt-bindings: phy: rockchip-inno-csi-dphy: add rk3576 variant Amin Gattout
2026-08-20 18:18   ` Conor Dooley
2026-08-20 14:01 ` [PATCH 3/4] phy: rockchip: phy-rockchip-inno-csidphy: add support for " Amin Gattout
2026-09-07 11:02   ` Michael Riesch [this message]
2026-08-20 14:01 ` [PATCH 4/4] arm64: dts: rockchip: add csi dphy nodes to rk3576 Amin Gattout

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=0ab0b4f4-ab5d-413b-9446-5d747c59a32a@collabora.com \
    --to=michael.riesch@collabora.com \
    --cc=amin.gattout@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=vkoul@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