Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
MIPI-DSI driver APIs

MIPI-DSI driver APIs. More...

Data Structures

struct  mipi_dsi_timings
 MIPI-DSI display timings. More...
 
struct  mipi_dsi_device
 MIPI-DSI device. More...
 
struct  mipi_dsi_msg
 MIPI-DSI read/write message. More...
 
struct  mipi_dsi_driver_api
 MIPI-DSI host driver API. More...
 

Functions

static int mipi_dsi_attach (const struct device *dev, uint8_t channel, const struct mipi_dsi_device *mdev)
 Attach a new device to the MIPI-DSI bus.
 
static ssize_t mipi_dsi_transfer (const struct device *dev, uint8_t channel, struct mipi_dsi_msg *msg)
 Transfer data to/from a device attached to the MIPI-DSI bus.
 
ssize_t mipi_dsi_generic_read (const struct device *dev, uint8_t channel, const void *params, size_t nparams, void *buf, size_t len)
 MIPI-DSI generic read.
 
ssize_t mipi_dsi_generic_write (const struct device *dev, uint8_t channel, const void *buf, size_t len)
 MIPI-DSI generic write.
 
ssize_t mipi_dsi_dcs_read (const struct device *dev, uint8_t channel, uint8_t cmd, void *buf, size_t len)
 MIPI-DSI DCS read.
 
ssize_t mipi_dsi_dcs_write (const struct device *dev, uint8_t channel, uint8_t cmd, const void *buf, size_t len)
 MIPI-DSI DCS write.
 

MIPI-DSI DCS (Display Command Set)

#define MIPI_DCS_NOP   0x00U
 
#define MIPI_DCS_SOFT_RESET   0x01U
 
#define MIPI_DCS_GET_COMPRESSION_MODE   0x03U
 
#define MIPI_DCS_GET_DISPLAY_ID   0x04U
 
#define MIPI_DCS_GET_RED_CHANNEL   0x06U
 
#define MIPI_DCS_GET_GREEN_CHANNEL   0x07U
 
#define MIPI_DCS_GET_BLUE_CHANNEL   0x08U
 
#define MIPI_DCS_GET_DISPLAY_STATUS   0x09U
 
#define MIPI_DCS_GET_POWER_MODE   0x0AU
 
#define MIPI_DCS_GET_ADDRESS_MODE   0x0BU
 
#define MIPI_DCS_GET_PIXEL_FORMAT   0x0CU
 
#define MIPI_DCS_GET_DISPLAY_MODE   0x0DU
 
#define MIPI_DCS_GET_SIGNAL_MODE   0x0EU
 
#define MIPI_DCS_GET_DIAGNOSTIC_RESULT   0x0FU
 
#define MIPI_DCS_ENTER_SLEEP_MODE   0x10U
 
#define MIPI_DCS_EXIT_SLEEP_MODE   0x11U
 
#define MIPI_DCS_ENTER_PARTIAL_MODE   0x12U
 
#define MIPI_DCS_ENTER_NORMAL_MODE   0x13U
 
#define MIPI_DCS_EXIT_INVERT_MODE   0x20U
 
#define MIPI_DCS_ENTER_INVERT_MODE   0x21U
 
#define MIPI_DCS_SET_GAMMA_CURVE   0x26U
 
#define MIPI_DCS_SET_DISPLAY_OFF   0x28U
 
#define MIPI_DCS_SET_DISPLAY_ON   0x29U
 
#define MIPI_DCS_SET_COLUMN_ADDRESS   0x2AU
 
#define MIPI_DCS_SET_PAGE_ADDRESS   0x2BU
 
#define MIPI_DCS_WRITE_MEMORY_START   0x2CU
 
#define MIPI_DCS_WRITE_LUT   0x2DU
 
#define MIPI_DCS_READ_MEMORY_START   0x2EU
 
#define MIPI_DCS_SET_PARTIAL_ROWS   0x30U
 
#define MIPI_DCS_SET_PARTIAL_COLUMNS   0x31U
 
#define MIPI_DCS_SET_SCROLL_AREA   0x33U
 
#define MIPI_DCS_SET_TEAR_OFF   0x34U
 
#define MIPI_DCS_SET_TEAR_ON   0x35U
 
#define MIPI_DCS_SET_ADDRESS_MODE   0x36U
 
#define MIPI_DCS_SET_SCROLL_START   0x37U
 
