MIPI-LCM-Porting-Guide

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Copyright©MediaTekInc.Allrightsreserved.MT6573/75MIPILCMPortingGuide-CommandModeConfidentialBCopyright©MediaTekInc.Allrightsreserved.OutlineMIPILCMDisplayTypeHWConnectionPortingGuide(stepbystep)DebugChecklistMIPISignalWaveformCopyright©MediaTekInc.Allrightsreserved.MIPILCMDisplayTypeMIPILCMDisplayType(1/2)▪Commandmode:likeDBI,CPUinterfaceHostProcessorDisplayPanelLCDDisplayLCDDisplayBusInterfaceColorFrameBufferImageUpdateDataCommands&ImageUpdateDataBusInterfaceDisplayControllerMIPILCMDisplayType(2/2)▪Videomode:likeDPIinterfaceDisplayDriverHostProcessorDisplayPanelLCDDisplayLCDDisplayBusInterfaceBusInterfaceColorFrameBufferDisplayRefreshTimingControlUpdateFrameBufferCopyright©MediaTekInc.Allrightsreserved.HWConnectionHWConnection(1/2)▪73/75support1laneor2lanemipilcm.Forbetterperformance,pleaseuse2lanemipilcmLCMMT6573/75Data1+Data1-Data0+Clk+Data0-Clk-TEData1+Data1-Data0+Clk-Clk+Data0-TEEnableTEpintoavoidtearing,likeDBIHWConnection(2/2)▪ConfigureClocklaneandDatalaneinDCTtool.–Def.Mode0:GPIO–设定默认为pulldownoutputInPullEnPUPD打勾InPullSelHigh不选Def.DirOUTTakemt6573asaexample:ClkanddataGPIO142-GPIO147Copyright©MediaTekInc.Allrightsreserved.PortingGuide(stepbystep)PortingGuide—Step1▪..\mediatek\custom\common\kernel\lcm\xxxx\lcm_drv.cPortingGuide—Step22020/11/22Copyright©MediaTekInc.Allrightsreserved11▪Lcm_get_params()staticvoidlcm_get_params(LCM_PARAMS*params){//thispartisDSIbasicsettingparams-type=LCM_TYPE_DSI;params-dsi.mode=CMD_MODE;params-width=FRAME_WIDTH;params-height=FRAME_HEIGHT;//Sofar,wesupportmaximumTWO_LANEparams-dsi.LANE_NUM=LCM_TWO_LANE;PortingGuide—Step22020/11/22Copyright©MediaTekInc.Allrightsreserved12▪Lcm_get_params()//thispartisDSICommandModesetting//enabletearing-free,issameasDBIlcmtearing-free,mustenablelcmoutputTEsignaltoBBparams-dbi.te_mode=LCM_DBI_TE_MODE_VSYNC_ONLY;params-dbi.te_edge_polarity=LCM_POLARITY_RISING;//colorformatparams-dsi.data_format.color_order=LCM_COLOR_ORDER_RGB;params-dsi.data_format.trans_seq=LCM_DSI_TRANS_SEQ_MSB_FIRST;params-dsi.data_format.padding=LCM_DSI_PADDING_ON_LSB;params-dsi.data_format.format=LCM_DSI_FORMAT_RGB888;//ForMT6575Only,formt6573noneedtosetthisvalue.params-dsi.packet_size=256;//setvaluejustforMT6575onlyPortingGuide—Step22020/11/22Copyright©MediaTekInc.Allrightsreserved13▪Lcm_get_params()//thispartisDSIClocksetting,params-dsi.pll_div1=37;//div1=0~63params-dsi.pll_div2=1;//div2=0~15}Note:maximumbitrateis1Gbperlane//Bitratecalculation//fref=26MHz,Bitrateperlane:fout=26*(pll_div1+1)/(2*pll_div2)MIPIspec规定的timing参数都由datarate来决定,目前这部分值都在dsi_drv.c中根据div1和div2自动计算。无需客户设定。PortingGuide—Step32020/11/22Copyright©MediaTekInc.Allrightsreserved14▪Lcm_init()--initialsettingcommand▪Lcm_suspend()--sleepinsettingcommand▪Lcm_resume()--sleepoutsettingcommand将LCMFAE提供的initialsetting,sleepin,sleepout,updateimagesetting通过DSICommandQueue的方式发送给LCM。目前提供了两个API来实现Commandqueue发送命令,作用是一样:1.dsi_set_cmdq(*pdata,queue_size,force_update);2.dsi_set_cmdq_V2(cmd,count,*para_list,force_update);HowtousetheseTwoAPI?YouneedtoknowwhatisDSICommandQueuefirst!dsi_set_cmdq(*pdata,queue_size,force_update)2020/11/22Copyright©MediaTekInc.Allrightsreserved15Type0&Type2dsi_set_cmdq(*pdata,queue_size,force_update)2020/11/22Copyright©MediaTekInc.Allrightsreserved16Type1Dsi_set_cmdq()客户需要根据setting,自行填充正确的DataID和commandqueueType。dsi_set_cmdq_V2(cmd,count,*para_list,force_update)2020/11/22Copyright©MediaTekInc.Allrightsreserved17dsi_set_cmdq_V2(cmd,count,*para_list,force_update)2020/11/22Copyright©MediaTekInc.Allrightsreserved18Dsi_set_cmdq_V2()客户只需填setting就行,相应的DataID和type由dsicode根据paramscount来决定,无需客户填充dsi_set_cmdq_V2(cmd,count,*para_list,force_update)▪如果调用dsi_set_cmdq_V2(),则只需完成下面的LCMsettingtables,然后调用push_table(lcm_setting,sizeof(lcm_xxx_setting)/sizeof(structLCM_setting_table),1);-lcm_initialization_setting-lcm_sleep_out_setting-lcm_deep_sleep_mode_in_setting-lcm_backlight_level_settingPortingGuide—Step4▪Lcm_update()mustusedsi_set_cmdq()来发送paramsCopyright©MediaTekInc.Allrightsreserved.DebugChecklistDebugChecklist▪如果已经按之前的steps完成了相关function,但是LCM还是不能正常work,可以按照下面的checklist来debug。Checklist1▪Resetpincannotbefloating.(ProcessortoPanel)▪LCMInitialCodeisvalidornot.–CheckwithPanelVendor.▪Backlightisonwhenturnonpower.–Powerfailed.▪ProbetheinterfacetocheckifDSIcommandistriggeredornot.Checklist2▪Checkifconfigurationiscommandmodeorvideomode.–是否设定某些register或外部pin来决定commandmode▪CheckifLCD/DSIimagesettingisokornot.–可以用DDMS先确认下buffer中的image是否OK▪Setlanenumbertobe1.▪CheckifpanelsupportsLPtransmissionornot.Checklist3/4▪TimingParameter–CheckthattimingsettingcansatisfyPanel’sspec.▪Checkpaneldataratesupportingrange–Forexample,Renesas’schipneeddataratebetween240.5~429Mb/perlane–可以尝试降低datarate,来看是否OK▪Checkwireconnection–Highspeedmoderequiresimpedancematch.Copyright©MediaTekInc.Allrightsreserved.MIPISignalWaveformYellow:D0PRed:D0NWaveform:LowPowerModeYellow:D0PRed:D0NWaveform:HighSpeedModeCopyright©MediaTekInc.Allrightsreserved.AppendixDSIPacketStructure(1)▪ShortpacketDSIPacketStructure(2)▪LongpacketDSIComm

1 / 37
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功