drm: vc4: Reset DSI AFE on disable

vc4_dsi_bridge_disable wasn't resetting things during shutdown,
so add that in.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2022-05-26 18:56:19 +01:00
committed by Dom Cobley
parent 8c33016aec
commit 7d166cfd30

View File

@@ -361,6 +361,16 @@
# define DSI_PHY_AFEC0_CTATADJ_MASK VC4_MASK(3, 0)
# define DSI_PHY_AFEC0_CTATADJ_SHIFT 0
# define DSI0_AFEC0_PD_ALL_LANES (DSI0_PHY_AFEC0_PD | \
DSI0_PHY_AFEC0_PD_BG | \
DSI0_PHY_AFEC0_PD_DLANE1)
# define DSI1_AFEC0_PD_ALL_LANES (DSI1_PHY_AFEC0_PD | \
DSI1_PHY_AFEC0_PD_BG | \
DSI1_PHY_AFEC0_PD_DLANE3 | \
DSI1_PHY_AFEC0_PD_DLANE2 | \
DSI1_PHY_AFEC0_PD_DLANE1)
#define DSI0_PHY_AFEC1 0x68
# define DSI0_PHY_AFEC1_IDR_DLANE1_MASK VC4_MASK(10, 8)
# define DSI0_PHY_AFEC1_IDR_DLANE1_SHIFT 8
@@ -810,6 +820,16 @@ static void vc4_dsi_bridge_disable(struct drm_bridge *bridge,
disp0_ctrl = DSI_PORT_READ(DISP0_CTRL);
disp0_ctrl &= ~DSI_DISP0_ENABLE;
DSI_PORT_WRITE(DISP0_CTRL, disp0_ctrl);
/* Reset the DSI and all its fifos. */
DSI_PORT_WRITE(CTRL, DSI_CTRL_SOFT_RESET_CFG |
DSI_PORT_BIT(CTRL_RESET_FIFOS));
/* Power down the analogue front end. */
DSI_PORT_WRITE(PHY_AFEC0, DSI_PORT_BIT(PHY_AFEC0_RESET) |
DSI_PORT_BIT(PHY_AFEC0_PD) |
DSI_PORT_BIT(AFEC0_PD_ALL_LANES));
}
static void vc4_dsi_bridge_post_disable(struct drm_bridge *bridge,