#define MIPI_DCS_EXIT_IDLE_MODE   0x38U
 
#define MIPI_DCS_ENTER_IDLE_MODE   0x39U
 
#define MIPI_DCS_SET_PIXEL_FORMAT   0x3AU
 
#define MIPI_DCS_WRITE_MEMORY_CONTINUE   0x3CU
 
#define MIPI_DCS_SET_3D_CONTROL   0x3DU
 
#define MIPI_DCS_READ_MEMORY_CONTINUE   0x3EU
 
#define MIPI_DCS_GET_3D_CONTROL   0x3FU
 
#define MIPI_DCS_SET_VSYNC_TIMING   0x40U
 
#define MIPI_DCS_SET_TEAR_SCANLINE   0x44U
 
#define MIPI_DCS_GET_SCANLINE   0x45U
 
#define MIPI_DCS_SET_DISPLAY_BRIGHTNESS   0x51U
 
#define MIPI_DCS_GET_DISPLAY_BRIGHTNESS   0x52U
 
#define MIPI_DCS_WRITE_CONTROL_DISPLAY   0x53U
 
#define MIPI_DCS_GET_CONTROL_DISPLAY   0x54U
 
#define MIPI_DCS_WRITE_POWER_SAVE   0x55U
 
#define MIPI_DCS_GET_POWER_SAVE   0x56U
 
#define MIPI_DCS_SET_CABC_MIN_BRIGHTNESS   0x5EU
 
#define MIPI_DCS_GET_CABC_MIN_BRIGHTNESS   0x5FU
 
#define MIPI_DCS_READ_DDB_START   0xA1U
 
#define MIPI_DCS_READ_DDB_CONTINUE   0xA8U
 
#define MIPI_DCS_PIXEL_FORMAT_24BIT   0x77
 
#define MIPI_DCS_PIXEL_FORMAT_18BIT   0x66
 
#define MIPI_DCS_PIXEL_FORMAT_16BIT   0x55
 
#define MIPI_DCS_PIXEL_FORMAT_12BIT   0x33
 
#define MIPI_DCS_PIXEL_FORMAT_8BIT   0x22
 
#define MIPI_DCS_PIXEL_FORMAT_3BIT   0x11
 

MIPI-DSI Address mode register fields.

#define MIPI_DCS_ADDRESS_MODE_MIRROR_Y   BIT(7)
 
#define MIPI_DCS_ADDRESS_MODE_MIRROR_X   BIT(6)
 
#define MIPI_DCS_ADDRESS_MODE_SWAP_XY   BIT(5)
 
#define MIPI_DCS_ADDRESS_MODE_REFRESH_BT   BIT(4)
 
#define MIPI_DCS_ADDRESS_MODE_BGR   BIT(3)
 
#define MIPI_DCS_ADDRESS_MODE_LATCH_RL   BIT(2)
 
#define MIPI_DCS_ADDRESS_MODE_FLIP_X   BIT(1)
 
#define MIPI_DCS_ADDRESS_MODE_FLIP_Y   BIT(0)
 

MIPI-DSI Processor-to-Peripheral transaction types.

#define MIPI_DSI_V_SYNC_START   0x01U
 
#define MIPI_DSI_V_SYNC_END   0x11U
 
#define MIPI_DSI_H_SYNC_START   0x21U
 
#define MIPI_DSI_H_SYNC_END   0x31U
 
#define MIPI_DSI_COLOR_MODE_OFF   0x02U
 
#define MIPI_DSI_COLOR_MODE_ON   0x12U
 
#define MIPI_DSI_SHUTDOWN_PERIPHERAL   0x22U
 
#define MIPI_DSI_TURN_ON_PERIPHERAL   0x32U
 
#define MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM   0x03U
 
#define MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM   0x13U
 
#define MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM   0x23U
 
#define MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM   0x04U
 
#define MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM   0x14U
 
#define MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM   0x24U
 
#define MIPI_DSI_DCS_SHORT_WRITE   0x05U
 
#define MIPI_DSI_DCS_SHORT_WRITE_PARAM   0x15U
 
#define MIPI_DSI_DCS_READ   0x06U
 
#define MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE   0x37U
 
#define MIPI_DSI_END_OF_TRANSMISSION   0x08U
 
#define MIPI_DSI_NULL_PACKET   0x09U
 
