xref: /dflybsd-src/sys/dev/drm/include/video/mipi_display.h (revision 1487f78699db6b645ec307a207e4611f50a7cc53)
19edbd4a0SFrançois Tigeot /*
2*1487f786SFrançois Tigeot  * Copyright (c) 2015-2019 François Tigeot <ftigeot@wolfpond.org>
39edbd4a0SFrançois Tigeot  *
49edbd4a0SFrançois Tigeot  * Permission is hereby granted, free of charge, to any person obtaining a
59edbd4a0SFrançois Tigeot  * copy of this software and associated documentation files (the "Software"),
69edbd4a0SFrançois Tigeot  * to deal in the Software without restriction, including without limitation
79edbd4a0SFrançois Tigeot  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
89edbd4a0SFrançois Tigeot  * and/or sell copies of the Software, and to permit persons to whom the
99edbd4a0SFrançois Tigeot  * Software is furnished to do so, subject to the following conditions:
109edbd4a0SFrançois Tigeot  *
119edbd4a0SFrançois Tigeot  * The above copyright notice and this permission notice (including the next
129edbd4a0SFrançois Tigeot  * paragraph) shall be included in all copies or substantial portions of the
139edbd4a0SFrançois Tigeot  * Software.
149edbd4a0SFrançois Tigeot  *
159edbd4a0SFrançois Tigeot  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
169edbd4a0SFrançois Tigeot  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
179edbd4a0SFrançois Tigeot  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
189edbd4a0SFrançois Tigeot  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
199edbd4a0SFrançois Tigeot  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
209edbd4a0SFrançois Tigeot  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
219edbd4a0SFrançois Tigeot  * IN THE SOFTWARE.
229edbd4a0SFrançois Tigeot  */
239edbd4a0SFrançois Tigeot 
249edbd4a0SFrançois Tigeot #ifndef __VIDEO_MIPI_DISPLAY_H__
259edbd4a0SFrançois Tigeot #define __VIDEO_MIPI_DISPLAY_H__
269edbd4a0SFrançois Tigeot 
272c9916cdSFrançois Tigeot #define MIPI_DSI_V_SYNC_START			0x01
282c9916cdSFrançois Tigeot #define MIPI_DSI_V_SYNC_END			0x11
292c9916cdSFrançois Tigeot #define MIPI_DSI_H_SYNC_START			0x21
302c9916cdSFrançois Tigeot #define MIPI_DSI_H_SYNC_END			0x31
312c9916cdSFrançois Tigeot 
322c9916cdSFrançois Tigeot #define MIPI_DSI_COLOR_MODE_OFF			0x02
332c9916cdSFrançois Tigeot #define MIPI_DSI_COLOR_MODE_ON			0x12
342c9916cdSFrançois Tigeot #define MIPI_DSI_SHUTDOWN_PERIPHERAL		0x22
352c9916cdSFrançois Tigeot #define MIPI_DSI_TURN_ON_PERIPHERAL		0x32
362c9916cdSFrançois Tigeot 
379edbd4a0SFrançois Tigeot #define MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM	0x03
389edbd4a0SFrançois Tigeot #define MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM	0x13
399edbd4a0SFrançois Tigeot #define MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM	0x23
409edbd4a0SFrançois Tigeot 
419edbd4a0SFrançois Tigeot #define MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM	0x04
429edbd4a0SFrançois Tigeot #define MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM	0x14
439edbd4a0SFrançois Tigeot #define MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM	0x24
449edbd4a0SFrançois Tigeot 
452c9916cdSFrançois Tigeot #define MIPI_DSI_DCS_SHORT_WRITE		0x05
462c9916cdSFrançois Tigeot #define MIPI_DSI_DCS_SHORT_WRITE_PARAM		0x15
472c9916cdSFrançois Tigeot 
482c9916cdSFrançois Tigeot #define MIPI_DSI_DCS_READ			0x06
492c9916cdSFrançois Tigeot 
502c9916cdSFrançois Tigeot #define MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE	0x37
512c9916cdSFrançois Tigeot 
522c9916cdSFrançois Tigeot #define MIPI_DSI_END_OF_TRANSMISSION		0x08
532c9916cdSFrançois Tigeot 
542c9916cdSFrançois Tigeot #define MIPI_DSI_NULL_PACKET			0x09
552c9916cdSFrançois Tigeot #define MIPI_DSI_BLANKING_PACKET		0x19
562c9916cdSFrançois Tigeot 
572c9916cdSFrançois Tigeot #define MIPI_DSI_GENERIC_LONG_WRITE		0x29
582c9916cdSFrançois Tigeot #define MIPI_DSI_DCS_LONG_WRITE			0x39
592c9916cdSFrançois Tigeot 
602c9916cdSFrançois Tigeot #define MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20	0x0c
612c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24		0x1c
622c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16		0x2c
632c9916cdSFrançois Tigeot 
642c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_30		0x0d
652c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_36		0x1d
662c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12	0x3d
672c9916cdSFrançois Tigeot 
682c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_16		0x0e
692c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_18		0x1e
702c9916cdSFrançois Tigeot #define MIPI_DSI_PIXEL_STREAM_3BYTE_18		0x2e
712c9916cdSFrançois Tigeot #define MIPI_DSI_PACKED_PIXEL_STREAM_24		0x3e
722c9916cdSFrançois Tigeot 
73*1487f786SFrançois Tigeot #define MIPI_DCS_NOP				0x00
74*1487f786SFrançois Tigeot #define MIPI_DCS_SET_DISPLAY_BRIGHTNESS		0x51
75*1487f786SFrançois Tigeot #define MIPI_DCS_GET_DISPLAY_BRIGHTNESS		0x52
76*1487f786SFrançois Tigeot #define MIPI_DCS_WRITE_CONTROL_DISPLAY		0x53
77*1487f786SFrançois Tigeot #define MIPI_DCS_GET_CONTROL_DISPLAY		0x54
78*1487f786SFrançois Tigeot #define MIPI_DCS_WRITE_POWER_SAVE		0x55
79*1487f786SFrançois Tigeot 
809edbd4a0SFrançois Tigeot #endif /* __VIDEO_MIPI_DISPLAY_H__ */
81