[PATCH v2 1/2] drm/bridge: tc358767: increase PLL lock time delay

Lucas Stach l.stach at pengutronix.de
Fri Jul 21 16:53:27 UTC 2023


From: David Jander <david at protonic.nl>

The PLL often fails to lock with this delay. The new value was
determined by trial and error increasing the delay bit by bit
until the error did not occurr anymore even after several tries.
Then double that value was taken as the minimum delay to be safe.

Signed-off-by: David Jander <david at protonic.nl>
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
Reviewed-by: Marek Vasut <marex at denx.de>
Tested-by: Marek Vasut <marex at denx.de> # TC9595
Reviewed-by: Marek Vasut <marex at denx.de>
---
v2: correct comment
---
 drivers/gpu/drm/bridge/tc358767.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 65dc842e31f0..29721e26de5d 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -500,8 +500,8 @@ static int tc_pllupdate(struct tc_data *tc, unsigned int pllctrl)
 	if (ret)
 		return ret;
 
-	/* Wait for PLL to lock: up to 2.09 ms, depending on refclk */
-	usleep_range(3000, 6000);
+	/* Wait for PLL to lock: up to 7.5 ms, depending on refclk */
+	usleep_range(15000, 20000);
 
 	return 0;
 }
-- 
2.41.0



More information about the dri-devel mailing list