1*ebe079bcSSiarhei Siamashka /* 2*ebe079bcSSiarhei Siamashka * Defines for Mobile Industry Processor Interface (MIPI(R)) 3*ebe079bcSSiarhei Siamashka * Display Working Group standards: DSI, DCS, DBI, DPI 4*ebe079bcSSiarhei Siamashka * 5*ebe079bcSSiarhei Siamashka * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> 6*ebe079bcSSiarhei Siamashka * Copyright (C) 2006 Nokia Corporation 7*ebe079bcSSiarhei Siamashka * Author: Imre Deak <imre.deak@nokia.com> 8*ebe079bcSSiarhei Siamashka * 9*ebe079bcSSiarhei Siamashka * This program is free software; you can redistribute it and/or modify 10*ebe079bcSSiarhei Siamashka * it under the terms of the GNU General Public License version 2 as 11*ebe079bcSSiarhei Siamashka * published by the Free Software Foundation. 12*ebe079bcSSiarhei Siamashka */ 13*ebe079bcSSiarhei Siamashka #ifndef MIPI_DISPLAY_H 14*ebe079bcSSiarhei Siamashka #define MIPI_DISPLAY_H 15*ebe079bcSSiarhei Siamashka 16*ebe079bcSSiarhei Siamashka /* MIPI DSI Processor-to-Peripheral transaction types */ 17*ebe079bcSSiarhei Siamashka enum { 18*ebe079bcSSiarhei Siamashka MIPI_DSI_V_SYNC_START = 0x01, 19*ebe079bcSSiarhei Siamashka MIPI_DSI_V_SYNC_END = 0x11, 20*ebe079bcSSiarhei Siamashka MIPI_DSI_H_SYNC_START = 0x21, 21*ebe079bcSSiarhei Siamashka MIPI_DSI_H_SYNC_END = 0x31, 22*ebe079bcSSiarhei Siamashka 23*ebe079bcSSiarhei Siamashka MIPI_DSI_COLOR_MODE_OFF = 0x02, 24*ebe079bcSSiarhei Siamashka MIPI_DSI_COLOR_MODE_ON = 0x12, 25*ebe079bcSSiarhei Siamashka MIPI_DSI_SHUTDOWN_PERIPHERAL = 0x22, 26*ebe079bcSSiarhei Siamashka MIPI_DSI_TURN_ON_PERIPHERAL = 0x32, 27*ebe079bcSSiarhei Siamashka 28*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM = 0x03, 29*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM = 0x13, 30*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM = 0x23, 31*ebe079bcSSiarhei Siamashka 32*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM = 0x04, 33*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM = 0x14, 34*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM = 0x24, 35*ebe079bcSSiarhei Siamashka 36*ebe079bcSSiarhei Siamashka MIPI_DSI_DCS_SHORT_WRITE = 0x05, 37*ebe079bcSSiarhei Siamashka MIPI_DSI_DCS_SHORT_WRITE_PARAM = 0x15, 38*ebe079bcSSiarhei Siamashka 39*ebe079bcSSiarhei Siamashka MIPI_DSI_DCS_READ = 0x06, 40*ebe079bcSSiarhei Siamashka 41*ebe079bcSSiarhei Siamashka MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37, 42*ebe079bcSSiarhei Siamashka 43*ebe079bcSSiarhei Siamashka MIPI_DSI_END_OF_TRANSMISSION = 0x08, 44*ebe079bcSSiarhei Siamashka 45*ebe079bcSSiarhei Siamashka MIPI_DSI_NULL_PACKET = 0x09, 46*ebe079bcSSiarhei Siamashka MIPI_DSI_BLANKING_PACKET = 0x19, 47*ebe079bcSSiarhei Siamashka MIPI_DSI_GENERIC_LONG_WRITE = 0x29, 48*ebe079bcSSiarhei Siamashka MIPI_DSI_DCS_LONG_WRITE = 0x39, 49*ebe079bcSSiarhei Siamashka 50*ebe079bcSSiarhei Siamashka MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 0x0c, 51*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 0x1c, 52*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 = 0x2c, 53*ebe079bcSSiarhei Siamashka 54*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_30 = 0x0d, 55*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_36 = 0x1d, 56*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12 = 0x3d, 57*ebe079bcSSiarhei Siamashka 58*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_16 = 0x0e, 59*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_18 = 0x1e, 60*ebe079bcSSiarhei Siamashka MIPI_DSI_PIXEL_STREAM_3BYTE_18 = 0x2e, 61*ebe079bcSSiarhei Siamashka MIPI_DSI_PACKED_PIXEL_STREAM_24 = 0x3e, 62*ebe079bcSSiarhei Siamashka }; 63*ebe079bcSSiarhei Siamashka 64*ebe079bcSSiarhei Siamashka /* MIPI DSI Peripheral-to-Processor transaction types */ 65*ebe079bcSSiarhei Siamashka enum { 66*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT = 0x02, 67*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_END_OF_TRANSMISSION = 0x08, 68*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE = 0x11, 69*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_2BYTE = 0x12, 70*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_GENERIC_LONG_READ_RESPONSE = 0x1a, 71*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_DCS_LONG_READ_RESPONSE = 0x1c, 72*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE = 0x21, 73*ebe079bcSSiarhei Siamashka MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_2BYTE = 0x22, 74*ebe079bcSSiarhei Siamashka }; 75*ebe079bcSSiarhei Siamashka 76*ebe079bcSSiarhei Siamashka /* MIPI DCS commands */ 77*ebe079bcSSiarhei Siamashka enum { 78*ebe079bcSSiarhei Siamashka MIPI_DCS_NOP = 0x00, 79*ebe079bcSSiarhei Siamashka MIPI_DCS_SOFT_RESET = 0x01, 80*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_DISPLAY_ID = 0x04, 81*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_RED_CHANNEL = 0x06, 82*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_GREEN_CHANNEL = 0x07, 83*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_BLUE_CHANNEL = 0x08, 84*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_DISPLAY_STATUS = 0x09, 85*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_POWER_MODE = 0x0A, 86*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_ADDRESS_MODE = 0x0B, 87*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_PIXEL_FORMAT = 0x0C, 88*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_DISPLAY_MODE = 0x0D, 89*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_SIGNAL_MODE = 0x0E, 90*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_DIAGNOSTIC_RESULT = 0x0F, 91*ebe079bcSSiarhei Siamashka MIPI_DCS_ENTER_SLEEP_MODE = 0x10, 92*ebe079bcSSiarhei Siamashka MIPI_DCS_EXIT_SLEEP_MODE = 0x11, 93*ebe079bcSSiarhei Siamashka MIPI_DCS_ENTER_PARTIAL_MODE = 0x12, 94*ebe079bcSSiarhei Siamashka MIPI_DCS_ENTER_NORMAL_MODE = 0x13, 95*ebe079bcSSiarhei Siamashka MIPI_DCS_EXIT_INVERT_MODE = 0x20, 96*ebe079bcSSiarhei Siamashka MIPI_DCS_ENTER_INVERT_MODE = 0x21, 97*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_GAMMA_CURVE = 0x26, 98*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_DISPLAY_OFF = 0x28, 99*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_DISPLAY_ON = 0x29, 100*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_COLUMN_ADDRESS = 0x2A, 101*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_PAGE_ADDRESS = 0x2B, 102*ebe079bcSSiarhei Siamashka MIPI_DCS_WRITE_MEMORY_START = 0x2C, 103*ebe079bcSSiarhei Siamashka MIPI_DCS_WRITE_LUT = 0x2D, 104*ebe079bcSSiarhei Siamashka MIPI_DCS_READ_MEMORY_START = 0x2E, 105*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_PARTIAL_AREA = 0x30, 106*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_SCROLL_AREA = 0x33, 107*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_TEAR_OFF = 0x34, 108*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_TEAR_ON = 0x35, 109*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_ADDRESS_MODE = 0x36, 110*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_SCROLL_START = 0x37, 111*ebe079bcSSiarhei Siamashka MIPI_DCS_EXIT_IDLE_MODE = 0x38, 112*ebe079bcSSiarhei Siamashka MIPI_DCS_ENTER_IDLE_MODE = 0x39, 113*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_PIXEL_FORMAT = 0x3A, 114*ebe079bcSSiarhei Siamashka MIPI_DCS_WRITE_MEMORY_CONTINUE = 0x3C, 115*ebe079bcSSiarhei Siamashka MIPI_DCS_READ_MEMORY_CONTINUE = 0x3E, 116*ebe079bcSSiarhei Siamashka MIPI_DCS_SET_TEAR_SCANLINE = 0x44, 117*ebe079bcSSiarhei Siamashka MIPI_DCS_GET_SCANLINE = 0x45, 118*ebe079bcSSiarhei Siamashka MIPI_DCS_READ_DDB_START = 0xA1, 119*ebe079bcSSiarhei Siamashka MIPI_DCS_READ_DDB_CONTINUE = 0xA8, 120*ebe079bcSSiarhei Siamashka }; 121*ebe079bcSSiarhei Siamashka 122*ebe079bcSSiarhei Siamashka /* MIPI DCS pixel formats */ 123*ebe079bcSSiarhei Siamashka #define MIPI_DCS_PIXEL_FMT_24BIT 7 124*ebe079bcSSiarhei Siamashka #define MIPI_DCS_PIXEL_FMT_18BIT 6 125*ebe079bcSSiarhei Siamashka #define MIPI_DCS_PIXEL_FMT_16BIT 5 126*ebe079bcSSiarhei Siamashka #define MIPI_DCS_PIXEL_FMT_12BIT 3 127*ebe079bcSSiarhei Siamashka #define MIPI_DCS_PIXEL_FMT_8BIT 2 128*ebe079bcSSiarhei Siamashka #define MIPI_DCS_PIXEL_FMT_3BIT 1 129*ebe079bcSSiarhei Siamashka 130*ebe079bcSSiarhei Siamashka #endif 131