diff options
author | Lin Huang <hl@rock-chips.com> | 2018-01-17 14:24:14 +0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2018-01-29 19:22:12 +0000 |
commit | 0499ce9f8319cac1078f4b2423e4e7b420611943 (patch) | |
tree | 86950a84a3c596b19117a32e6a40f3567d129de3 /src/soc/rockchip/rk3399/include | |
parent | e87d3cdf59e6457e04158715789066d47d6e30e0 (diff) | |
download | coreboot-0499ce9f8319cac1078f4b2423e4e7b420611943.tar.xz |
rockchip/rk3399: Support LONG_WRITE type in MIPI DSI
Some panels need to transfer initial code, and some of them will be
over 3 bytes, so support LONG_WRITE type in driver. Refactor mipi
dsi transfer function to support it.
Change-Id: I212c14165e074c40a4a1a25140d9e8dfdfba465f
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/23299
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/rockchip/rk3399/include')
-rw-r--r-- | src/soc/rockchip/rk3399/include/soc/mipi.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/soc/rockchip/rk3399/include/soc/mipi.h b/src/soc/rockchip/rk3399/include/soc/mipi.h index 933ea89bd4..457c51dd1e 100644 --- a/src/soc/rockchip/rk3399/include/soc/mipi.h +++ b/src/soc/rockchip/rk3399/include/soc/mipi.h @@ -264,9 +264,14 @@ check_member(rk_mipi_regs, dsi_int_msk1, 0xc8); #define GEN_RD_CMD_BUSY BIT(6) #define MIPI_DSI_DCS_SHORT_WRITE 0x05 +#define MIPI_DSI_DCS_SHORT_WRITE_PARAM 0x15 #define MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM 0x23 #define MIPI_DSI_DCS_LONG_WRITE 0x39 +#define MIPI_INIT_CMD(...) { \ + .len = sizeof((char[]){__VA_ARGS__}), \ + .data = (char[]){__VA_ARGS__} } + enum mipi_dsi_pixel_format { MIPI_DSI_FMT_RGB888, MIPI_DSI_FMT_RGB666, @@ -324,8 +329,8 @@ struct rk_mipi_dsi { }; struct panel_init_command { - u8 cmd; - u8 data; + int len; + char *data; }; struct mipi_panel_data { @@ -334,7 +339,6 @@ struct mipi_panel_data { u8 lanes; u32 display_on_udelay; u32 video_mode_udelay; - u32 num_init_commands; struct panel_init_command *init_cmd; }; |