您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 资本运营 > RM68172+MTK6572&82&92-MIPI配置要点说明
RM68172+MTK6572配置要点说明RMFAE-Shanghai2015/02/10RM68172+MTK6572配置要点说明目录initialcode中Page的定义--------------------------------------3分辨率/解析度设置-----------------------------------------------4pushtable设置-------------------------------------------------5Initialcode中的delay设置-------------------------------------6Flicker/Vcom调整(Page1_BE01h)---------------------------7,8方向180°调整(36h)--------------------------------------------9Reset设置-------------------------------------------------------10Porch设置-------------------------------------------------------11MIPItiming设置-------------------------------------------------12lcm_suspend设置-----------------------------------------------13lcm_resume设置-------------------------------------------------14ID读取&常见问题-----------------------------------------------15,16ESDCheck------------------------------------------------------17MTK6572ESDsolution----------------------------------------18最简单配置方式--------------------------------------------------19RM68172+MTK6572配置要点说明initialcode中Page的定义:0xF0寄存器为Page设置以下为page1下的寄存器直到下一个page设置出现RM68172+MTK6572配置要点说明分辨率/解析度设置:FWVGAinitial中同步设置page0_B5h=0x6BWVGA为RM68172默认设置,initialPage0_B5h可以不写;RM68172+MTK6572配置要点说明pushtable设置注意事项:Regflag_delay&Regflag_end_of_table这两个值不可与initial中寄存器or数据重复,否则会导致initial下不完整;不重复---OK重复---NGRM68172+MTK6572配置要点说明Initialcode中的delay设置:整个initialcode中一般只需在末尾11H/29h后面加delaytime;Initial中其他位置均不需设置delaytime;RM68172+MTK6572配置要点说明Flicker原理IC正负驱动电压不平衡,则会产生flicker;晃动屏幕会有网格状闪烁晃动屏幕会有竖条纹状闪烁V-com调试OK无网格/竖条纹2dotinversion---2点翻转Columninversion---列翻转RM68172+MTK6572配置要点说明Flicker/Vcom调整(Page1_BEh)Vcom调整Page1_BE01h每次+/-2~4阶{0xBE,2,{0x01,0x18}},//最大值{0xBE,2,{0x00,0x00}},//最小值RM68172+MTK6572配置要点说明方向180°调整(36h):默认设置:{0x36,1,{0x00}},//或者不写;方向旋转180°:{0x36,1,{0x03}},//需要玻璃支持反扫RM68172+MTK6572配置要点说明Reset设置:建议设置如下:staticvoidlcm_init(void){SET_RESET_PIN(1);//--------------------HighMDELAY(10);//10msSET_RESET_PIN(0);//--------------------LowMDELAY(10);//10msSET_RESET_PIN(1);//--------------------HighMDELAY(150);//一般大于120mspush_table(lcm_initialization_setting_1,sizeof(lcm_initialization_setting_1)/sizeof(structLCM_setting_table),1);}HighHighlowRM68172+MTK6572配置要点说明Porch设置注意事项:staticvoidlcm_get_params(LCM_PARAMS*params){params-dsi.vertical_sync_active=2;params-dsi.vertical_backporch=14;params-dsi.vertical_frontporch=16or18;//WVGA=16;//FWVGA=18;params-dsi.vertical_active_line=FRAME_HEIGHT;params-dsi.horizontal_sync_active=8;params-dsi.horizontal_backporch=16;params-dsi.horizontal_frontporch=24;//可调整H-front-porch的大小来匹配帧频/Fps;params-dsi.horizontal_active_pixel=FRAME_WIDTH;}RM68172porch设置建议为固定配置如下:WVGA-VFP=16,FWVGA-VFP=18;(以确保V-total为8的整数倍)匹配帧频/FPS时,尽量只调整H-front-porch的大小,其它不要变;备注:WVGA-V-total=800+2+14+16=832;FWVGA-V-total=854+2+14+18=888;H-total=480+8+16+24=528;RM68172+MTK6572配置要点说明MIPItiming设置注意事项:MIPIDateRate可设置范围300M~500M;WVGA&FWVGA建议设置330M~350M附近为佳,不要过高;staticvoidlcm_get_params(LCM_PARAMS*params){params-dsi.pll_div1=1;//div1=0,1,2,3;div1_real=1,2,4,4params-dsi.pll_div2=0;//div2=0,1,2,3;div2_real=1,2,4,4params-dsi.fbk_div=12;//17fref=26MHz,fvco=fref*(fbk_div+1)*2/(div1_real*div2_real)}MIPIDatarate(1lane)=26*(12+1)=338Mbps帧频/FPS=(338Mbps*2lane)/(H-total*V-total)/24bit另外一种MIPI频率设置方式如下:params-dsi.PLL_CLOCK=165;MIPIDatarate(1lane)=165*2=330MbpsRM68172+MTK6572配置要点说明lcm_suspend设置注意事项:Data_array方式为最佳【瑞鼎建议】staticvoidlcm_suspend(void){unsignedintdata_array[2];data_array[0]=0x00011500;//softwareresetdsi_set_cmdq(&data_array,1,1);MDELAY(100);data_array[0]=0x00280500;//displayoffdsi_set_cmdq(&data_array,1,1);MDELAY(50);data_array[0]=0x00100500;//sleepindsi_set_cmdq(&data_array,1,1);MDELAY(50);data_array[0]=0x014f1500;//deepstandbydsi_set_cmdq(&data_array,1,1);MDELAY(50);}整个suspen流程中不要拉低ResetRM68172+MTK6572配置要点说明lcm_resume设置注意事项:staticvoidlcm_init(void){SET_RESET_PIN(1);MDELAY(10);SET_RESET_PIN(0);MDELAY(10);SET_RESET_PIN(1);MDELAY(150);push_table(lcm_initialization_setting,sizeof(lcm_initialization_setting)/sizeof(structLCM_setting_table),1);//init_lcm_registers();}Reset+重新initialstaticvoidlcm_resume(void){lcm_init();}RM68172+MTK6572配置要点说明ID读取:Reset&ReadPage1_C5h(C500=0x72,C501=0x81)staticunsignedintlcm_compare_id(void){unsignedintid,id0,id1=0;unsignedcharbuffer[3];unsignedintarray[16];staticintlcm_id;SET_RESET_PIN(1);//NOTE:shouldresetLCMfirstlyMDELAY(10);SET_RESET_PIN(0);MDELAY(10);SET_RESET_PIN(1);MDELAY(120);0array[0]=0x00063902;array[1]=0x52aa55f0;array[2]=0x00000108;//PAGE1dsi_set_cmdq(&array,3,1);MDELAY(10);array[0]=0x00023700;dsi_set_cmdq(array,1,1);MDELAY(10);read_reg_v2(0xC5,buffer,2);//148/84.1/5.227.1MDELAY(10);lcm_id=(buffer[0]8)|buffer[1];#ifdefBUILD_LKprintf(rm68172_wvga_dsi_vdoLCD_ID=%xbuffer[2]=%dbuffer[1]=%xbuffer[0]=%x\n,lcm_id,buffer[2],buffer[1],buffer[0]);#elseprintk(rm68172_wvga_dsi_vdoLCD_ID=%xbuffer[2]=%dbuffer[1]=%xbuffer[0]=%x\n,lcm_id,buffer[2],buffer[1],buffer[0]);#endifif(0x7281==lcm_id)return1;elsereturn0;}RM68172+MTK6572配置要点说明MTK6572ID读取不到常见问题:确认平台配置文件U-boot的DSI_DRV.C文件中,READ_TI
本文标题:RM68172+MTK6572&82&92-MIPI配置要点说明
链接地址:https://www.777doc.com/doc-3332518 .html