diff options
author | Julius Werner <jwerner@chromium.org> | 2021-09-08 17:58:34 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2021-09-11 01:42:47 +0000 |
commit | 4757a7ea3390db9fb3a9147d43eeb7ac00eba45c (patch) | |
tree | 30fec2fcc2eb9c0fae98a9e482e1f31de68dbac3 /src/soc/rockchip/rk3399 | |
parent | ab7006e4c41bb6f8ed5dd809b4239c43393a8097 (diff) |
mipi: Make panel init callback work directly on DSI transaction types
Our MIPI panel initialization framework differentiates between DCS and
GENERIC commands, but the exact interpretation of those terms is left to
the platform drivers. In practice, the MIPI DSI transaction codes for
these are standardized and platforms always need to do the same
operation of combining the command length and transfer type into a
correct DSI protocol code. This patch factors out the various
platform-specific DSI protocol definitions into a single global one and
moves the transaction type calculation into the common panel framework.
The Qualcomm SC7180 implementation which previously only supported DCS
commands is enhanced to (hopefully? untested for now...) also support
GENERIC commands. While we're rewriting that whole section also fix some
other issues about how exactly long and short commands need to be passed
to that hardware which we identified in the meantime.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I09ade7857ca04e89d286cf538b1a5ebb1eeb8c04
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57150
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/soc/rockchip/rk3399')
-rw-r--r-- | src/soc/rockchip/rk3399/include/soc/mipi.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/soc/rockchip/rk3399/include/soc/mipi.h b/src/soc/rockchip/rk3399/include/soc/mipi.h index 46077cb301..f5bd797850 100644 --- a/src/soc/rockchip/rk3399/include/soc/mipi.h +++ b/src/soc/rockchip/rk3399/include/soc/mipi.h @@ -3,6 +3,7 @@ #ifndef __RK_MIPI_H #define __RK_MIPI_H +#include <mipi/dsi.h> #include <types.h> struct rk_mipi_regs { @@ -250,11 +251,6 @@ check_member(rk_mipi_regs, dsi_int_msk1, 0xc8); #define GEN_PLD_R_FULL BIT(5) #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__} } @@ -293,12 +289,6 @@ enum rk_mipi_dsi_mode { MIPI_DSI_VID_MODE, }; -enum { - MIPI_DCS_NOP = 0x00, - MIPI_DCS_EXIT_SLEEP_MODE = 0x11, - MIPI_DCS_SET_DISPLAY_ON = 0x29, -}; - struct dphy_pll_parameter_map { unsigned int max_mbps; u8 hsfreqrange; |