diff options
author | Lin Huang <hl@rock-chips.com> | 2017-11-22 09:40:50 +0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2017-11-28 19:16:09 +0000 |
commit | 25fb09b0684769bd010cde0aa60f1b32eddb2cba (patch) | |
tree | db7ef455bfcb34369603f6513e3eeb8c8b8cd2c4 /src/soc/rockchip/common | |
parent | 45f1b01324ed1712092e80fed7e03fe088452729 (diff) |
rockchip/rk3399: support dual mipi dsi
Refactor the mipi driver, so we can support dual mipi panel.
And pass the panel data from mainboard.c, that we can
support different panel with different board.
Change-Id: Id1286c0ccbe50c89514c8daee66439116d3f1ca4
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/22471
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/rockchip/common')
-rw-r--r-- | src/soc/rockchip/common/include/soc/vop.h | 6 | ||||
-rw-r--r-- | src/soc/rockchip/common/vop.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/soc/rockchip/common/include/soc/vop.h b/src/soc/rockchip/common/include/soc/vop.h index c5c542583d..69d11845c0 100644 --- a/src/soc/rockchip/common/include/soc/vop.h +++ b/src/soc/rockchip/common/include/soc/vop.h @@ -120,6 +120,7 @@ enum vop_modes { VOP_MODE_EDP = 0, VOP_MODE_HDMI, VOP_MODE_MIPI, + VOP_MODE_DUAL_MIPI, VOP_MODE_NONE, VOP_MODE_AUTO_DETECT, VOP_MODE_UNKNOWN, @@ -139,7 +140,9 @@ enum vop_modes { #define M_EDP_OUT_EN (1 << 14) #define M_HDMI_OUT_EN (1 << 13) #define M_RGB_OUT_EN (1 << 12) -#define M_ALL_OUT_EN (M_MIPI_OUT_EN | M_EDP_OUT_EN | M_HDMI_OUT_EN | M_RGB_OUT_EN) +#define M_DUAL_MIPI_OUT_EN (1 << 3) +#define M_ALL_OUT_EN (M_MIPI_OUT_EN | M_EDP_OUT_EN | M_HDMI_OUT_EN |\ + M_RGB_OUT_EN | M_DUAL_MIPI_OUT_EN) #define M_EDPI_WMS_FS (1 << 10) #define M_EDPI_WMS_MODE (1 << 9) #define M_EDPI_HALT_EN (1 << 8) @@ -154,6 +157,7 @@ enum vop_modes { #define V_MMU_EN(x) (((x) & 1) << 20) #define V_DMA_BURST_LENGTH(x) (((x) & 3) << 18) #define V_MIPI_OUT_EN(x) (((x) & 1) << 15) +#define V_DUAL_MIPI_EN(x) (((x) & 1) << 3) #define V_EDP_OUT_EN(x) (((x) & 1) << 14) #define V_HDMI_OUT_EN(x) (((x) & 1) << 13) #define V_RGB_OUT_EN(x) (((x) & 1) << 12) diff --git a/src/soc/rockchip/common/vop.c b/src/soc/rockchip/common/vop.c index 70d59bd6a8..463159182a 100644 --- a/src/soc/rockchip/common/vop.c +++ b/src/soc/rockchip/common/vop.c @@ -119,8 +119,13 @@ void rkvop_mode_set(u32 vop_id, const struct edid *edid, u32 mode) dsp_out_mode = 15; break; case VOP_MODE_MIPI: - clrsetbits_le32(&preg->sys_ctrl, - M_ALL_OUT_EN, V_MIPI_OUT_EN(1)); + clrsetbits_le32(&preg->sys_ctrl, M_ALL_OUT_EN, + V_MIPI_OUT_EN(1)); + dsp_out_mode = 0; + break; + case VOP_MODE_DUAL_MIPI: + clrsetbits_le32(&preg->sys_ctrl, M_ALL_OUT_EN, + V_MIPI_OUT_EN(1) | V_DUAL_MIPI_EN(1)); dsp_out_mode = 0; break; case VOP_MODE_EDP: |