diff options
author | Julius Werner <jwerner@chromium.org> | 2021-08-24 16:03:57 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-08-26 15:18:45 +0000 |
commit | 5ff1808f20a70912796b274c03cec3d91ddf890a (patch) | |
tree | 5b8207fc81eca4b6c1dddf478ad47a8537a0a2e6 /src/include/mipi | |
parent | 7d41491e76eea186fe0e734e50fdb827e877e0ad (diff) |
device/mipi: Move to drivers/mipi
Sounds like we prefer to have this under drivers/ instead of device/.
Also move all MIPI-related headers out from device/ into their own
directory.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ib3e66954b8f0cf85b28d8d186b09d7846707559d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57128
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/include/mipi')
-rw-r--r-- | src/include/mipi/ids.h | 29 | ||||
-rw-r--r-- | src/include/mipi/panel.h | 56 |
2 files changed, 85 insertions, 0 deletions
diff --git a/src/include/mipi/ids.h b/src/include/mipi/ids.h new file mode 100644 index 0000000000..982e6e14b4 --- /dev/null +++ b/src/include/mipi/ids.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * MIPI Alliance Manufacturer IDs from https://mid.mipi.org + */ + +#ifndef __MIPI_IDS_H__ +#define __MIPI_IDS_H__ + +/* Board Members */ +#define MIPI_MFG_ID_INTEL 0x0105 +#define MIPI_MFG_ID_QUALCOMM 0x0217 +#define MIPI_MFG_ID_BOSCH 0x03b8 +#define MIPI_MFG_ID_SAMSUNG 0x010b +#define MIPI_MFG_ID_ST_MICRO 0x0104 +#define MIPI_MFG_ID_SYNOPSYS 0x0148 +#define MIPI_MFG_ID_TI 0x0102 +#define MIPI_MFG_ID_TOSHIBA 0x0126 + +/* Contributing Members */ +#define MIPI_MFG_ID_REALTEK 0x025d +#define MIPI_DEV_ID_REALTEK_ALC5682 0x5682 +#define MIPI_DEV_ID_REALTEK_ALC711 0x0711 +#define MIPI_DEV_ID_REALTEK_ALC1308 0x1308 + +#define MIPI_MFG_ID_MAXIM 0x019f +#define MIPI_DEV_ID_MAXIM_MAX98373 0x8373 + +#endif /* __MIPI_IDS_H__ */ diff --git a/src/include/mipi/panel.h b/src/include/mipi/panel.h new file mode 100644 index 0000000000..e0a1463823 --- /dev/null +++ b/src/include/mipi/panel.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __MIPI_PANEL_H__ +#define __MIPI_PANEL_H__ + +#include <edid.h> +#include <types.h> + +/* Definitions for cmd in panel_init_command */ +enum panel_init_cmd { + PANEL_CMD_END = 0, + PANEL_CMD_DELAY = 1, + PANEL_CMD_GENERIC = 2, + PANEL_CMD_DCS = 3, +}; + +struct panel_init_command { + u8 cmd; + u8 len; + u8 data[]; +}; + +/* + * The data to be serialized and put into CBFS. + * Note some fields, for example edid.mode.name, were actually pointers and + * cannot be really serialized. + */ +struct panel_serializable_data { + struct edid edid; /* edid info of this panel */ + enum lb_fb_orientation orientation; /* Panel orientation */ + u8 init[]; /* A packed array of panel_init_command */ +}; + +typedef cb_err_t (*mipi_cmd_func_t)(enum panel_init_cmd cmd, const u8 *data, u8 len); + +/* Parse a command array and call cmd_func() for each entry. Delays get handled internally. */ +cb_err_t mipi_panel_parse_init_commands(const void *buf, mipi_cmd_func_t cmd_func); + +#define PANEL_DCS(...) \ + PANEL_CMD_DCS, \ + sizeof((u8[]){__VA_ARGS__}), \ + __VA_ARGS__ + +#define PANEL_GENERIC(...) \ + PANEL_CMD_GENERIC, \ + sizeof((u8[]){__VA_ARGS__}), \ + __VA_ARGS__ + +#define PANEL_DELAY(delay) \ + PANEL_CMD_DELAY, \ + delay + +#define PANEL_END \ + PANEL_CMD_END + +#endif /* __MIPI_PANEL_H__ */ |