drm: bridge: icn6211: Add support for external REFCLK
authorMarek Vasut <marex@denx.de>
Mon, 1 Aug 2022 13:17:47 +0000 (15:17 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 26 Aug 2022 11:54:52 +0000 (13:54 +0200)
commit378e0f9f0b3e03a84db5ed5d3da3850871e9209e
tree53e6deb8dd167fd6db8d247623242b54e6050e52
parenta2d6447a4a8ab314a6f82ab99f218689f9b0c306
drm: bridge: icn6211: Add support for external REFCLK

The ICN6211 is capable of deriving its internal PLL clock from either
MIPI DSI HS clock, external REFCLK clock, or even internal oscillator.
Currently supported is only the first option. Add support for external
REFCLK clock input in addition to that.

There is little difference between these options, except that in case
of MIPI DSI HS clock input, the HS clock are pre-divided by a fixed /4
divider before being fed to the PLL input, while in case of external
REFCLK, the RECLK clock are fed directly into the PLL input.

Per exceptionally poor documentation, the REFCLK must be in range of
10..154 MHz.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220801131747.183041-2-marex@denx.de
drivers/gpu/drm/bridge/chipone-icn6211.c