1 /* drivers/video/sprdfb/lcd_ssd2075_mipi.c
\r
3 * Support for ssd2075 mipi LCD device
\r
5 * Copyright (C) 2010 Spreadtrum
\r
7 * This software is licensed under the terms of the GNU General Public
\r
8 * License version 2, as published by the Free Software Foundation, and
\r
9 * may be copied, distributed, and modified under those terms.
\r
11 * This program is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
17 #include <asm/arch/sprd_lcd.h>
\r
18 #include "../sprdfb.h"
\r
20 #define printk printf
\r
23 //#define THREE_LANE_SUPPORT
\r
26 #define LCD_PRINT printk
\r
28 #define LCD_PRINT(...)
\r
32 typedef struct LCM_Init_Code_tag {
\r
34 unsigned char data[MAX_DATA];
\r
37 typedef struct LCM_force_cmd_code_tag{
\r
38 unsigned int datatype;
\r
39 LCM_Init_Code real_cmd_code;
\r
40 }LCM_Force_Cmd_Code;
\r
42 #define LCM_TAG_SHIFT 24
\r
43 #define LCM_TAG_MASK ((1 << 24) -1)
\r
44 #define LCM_SEND(len) ((1 << LCM_TAG_SHIFT)| len)
\r
45 #define LCM_SLEEP(ms) ((2 << LCM_TAG_SHIFT)| ms)
\r
46 //#define ARRAY_SIZE(array) ( sizeof(array) / sizeof(array[0]))
\r
48 #define LCM_TAG_SEND (1<< 0)
\r
49 #define LCM_TAG_SLEEP (1 << 1)
\r
52 static LCM_Force_Cmd_Code rd_prep_code[]={
\r
53 {0x37, {LCM_SEND(2), {0x5, 0}}},
\r
56 static LCM_Init_Code init_data[] = {
\r
57 {LCM_SEND(2),{0x00,0x00}},
\r
58 {LCM_SEND(6),{4,0,0xFF,0x12,0x83,0x01}},
\r
59 {LCM_SEND(2),{0x00,0x80}},
\r
61 {LCM_SEND(5),{3,0,0xFF,0x12,0x83}},
\r
63 #ifdef THREE_LANE_SUPPORT
\r
64 {LCM_SEND(2),{0x00,0x92}},
\r
65 {LCM_SEND(5),{3,0,0xFF,0x20,0x02}},
\r
67 //---------------PANEL setting -----------//
\r
68 {LCM_SEND(2),{0x00,0x80}},
\r
69 {LCM_SEND(10),{8,0,0xC0,0x00,0x64,0x00,0x10,0x10,0x00,0x64}},
\r
70 {LCM_SEND(2),{0x00,0x87}},
\r
71 {LCM_SEND(5),{3,0,0xC0,0x10,0x10}},
\r
72 {LCM_SEND(2),{0x00,0x90}},
\r
73 {LCM_SEND(9),{7,0,0xC0,0x00,0x5C,0x00,0x01,0x00,0x04}},
\r
74 {LCM_SEND(2),{0x00,0xA4}},
\r
75 {LCM_SEND(2),{0xC0,0x22}},
\r
76 {LCM_SEND(2),{0x00,0xB3}},
\r
77 {LCM_SEND(5),{3,0,0xC0,0x00,0x50}},
\r
78 {LCM_SEND(2),{0x00,0xB4}},
\r
79 {LCM_SEND(2),{0xC0,0x55}},
\r
80 {LCM_SEND(2),{0x00,0x81}},
\r
81 //if(!TC358768_Gen_write_1A_1P(0xC1,0x55)) return -1;//xufei 2013-08-26 delete
\r
83 {LCM_SEND(2),{0xC1,0x66}},
\r
84 {LCM_SEND(2),{0x00,0x90}},
\r
85 {LCM_SEND(2),{0xC4,0x49}},
\r
86 {LCM_SEND(2),{0x00,0x00}},
\r
87 {LCM_SEND(2),{0x35,0x01}},
\r
88 {LCM_SEND(2),{0x00,0x00}},
\r
89 {LCM_SEND(2),{0x36,0x00}},
\r
90 //-----------------POWER SETTING-----------------
\r
91 {LCM_SEND(2),{0x00,0xA0}},
\r
92 {LCM_SEND(10),{8,0,0xC4,0x05,0x10,0x06,0x02,0x05,0x15,0x10}},
\r
93 {LCM_SEND(2),{0x00,0xA7}},
\r
94 {LCM_SEND(10),{8,0,0xC4,0x05,0x10,0x07,0x02,0x05,0x15,0x10}},
\r
95 {LCM_SEND(2),{0x00,0xB0}},
\r
96 {LCM_SEND(5),{3,0,0xC4,0x00,0x00}},
\r
97 {LCM_SEND(2),{0x00,0x91}},
\r
98 {LCM_SEND(5),{3,0,0xC5,0x46,0x40}},
\r
99 {LCM_SEND(2),{0x00,0x00}},
\r
100 {LCM_SEND(5),{3,0,0xD8,0xC7,0xC7}},
\r
101 {LCM_SEND(2),{0x00,0x00}},
\r
102 {LCM_SEND(2),{0xD9,0x6B}},
\r
103 {LCM_SEND(2),{0x00,0x81}},
\r
104 {LCM_SEND(2),{0xC4,0x82}},
\r
105 {LCM_SEND(2),{0x00,0xB0}},
\r
107 //if(!TC358768_Gen_write_1A_2P(0xC5,0x04,0xB8)) return -1;//xufei 2013-08-26 delete
\r
109 {LCM_SEND(5),{3,0,0xC5,0x04,0x58}},
\r
110 {LCM_SEND(2),{0x00,0xBB}},
\r
111 {LCM_SEND(2),{0xC5,0x80}},
\r
112 {LCM_SEND(2),{0x00,0x82}},
\r
113 {LCM_SEND(2),{0xC4,0x02}},
\r
114 {LCM_SEND(2),{0x00,0xC6}},
\r
115 {LCM_SEND(2),{0xB0,0x03}},
\r
116 {LCM_SEND(2),{0x00,0xB1}},
\r
117 {LCM_SEND(2),{0xC6,0x03}},
\r
118 //-----------------CONTROL SETTING---------------
\r
119 {LCM_SEND(2),{0x00,0x00}},
\r
120 {LCM_SEND(2),{0xD0,0x40}},
\r
121 {LCM_SEND(2),{0x00,0x00}},
\r
122 {LCM_SEND(5),{3,0,0xD1,0x00,0x00}},
\r
123 //-----------------PANEL TIMING STATE-------------------
\r
124 {LCM_SEND(2),{0x00,0x80}},
\r
125 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
126 {LCM_SEND(2),{0x00,0x87}},
\r
127 {LCM_SEND(6),{4,0,0xCB,0x00,0x00,0x00,0x00}},
\r
128 {LCM_SEND(2),{0x00,0x90}},
\r
129 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
130 {LCM_SEND(2),{0x00,0x97}},
\r
131 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
132 {LCM_SEND(2),{0x00,0x9E}},
\r
133 {LCM_SEND(2),{0xCB,0x00}},
\r
134 {LCM_SEND(2),{0x00,0xA0}},
\r
135 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
136 {LCM_SEND(2),{0x00,0xA7}},
\r
137 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
138 {LCM_SEND(2),{0x00,0xAE}},
\r
139 {LCM_SEND(2),{0xCB,0x00}},
\r
140 {LCM_SEND(2),{0x00,0xB0}},
\r
141 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
142 {LCM_SEND(2),{0x00,0xB7}},
\r
143 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
144 {LCM_SEND(2),{0x00,0xBE}},
\r
145 {LCM_SEND(2),{0xCB,0x00}},
\r
146 {LCM_SEND(2),{0x00,0xC0}},
\r
147 {LCM_SEND(10),{8,0,0xCB,0x05,0x05,0x05,0x05,0x05,0x05,0x00}},
\r
148 {LCM_SEND(2),{0x00,0xC7}},
\r
149 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x05,0x05,0x00,0x05}},
\r
150 {LCM_SEND(2),{0x00,0xCE}},
\r
151 {LCM_SEND(2),{0xCB,0x05}},
\r
152 {LCM_SEND(2),{0x00,0xD0}},
\r
153 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
154 {LCM_SEND(2),{0x00,0xD7}},
\r
155 {LCM_SEND(10),{8,0,0xCB,0x05,0x05,0x05,0x05,0x05,0x05,0x00}},
\r
156 {LCM_SEND(2),{0x00,0xDE}},
\r
157 {LCM_SEND(2),{0xCB,0x00}},
\r
158 {LCM_SEND(2),{0x00,0xE0}},
\r
159 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x05,0x05,0x00,0x05,0x05}},
\r
160 {LCM_SEND(2),{0x00,0xE7}},
\r
161 {LCM_SEND(10),{8,0,0xCB,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
162 {LCM_SEND(2),{0x00,0xF0}},
\r
163 {LCM_SEND(10),{8,0,0xCB,0xff,0xff,0xff,0xff,0xff,0xff,0xff}},
\r
164 {LCM_SEND(2),{0x00,0xF7}},
\r
165 {LCM_SEND(6),{4,0,0xCB,0xff,0xff,0xff,0xff}},
\r
166 //--------------PANEL PAD MAPPING-------------
\r
167 {LCM_SEND(2),{0x00,0x80}},
\r
168 {LCM_SEND(10),{8,0,0xCC,0x0E,0x10,0x0A,0x0C,0x02,0x04,0x00}},
\r
169 {LCM_SEND(2),{0x00,0x87}},
\r
170 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x00,0x2E,0x2D,0x00,0x29}},
\r
171 {LCM_SEND(2),{0x00,0x8E}},
\r
172 {LCM_SEND(2),{0xCC,0x2A}},
\r
173 {LCM_SEND(2),{0x00,0x90}},
\r
174 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
175 {LCM_SEND(2),{0x00,0x97}},
\r
176 {LCM_SEND(10),{8,0,0xCC,0x0D,0x0F,0x09,0x0B,0x01,0x03,0x00}},
\r
177 {LCM_SEND(2),{0x00,0x9E}},
\r
178 {LCM_SEND(2),{0xCC,0x00}},
\r
180 {LCM_SEND(2),{0x00,0xA0}},
\r
181 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x2E,0x2D,0x00,0x29,0x2A}},
\r
182 {LCM_SEND(2),{0x00,0xA7}},
\r
183 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
184 {LCM_SEND(2),{0x00,0xB0}},
\r
185 {LCM_SEND(10),{8,0,0xCC,0x0B,0x09,0x0F,0x0D,0x03,0x01,0x00}},
\r
186 {LCM_SEND(2),{0x00,0xB7}},
\r
187 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x00,0x2D,0x2E,0x00,0x29}},
\r
188 {LCM_SEND(2),{0x00,0xBE}},
\r
189 {LCM_SEND(2),{0xCC,0x2A}},
\r
190 {LCM_SEND(2),{0x00,0xC0}},
\r
191 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
192 {LCM_SEND(2),{0x00,0xC7}},
\r
193 {LCM_SEND(10),{8,0,0xCC,0x0C,0x0A,0x10,0x0E,0x04,0x02,0x00}},
\r
194 {LCM_SEND(2),{0x00,0xCE}},
\r
195 {LCM_SEND(2),{0xCC,0x00}},
\r
196 {LCM_SEND(2),{0x00,0xD0}},
\r
197 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x2D,0x2E,0x00,0x29,0x2A}},
\r
198 {LCM_SEND(2),{0x00,0xD7}},
\r
199 {LCM_SEND(10),{8,0,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
200 //-----------PANEL TIMING SETTING
\r
201 {LCM_SEND(2),{0x00,0x80}},
\r
202 {LCM_SEND(10),{8,0,0xCE,0x8B,0x03,0x18,0x8A,0x03,0x18,0x89}},
\r
203 {LCM_SEND(2),{0x00,0x87}},
\r
204 {LCM_SEND(8),{6,0,0xCE,0x03,0x18,0x88,0x03,0x18}},
\r
205 {LCM_SEND(2),{0x00,0x90}},
\r
206 {LCM_SEND(10),{8,0,0xCE,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
207 {LCM_SEND(2),{0x00,0x97}},
\r
208 {LCM_SEND(10),{8,0,0xCE,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
209 {LCM_SEND(2),{0x00,0xA0}},
\r
210 {LCM_SEND(10),{8,0,0xCE,0x38,0x07,0x05,0x00,0x00,0x48,0x00}},
\r
211 {LCM_SEND(2),{0x00,0xA7}},
\r
212 {LCM_SEND(10),{8,0,0xCE,0x38,0x06,0x05,0x01,0x00,0x48,0x00}},
\r
213 {LCM_SEND(2),{0x00,0xB0}},
\r
214 {LCM_SEND(10),{8,0,0xCE,0x38,0x05,0x05,0x02,0x00,0x48,0x00}},
\r
215 {LCM_SEND(2),{0x00,0xB7}},
\r
216 {LCM_SEND(10),{8,0,0xCE,0x38,0x04,0x05,0x03,0x00,0x48,0x00}},
\r
217 {LCM_SEND(2),{0x00,0xC0}},
\r
218 {LCM_SEND(10),{8,0,0xCE,0x38,0x03,0x05,0x04,0x00,0x48,0x00}},
\r
219 {LCM_SEND(2),{0x00,0xC7}},
\r
220 {LCM_SEND(10),{8,0,0xCE,0x38,0x02,0x05,0x05,0x00,0x48,0x00}},
\r
221 {LCM_SEND(2),{0x00,0xD0}},
\r
222 {LCM_SEND(10),{8,0,0xCE,0x38,0x01,0x05,0x06,0x00,0x48,0x00}},
\r
223 {LCM_SEND(2),{0x00,0xD7}},
\r
224 {LCM_SEND(10),{8,0,0xCE,0x38,0x00,0x05,0x07,0x00,0x48,0x00}},
\r
225 {LCM_SEND(2),{0x00,0x80}},
\r
226 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
227 {LCM_SEND(2),{0x00,0x87}},
\r
228 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
229 {LCM_SEND(2),{0x00,0x90}},
\r
230 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
231 {LCM_SEND(2),{0x00,0x97}},
\r
232 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
233 {LCM_SEND(2),{0x00,0xA0}},
\r
234 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
235 {LCM_SEND(2),{0x00,0xA7}},
\r
236 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
237 {LCM_SEND(2),{0x00,0xB0}},
\r
238 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
239 {LCM_SEND(2),{0x00,0xB7}},
\r
240 {LCM_SEND(10),{8,0,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
\r
241 {LCM_SEND(2),{0x00,0xC0}},
\r
242 {LCM_SEND(10),{8,0,0xCF,0x02,0x01,0x20,0x20,0x00,0x00,0x01}},
\r
243 {LCM_SEND(2),{0x00,0xC7}},
\r
244 {LCM_SEND(6),{4,0,0xCF,0x81,0x00,0x03,0x08}},
\r
245 {LCM_SEND(2),{0x00,0xB5}},
\r
246 {LCM_SEND(9),{7,0,0xC5,0x00,0x6F,0xFF,0x00,0x6F,0xFF}},
\r
247 //-----------------FOR POWER IC--------------------------
\r
248 {LCM_SEND(2),{0x00,0x90}},
\r
249 {LCM_SEND(6),{4,0,0xF5,0x02,0x11,0x02,0x11}},
\r
250 {LCM_SEND(2),{0x00,0x90}},
\r
251 {LCM_SEND(2),{0xC5,0x50}},
\r
252 {LCM_SEND(2),{0x00,0x94}},
\r
253 {LCM_SEND(2),{0xC5,0x66}},
\r
254 //-----------------VGL01/02----------------------------------
\r
255 {LCM_SEND(2),{0x00,0xB2}},
\r
256 {LCM_SEND(5),{3,0,0xF5,0x00,0x00}},
\r
257 {LCM_SEND(2),{0x00,0xB4}},
\r
258 {LCM_SEND(5),{3,0,0xF5,0x00,0x00}},
\r
259 {LCM_SEND(2),{0x00,0xB6}},
\r
260 {LCM_SEND(5),{3,0,0xF5,0x00,0x00}},
\r
261 {LCM_SEND(2),{0x00,0xB8}},
\r
262 {LCM_SEND(5),{3,0,0xF5,0x00,0x00}},
\r
263 {LCM_SEND(2),{0x00,0x94}},
\r
264 {LCM_SEND(2),{0xF5,0x02}},
\r
265 {LCM_SEND(2),{0x00,0xBA}},
\r
266 {LCM_SEND(2),{0xF5,0x03}},
\r
267 {LCM_SEND(2),{0x00,0xB4}},
\r
268 {LCM_SEND(2),{0xC5,0xC0}},
\r
269 {LCM_SEND(2),{0x00,0xc6}},
\r
270 {LCM_SEND(2),{0xB0,0x03}},
\r
271 //spread frame range
\r
272 {LCM_SEND(2),{0x00,0xA0}},
\r
273 {LCM_SEND(2),{0xC1,0x02}},
\r
274 {LCM_SEND(2),{0x00,0xA3}},
\r
275 {LCM_SEND(2),{0xC1,0xF0}},
\r
276 //-----------------GAMMA------------------------------
\r
277 {LCM_SEND(2),{0x00,0x00}},
\r
278 {LCM_SEND(10),{8,0,0xE1,0x00,0x0d,0x14,0x0d,0x06,0x0e,0x0a}},
\r
279 {LCM_SEND(10),{8,0,0xE1,0x09,0x05,0x08,0x0f,0x08,0x0f,0x10}},
\r
280 {LCM_SEND(5),{3,0,0xE1,0x0a,0x05}},
\r
281 {LCM_SEND(2),{0x00,0x00}},
\r
282 {LCM_SEND(10),{8,0,0xE2,0x00,0x0d,0x14,0x0d,0x06,0x0e,0x0a}},
\r
283 {LCM_SEND(10),{8,0,0xE2,0x09,0x05,0x08,0x0f,0x08,0x0f,0x10}},
\r
284 {LCM_SEND(5),{3,0,0xE2,0x0a,0x05}},
\r
286 {LCM_SEND(1), {0x11}}, // sleep out
\r
288 {LCM_SEND(1), {0x29}}, // display on
\r
289 {LCM_SLEEP(50),}, //30,100
\r
290 {LCM_SEND(1), {0x2C}}, // normal on
\r
294 static LCM_Init_Code disp_on = {LCM_SEND(1), {0x29}};
\r
295 static LCM_Init_Code sleep_in = {LCM_SEND(1), {0x10}};
\r
296 static LCM_Init_Code sleep_out = {LCM_SEND(1), {0x11}};
\r
298 static int32_t otm1283a_mipi_init(struct panel_spec *self)
\r
301 LCM_Init_Code *init = init_data;
\r
304 mipi_set_cmd_mode_t mipi_set_cmd_mode = self->info.mipi->ops->mipi_set_cmd_mode;
\r
305 mipi_gen_write_t mipi_gen_write = self->info.mipi->ops->mipi_gen_write;
\r
306 mipi_eotp_set_t mipi_eotp_set = self->info.mipi->ops->mipi_eotp_set;
\r
308 LCD_PRINT("otm1283a_mipi_init\n");
\r
310 mipi_set_cmd_mode();
\r
311 mipi_eotp_set(1,0);
\r
313 for(i = 0; i < ARRAY_SIZE(init_data); i++){
\r
314 tag = (init->tag >>24);
\r
315 if(tag & LCM_TAG_SEND){
\r
316 mipi_gen_write(init->data, (init->tag & LCM_TAG_MASK));
\r
318 }else if(tag & LCM_TAG_SLEEP){
\r
319 mdelay((init->tag & LCM_TAG_MASK));
\r
323 mipi_eotp_set(1,1);
\r
327 static uint32_t otm1283a_readid(struct panel_spec *self)
\r
329 /*Jessica TODO: need read id*/
\r
332 LCM_Force_Cmd_Code * rd_prepare = rd_prep_code;
\r
333 uint8_t read_data[5] = {0};
\r
334 int32_t read_rtn = 0;
\r
335 unsigned int tag = 0;
\r
337 mipi_set_cmd_mode_t mipi_set_cmd_mode = self->info.mipi->ops->mipi_set_cmd_mode;
\r
338 mipi_force_write_t mipi_force_write = self->info.mipi->ops->mipi_force_write;
\r
339 mipi_force_read_t mipi_force_read = self->info.mipi->ops->mipi_force_read;
\r
340 mipi_eotp_set_t mipi_eotp_set = self->info.mipi->ops->mipi_eotp_set;
\r
342 LCD_PRINT("lcd_otm1283a_mipi read id!\n");
\r
344 mipi_set_cmd_mode();
\r
345 mipi_eotp_set(1,0);
\r
347 for(j = 0; j < 4; j++){
\r
348 rd_prepare = rd_prep_code;
\r
349 for(i = 0; i < ARRAY_SIZE(rd_prep_code); i++){
\r
350 tag = (rd_prepare->real_cmd_code.tag >> 24);
\r
351 if(tag & LCM_TAG_SEND){
\r
352 mipi_force_write(rd_prepare->datatype, rd_prepare->real_cmd_code.data, (rd_prepare->real_cmd_code.tag & LCM_TAG_MASK));
\r
353 }else if(tag & LCM_TAG_SLEEP){
\r
354 mdelay((rd_prepare->real_cmd_code.tag & LCM_TAG_MASK));
\r
359 read_rtn = mipi_force_read(0xa1, 5,(uint8_t *)read_data);
\r
360 LCD_PRINT("lcd_otm1283a_mipi read id 0xa1 value is 0x%x, 0x%x, 0x%x, 0x%x, 0x%x!\n",
\r
361 read_data[0], read_data[1], read_data[2], read_data[3], read_data[4]);
\r
363 mipi_eotp_set(1,1);
\r
365 if((0x01 == read_data[0])&&(0x8b == read_data[1])&&(0x12 == read_data[2])&&(0x83 == read_data[3])&&(0xff == read_data[4])){
\r
366 LCD_PRINT("lcd_otm1283a_mipi read id success!\n");
\r
371 printk("lcd_otm1283a_mipi identify fail!\n");
\r
375 static struct panel_operations lcd_otm1283a_mipi_operations = {
\r
376 .panel_init = otm1283a_mipi_init,
\r
377 .panel_readid = otm1283a_readid,
\r
380 static struct timing_rgb lcd_otm1283a_mipi_timing = {
\r
389 static struct info_mipi lcd_otm1283a_mipi_info = {
\r
390 .work_mode = SPRDFB_MIPI_MODE_VIDEO,
\r
391 .video_bus_width = 24, /*18,16*/
\r
392 #ifdef THREE_LANE_SUPPORT
\r
394 .phy_feq = 550*1000,
\r
397 .phy_feq = 500*1000,
\r
399 .h_sync_pol = SPRDFB_POLARITY_POS,
\r
400 .v_sync_pol = SPRDFB_POLARITY_POS,
\r
401 .de_pol = SPRDFB_POLARITY_POS,
\r
402 .te_pol = SPRDFB_POLARITY_POS,
\r
403 .color_mode_pol = SPRDFB_POLARITY_NEG,
\r
404 .shut_down_pol = SPRDFB_POLARITY_NEG,
\r
405 .timing = &lcd_otm1283a_mipi_timing,
\r
409 struct panel_spec lcd_otm1283a_mipi_spec = {
\r
413 .type = LCD_MODE_DSI,
\r
414 .direction = LCD_DIRECT_NORMAL,
\r
416 .mipi = &lcd_otm1283a_mipi_info
\r
418 .ops = &lcd_otm1283a_mipi_operations,
\r