]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/bridge: tc358767: Set LSCLK divider for SYSCLK to 1
authorMarek Vasut <marex@denx.de>
Tue, 25 Jun 2024 12:02:33 +0000 (14:02 +0200)
committerRobert Foss <rfoss@kernel.org>
Thu, 27 Jun 2024 09:07:07 +0000 (11:07 +0200)
The only information in the datasheet regarding this divider is a note
in SYS_PLLPARAM register documentation which states that when LSCLK is
270 MHz, LSCLK_DIV should be 1. What should LSCLK_DIV be set to when
LSCLK is 162 MHz (for DP 1.62G mode) is unclear, but empirical test
confirms using LSCLK_DIV 1 has no adverse effects either. In the worst
case, the internal TC358767 clock would run faster.

Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240625120334.145320-4-marex@denx.de
drivers/gpu/drm/bridge/tc358767.c

index 0338b7a7bbefbaff281a31fc4c04c67af1d49319..610df536a6edf0a6047d4bfa09a35a0c9dc1973e 100644 (file)
@@ -738,7 +738,7 @@ static int tc_stream_clock_calc(struct tc_data *tc)
 static int tc_set_syspllparam(struct tc_data *tc)
 {
        unsigned long rate;
-       u32 pllparam = SYSCLK_SEL_LSCLK | LSCLK_DIV_2;
+       u32 pllparam = SYSCLK_SEL_LSCLK | LSCLK_DIV_1;
 
        rate = clk_get_rate(tc->refclk);
        switch (rate) {