[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250904082151.2929189-4-h-shenoy@ti.com>
Date: Thu, 4 Sep 2025 13:51:51 +0530
From: Harikrishna Shenoy <h-shenoy@...com>
To: <vkoul@...nel.org>, <kishon@...nel.org>, <devarsht@...com>,
<tomi.valkeinen@...asonboard.com>, <aradhya.bhatia@...ux.dev>,
<u.kleine-koenig@...libre.com>, <mripard@...nel.org>,
<sakari.ailus@...ux.intel.com>, <linux-phy@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <u-kumar1@...com>, <s-jain1@...com>
Subject: [PATCH RESEND 3/3] drivers: phy: cadence: cdns-dphy: Enable lower resolutions in dphy
Enable support for data lane rates between 80-160 Mbps cdns dphy
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@...com>
Reviewed-by: Devarsh Thakkar <devarsht@...com>
Signed-off-by: Harikrishna Shenoy <h-shenoy@...com>
---
Rebased on top of linux-next and resend.
Link to original patch- https://lore.kernel.org/all/20250807052002.717807-1-h-shenoy@ti.com/
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 24a25606996c..d5b0e516b93c 100644
--- a/drivers/phy/cadence/cdns-dphy.c
+++ b/drivers/phy/cadence/cdns-dphy.c
@@ -136,7 +136,7 @@ static int cdns_dphy_get_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;
@@ -146,6 +146,8 @@ static int cdns_dphy_get_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,
--
2.34.1
Powered by blists - more mailing lists