#define MIPI_DSI_BLANKING_PACKET   0x19U
 
#define MIPI_DSI_GENERIC_LONG_WRITE   0x29U
 
#define MIPI_DSI_DCS_LONG_WRITE   0x39U
 
#define MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20   0x0CU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24   0x1CU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16   0x2CU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_30   0x0DU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_36   0x1DU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12   0x3DU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_16   0x0EU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_18   0x1EU
 
#define MIPI_DSI_PIXEL_STREAM_3BYTE_18   0x2EU
 
#define MIPI_DSI_PACKED_PIXEL_STREAM_24   0x3EU
 

MIPI-DSI Device mode flags.

#define MIPI_DSI_MODE_VIDEO   BIT(0)
 Video mode.
 
#define MIPI_DSI_MODE_VIDEO_BURST   BIT(1)
 Video burst mode.
 
#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE   BIT(2)
 Video pulse mode.
 
#define MIPI_DSI_MODE_VIDEO_AUTO_VERT   BIT(3)
 Enable auto vertical count mode.
 
#define MIPI_DSI_MODE_VIDEO_HSE   BIT(4)
 Enable hsync-end packets in vsync-pulse and v-porch area.
 
#define MIPI_DSI_MODE_VIDEO_HFP   BIT(5)
 Disable hfront-porch area.
 
#define MIPI_DSI_MODE_VIDEO_HBP   BIT(6)
 Disable hback-porch area.
 
#define MIPI_DSI_MODE_VIDEO_HSA   BIT(7)
 Disable hsync-active area.
 
#define MIPI_DSI_MODE_VSYNC_FLUSH   BIT(8)
 Flush display FIFO on vsync pulse.
 
#define MIPI_DSI_MODE_EOT_PACKET   BIT(9)
 Disable EoT packets in HS mode.
 
#define MIPI_DSI_CLOCK_NON_CONTINUOUS   BIT(10)
 Device supports non-continuous clock behavior (DSI spec 5.6.1)
 
#define MIPI_DSI_MODE_LPM   BIT(11)
 Transmit data in low power.
 

MIPI-DSI Pixel formats.

#define MIPI_DSI_PIXFMT_RGB888   0U
 RGB888 (24bpp).
 
#define MIPI_DSI_PIXFMT_RGB666   1U
 RGB666 (24bpp).
 
#define MIPI_DSI_PIXFMT_RGB666_PACKED   2U
 Packed RGB666 (18bpp).
 
#define MIPI_DSI_PIXFMT_RGB565   3U
 RGB565 (16bpp).
 

Detailed Description

MIPI-DSI driver APIs.

Macro Definition Documentation

◆ MIPI_DCS_ADDRESS_MODE_BGR

#define MIPI_DCS_ADDRESS_MODE_BGR   BIT(3)

◆ MIPI_DCS_ADDRESS_MODE_FLIP_X

#define MIPI_DCS_ADDRESS_MODE_FLIP_X   BIT(1)

◆ MIPI_DCS_ADDRESS_MODE_FLIP_Y

#define MIPI_DCS_ADDRESS_MODE_FLIP_Y   BIT(0)

◆ MIPI_DCS_ADDRESS_MODE_LATCH_RL

#define MIPI_DCS_ADDRESS_MODE_LATCH_RL   BIT(2)

◆ MIPI_DCS_ADDRESS_MODE_MIRROR_X

#define MIPI_DCS_ADDRESS_MODE_MIRROR_X   BIT(6)

◆ MIPI_DCS_ADDRESS_MODE_MIRROR_Y

#define MIPI_DCS_ADDRESS_MODE_MIRROR_Y   BIT(7)

◆ MIPI_DCS_ADDRESS_MODE_REFRESH_BT

#define MIPI_DCS_ADDRESS_MODE_REFRESH_BT   BIT(4)

◆ MIPI_DCS_ADDRESS_MODE_SWAP_XY

#define MIPI_DCS_ADDRESS_MODE_SWAP_XY   BIT(5)

◆ MIPI_DCS_ENTER_IDLE_MODE

#define MIPI_DCS_ENTER_IDLE_MODE   0x39U

◆ MIPI_DCS_ENTER_INVERT_MODE

#define MIPI_DCS_ENTER_INVERT_MODE   0x21U

◆ MIPI_DCS_ENTER_NORMAL_MODE

