From nobody Sun Oct 5 07:26:07 2025 Received: from fllvem-ot04.ext.ti.com (fllvem-ot04.ext.ti.com [198.47.19.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F061F956 for ; Thu, 7 Aug 2025 05:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754544029; cv=none; b=j/bEP9CBLjxNdsjhI8lPvXRLkhGyXXirVIOAK1EeM/w2b6ux4JTODdtDEfWz2U1wWnQcCF4nRsAB0hW6gWB35cA+nhNSY7uiNx1UI1/VwKHuyGrniBGppeMvl4mIMllSqjYWhNcqkX8QyfRYVut3A1YFzvNORcI4qalJL2RJ5vA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754544029; c=relaxed/simple; bh=TjokWoUgRJe7In/CF0otXfeJm2RnvgnZCqW7yta6cUg=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JXNqd62w7T043IL8jDEsfytDsNQiosZKNJWdTt8Pu4nWBGDwFc1E5BoT66khWouaDJFEc9sX75sBwf+7kDXLa7GL42xNcjuvIbilMhSrvtSblEibkLXfHLi5wFizj/Y8fiUFegqeyCj0bLXPGk35bvOf8FdoCVF+3LyLoNnBZdE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=wz4Lkun8; arc=none smtp.client-ip=198.47.19.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="wz4Lkun8" Received: from fllvem-sh03.itg.ti.com ([10.64.41.86]) by fllvem-ot04.ext.ti.com (8.15.2/8.15.2) with ESMTP id 5775K6GA676502; Thu, 7 Aug 2025 00:20:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1754544006; bh=oHumpSx3wKCOMnZgWNVeT2j3T6agkIplHk/j+VJ+VU0=; h=From:To:CC:Subject:Date; b=wz4Lkun8dW4FtCXNlVUI29OaMSEQfpTCHeR3bNLSwSDhNvL2rFofGcpbQvsnx83EV rCYe5Ms90mVcRMyBSxxp+TfwEYvPDY+Ue7XShaRp36FLV+uvtJxTD81KbIBVOVzb16 C+GfJfVhqfI5ymB6YmnYC7hAHp1AWRFDECdFxqCc= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllvem-sh03.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 5775K6Gn4103674 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Thu, 7 Aug 2025 00:20:06 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Thu, 7 Aug 2025 00:20:06 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Thu, 7 Aug 2025 00:20:06 -0500 Received: from hkshenoy.dhcp.ti.com (hkshenoy.dhcp.ti.com [172.24.235.208]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 5775K2dT791310; Thu, 7 Aug 2025 00:20:03 -0500 From: Harikrishna Shenoy To: , , , , , , , CC: Subject: [PATCH v3] drivers: phy: cadence: cdns-dphy: Enable lower resolutions in dphy Date: Thu, 7 Aug 2025 10:50:02 +0530 Message-ID: <20250807052002.717807-1-h-shenoy@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Devarsh Thakkar Signed-off-by: Harikrishna Shenoy --- Changes in v3: - Updated commit message. - Added Reviewed-by tags. - Link to v2: https://lore.kernel.org/all/20250806052650.429767-1-h-shenoy@= ti.com/ Changes in v2: - Updated commit message and title. - Added Reviewed-by tag. - Link to v1: https://lore.kernel.org/all/1ebb82ea-4b6c-4496-b7c0-17d4168d8= ddf@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-dph= y.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, =20 dlane_bps =3D opts->hs_clk_rate; =20 - if (dlane_bps > 2500000000UL || dlane_bps < 160000000UL) + if (dlane_bps > 2500000000UL || dlane_bps < 80000000UL) return -EINVAL; else if (dlane_bps >=3D 1250000000) cfg->pll_opdiv =3D 1; @@ -149,6 +149,8 @@ static int cdns_dsi_get_dphy_pll_cfg(struct cdns_dphy *= dphy, cfg->pll_opdiv =3D 4; else if (dlane_bps >=3D 160000000) cfg->pll_opdiv =3D 8; + else if (dlane_bps >=3D 80000000) + cfg->pll_opdiv =3D 16; =20 cfg->pll_fbdiv =3D DIV_ROUND_UP_ULL(dlane_bps * 2 * cfg->pll_opdiv * cfg->pll_ipdiv, --=20 2.34.1