• Marek Vasut's avatar
    drm/bridge: tc358767: Add DSI-to-DPI mode support · bbfd3190
    Marek Vasut authored
    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: default avatarLucas Stach <l.stach@pengutronix.de>
    Signed-off-by: default avatarMarek 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: default avatarRobert Foss <robert.foss@linaro.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220329085015.39159-12-marex@denx.de
    bbfd3190
tc358767.c 54.7 KB