#define MIPI_DCS_ENTER_NORMAL_MODE   0x13U

◆ MIPI_DCS_ENTER_PARTIAL_MODE

#define MIPI_DCS_ENTER_PARTIAL_MODE   0x12U

◆ MIPI_DCS_ENTER_SLEEP_MODE

#define MIPI_DCS_ENTER_SLEEP_MODE   0x10U

◆ MIPI_DCS_EXIT_IDLE_MODE

#define MIPI_DCS_EXIT_IDLE_MODE   0x38U

◆ MIPI_DCS_EXIT_INVERT_MODE

#define MIPI_DCS_EXIT_INVERT_MODE   0x20U

◆ MIPI_DCS_EXIT_SLEEP_MODE

#define MIPI_DCS_EXIT_SLEEP_MODE   0x11U

◆ MIPI_DCS_GET_3D_CONTROL

#define MIPI_DCS_GET_3D_CONTROL   0x3FU

◆ MIPI_DCS_GET_ADDRESS_MODE

#define MIPI_DCS_GET_ADDRESS_MODE   0x0BU

◆ MIPI_DCS_GET_BLUE_CHANNEL

#define MIPI_DCS_GET_BLUE_CHANNEL   0x08U

◆ MIPI_DCS_GET_CABC_MIN_BRIGHTNESS

#define MIPI_DCS_GET_CABC_MIN_BRIGHTNESS   0x5FU

◆ MIPI_DCS_GET_COMPRESSION_MODE

#define MIPI_DCS_GET_COMPRESSION_MODE   0x03U

◆ MIPI_DCS_GET_CONTROL_DISPLAY

#define MIPI_DCS_GET_CONTROL_DISPLAY   0x54U

◆ MIPI_DCS_GET_DIAGNOSTIC_RESULT

#define MIPI_DCS_GET_DIAGNOSTIC_RESULT   0x0FU

◆ MIPI_DCS_GET_DISPLAY_BRIGHTNESS

#define MIPI_DCS_GET_DISPLAY_BRIGHTNESS   0x52U

◆ MIPI_DCS_GET_DISPLAY_ID

#define MIPI_DCS_GET_DISPLAY_ID   0x04U

◆ MIPI_DCS_GET_DISPLAY_MODE

#define MIPI_DCS_GET_DISPLAY_MODE   0x0DU

◆ MIPI_DCS_GET_DISPLAY_STATUS

#define MIPI_DCS_GET_DISPLAY_STATUS   0x09U

◆ MIPI_DCS_GET_GREEN_CHANNEL

#define MIPI_DCS_GET_GREEN_CHANNEL   0x07U

◆ MIPI_DCS_GET_PIXEL_FORMAT

#define MIPI_DCS_GET_PIXEL_FORMAT   0x0CU

◆ MIPI_DCS_GET_POWER_MODE

#define MIPI_DCS_GET_POWER_MODE   0x0AU

◆ MIPI_DCS_GET_POWER_SAVE

#define MIPI_DCS_GET_POWER_SAVE   0x56U

◆ MIPI_DCS_GET_RED_CHANNEL

#define MIPI_DCS_GET_RED_CHANNEL   0x06U

◆ MIPI_DCS_GET_SCANLINE

#define MIPI_DCS_GET_SCANLINE   0x45U

◆ MIPI_DCS_GET_SIGNAL_MODE

#define MIPI_DCS_GET_SIGNAL_MODE   0x0EU

◆ MIPI_DCS_NOP

#define MIPI_DCS_NOP   0x00U

◆ MIPI_DCS_PIXEL_FORMAT_12BIT

#define MIPI_DCS_PIXEL_FORMAT_12BIT   0x33

◆ MIPI_DCS_PIXEL_FORMAT_16BIT

#define MIPI_DCS_PIXEL_FORMAT_16BIT   0x55

◆ MIPI_DCS_PIXEL_FORMAT_18BIT

#define MIPI_DCS_PIXEL_FORMAT_18BIT   0x66

◆ MIPI_DCS_PIXEL_FORMAT_24BIT

#define MIPI_DCS_PIXEL_FORMAT_24BIT   0x77

◆ MIPI_DCS_PIXEL_FORMAT_3BIT

#define MIPI_DCS_PIXEL_FORMAT_3BIT   0x11

◆ MIPI_DCS_PIXEL_FORMAT_8BIT

