OSDN Git Service

drm/bridge: tc358767: Add DSI-to-DPI mode support
authorMarek Vasut <marex@denx.de>
Tue, 29 Mar 2022 08:50:15 +0000 (10:50 +0200)
committerRobert Foss <robert.foss@linaro.org>
Thu, 31 Mar 2022 14:00:28 +0000 (16:00 +0200)
commitbbfd3190b65629117ae1535499e3de9791499ddc
treeb8f35c31fd8289295e705a5eb5860967271a11aa
parentaebe58a7af42d2126dc8ca39825cb5a624649115
drm/bridge: tc358767: Add DSI-to-DPI mode support

The TC358767/TC358867/TC9595 are all capable of operating in multiple
modes, DPI-to-(e)DP, DSI-to-(e)DP, DSI-to-DPI. Add support for the
DSI-to-DPI mode.

This requires skipping most of the (e)DP initialization code, which is
currently a large part of this driver, hence it is better to have far
simpler separate tc_dpi_bridge_funcs and their implementation.

The configuration of DPI output is also much simpler. The configuration
of the DSI input is rather similar to the other TC bridge chips.

The Pixel PLL in DPI output mode does not have the 65..150 MHz limitation
imposed on the (e)DP output mode, so this limitation is skipped to permit
operating panels with far slower pixel clock, even below 9 MHz. This mode
of operation of the PLL is valid and tested.

The detection of bridge mode is now added into tc_probe_bridge_mode(),
where in case a DPI panel is found on port@1 endpoint@1, the mode is
assumed to be DSI-to-DPI. If (e)DP is detected on port@2, the mode is
assumed to be DPI-to-(e)DP.

The DSI-to-(e)DP mode is not supported due to lack of proper hardware,
but this would be some sort of mix between the two aforementioned modes.

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220329085015.39159-12-marex@denx.de
drivers/gpu/drm/bridge/Kconfig
drivers/gpu/drm/bridge/tc358767.c