• Heiko Stuebner's avatar
    drm/rockchip: dsi: add ability to work as a phy instead of full dsi · 71f68fe7
    Heiko Stuebner authored
    SoCs like the rk3288 and rk3399 have 3 mipi dphys on them. One is TX-
    only, one is RX-only and one can be configured to do either TX or RX.
    
    The RX phy is statically connected to the first Image Signal Processor,
    the TX phy is statically connected to the first DSI controller and
    the TXRX phy is connected to both the second DSI controller as well
    as the second ISP.
    
    The RX dphy is controlled externally through registers in the "General
    Register Files", while the other two are controlled through the
    "Configuration and Test Interface" inside their DSI controller's
    io-memory area.
    
    The Rockchip dw-dsi controller already controls these dphys for the
    TX case in the driver, but when we want to also allow configuration
    for RX to the ISP from the media subsystem we need to expose phy-
    functionality instead.
    
    So add a bit of infrastructure to allow the dsi driver to work as a
    phy and make sure it can be only one or the other at a time.
    
    Similarly as the dsi-controller will be part of the drm-graph when
    active, add an empty component to the drm-graph when in phy-mode
    to make the rest of the drm-graph not wait for it.
    Signed-off-by: default avatarHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
    Tested-by: default avatarSebastian Fricke <sebastian.fricke@posteo.net>
    Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210210111020.2476369-4-heiko@sntech.de
    71f68fe7
dw-mipi-dsi-rockchip.c 42.5 KB