#define MIPI_DCS_PIXEL_FORMAT_8BIT   0x22

◆ MIPI_DCS_READ_DDB_CONTINUE

#define MIPI_DCS_READ_DDB_CONTINUE   0xA8U

◆ MIPI_DCS_READ_DDB_START

#define MIPI_DCS_READ_DDB_START   0xA1U

◆ MIPI_DCS_READ_MEMORY_CONTINUE

#define MIPI_DCS_READ_MEMORY_CONTINUE   0x3EU

◆ MIPI_DCS_READ_MEMORY_START

#define MIPI_DCS_READ_MEMORY_START   0x2EU

◆ MIPI_DCS_SET_3D_CONTROL

#define MIPI_DCS_SET_3D_CONTROL   0x3DU

◆ MIPI_DCS_SET_ADDRESS_MODE

#define MIPI_DCS_SET_ADDRESS_MODE   0x36U

◆ MIPI_DCS_SET_CABC_MIN_BRIGHTNESS

#define MIPI_DCS_SET_CABC_MIN_BRIGHTNESS   0x5EU

◆ MIPI_DCS_SET_COLUMN_ADDRESS

#define MIPI_DCS_SET_COLUMN_ADDRESS   0x2AU

◆ MIPI_DCS_SET_DISPLAY_BRIGHTNESS

#define MIPI_DCS_SET_DISPLAY_BRIGHTNESS   0x51U

◆ MIPI_DCS_SET_DISPLAY_OFF

#define MIPI_DCS_SET_DISPLAY_OFF   0x28U

◆ MIPI_DCS_SET_DISPLAY_ON

#define MIPI_DCS_SET_DISPLAY_ON   0x29U

◆ MIPI_DCS_SET_GAMMA_CURVE

#define MIPI_DCS_SET_GAMMA_CURVE   0x26U

◆ MIPI_DCS_SET_PAGE_ADDRESS

#define MIPI_DCS_SET_PAGE_ADDRESS   0x2BU

◆ MIPI_DCS_SET_PARTIAL_COLUMNS

#define MIPI_DCS_SET_PARTIAL_COLUMNS   0x31U

◆ MIPI_DCS_SET_PARTIAL_ROWS

#define MIPI_DCS_SET_PARTIAL_ROWS   0x30U

◆ MIPI_DCS_SET_PIXEL_FORMAT

#define MIPI_DCS_SET_PIXEL_FORMAT   0x3AU

◆ MIPI_DCS_SET_SCROLL_AREA

#define MIPI_DCS_SET_SCROLL_AREA   0x33U

◆ MIPI_DCS_SET_SCROLL_START

#define MIPI_DCS_SET_SCROLL_START   0x37U

◆ MIPI_DCS_SET_TEAR_OFF

#define MIPI_DCS_SET_TEAR_OFF   0x34U

◆ MIPI_DCS_SET_TEAR_ON

#define MIPI_DCS_SET_TEAR_ON   0x35U

◆ MIPI_DCS_SET_TEAR_SCANLINE

#define MIPI_DCS_SET_TEAR_SCANLINE   0x44U

◆ MIPI_DCS_SET_VSYNC_TIMING

#define MIPI_DCS_SET_VSYNC_TIMING   0x40U

◆ MIPI_DCS_SOFT_RESET

#define MIPI_DCS_SOFT_RESET   0x01U

◆ MIPI_DCS_WRITE_CONTROL_DISPLAY

#define MIPI_DCS_WRITE_CONTROL_DISPLAY   0x53U

◆ MIPI_DCS_WRITE_LUT

#define MIPI_DCS_WRITE_LUT   0x2DU

◆ MIPI_DCS_WRITE_MEMORY_CONTINUE

#define MIPI_DCS_WRITE_MEMORY_CONTINUE   0x3CU

◆ MIPI_DCS_WRITE_MEMORY_START

#define MIPI_DCS_WRITE_MEMORY_START   0x2CU

◆ MIPI_DCS_WRITE_POWER_SAVE

#define MIPI_DCS_WRITE_POWER_SAVE   0x55U

◆ MIPI_DSI_BLANKING_PACKET

#define MIPI_DSI_BLANKING_PACKET   0x19U

◆ MIPI_DSI_CLOCK_NON_CONTINUOUS

#define MIPI_DSI_CLOCK_NON_CONTINUOUS   BIT(10)

