1 /* 2 * Allwinner SoCs display driver. 3 * 4 * Copyright (C) 2016 Allwinner. 5 * 6 * This file is licensed under the terms of the GNU General Public 7 * License version 2. This program is licensed "as is" without any 8 * warranty of any kind, whether express or implied. 9 */ 10 11 #ifndef __PANEL_H__ 12 #define __PANEL_H__ 13 #include "../de/bsp_display.h" 14 #include "lcd_source.h" 15 16 extern void LCD_OPEN_FUNC(u32 sel, LCD_FUNC func, u32 delay /*ms */); 17 extern void LCD_CLOSE_FUNC(u32 sel, LCD_FUNC func, u32 delay /*ms */); 18 19 struct __lcd_panel { 20 char name[32]; 21 struct disp_lcd_panel_fun func; 22 }; 23 24 extern struct __lcd_panel *panel_array[]; 25 26 struct sunxi_lcd_drv { 27 struct sunxi_disp_source_ops src_ops; 28 }; 29 30 #ifndef SUPPORT_DSI 31 enum __dsi_dcs_t { 32 DSI_DCS_ENTER_IDLE_MODE = 0x39, /* 01 */ 33 DSI_DCS_ENTER_INVERT_MODE = 0x21, /* 02 */ 34 DSI_DCS_ENTER_NORMAL_MODE = 0x13, /* 03 */ 35 DSI_DCS_ENTER_PARTIAL_MODE = 0x12, /* 04 */ 36 DSI_DCS_ENTER_SLEEP_MODE = 0x10, /* 05 */ 37 DSI_DCS_EXIT_IDLE_MODE = 0x38, /* 06 */ 38 DSI_DCS_EXIT_INVERT_MODE = 0x20, /* 07 */ 39 DSI_DCS_EXIT_SLEEP_MODE = 0x11, /* 08 */ 40 DSI_DCS_GET_ADDRESS_MODE = 0x0b, /* 09 */ 41 DSI_DCS_GET_BLUE_CHANNEL = 0x08, /* 10 */ 42 DSI_DCS_GET_DIAGNOSTIC_RESULT = 0x0f, /* 11 */ 43 DSI_DCS_GET_DISPLAY_MODE = 0x0d, /* 12 */ 44 DSI_DCS_GET_GREEN_CHANNEL = 0x07, /* 13 */ 45 DSI_DCS_GET_PIXEL_FORMAT = 0x0c, /* 14 */ 46 DSI_DCS_GET_POWER_MODE = 0x0a, /* 15 */ 47 DSI_DCS_GET_RED_CHANNEL = 0x06, /* 16 */ 48 DSI_DCS_GET_SCANLINE = 0x45, /* 17 */ 49 DSI_DCS_GET_SIGNAL_MODE = 0x0e, /* 18 */ 50 DSI_DCS_NOP = 0x00, /* 19 */ 51 DSI_DCS_READ_DDB_CONTINUE = 0xa8, /* 20 */ 52 DSI_DCS_READ_DDB_START = 0xa1, /* 21 */ 53 DSI_DCS_READ_MEMORY_CONTINUE = 0x3e, /* 22 */ 54 DSI_DCS_READ_MEMORY_START = 0x2e, /* 23 */ 55 DSI_DCS_SET_ADDRESS_MODE = 0x36, /* 24 */ 56 DSI_DCS_SET_COLUMN_ADDRESS = 0x2a, /* 25 */ 57 DSI_DCS_SET_DISPLAY_OFF = 0x28, /* 26 */ 58 DSI_DCS_SET_DISPLAY_ON = 0x29, /* 27 */ 59 DSI_DCS_SET_GAMMA_CURVE = 0x26, /* 28 */ 60 DSI_DCS_SET_PAGE_ADDRESS = 0x2b, /* 29 */ 61 DSI_DCS_SET_PARTIAL_AREA = 0x30, /* 30 */ 62 DSI_DCS_SET_PIXEL_FORMAT = 0x3a, /* 31 */ 63 DSI_DCS_SET_SCROLL_AREA = 0x33, /* 32 */ 64 DSI_DCS_SET_SCROLL_START = 0x37, /* 33 */ 65 DSI_DCS_SET_TEAR_OFF = 0x34, /* 34 */ 66 DSI_DCS_SET_TEAR_ON = 0x35, /* 35 */ 67 DSI_DCS_SET_TEAR_SCANLINE = 0x44, /* 36 */ 68 DSI_DCS_SOFT_RESET = 0x01, /* 37 */ 69 DSI_DCS_WRITE_LUT = 0x2d, /* 38 */ 70 DSI_DCS_WRITE_MEMORY_CONTINUE = 0x3c, /* 39 */ 71 DSI_DCS_WRITE_MEMORY_START = 0x2c, /* 40 */ 72 }; 73 #endif 74 75 extern int sunxi_disp_get_source_ops(struct sunxi_disp_source_ops *src_ops); 76 int lcd_init(void); 77 78 extern struct __lcd_panel default_eink; 79 extern struct __lcd_panel default_panel; 80 extern struct __lcd_panel lt070me05000_panel; 81 extern struct __lcd_panel wtq05027d01_panel; 82 extern struct __lcd_panel t27p06_panel; 83 extern struct __lcd_panel dx0960be40a1_panel; 84 extern struct __lcd_panel tft720x1280_panel; 85 extern struct __lcd_panel S6D7AA0X01_panel; 86 extern struct __lcd_panel gg1p4062utsw_panel; 87 extern struct __lcd_panel ls029b3sx02_panel; 88 extern struct __lcd_panel he0801a068_panel; 89 #ifdef CONFIG_LCD_SUPPORT_INET_DSI_PANEL 90 extern struct __lcd_panel inet_dsi_panel; 91 #endif 92 #ifdef CONFIG_LCD_SUPPORT_LQ101R1SX03 93 extern struct __lcd_panel lq101r1sx03_panel; 94 #endif 95 #ifdef CONFIG_LCD_SUPPORT_WILLIAMLCD 96 extern struct __lcd_panel WilliamLcd_panel; 97 #endif 98 #ifdef CONFIG_LCD_SUPPORT_ILI9881C 99 extern struct __lcd_panel ili9881c_dsi_panel; 100 #endif 101 #ifdef CONFIG_LCD_SUPPORT_TM_DSI_PANEL 102 extern struct __lcd_panel tm_dsi_panel; 103 #endif 104 #ifdef CONFIG_LCD_SUPPORT_FD055HD003S 105 extern struct __lcd_panel fd055hd003s_panel; 106 #endif 107 #ifdef CONFIG_LCD_SUPPORT_FRD450H40014 108 extern struct __lcd_panel frd450h40014_panel; 109 #endif 110 #ifdef CONFIG_LCD_SUPPORT_H245QBN02 111 extern struct __lcd_panel h245qbn02_panel; 112 #endif 113 #ifdef CONFIG_LCD_SUPPORT_ILI9341 114 extern struct __lcd_panel ili9341_panel; 115 #endif 116 #ifdef CONFIG_LCD_SUPPORT_LH219WQ1 117 extern struct __lcd_panel lh219wq1_panel; 118 #endif 119 #ifdef CONFIG_LCD_SUPPORT_ST7789V 120 extern struct __lcd_panel st7789v_panel; 121 #endif 122 #ifdef CONFIG_LCD_SUPPORT_ST7796S 123 extern struct __lcd_panel st7796s_panel; 124 #endif 125 #ifdef CONFIG_LCD_SUPPORT_ST7701S 126 extern struct __lcd_panel st7701s_panel; 127 #endif 128 #ifdef CONFIG_LCD_SUPPORT_T30P106 129 extern struct __lcd_panel t30p106_panel; 130 #endif 131 #ifdef CONFIG_LCD_SUPPORT_TO20T20000 132 extern struct __lcd_panel to20t20000_panel; 133 #endif 134 #ifdef CONFIG_LCD_SUPPORT_S2003T46G 135 extern struct __lcd_panel s2003t46g_panel; 136 #endif 137 #ifdef CONFIG_LCD_SUPPORT_WTL096601G03 138 extern struct __lcd_panel wtl096601g03_panel; 139 #endif 140 #ifdef CONFIG_LCD_SUPPORT_RT13QV005D 141 extern struct __lcd_panel rt13qv005d_panel; 142 #endif 143 #ifdef CONFIG_LCD_SUPPORT_ST7789V_CPU 144 extern struct __lcd_panel st7789v_cpu_panel; 145 #endif 146 #ifdef CONFIG_LCD_SUPPORT_CC08021801_310_800X1280 147 extern struct __lcd_panel CC08021801_310_800X1280_mipi_panel; 148 #endif 149 #ifdef CONFIG_LCD_SUPPORT_JD9366AB_3 150 extern struct __lcd_panel jd9366ab_3_panel; 151 #endif 152 #ifdef CONFIG_LCD_SUPPORT_TFT08006 153 extern struct __lcd_panel tft08006_panel; 154 #endif 155 #ifdef CONFIG_LCD_SUPPORT_BP101WX1_206 156 extern struct __lcd_panel bp101wx1_panel; 157 #endif 158 #ifdef CONFIG_LCD_SUPPORT_K101IM2QA04 159 extern struct __lcd_panel k101im2qa04_panel; 160 #endif 161 #ifdef CONFIG_LCD_SUPPORT_FX070 162 extern struct __lcd_panel fx070_panel; 163 #endif 164 #ifdef CONFIG_LCD_SUPPORT_K101_IM2BYL02_L_800X1280 165 extern struct __lcd_panel K101_IM2BYL02_L_800X1280_mipi_panel; 166 #endif 167 #ifdef CONFIG_LCD_SUPPORT_K080_IM2HYL802R_800X1280 168 extern struct __lcd_panel K080_IM2HYL802R_800X1280_mipi_panel; 169 #endif 170 171 extern struct __lcd_panel super_lcd_panel; 172 173 #endif 174