VOP_CTRL_SET(vop, mipi_en, 1);
VOP_CTRL_SET(vop, mipi_pin_pol, val);
VOP_CTRL_SET(vop, mipi_dclk_pol, 1);
- if (s->output_flags & ROCKCHIP_OUTPUT_DSI_DUAL_CHANNEL)
- VOP_CTRL_SET(vop, mipi_dual_channel_en, 1);
- else
- VOP_CTRL_SET(vop, mipi_dual_channel_en, 0);
+ VOP_CTRL_SET(vop, mipi_dual_channel_en,
+ !!(s->output_flags & ROCKCHIP_OUTPUT_DSI_DUAL_CHANNEL));
+ VOP_CTRL_SET(vop, data01_swap,
+ !!(s->output_flags & ROCKCHIP_OUTPUT_DSI_DUAL_LINK));
break;
case DRM_MODE_CONNECTOR_DisplayPort:
VOP_CTRL_SET(vop, dp_dclk_pol, 0);
#define VOP_MINOR(version) ((version) & 0xff)
#define ROCKCHIP_OUTPUT_DSI_DUAL_CHANNEL BIT(0)
+#define ROCKCHIP_OUTPUT_DSI_DUAL_LINK BIT(1)
#define AFBDC_FMT_RGB565 0x0
#define AFBDC_FMT_U8U8U8U8 0x5
struct vop_reg edp_en;
struct vop_reg hdmi_en;
struct vop_reg mipi_en;
+ struct vop_reg data01_swap;
struct vop_reg mipi_dual_channel_en;
struct vop_reg dp_en;
struct vop_reg dclk_pol;
.edp_en = VOP_REG(RK3288_SYS_CTRL, 0x1, 14),
.mipi_en = VOP_REG(RK3288_SYS_CTRL, 0x1, 15),
.mipi_dual_channel_en = VOP_REG(RK3288_SYS_CTRL, 0x1, 3),
+ .data01_swap = VOP_REG_VER(RK3288_SYS_CTRL, 0x1, 17, 3, 5, -1),
.dclk_pol = VOP_REG_VER(RK3288_DSP_CTRL0, 0x1, 7, 3, 0, 1),
.pin_pol = VOP_REG_VER(RK3288_DSP_CTRL0, 0x7, 4, 3, 0, 1),
.dp_dclk_pol = VOP_REG_VER(RK3399_DSP_CTRL1, 0x1, 19, 3, 5, -1),