#include <zephyr/drivers/mipi_dsi.h>

Device supports non-continuous clock behavior (DSI spec 5.6.1)

◆ MIPI_DSI_COLOR_MODE_OFF

#define MIPI_DSI_COLOR_MODE_OFF   0x02U

◆ MIPI_DSI_COLOR_MODE_ON

#define MIPI_DSI_COLOR_MODE_ON   0x12U

◆ MIPI_DSI_DCS_LONG_WRITE

#define MIPI_DSI_DCS_LONG_WRITE   0x39U

◆ MIPI_DSI_DCS_READ

#define MIPI_DSI_DCS_READ   0x06U

◆ MIPI_DSI_DCS_SHORT_WRITE

#define MIPI_DSI_DCS_SHORT_WRITE   0x05U

◆ MIPI_DSI_DCS_SHORT_WRITE_PARAM

#define MIPI_DSI_DCS_SHORT_WRITE_PARAM   0x15U

◆ MIPI_DSI_END_OF_TRANSMISSION

#define MIPI_DSI_END_OF_TRANSMISSION   0x08U

◆ MIPI_DSI_GENERIC_LONG_WRITE

#define MIPI_DSI_GENERIC_LONG_WRITE   0x29U

◆ MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM

#define MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM   0x04U

◆ MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM

#define MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM   0x14U

◆ MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM

#define MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM   0x24U

◆ MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM

#define MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM   0x03U

◆ MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM

#define MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM   0x13U

◆ MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM

#define MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM   0x23U

◆ MIPI_DSI_H_SYNC_END

#define MIPI_DSI_H_SYNC_END   0x31U

◆ MIPI_DSI_H_SYNC_START

#define MIPI_DSI_H_SYNC_START   0x21U

◆ MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20

#define MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20   0x0CU

◆ MIPI_DSI_MODE_EOT_PACKET

#define MIPI_DSI_MODE_EOT_PACKET   BIT(9)

#include <zephyr/drivers/mipi_dsi.h>

Disable EoT packets in HS mode.

◆ MIPI_DSI_MODE_LPM

#define MIPI_DSI_MODE_LPM   BIT(11)

#include <zephyr/drivers/mipi_dsi.h>

Transmit data in low power.

◆ MIPI_DSI_MODE_VIDEO

#define MIPI_DSI_MODE_VIDEO   BIT(0)

#include <zephyr/drivers/mipi_dsi.h>

Video mode.

◆ MIPI_DSI_MODE_VIDEO_AUTO_VERT

#define MIPI_DSI_MODE_VIDEO_AUTO_VERT   BIT(3)

#include <zephyr/drivers/mipi_dsi.h>

Enable auto vertical count mode.

◆ MIPI_DSI_MODE_VIDEO_BURST

#define MIPI_DSI_MODE_VIDEO_BURST   BIT(1)

#include <zephyr/drivers/mipi_dsi.h>

Video burst mode.

◆ MIPI_DSI_MODE_VIDEO_HBP

#define MIPI_DSI_MODE_VIDEO_HBP   BIT(6)

#include <zephyr/drivers/mipi_dsi.h>

Disable hback-porch area.

◆ MIPI_DSI_MODE_VIDEO_HFP

#define MIPI_DSI_MODE_VIDEO_HFP   BIT(5)

#include <zephyr/drivers/mipi_dsi.h>

Disable hfront-porch area.

◆ MIPI_DSI_MODE_VIDEO_HSA

#define MIPI_DSI_MODE_VIDEO_HSA   BIT(7)

#include <zephyr/drivers/mipi_dsi.h>

Disable hsync-active area.

◆ MIPI_DSI_MODE_VIDEO_HSE

#define MIPI_DSI_MODE_VIDEO_HSE   BIT(4)

#include <zephyr/drivers/mipi_dsi.h>

Enable hsync-end packets in vsync-pulse and v-porch area.

◆ MIPI_DSI_MODE_VIDEO_SYNC_PULSE

#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE   BIT(2)

#include <zephyr/drivers/mipi_dsi.h>

Video pulse mode.

◆ MIPI_DSI_MODE_VSYNC_FLUSH

#define MIPI_DSI_MODE_VSYNC_FLUSH   BIT(8)

#include <zephyr/drivers/mipi_dsi.h>

Flush display FIFO on vsync pulse.

