coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | mipi_dsi_msg |
mipi_dsi_msg - read/write DSI buffer More... | |
struct | mipi_dsi_host_ops |
struct | mipi_dsi_host |
mipi_dsi_host - DSI host device More... | |
struct | mipi_dsi_master_ops |
struct | mipi_dsi_device |
mipi_dsi_device - DSI peripheral device More... | |
struct | tegra_mipi_pad |
struct | tegra_mipi_soc |
struct | tegra_mipi |
struct | tegra_mipi_device |
Functions | |
int | mipi_dsi_host_register (struct mipi_dsi_host *host) |
int | mipi_dsi_attach (struct mipi_dsi_device *dsi) |
mipi_dsi_attach - attach a DSI device to its DSI host More... | |
int | mipi_dsi_detach (struct mipi_dsi_device *dsi) |
mipi_dsi_detach - detach a DSI device from its DSI host More... | |
int | mipi_dsi_enslave (struct mipi_dsi_device *master, struct mipi_dsi_device *slave) |
mipi_dsi_enslave() - use a MIPI DSI peripheral as slave for dual-channel operation More... | |
int | mipi_dsi_liberate (struct mipi_dsi_device *master, struct mipi_dsi_device *slave) |
mipi_dsi_liberate() - stop using a MIPI DSI peripheral as slave for dual- channel operation More... | |
ssize_t | mipi_dsi_dcs_write (struct mipi_dsi_device *dsi, u8 cmd, const void *data, size_t len) |
mipi_dsi_dcs_write() - send DCS write command More... | |
int | mipi_dsi_dcs_exit_sleep_mode (struct mipi_dsi_device *dsi) |
mipi_dsi_dcs_exit_sleep_mode() - enable all blocks inside the display module More... | |
int | mipi_dsi_dcs_set_display_on (struct mipi_dsi_device *dsi) |
mipi_dsi_dcs_set_display_on() - start displaying the image data on the display device More... | |
int | mipi_dsi_dcs_set_column_address (struct mipi_dsi_device *dsi, u16 start, u16 end) |
mipi_dsi_dcs_set_column_address() - define the column extent of the frame memory accessed by the host processor More... | |
int | mipi_dsi_dcs_set_page_address (struct mipi_dsi_device *dsi, u16 start, u16 end) |
mipi_dsi_dcs_set_page_address() - define the page extent of the frame memory accessed by the host processor More... | |
int | mipi_dsi_dcs_set_address_mode (struct mipi_dsi_device *dsi, bool reverse_page_address, bool reverse_col_address, bool reverse_page_col_address, bool refresh_from_bottom, bool reverse_rgb, bool latch_right_to_left, bool flip_horizontal, bool flip_vertical) |
mipi_dsi_dcs_set_address_mode() - sets the data order for forward transfers from the host to the peripheral More... | |
int | mipi_dsi_dcs_set_tear_on (struct mipi_dsi_device *dsi, enum mipi_dsi_dcs_tear_mode mode) |
mipi_dsi_dcs_set_tear_on() - turn on the display module's Tearing Effect output signal on the TE signal line. More... | |
int | mipi_dsi_dcs_set_pixel_format (struct mipi_dsi_device *dsi, u8 format) |
mipi_dsi_dcs_set_pixel_format() - sets the pixel format for the RGB image data used by the interface More... | |
struct tegra_mipi_device * | tegra_mipi_request (struct tegra_mipi_device *device, int device_index) |
int | tegra_mipi_calibrate (struct tegra_mipi_device *device) |
#define MIPI_CAL_AUTOCAL_CTRL 0x01 |
Definition at line 189 of file mipi_dsi.h.
#define MIPI_CAL_BIAS_PAD_CFG0 0x16 |
Definition at line 226 of file mipi_dsi.h.
#define MIPI_CAL_BIAS_PAD_CFG1 0x17 |
Definition at line 230 of file mipi_dsi.h.
#define MIPI_CAL_BIAS_PAD_CFG2 0x18 |
Definition at line 234 of file mipi_dsi.h.
Definition at line 231 of file mipi_dsi.h.
Definition at line 232 of file mipi_dsi.h.
#define MIPI_CAL_BIAS_PAD_E_VCLAMP_REF (1 << 0) |
Definition at line 228 of file mipi_dsi.h.
#define MIPI_CAL_BIAS_PAD_PDVCLAMP (1 << 1) |
Definition at line 227 of file mipi_dsi.h.
#define MIPI_CAL_BIAS_PAD_PDVREG (1 << 1) |
Definition at line 237 of file mipi_dsi.h.
Definition at line 236 of file mipi_dsi.h.
Definition at line 235 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIA 0x05 |
Definition at line 195 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIAB_CLK 0x1b |
Definition at line 208 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIB 0x06 |
Definition at line 196 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIC 0x07 |
Definition at line 197 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSICD_CLK 0x1c |
Definition at line 210 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSID 0x08 |
Definition at line 198 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIE 0x09 |
Definition at line 199 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIE_CLK 0x1d |
Definition at line 212 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_CSIF 0x0a |
Definition at line 200 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSIA 0x0e |
Definition at line 201 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSIA_CLK 0x19 |
Definition at line 206 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSIB 0x0f |
Definition at line 202 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSIB_CLK 0x1a |
Definition at line 207 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSIC 0x10 |
Definition at line 203 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSIC_CLK 0x1c |
Definition at line 209 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSID 0x11 |
Definition at line 204 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_DSID_CLK 0x1d |
Definition at line 211 of file mipi_dsi.h.
Definition at line 223 of file mipi_dsi.h.
Definition at line 224 of file mipi_dsi.h.
Definition at line 218 of file mipi_dsi.h.
Definition at line 219 of file mipi_dsi.h.
#define MIPI_CAL_CONFIG_SELECT (1 << 21) |
Definition at line 215 of file mipi_dsi.h.
Definition at line 220 of file mipi_dsi.h.
#define MIPI_CAL_CTRL 0x00 |
Definition at line 183 of file mipi_dsi.h.
#define MIPI_CAL_CTRL_CLKEN_OVR (1 << 4) |
Definition at line 186 of file mipi_dsi.h.
Definition at line 184 of file mipi_dsi.h.
Definition at line 185 of file mipi_dsi.h.
#define MIPI_CAL_CTRL_START (1 << 0) |
Definition at line 187 of file mipi_dsi.h.
#define MIPI_CAL_STATUS 0x02 |
Definition at line 191 of file mipi_dsi.h.
#define MIPI_CAL_STATUS_ACTIVE (1 << 0) |
Definition at line 193 of file mipi_dsi.h.
#define MIPI_CAL_STATUS_DONE (1 << 16) |
Definition at line 192 of file mipi_dsi.h.
#define MIPI_DSI_CLOCK_NON_CONTINUOUS BIT(10) |
Definition at line 100 of file mipi_dsi.h.
#define MIPI_DSI_DCS_POWER_MODE_DISPLAY (1 << 2) |
Definition at line 156 of file mipi_dsi.h.
#define MIPI_DSI_DCS_POWER_MODE_IDLE (1 << 6) |
Definition at line 160 of file mipi_dsi.h.
#define MIPI_DSI_DCS_POWER_MODE_NORMAL (1 << 3) |
Definition at line 157 of file mipi_dsi.h.
#define MIPI_DSI_DCS_POWER_MODE_PARTIAL (1 << 5) |
Definition at line 159 of file mipi_dsi.h.
#define MIPI_DSI_DCS_POWER_MODE_SLEEP (1 << 4) |
Definition at line 158 of file mipi_dsi.h.
#define MIPI_DSI_MODE_EOT_PACKET BIT(9) |
Definition at line 98 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO BIT(0) |
Definition at line 80 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_AUTO_VERT BIT(3) |
Definition at line 86 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_BURST BIT(1) |
Definition at line 82 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_HBP BIT(6) |
Definition at line 92 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_HFP BIT(5) |
Definition at line 90 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_HSA BIT(7) |
Definition at line 94 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_HSE BIT(4) |
Definition at line 88 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE BIT(2) |
Definition at line 84 of file mipi_dsi.h.
#define MIPI_DSI_MODE_VSYNC_FLUSH BIT(8) |
Definition at line 96 of file mipi_dsi.h.
#define MIPI_DSI_MSG_REQ_ACK BIT(0) |
Definition at line 17 of file mipi_dsi.h.
#define MIPI_DSI_MSG_USE_LPM BIT(1) |
Definition at line 19 of file mipi_dsi.h.
Definition at line 151 of file mipi_dsi.h.
Definition at line 102 of file mipi_dsi.h.
int mipi_dsi_attach | ( | struct mipi_dsi_device * | dsi | ) |
mipi_dsi_attach - attach a DSI device to its DSI host
dsi | DSI peripheral |
Definition at line 93 of file mipi_dsi.c.
References ENOSYS, mipi_dsi_device::host, ops, and mipi_dsi_host::ops.
Referenced by panel_jdi_dsi_probe(), and panel_jdi_enslave().
int mipi_dsi_dcs_exit_sleep_mode | ( | struct mipi_dsi_device * | dsi | ) |
mipi_dsi_dcs_exit_sleep_mode() - enable all blocks inside the display module
dsi | DSI peripheral device |
Definition at line 250 of file mipi_dsi.c.
References MIPI_DCS_EXIT_SLEEP_MODE, mipi_dsi_dcs_write(), and NULL.
Referenced by panel_jdi_prepare().
int mipi_dsi_dcs_set_address_mode | ( | struct mipi_dsi_device * | dsi, |
bool | reverse_page_address, | ||
bool | reverse_col_address, | ||
bool | reverse_page_col_address, | ||
bool | refresh_from_bottom, | ||
bool | reverse_rgb, | ||
bool | latch_right_to_left, | ||
bool | flip_horizontal, | ||
bool | flip_vertical | ||
) |
mipi_dsi_dcs_set_address_mode() - sets the data order for forward transfers from the host to the peripheral
dsi | DSI peripheral device |
reverse_page_address | reverses the page addressing to bottom->top |
reverse_col_address | reverses the column addressing to right->left |
reverse_page_col_address | reverses the page/column addressing order |
refresh_from_bottom | refresh the display bottom to top |
reverse_rgb | send pixel data bgr instead of rgb |
latch_right_to_left | latch the incoming display data right to left |
flip_horizontal | flip the image horizontally, left to right |
flip_vertical | flip the image vertically, top to bottom |
Definition at line 382 of file mipi_dsi.c.
References MIPI_DCS_SET_ADDRESS_MODE, and mipi_dsi_dcs_write().
Referenced by panel_jdi_prepare().
int mipi_dsi_dcs_set_column_address | ( | struct mipi_dsi_device * | dsi, |
u16 | start, | ||
u16 | end | ||
) |
mipi_dsi_dcs_set_column_address() - define the column extent of the frame memory accessed by the host processor
dsi | DSI peripheral device |
start | first column of frame memory |
end | last column of frame memory |
Definition at line 288 of file mipi_dsi.c.
References MIPI_DCS_SET_COLUMN_ADDRESS, and mipi_dsi_dcs_write().
Referenced by panel_jdi_prepare().
int mipi_dsi_dcs_set_display_on | ( | struct mipi_dsi_device * | dsi | ) |
mipi_dsi_dcs_set_display_on() - start displaying the image data on the display device
dsi | DSI peripheral device |
Definition at line 268 of file mipi_dsi.c.
References MIPI_DCS_SET_DISPLAY_ON, mipi_dsi_dcs_write(), and NULL.
Referenced by panel_jdi_prepare().
int mipi_dsi_dcs_set_page_address | ( | struct mipi_dsi_device * | dsi, |
u16 | start, | ||
u16 | end | ||
) |
mipi_dsi_dcs_set_page_address() - define the page extent of the frame memory accessed by the host processor
dsi | DSI peripheral device |
start | first page of frame memory |
end | last page of frame memory |
Definition at line 311 of file mipi_dsi.c.
References MIPI_DCS_SET_PAGE_ADDRESS, and mipi_dsi_dcs_write().
Referenced by panel_jdi_prepare().
int mipi_dsi_dcs_set_pixel_format | ( | struct mipi_dsi_device * | dsi, |
u8 | format | ||
) |
mipi_dsi_dcs_set_pixel_format() - sets the pixel format for the RGB image data used by the interface
dsi | DSI peripheral device |
format | pixel format |
Definition at line 355 of file mipi_dsi.c.
References MIPI_DCS_SET_PIXEL_FORMAT, and mipi_dsi_dcs_write().
Referenced by panel_jdi_prepare().
int mipi_dsi_dcs_set_tear_on | ( | struct mipi_dsi_device * | dsi, |
enum mipi_dsi_dcs_tear_mode | mode | ||
) |
mipi_dsi_dcs_set_tear_on() - turn on the display module's Tearing Effect output signal on the TE signal line.
dsi | DSI peripheral device |
mode | the Tearing Effect Output Line mode |
Definition at line 333 of file mipi_dsi.c.
References MIPI_DCS_SET_TEAR_ON, mipi_dsi_dcs_write(), and value.
Referenced by panel_jdi_prepare().
ssize_t mipi_dsi_dcs_write | ( | struct mipi_dsi_device * | dsi, |
u8 | cmd, | ||
const void * | data, | ||
size_t | len | ||
) |
mipi_dsi_dcs_write() - send DCS write command
dsi | DSI peripheral device |
cmd | DCS command |
data | buffer containing the command payload |
len | command payload length |
This function will automatically choose the right data type depending on the command payload length.
Definition at line 173 of file mipi_dsi.c.
References BIOS_ERR, buffer, mipi_dsi_msg::channel, mipi_dsi_device::channel, EINVAL, mipi_dsi_msg::flags, mipi_dsi_device::host, MAX_DSI_HOST_FIFO_DEPTH, memcpy(), memset(), MIPI_DSI_DCS_LONG_WRITE, MIPI_DSI_DCS_SHORT_WRITE, MIPI_DSI_DCS_SHORT_WRITE_PARAM, MIPI_DSI_MSG_USE_LPM, offset, mipi_dsi_host::ops, printk, mipi_dsi_host_ops::transfer, mipi_dsi_msg::tx_buf, mipi_dsi_msg::tx_len, and mipi_dsi_msg::type.
Referenced by mipi_dsi_dcs_exit_sleep_mode(), mipi_dsi_dcs_set_address_mode(), mipi_dsi_dcs_set_column_address(), mipi_dsi_dcs_set_display_on(), mipi_dsi_dcs_set_page_address(), mipi_dsi_dcs_set_pixel_format(), mipi_dsi_dcs_set_tear_on(), and panel_jdi_prepare().
int mipi_dsi_detach | ( | struct mipi_dsi_device * | dsi | ) |
mipi_dsi_detach - detach a DSI device from its DSI host
dsi | DSI peripheral |
Definition at line 107 of file mipi_dsi.c.
References ENOSYS, mipi_dsi_device::host, ops, and mipi_dsi_host::ops.
Referenced by panel_jdi_liberate().
int mipi_dsi_enslave | ( | struct mipi_dsi_device * | master, |
struct mipi_dsi_device * | slave | ||
) |
mipi_dsi_enslave() - use a MIPI DSI peripheral as slave for dual-channel operation
master | master DSI peripheral device |
slave | slave DSI peripheral device |
Definition at line 125 of file mipi_dsi.c.
References mipi_dsi_master_ops::enslave, mipi_dsi_device::ops, slave, and mipi_dsi_device::slave.
Referenced by panel_jdi_dsi_probe().
int mipi_dsi_host_register | ( | struct mipi_dsi_host * | host | ) |
Definition at line 83 of file mipi_dsi.c.
References mipi_dsi_device::host, and of_mipi_dsi_device_add().
Referenced by dsi_probe_if().
int mipi_dsi_liberate | ( | struct mipi_dsi_device * | master, |
struct mipi_dsi_device * | slave | ||
) |
mipi_dsi_liberate() - stop using a MIPI DSI peripheral as slave for dual- channel operation
master | master DSI peripheral device |
slave | slave DSI peripheral device |
Definition at line 147 of file mipi_dsi.c.
References mipi_dsi_master_ops::liberate, NULL, mipi_dsi_device::ops, slave, and mipi_dsi_device::slave.
int tegra_mipi_calibrate | ( | struct tegra_mipi_device * | device | ) |
Definition at line 102 of file mipi.c.
References BIOS_ERR, BIOS_INFO, BIT, tegra_mipi_pad::clk, tegra_mipi_soc::clock_enable_override, tegra_mipi_pad::data, tegra_mipi_soc::has_clk_lane, tegra_mipi_soc::hsclkpdos, tegra_mipi_soc::hsclkpuos, tegra_mipi_soc::hspdos, tegra_mipi_soc::hspuos, MIPI_CAL_BIAS_PAD_CFG0, MIPI_CAL_BIAS_PAD_CFG1, MIPI_CAL_BIAS_PAD_CFG2, MIPI_CAL_BIAS_PAD_DRV_DN_REF, MIPI_CAL_BIAS_PAD_DRV_UP_REF, MIPI_CAL_BIAS_PAD_E_VCLAMP_REF, MIPI_CAL_BIAS_PAD_PDVCLAMP, MIPI_CAL_BIAS_PAD_PDVREG, MIPI_CAL_BIAS_PAD_VAUXP, MIPI_CAL_BIAS_PAD_VCLAMP, MIPI_CAL_CONFIG_HSCLKPDOSD, MIPI_CAL_CONFIG_HSCLKPUOSD, MIPI_CAL_CONFIG_HSPDOS, MIPI_CAL_CONFIG_HSPUOS, MIPI_CAL_CONFIG_SELECT, MIPI_CAL_CONFIG_TERMOS, MIPI_CAL_CTRL, MIPI_CAL_CTRL_CLKEN_OVR, MIPI_CAL_CTRL_NOISE_FILTER, MIPI_CAL_CTRL_PRESCALE, MIPI_CAL_CTRL_START, MIPI_CAL_STATUS, tegra_mipi_soc::needs_vclamp_ref, tegra_mipi_soc::num_pads, tegra_mipi_soc::pad_drive_down_ref, tegra_mipi_soc::pad_drive_up_ref, tegra_mipi_soc::pad_vauxp_level, tegra_mipi_soc::pad_vclamp_level, tegra_mipi_soc::pads, printk, tegra_mipi_readl(), tegra_mipi_wait(), tegra_mipi_writel(), tegra_mipi_soc::termos, and value.
Referenced by tegra_dsi_pad_calibrate().
struct tegra_mipi_device* tegra_mipi_request | ( | struct tegra_mipi_device * | device, |
int | device_index | ||
) |
Definition at line 68 of file mipi.c.
References device, dsi_pads, mipi_data, and tegra210_mipi_soc.
Referenced by dsi_probe_if().