soc/intel/alderlake: Add ADL-P 4+4 with 28W TDP
[coreboot.git] / src / include / mipi / panel.h
blobca06897c98a7ed9fdae334887431747b20140729
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __MIPI_PANEL_H__
4 #define __MIPI_PANEL_H__
6 #include <edid.h>
7 #include <mipi/dsi.h>
8 #include <types.h>
10 /* Definitions for cmd in panel_init_command */
11 enum panel_init_cmd {
12 PANEL_CMD_END = 0,
13 PANEL_CMD_DELAY = 1,
14 PANEL_CMD_GENERIC = 2,
15 PANEL_CMD_DCS = 3,
18 struct panel_init_command {
19 u8 cmd;
20 u8 len;
21 u8 data[];
25 * The data to be serialized and put into CBFS.
26 * Note some fields, for example edid.mode.name, were actually pointers and
27 * cannot be really serialized.
29 struct panel_serializable_data {
30 struct edid edid; /* edid info of this panel */
31 u8 init[]; /* A packed array of panel_init_command */
34 typedef enum cb_err (*mipi_cmd_func_t)(enum mipi_dsi_transaction type, const u8 *data, u8 len);
36 /* Parse a command array and call cmd_func() for each entry. Delays get handled internally. */
37 enum cb_err mipi_panel_parse_init_commands(const void *buf, mipi_cmd_func_t cmd_func);
39 #define PANEL_DCS(...) \
40 PANEL_CMD_DCS, \
41 sizeof((u8[]){__VA_ARGS__}), \
42 __VA_ARGS__
44 #define PANEL_GENERIC(...) \
45 PANEL_CMD_GENERIC, \
46 sizeof((u8[]){__VA_ARGS__}), \
47 __VA_ARGS__
49 #define PANEL_DELAY(delay) \
50 PANEL_CMD_DELAY, \
51 delay
53 #define PANEL_END \
54 PANEL_CMD_END
56 #endif /* __MIPI_PANEL_H__ */