◆ MIPI_DSI_NULL_PACKET

#define MIPI_DSI_NULL_PACKET   0x09U

◆ MIPI_DSI_PACKED_PIXEL_STREAM_16

#define MIPI_DSI_PACKED_PIXEL_STREAM_16   0x0EU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_18

#define MIPI_DSI_PACKED_PIXEL_STREAM_18   0x1EU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_24

#define MIPI_DSI_PACKED_PIXEL_STREAM_24   0x3EU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_30

#define MIPI_DSI_PACKED_PIXEL_STREAM_30   0x0DU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_36

#define MIPI_DSI_PACKED_PIXEL_STREAM_36   0x1DU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12

#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12   0x3DU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16

#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16   0x2CU

◆ MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24

#define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24   0x1CU

◆ MIPI_DSI_PIXEL_STREAM_3BYTE_18

#define MIPI_DSI_PIXEL_STREAM_3BYTE_18   0x2EU

◆ MIPI_DSI_PIXFMT_RGB565

#define MIPI_DSI_PIXFMT_RGB565   3U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

RGB565 (16bpp).

◆ MIPI_DSI_PIXFMT_RGB666

#define MIPI_DSI_PIXFMT_RGB666   1U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

RGB666 (24bpp).

◆ MIPI_DSI_PIXFMT_RGB666_PACKED

#define MIPI_DSI_PIXFMT_RGB666_PACKED   2U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

Packed RGB666 (18bpp).

◆ MIPI_DSI_PIXFMT_RGB888

#define MIPI_DSI_PIXFMT_RGB888   0U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

RGB888 (24bpp).

◆ MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE

#define MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE   0x37U

◆ MIPI_DSI_SHUTDOWN_PERIPHERAL

#define MIPI_DSI_SHUTDOWN_PERIPHERAL   0x22U

◆ MIPI_DSI_TURN_ON_PERIPHERAL

#define MIPI_DSI_TURN_ON_PERIPHERAL   0x32U

◆ MIPI_DSI_V_SYNC_END

#define MIPI_DSI_V_SYNC_END   0x11U

◆ MIPI_DSI_V_SYNC_START

#define MIPI_DSI_V_SYNC_START   0x01U

Function Documentation

◆ mipi_dsi_attach()

static int mipi_dsi_attach ( const struct device dev,
uint8_t  channel,
const struct mipi_dsi_device mdev 
)
inlinestatic

#include <zephyr/drivers/mipi_dsi.h>

Attach a new device to the MIPI-DSI bus.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
mdevMIPI-DSI device description.
Returns
0 on success, negative on error

◆ mipi_dsi_dcs_read()

ssize_t mipi_dsi_dcs_read ( const struct device dev,
uint8_t  channel,
uint8_t  cmd,
void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI DCS read.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
cmdDCS command.
bufBuffer where read data will be stored.
lenLength of the reception buffer.
Returns
Size of the read data on success, negative on error.

◆ mipi_dsi_dcs_write()

ssize_t mipi_dsi_dcs_write ( const struct device dev,
uint8_t  channel,
uint8_t  cmd,
const void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI DCS write.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
cmdDCS command.
bufTransmission buffer.
lenLength of the transmission buffer
Returns
Size of the written data on success, negative on error.

◆ mipi_dsi_generic_read()

ssize_t mipi_dsi_generic_read ( const struct device dev,
uint8_t  channel,
const void *  params,
size_t  nparams,
void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI generic read.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
paramsBuffer containing request parameters.
nparamsNumber of parameters.
bufBuffer where read data will be stored.
lenLength of the reception buffer.
Returns
Size of the read data on success, negative on error.

◆ mipi_dsi_generic_write()

ssize_t mipi_dsi_generic_write ( const struct device dev,
uint8_t  channel,
const void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI generic write.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
bufTransmission buffer.
lenLength of the transmission buffer
Returns
Size of the written data on success, negative on error.

◆ mipi_dsi_transfer()

static ssize_t mipi_dsi_transfer ( const struct device dev,
uint8_t  channel,
struct mipi_dsi_msg msg 
)
inlinestatic

#include <zephyr/drivers/mipi_dsi.h>

Transfer data to/from a device attached to the MIPI-DSI bus.

Parameters
devMIPI-DSI device.
channelDevice channel (VID).
msgMessage.
Returns
Size of the transferred data on success, negative on error.