]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll
authorAdam Ford <aford173@gmail.com>
Sat, 1 Jun 2024 14:41:01 +0000 (09:41 -0500)
committerRobert Foss <rfoss@kernel.org>
Mon, 10 Jun 2024 14:30:54 +0000 (16:30 +0200)
commit78c4c0011bb577a29906d8ca135795af2293c49e
tree6ddd69820b75f48419776825bba4f29ab3b1977d
parent162e48cb1d84c2c966b649b8ac5c9d4f75f6d44f
drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll

The P divider should be set based on the min and max values of
the fin pll which may vary between different platforms.
These ranges are defined per platform, but hard-coded values
were used instead which resulted in a smaller range available
on the i.MX8M[MNP] than what was possible.

As noted by Frieder, there are descripencies between the reference
manuals of the Mini, Nano and Plus, so I reached out to my NXP
rep and got the following response regarding the varing notes
in the documentation.

"Yes it is definitely wrong, the one that is part of the NOTE in
MIPI_DPHY_M_PLLPMS register table against PMS_P, PMS_M and PMS_S is
not correct. I will report this to Doc team, the one customer should
be take into account is the Table 13-40 DPHY PLL Parameters and the
Note above."

With this patch, the clock rates now match the values used in NXP's
downstream kernel.

Fixes: 846307185f0f ("drm/bridge: samsung-dsim: update PLL reference clock")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240601144103.198299-1-aford173@gmail.com
drivers/gpu/drm/bridge/samsung-dsim.c