From nobody Fri Oct 3 07:42:36 2025 Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245]) (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 5C8232C0F8F for ; Thu, 4 Sep 2025 08:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.245 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756974147; cv=none; b=ltbQql1cy+ThECzver7hDFDXwLxu6AyqzioCFWlyfv0fIxzx/pI5S+f+D/uM+I4o8DiDDhEWzOfPNSFqM4SJSmsS8aeFjCSo6bNNzXAmzvQOxb3hvGJ6oeyeE5+m52Y6kE2aknLWh2PRwGnDbmlI1e13+PjsrFYkFE86G9kCiuM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756974147; c=relaxed/simple; bh=SU4cObsHV4rohBFpe/vl35CrrZn0ihcP4zBtm+jxLbs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iE+buz78j9TtOGaDTwM7DuAy+jd+93jc6/XuAHUK74Arp37ry6Erx2FT1Mnp0alGHqtQPXzoIKg1VljDRiFBlMe8bdj6hC2VltH8udon6EOCCNkduC9jwHLzjovBodfx779+g5buubhbbTl1IZ/U18BItfoEs5NeJNxf2QrtnR8= 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=c8++B4bi; arc=none smtp.client-ip=198.47.19.245 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="c8++B4bi" Received: from lelvem-sh02.itg.ti.com ([10.180.78.226]) by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTP id 5848M8T52970708; Thu, 4 Sep 2025 03:22:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1756974128; bh=QuNDm8j6hps94EKqFie5sT5yfiKMVGlDZX/Z6+55M94=; h=From:To:Subject:Date:In-Reply-To:References; b=c8++B4biljVS60v+xFhutOqFXdJqzrFRHteKBfb71NRbKrfvPUYspDhpjvKElrFTf UeeJ7/c+AFsYe9+/X1ndy+RGFBT3peGyQRhDQ+w2NSIruapbbHPV4uXpbwXSFD+jJU 0UrHuhfTI1MaEvPiUJwTU9c/xe20Y++FG+MD0fXQ= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelvem-sh02.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 5848M8ZX035929 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Thu, 4 Sep 2025 03:22:08 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Thu, 4 Sep 2025 03:22:07 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE105.ent.ti.com (10.64.6.26) 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, 4 Sep 2025 03:22:07 -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 5848LpgH2963848; Thu, 4 Sep 2025 03:22:04 -0500 From: Harikrishna Shenoy To: , , , , , , , , , , , Subject: [PATCH RESEND 3/3] drivers: phy: cadence: cdns-dphy: Enable lower resolutions in dphy Date: Thu, 4 Sep 2025 13:51:51 +0530 Message-ID: <20250904082151.2929189-4-h-shenoy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250904082151.2929189-1-h-shenoy@ti.com> References: <20250904082151.2929189-1-h-shenoy@ti.com> 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 --- 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-dph= y.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, =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; @@ -146,6 +146,8 @@ static int cdns_dphy_get_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