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