Go to the documentation of this file.
18#ifndef __VSF_DISP_MIPI_LCD_DISPLAY_COMMAND_SET_H__
19#define __VSF_DISP_MIPI_LCD_DISPLAY_COMMAND_SET_H__
23#if VSF_USE_UI == ENABLED && VSF_DISP_USE_MIPI_LCD == ENABLED
31#define VSF_DISP_MIPI_LCD_WRITE(__CMD, __PARAM_LEN, ...) \
32 (__CMD), (__PARAM_LEN), ##__VA_ARGS__
34#define VSF_DISP_MIPI_LCD_DELAY_MS(__MS) \
44#define MIPI_DCS_CMD_HEX_CODE_NOP 0x00
45#define MIPI_DCS_CMD_NOP \
46 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_NOP, 0)
49#define MIPI_DCS_CMD_HEX_CODE_SOFT_RESET 0x01
50#define MIPI_DCS_CMD_SOFT_RESET \
51 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SOFT_RESET, 0)
53#define MIPI_DCS_CMD_HEX_CODE_GET_COMPRESSION_MODE 0x03
54#define MIPI_DCS_CMD_HEX_CODE_GET_DISPLAY_ID 0x04
55#define MIPI_DCS_CMD_HEX_CODE_GET_ERROR_COUNT_ON_DSI 0x05
56#define MIPI_DCS_CMD_HEX_CODE_GET_RED_CHANNEL 0x06
57#define MIPI_DCS_CMD_HEX_CODE_GET_GREEN_CHANNEL 0x07
58#define MIPI_DCS_CMD_HEX_CODE_GET_BLUE_CHANNEL 0x08
59#define MIPI_DCS_CMD_HEX_CODE_GET_DISPLAY_STATUS 0x09
60#define MIPI_DCS_CMD_HEX_CODE_GET_POWER_MODE 0x0A
61#define MIPI_DCS_CMD_HEX_CODE_GET_ADDRESS_MODE 0x0B
62#define MIPI_DCS_CMD_HEX_CODE_GET_PIXEL_FORMAT 0x0C
63#define MIPI_DCS_CMD_HEX_CODE_GET_DISPLAY_MODE 0x0D
64#define MIPI_DCS_CMD_HEX_CODE_GET_SIGNAL_MODE 0x0E
65#define MIPI_DCS_CMD_HEX_CODE_GET_DIAGNOSTIC_RESULT 0x0F
68#define MIPI_DCS_CMD_HEX_CODE_ENTER_SLEEP_MODE 0x10
69#define MIPI_DCS_CMD_ENTER_SLEEP_MODE \
70 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_ENTER_SLEEP_MODE, 0)
73#define MIPI_DCS_CMD_HEX_CODE_EXIT_SLEEP_MODE 0x11
74#define MIPI_DCS_CMD_EXIT_SLEEP_MODE \
75 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_EXIT_SLEEP_MODE, 0)
78#define MIPI_DCS_CMD_HEX_CODE_ENTER_PARTIAL_MODE 0x12
79#define MIPI_DCS_CMD_ENTER_PARTIAL_MODE \
80 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_ENTER_PARTIAL_MODE, 0)
83#define MIPI_DCS_CMD_HEX_CODE_ENTER_NORMAL_MODE 0x13
84#define MIPI_DCS_CMD_ENTER_NORMAL_MODE \
85 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_ENTER_NORMAL_MODE, 0)
92#define MIPI_DCS_CMD_HEX_CODE_EXIT_INVERT_MODE 0x20
93#define MIPI_DCS_CMD_EXIT_INVERT_MODE \
94 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_EXIT_INVERT_MODE, 0)
97#define MIPI_DCS_CMD_HEX_CODE_ENTER_INVERT_MODE 0x21
98#define MIPI_DCS_CMD_ENTER_INVERT_MODE \
99 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_ENTER_INVERT_MODE, 0)
102#define MIPI_DCS_CMD_HEX_CODE_SET_GAMMA_CURVE 0x26
103#define MIPI_DCS_CMD_GAMMA_CURVE_GC0 0x01
104#define MIPI_DCS_CMD_GAMMA_CURVE_GC1 0x02
105#define MIPI_DCS_CMD_GAMMA_CURVE_GC2 0x04
106#define MIPI_DCS_CMD_GAMMA_CURVE_GC3 0x08
107#define MIPI_DCS_CMD_SET_GAMMA_CURVE(__GC_MASK) \
108 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_GAMMA_CURVE, 0, __GC_MASK)
111#define MIPI_DCS_CMD_HEX_CODE_SET_DISPLAY_OFF 0x28
112#define MIPI_DCS_CMD_SET_DISPLAY_OFF \
113 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_DISPLAY_OFF, 0)
116#define MIPI_DCS_CMD_HEX_CODE_SET_DISPLAY_ON 0x29
117#define MIPI_DCS_CMD_SET_DISPLAY_ON \
118 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_DISPLAY_ON, 0)
121#define MIPI_DCS_CMD_HEX_CODE_SET_COLUMN_ADDRESS 0x2A
123#define MIPI_DCS_CMD_SET_COLUMN_ADDRESS(__SC, __EC) \
124 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_COLUMN_ADDRESS, 4,\
125 ((uint16_t)__SC >> 8), (__SC & 0xFF), \
126 ((uint16_t)__EC >> 8), (__EC & 0xFF))
129#define MIPI_DCS_CMD_HEX_CODE_SET_PAGE_ADDRESS 0x2B
131#define MIPI_DCS_CMD_SET_PAGE_ADDRESS(__SP, __EP) \
132 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_PAGE_ADDRESS, 4, \
133 ((uint16_t)__SP >> 8), (__SP & 0xFF), \
134 ((uint16_t)__EP >> 8), (__EP & 0xFF))
138#define MIPI_DCS_CMD_HEX_CODE_WRITE_MEMORY_START 0x2C
139#define MIPI_DCS_CMD_WRITE_MEMORY_START(__NUM, ...) \
140 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_WRITE_MEMORY_START, __NUM, ##__VA_ARGS__)
143#define MIPI_DCS_CMD_HEX_CODE_WRITE_LUT 0x2D
144#define MIPI_DCS_CMD_WRITE_LUT(__NUM, ...) \
145 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_WRITE_LUT, __NUM, ##__VA_ARGS__)
151#define MIPI_DCS_CMD_HEX_CODE_SET_PARTIAL_ROWS 0x30
153#define MIPI_DCS_CMD_SET_PARTIAL_ROWS(__SR, __ER) \
154 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_PARTIAL_ROWS, 4, \
155 ((uint16_t)__SR >> 8), (__SR & 0xFF), \
156 ((uint16_t)__ER >> 8), (__ER & 0xFF))
158#define MIPI_DCS_CMD_HEX_CODE_SET_PARTIAL_COLUMNS 0x31
160#define MIPI_DCS_CMD_SET_PARTIAL_COLUMNS(__SC, __EC) \
161 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_PARTIAL_COLUMNS, 4, \
162 ((uint16_t)__SC >> 8), (__SC & 0xFF), \
163 ((uint16_t)__EC >> 8), (__EC & 0xFF))
166#define MIPI_DCS_CMD_HEX_CODE_SET_SCROLL_AREA 0x33
168#define MIPI_DCS_CMD_SET_SCROLL_AREA(__TFA, __VERTICAL_SCROLLING_AREA, __BFA) \
169 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_SCROLL_AREA, 6, \
170 ((uint16_t)__TFA >> 8), (__TFA & 0xFF), \
171 ((uint16_t)__VSA >> 8), (__VSA & 0xFF), \
172 ((uint16_t)__BFA >> 8), (__BFA & 0xFF))
175#define MIPI_DCS_CMD_HEX_CODE_SET_TEAR_OFF 0x34
176#define MIPI_DCS_CMD_SET_TEAR_OFF \
177 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_TEAR_OFF, 0)
180#define MIPI_DCS_CMD_HEX_CODE_SET_TEAR_ON 0x35
181#define MIPI_DCS_CMD_SET_TEAR_ON \
182 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_TEAR_ON, 0)
184#define MIPI_DCS_CMD_HEX_CODE_SET_ADDRESS_MODE 0x36
187#define MIPI_DCS_PAGE_ADDRESS_TOP_TO_BOTTOM (0 << 7)
188#define MIPI_DCS_PAGE_ADDRESS_BOTTOM_TO_TOP (1 << 7)
190#define MIPI_DCS_COLUME_ADDRESS_LEFT_TO_RIGHT (0 << 6)
191#define MIPI_DCS_COLUME_ADDRESS_RIGHT_TO_LEFT (1 << 6)
195#define MIPI_DCS_PAGE_COLUMN_NORMAL_ORDER (0 << 5)
196#define MIPI_DCS_PAGE_COLUMN_REVERSE_ORDER (1 << 5)
199#define MIPI_DCS_DEVICE_REFRESH_TOP_TO_BOTTOM (0 << 4)
200#define MIPI_DCS_DEVICE_REFRESH_BOTTOM_TO_TOP (1 << 4)
202#define MIPI_DCS_DEVICE_REFRESH_RGB (0 << 3)
203#define MIPI_DCS_DEVICE_REFRESH_BGR (1 << 3)
205#define MIPI_DCS_LCD_REFRESH_LEFT_TO_RIGHT (0 << 2)
206#define MIPI_DCS_LCD_REFRESH_RIGHT_TO_LEFT (1 << 2)
208#define MIPI_DCS_FLIP_HORIZONTAL_NORMAL (0 << 1)
209#define MIPI_DCS_FLIP_HORIZONTAL_FLIPPED (1 << 1)
211#define MIPI_DCS_FLIP_VERTICAL_NORMAL (0 << 0)
212#define MIPI_DCS_FLIP_VERTICAL_FLIPPED (1 << 0)
214#define MIPI_DCS_CMD_SET_ADDRESS_MODE(__MODE_MASK) \
215 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_ADDRESS_MODE, 1, __MODE_MASK)
218#define MIPI_DCS_CMD_HEX_CODE_SET_SCROLL_START 0x37
219#define MIPI_DCS_CMD_SET_SCROLL_START(__VSP) \
220 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_SCROLL_START, 2, \
221 ((uint16_t)__VSP >> 8), (__VSP & 0xFF))
224#define MIPI_DCS_CMD_HEX_CODE_EXIT_IDLE_MODE 0x38
225#define MIPI_DCS_CMD_EXIT_IDLE_MODE \
226 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_EXIT_IDLE_MODE, 0)
229#define MIPI_DCS_CMD_HEX_CODE_ENTER_IDLE_MODE 0x39
230#define MIPI_DCS_CMD_ENTER_IDLE_MODE \
231 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_ENTER_IDLE_MODE, 0)
235#define MIPI_DCS_CMD_HEX_CODE_SET_PIXEL_FORMAT 0x3A
236#define MIPI_DCS_PIXEL_FORMAT_BITS_3 0x01
237#define MIPI_DCS_PIXEL_FORMAT_BITS_8 0x02
238#define MIPI_DCS_PIXEL_FORMAT_BITS_12 0x03
239#define MIPI_DCS_PIXEL_FORMAT_BITS_16 0x05
240#define MIPI_DCS_PIXEL_FORMAT_BITS_18 0x06
241#define MIPI_DCS_PIXEL_FORMAT_BITS_24 0x07
243#define MIPI_DCS_PIXEL_FORMAT_BITS(__BITS) MIPI_DCS_PIXEL_FORMAT_BITS_ ## __BITS
246#define MIPI_DCS_PIXEL_FORMAT_DBI_BITS(__BITS) MIPI_DCS_PIXEL_FORMAT_BITS(__BITS)
249#define MIPI_DCS_PIXEL_FORMAT_DPI_BITS(__BITS) (MIPI_DCS_PIXEL_FORMAT_BITS(__BITS) << 4)
250#define MIPI_DCS_CMD_SET_PIXEL_FORMAT(__PF) \
251 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_PIXEL_FORMAT, 1, __PF)
254#define MIPI_DCS_CMD_HEX_CODE_WRITE_MEMORY_CONTINUE 0x3C
255#define MIPI_DCS_CMD_WRITE_MEMORY_CONTINUE(__LEN, ...) \
256 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_WRITE_MEMORY_CONTINUE, __LEN, ##__VA_ARGS__)
259#define MIPI_DCS_CMD_HEX_CODE_SET_3D_CONTROL 0x3D
261#define MIPI_DCS_3D_CONTROL_LEFT_EYE_FIRST (0 << 5)
262#define MIPI_DCS_3D_CONTROL_RIGHT_EYE_FIRST (1 << 5)
266#define MIPI_DCS_3D_CONTROL_3DVSYNC_NO (0 << 4)
267#define MIPI_DCS_3D_CONTROL_3DVSYNC_SYNC (1 << 4)
272#define MIPI_DCS_3D_CONTROL_3DFMT_LINE (0 << 2)
273#define MIPI_DCS_3D_CONTROL_3DFMT_FRAME (1 << 2)
274#define MIPI_DCS_3D_CONTROL_3DFMT_PIXEL (2 << 2)
279#define MIPI_DCS_3D_CONTROL_3DMODE_OFF (0 << 0)
280#define MIPI_DCS_3D_CONTROL_3DMODE_ON_PO (1 << 0)
281#define MIPI_DCS_3D_CONTROL_3DMODE_ON_LO (2 << 0)
282#define MIPI_DCS_CMD_SET_3D_CONTROL(__V) \
283 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_3D_CONTROL, 2, __V, 0)
290#define MIPI_DCS_CMD_HEX_CODE_SET_VSYNC_TIMING 0x40
292#define MIPI_DCS_VSYNC_TIMING_NO_RESET (0 << 7)
293#define MIPI_DCS_VSYNC_TIMING_RESET (1 << 7)
295#define MIPI_DCS_VSYNC_TIMING_LD_LATER (0 << 7)
296#define MIPI_DCS_VSYNC_TIMING_LD_EARLIER (1 << 7)
298#define MIPI_DCS_VSYNC_TIMING_LD_LINES(__L) (__L << 1)
300#define MIPI_DCS_VSYNC_TIMING_NEXT_FRAME (0 << 0)
301#define MIPI_DCS_VSYNC_TIMING_FRAME_AFTER_NEXT_FRAME (1 << 0)
302#define MIPI_DCS_CMD_SET_VSYNC_TIMING(__V) \
303 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_VSYNC_TIMING, 1)
308#define MIPI_DCS_CMD_HEX_CODE_SET_TEAR_SCANLINE 0x44
309#define MIPI_DCS_CMD_SET_TEAR_SCANLINE(__N) \
310 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_TEAR_SCANLINE, 2, \
311 ((uint16_t)__N >> 8), (__N & 0xFF)
317#define MIPI_DCS_CMD_HEX_CODE_SET_DISPLAY_BRIGHTNESS 0x51
318#define MIPI_DCS_CMD_SET_DISPLAY_BRIGHTNESS(__B) \
319 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_DISPLAY_BRIGHTNESS, 1, __B)
325#define MIPI_DCS_CMD_HEX_CODE_WRITE_CONTROL_DISPLAY 0x53
326#define MIPI_DCS_CMD_WRITE_CONTROL_DISPLAY(__DISP) \
327 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_WRITE_CONTROL_DISPLAY, 1, __DISP)
333#define MIPI_DCS_CMD_HEX_CODE_WRITE_POWER_SAVE 0x55
334#define MIPI_DCS_CMD_WRITE_POWER_SAVE(__V) \
335 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_WRITE_POWER_SAVE, 1, __V)
341#define MIPI_DCS_CMD_HEX_CODE_SET_CABC_MIN_BRIGHTNESS 0x5E
342#define MIPI_DCS_CMD_SET_CABC_MIN_BRIGHTNESS(__B) \
343 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_CABC_MIN_BRIGHTNESS, 1, __B)
351#define MIPI_MODE_X_FLIP MIPI_DCS_COLUME_ADDRESS_RIGHT_TO_LEFT
352#define MIPI_MODE_Y_FLIP MIPI_DCS_PAGE_ADDRESS_BOTTOM_TO_TOP
353#define MIPI_MODE_RGB MIPI_DCS_DEVICE_REFRESH_RGB
354#define MIPI_MODE_BGR MIPI_DCS_DEVICE_REFRESH_BGR
357#define MIPI_PIXEL_FORMAT_BITLEN(__BITLEN) MIPI_DCS_PIXEL_FORMAT_DBI_BITS(__BITLEN)
359#define MIPI_SOFT_RESET MIPI_DCS_CMD_SOFT_RESET
361#define MIPI_ENTER_IDLE MIPI_DCS_CMD_HEX_CODE_ENTER_IDLE_MODE
363#define MIPI_EXIT_IDLE MIPI_DCS_CMD_HEX_CODE_EXIT_IDLE_MODE
365#define MIPI_ENTER_SLEEP MIPI_DCS_CMD_ENTER_SLEEP_MODE
367#define MIPI_EXIT_SLEEP MIPI_DCS_CMD_EXIT_SLEEP_MODE
369#define MIPI_ENTER_PARTIAL_MODE MIPI_DCS_CMD_ENTER_PARTIAL_MODE
371#define MIPI_EXIT_PARTIAL_MODE MIPI_DCS_CMD_ENTER_NORMAL_MODE
373#define MIPI_ENTER_INVERT_MODE MIPI_DCS_CMD_HEX_CODE_ENTER_INVERT_MODE
375#define MIPI_EXIT_INVERT_MODE MIPI_DCS_CMD_HEX_CODE_EXIT_INVERT_MODE
377#define MIPI_TEAR_PIN_ON MIPI_DCS_CMD_SET_TEAR_ON
379#define MIPI_TEAR_PIN_OFF MIPI_DCS_CMD_SET_TEAR_OFF
385#define VSF_DISP_MIPI_LCD_INITSEQ(__LCD_SEQ, ...) \
388 MIPI_DCS_CMD_SET_DISPLAY_ON
396#define VSF_DISP_MIPI_LCD_CO5300_BASE \
397 VSF_DISP_MIPI_LCD_WRITE(0xFE, 1, 0x20), \
398 VSF_DISP_MIPI_LCD_WRITE(0xF4, 1, 0x5A), \
399 VSF_DISP_MIPI_LCD_WRITE(0xF5, 1, 0x59), \
400 VSF_DISP_MIPI_LCD_WRITE(0xFE, 1, 0x20), \
401 VSF_DISP_MIPI_LCD_WRITE(0xF4, 1, 0xA5), \
402 VSF_DISP_MIPI_LCD_WRITE(0xF5, 1, 0xA5), \
403 VSF_DISP_MIPI_LCD_WRITE(0xFE, 1, 0x00), \
404 VSF_DISP_MIPI_LCD_WRITE(0xC4, 1, 0x80), \
405 VSF_DISP_MIPI_LCD_WRITE(0x3A, 1, 0x55), \
406 VSF_DISP_MIPI_LCD_WRITE(0x35, 1, 0x00), \
407 VSF_DISP_MIPI_LCD_WRITE(0x53, 1, 0x20), \
408 VSF_DISP_MIPI_LCD_WRITE(0x63, 1, 0xFF), \
409 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_EXIT_SLEEP_MODE, 0)
411#define VSF_DISP_MIPI_LCD_S6D05A1_BASE \
412 VSF_DISP_MIPI_LCD_WRITE(0xF0, 2, 0x5A, 0x5A), \
413 VSF_DISP_MIPI_LCD_WRITE(0xF1, 2, 0x5A, 0x5A), \
414 VSF_DISP_MIPI_LCD_WRITE(0xF2, 19, 0x3B, 0x40, 0x03, 0x04, 0x02, 0x08, 0x08, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x08, 0x08, 0x08), \
415 VSF_DISP_MIPI_LCD_WRITE(0xF4, 14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x03, 0x00, 0x70, 0x03), \
416 VSF_DISP_MIPI_LCD_WRITE(0xF5, 12, 0x00, 0x54, 0x73, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x53, 0x71), \
417 VSF_DISP_MIPI_LCD_WRITE(0xF6, 8, 0x04, 0x00, 0x08, 0x03, 0x01, 0x00, 0x01, 0x00), \
418 VSF_DISP_MIPI_LCD_WRITE(0xF7, 5, 0x48, 0x80, 0x10, 0x02, 0x00), \
419 VSF_DISP_MIPI_LCD_WRITE(0xF8, 2, 0x11, 0x00), \
420 VSF_DISP_MIPI_LCD_WRITE(0xF9, 1, 0x27), \
421 VSF_DISP_MIPI_LCD_WRITE(0xFA, 20, 0x0B, 0x0B, 0x0F, 0x26, 0x2A, 0x30, 0x33, 0x12, 0x1F, 0x25, 0x31, 0x30, 0x24, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x3F)
423#define VSF_DISP_MIPI_LCD_ILI9488_BASE \
424 VSF_DISP_MIPI_LCD_WRITE(0xE0, 15, 0x00, 0x07, 0x0f, 0x0D, 0x1B, 0x0A, 0x3c, 0x78, 0x4A, 0x07, 0x0E, 0x09, 0x1B, 0x1e, 0x0f), \
425 VSF_DISP_MIPI_LCD_WRITE(0xE1, 15, 0x00, 0x22, 0x24, 0x06, 0x12, 0x07, 0x36, 0x47, 0x47, 0x06, 0x0a, 0x07, 0x30, 0x37, 0x0f), \
426 VSF_DISP_MIPI_LCD_WRITE(0xC0, 2, 0x10, 0x10), \
427 VSF_DISP_MIPI_LCD_WRITE(0xC1, 1, 0x41), \
428 VSF_DISP_MIPI_LCD_WRITE(0xC5, 3, 0x00, 0x22, 0x80), \
429 VSF_DISP_MIPI_LCD_WRITE(0xB0, 1, 0x00), \
430 VSF_DISP_MIPI_LCD_WRITE(0xB1, 2, 0x60, 0x11), \
431 VSF_DISP_MIPI_LCD_WRITE(0xB4, 1, 0x02), \
432 VSF_DISP_MIPI_LCD_WRITE(0xB6, 2, 0x02, 0x02), \
433 VSF_DISP_MIPI_LCD_WRITE(0xB7, 1, 0x06), \
434 VSF_DISP_MIPI_LCD_WRITE(0xE9, 1, 0x00), \
435 VSF_DISP_MIPI_LCD_WRITE(0xF7, 4, 0xA9, 0x51, 0x2C, 0x82)
437#define VSF_DISP_MIPI_LCD_ILI9341_BASE \
438 VSF_DISP_MIPI_LCD_WRITE(0xCF, 3, 0x00, 0xC1, 0x30), \
439 VSF_DISP_MIPI_LCD_WRITE(0xED, 4, 0x64, 0x03, 0x12, 0x81), \
440 VSF_DISP_MIPI_LCD_WRITE(0xE8, 3, 0x85, 0x10, 0x7A), \
441 VSF_DISP_MIPI_LCD_WRITE(0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02), \
442 VSF_DISP_MIPI_LCD_WRITE(0xF7, 1, 0x20), \
443 VSF_DISP_MIPI_LCD_WRITE(0xEA, 2, 0x00, 0x00), \
444 VSF_DISP_MIPI_LCD_WRITE(0xC0, 1, 0x1B), \
445 VSF_DISP_MIPI_LCD_WRITE(0xC1, 1, 0x01), \
446 VSF_DISP_MIPI_LCD_WRITE(0xC5, 2, 0x30, 0x30), \
447 VSF_DISP_MIPI_LCD_WRITE(0xC7, 1, 0xB7), \
448 VSF_DISP_MIPI_LCD_WRITE(0xB1, 2, 0x01, 0x1B), \
449 VSF_DISP_MIPI_LCD_WRITE(0xB6, 2, 0x02, 0x82), \
450 VSF_DISP_MIPI_LCD_WRITE(0xB5, 4, 0x5F, 0x5F, 0x3F, 0x3F), \
451 VSF_DISP_MIPI_LCD_WRITE(0xF2, 1, 0x00), \
452 VSF_DISP_MIPI_LCD_WRITE(MIPI_DCS_CMD_HEX_CODE_SET_GAMMA_CURVE, 1, 0x01), \
453 VSF_DISP_MIPI_LCD_WRITE(0xE0, 15, 0x0F, 0x2A, 0x28, 0x08, 0x0E, 0x08, 0x54, 0xA9, 0x43, 0x0A, 0x0F, 0x00, 0x00, 0x00, 0x00), \
454 VSF_DISP_MIPI_LCD_WRITE(0xE1, 15, 0x00, 0x15, 0x17, 0x07, 0x11, 0x06, 0x2B, 0x56, 0x3C, 0x05, 0x10, 0x0F, 0x3F, 0x3F, 0x0F)
456#define VSF_DISP_MIPI_LCD_ST7789V_BASE \
457 VSF_DISP_MIPI_LCD_WRITE(0xB1, 3, 0x40, 0x7F, 0x14), \
458 VSF_DISP_MIPI_LCD_WRITE(0xB2, 5, 0x0C, 0x0C, 0x00, 0x33, 0x33), \
459 VSF_DISP_MIPI_LCD_WRITE(0xB7, 1, 0x35), \
460 VSF_DISP_MIPI_LCD_WRITE(0xBB, 1, 0x20), \
461 VSF_DISP_MIPI_LCD_WRITE(0xC0, 1, 0x2C), \
462 VSF_DISP_MIPI_LCD_WRITE(0xC2, 1, 0x01), \
463 VSF_DISP_MIPI_LCD_WRITE(0xC3, 1, 0x0B), \
464 VSF_DISP_MIPI_LCD_WRITE(0xC4, 1, 0x20), \
465 VSF_DISP_MIPI_LCD_WRITE(0xC6, 1, 0x1F), \
466 VSF_DISP_MIPI_LCD_WRITE(0xD0, 2, 0xA4, 0xA1), \
467 VSF_DISP_MIPI_LCD_WRITE(0xE0, 14, 0xD0, 0x03, 0x09, 0x0E, 0x11, 0x3D, 0x47, 0x55, 0x53, 0x1A, 0x16, 0x14, 0x1F, 0x22), \
468 VSF_DISP_MIPI_LCD_WRITE(0xE1, 14, 0xD0, 0x02, 0x08, 0x0D, 0x12, 0x2C, 0x43, 0x55, 0x53, 0x1E, 0x1B, 0x19, 0x20, 0x22)
470#define VSF_DISP_MIPI_LCD_ST7796S_BASE \
471 VSF_DISP_MIPI_LCD_WRITE(0xF0, 1, 0xC3), \
472 VSF_DISP_MIPI_LCD_WRITE(0xF0, 1, 0x96), \
473 VSF_DISP_MIPI_LCD_WRITE(0xE8, 8, 0x40, 0x82, 0x07, 0x18, 0x27, 0x0A, 0xB6, 0x33), \
474 VSF_DISP_MIPI_LCD_WRITE(0xC5, 1, 0x27), \
475 VSF_DISP_MIPI_LCD_WRITE(0xC2, 1, 0xA7), \
476 VSF_DISP_MIPI_LCD_WRITE(0xE0, 14, 0xF0, 0x01, 0x06, 0x0F, 0x12, 0x1D, 0x36, 0x54, 0x44, 0x0C, 0x18, 0x16, 0x13, 0x15), \
477 VSF_DISP_MIPI_LCD_WRITE(0xE1, 14, 0xF0, 0x01, 0x05, 0x0A, 0x0B, 0x07, 0x32, 0x44, 0x44, 0x0C, 0x18, 0x17, 0x13, 0x16), \
478 VSF_DISP_MIPI_LCD_WRITE(0xB5, 4, 0xFF, 0xFF, 0x00, 0x04), \
479 VSF_DISP_MIPI_LCD_WRITE(0xB1, 2, 0x00, 0x10), \
480 VSF_DISP_MIPI_LCD_WRITE(0xF0, 1, 0x3C), \
481 VSF_DISP_MIPI_LCD_WRITE(0xF0, 1, 0x69)