mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: devarsh <devarsht@ti.com>
To: Harikrishna Shenoy <h-shenoy@ti.com>, <vkoul@kernel.org>,
	<kishon@kernel.org>, <u.kleine-koenig@baylibre.com>,
	<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<u-kumar1@ti.com>, <s-jain1@ti.com>
Subject: Re: [PATCH v2] drivers: phy: cadence: cdns-dphy: Enable lower resolutions in dphy
Date: Wed, 6 Aug 2025 11:25:19 +0530	[thread overview]
Message-ID: <385d9185-e187-48c2-9854-10cdd98d2f1b@ti.com> (raw)
In-Reply-To: <20250806052650.429767-1-h-shenoy@ti.com>

On 06/08/25 10:56, Harikrishna Shenoy wrote:
> Enable support for hs_clk_rate between 80-160 Mbps cdns dphy

Enable support for data lane rates between 80-160 Mbps

> as mentioned in TRM [0] by setting the pll_opdiv field to 16.
> This change enables lower resolutions like 640x480 at 60Hz.
> 
> [0]: https://www.ti.com/lit/zip/spruil1
> (Table 12-552. DPHY_TX_PLL_CTRL Register Field Descriptions)
> 
> Reviewed-by: Udit Kumar <u-kumar1@ti.com>
> Signed-off-by: Harikrishna Shenoy <h-shenoy@ti.com>

With suggested change,
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>

Regards
Devarsh
> ---
> Changes in v2:
> - Updated commit message and title.
> - Added Reviewed-by tag.
> - Link to v1: https://lore.kernel.org/all/1ebb82ea-4b6c-4496-b7c0-17d4168d8ddf@ti.com/
> 
> Test log: https://gist.github.com/h-shenoy/3975156baf403a0ff8dbcce5b49b2b89
> 
>  drivers/phy/cadence/cdns-dphy.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c
> index ed87a3970f83..9abed2ece9b0 100644
> --- a/drivers/phy/cadence/cdns-dphy.c
> +++ b/drivers/phy/cadence/cdns-dphy.c
> @@ -139,7 +139,7 @@ static int cdns_dsi_get_dphy_pll_cfg(struct cdns_dphy *dphy,
>  
>  	dlane_bps = opts->hs_clk_rate;
>  
> -	if (dlane_bps > 2500000000UL || dlane_bps < 160000000UL)
> +	if (dlane_bps > 2500000000UL || dlane_bps < 80000000UL)
>  		return -EINVAL;
>  	else if (dlane_bps >= 1250000000)
>  		cfg->pll_opdiv = 1;
> @@ -149,6 +149,8 @@ static int cdns_dsi_get_dphy_pll_cfg(struct cdns_dphy *dphy,
>  		cfg->pll_opdiv = 4;
>  	else if (dlane_bps >= 160000000)
>  		cfg->pll_opdiv = 8;
> +	else if (dlane_bps >= 80000000)
> +		cfg->pll_opdiv = 16;
>  
>  	cfg->pll_fbdiv = DIV_ROUND_UP_ULL(dlane_bps * 2 * cfg->pll_opdiv *
>  					  cfg->pll_ipdiv,


      reply	other threads:[~2025-08-06  5:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  5:26 Harikrishna Shenoy
2025-08-06  5:55 ` devarsh [this message]

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=385d9185-e187-48c2-9854-10cdd98d2f1b@ti.com \
    --to=devarsht@ti.com \
    --cc=h-shenoy@ti.com \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=s-jain1@ti.com \
    --cc=u-kumar1@ti.com \
    --cc=u.kleine-koenig@baylibre.com \
    --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

all inboxes | Powered by JetHome®