參考教程講稿driver all in one v1mtl_第1頁
參考教程講稿driver all in one v1mtl_第2頁
參考教程講稿driver all in one v1mtl_第3頁
參考教程講稿driver all in one v1mtl_第4頁
參考教程講稿driver all in one v1mtl_第5頁
已閱讀5頁,還剩282頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

BuildBuildProject ??64‐bitOcta‐CorerunninguptoDual‐channelLPDDR3PoPmemoryatHigh‐endperformanceGPU,clockedatuptoSupportOpenGL‐ES3.0&OpenCL 5‐classaudioquality,achieving110dBSNR&90dBHigherthanretina‐resolutionQuad‐HD(2560x1440)@60fps yFDD/TDDLTER9Cat‐4Connectivityby? Copyright?MediaTekInc.All ?SupportWi‐Fi MP:MP:MP:64‐bitOcta‐Core itOcta‐Core64‐bitOcta‐Core2xLPDDR3933MHz2xLPDDR3933MHz2xLPDDR3933MHz16MP@30fps(dualISP20MP@30fps(dualISP20MP@30fps(dualISP4Kx2K4Kx2K4Kx2K1080p4Kx2K4Kx2KIMGG6200IMGG6200IMGG6200yFHD1080LTEFDD/TDDR9Cat4LTEFDD/TDDR9Cat4LTEFDD/TDDR9Cat4Wi‐FiWi‐Fi Copyright?MediaTekInc.All EntryLTEMainstreamLTEMP:MP:MP:4xCortex‐A53Performance:8Cortex‐A53Peformance:64‐bitOcta‐CoreuptoPerformance:1xLPDDR3800MHzBandwidth:1xLPDDR3800MHzBandwidth:2xLPDDR3933MHz13MP@30fps(dualISP16MP@30fps(dualISP20MP@30fps(dualISP1080p1080p4Kx2K1080p1080p4Kx2KARMMaliT760‐MP2ARMMaliT760‐MP2IMGRogueG6200HD720FHD1080LTEFDD/TDDR9DC‐HSPA42/11MbpsLTEFDD/TDDR9Cat4LTEFDD/TDDR9Cat4 Wi‐Fiabgn/BT/FM/GPS/GlWi‐Fi Copyright?MediaTekInc.All Theonlypremium64‐bitLTESoCthatcanmeet2015 NewYearhotsalesseason(customerscanhaveamodelMPbyJan2015) transitionfromCustomerscanstartdesignTrueOcta‐Core,employingHMParchitecture(competitor:dualCortex‐A57itselfisverypowerhungryCortex‐A57itselfisverypowerhungry(OneA57consumes4‐5xmorepowerthanone4xCortex‐A57canonlybeturnedonforasecondorless,evenimplementedat20nmWorld‐firstUltra‐HDH.265encode/decode.Richestcamerafeatures( Andmanymore.(seesupplementalmaterial) Copyright?MediaTekInc.All Step1:source Step2:lunch&select Step2:lunch${Project}alsoStepStep3:sourceCustomersneedtomodifythisfileaccordingtocustomers’buildenvironments.Step3’:Customersneedtomodifythisfileaccordingtocustomers’buildenvironments.Step3’:Ifyoucannotfindalps/mbldenv.sh,pleaseexecuteStep3’Step4:make–j242>&1|teeprojectnamecommand譯主機(jī)CPU支持核數(shù)2>&1|tee make‐j24pl2>&1|teemake‐j24lk2>&1|teemakemake‐j24kernel2>&1|tee Theycanbebuildcd?cd?cdmake‐j24$project2>&1|teecdmake‐j24‐kOoutzImage CleanmakeCleanmakeCleanmakeCleanmakeCleanmake CleanRemoveRemovemostgeneratedfilesbutkeeptheconfigandenoughbuildsupporttobuildexternalmodulesmakemrroRemoveallgeneratedfiles+config+variousbackupmrproper+removeeditorbackupandpatch Buildandroidmbuild/core/main.mk$@ Buildandroid Rebuildandroidmmm‐B B Buildandroidmodulebymake‐j24<module packpackbootmake‐j24打包bootBuildsystemmake‐j24PackSystemmake‐j24系,直接build對應(yīng)模塊并用snod命令打包sstemimaePackotamake–j24 $NEW_PROJECT指的是將創(chuàng)建的新的 cdIfmvIfcp-r${BASE_PROJECT}mvModify ceall$BASE_PROJECTstringwithsed-i cdIfIfModify ceall$BASEPROJECTstringwith$NEWsed-is/${BASEPROJECT}/${NEWPROJECT}/g cdkernel-Ifmvmach- Ifcp-rmach- configs/${NEW_PROJECT}debug_defconfig Underkernel-Modify ceall$BASE_PROJECTstringwithsed-is/${BASE_PROJECT}/${NEWPROJECT}/g Ifmvdevice/${ }/${NEWPROJECT}mvdevice/${ mvvendor/mediatek/proprietary/custom/${BASE_PROJEC}Ifcp-rdevice/${ mvdevice/${ }/${NEWPROJECT}/full_${NEWPROJECT}.mk Modify ceall$BASE_PROJECTstringwithsed-i }/${NEWsed-i sed-is/${BASEPROJECT}/${NEWPROJECT}/g sed-is/${BASE_PROJECT}/${NEW_PROJECT}/g T/device.mksed-i sed-is/${BASE_PROJECT}/${NEW_PROJECT}/g sed-is/${BASE_PROJECT}/${NEW_PROJECT}/g Ifsharelibrarieswithsed- Ifnotsharelibrarieswithcp–rvendor/${ MediatekPackagebinaryrelease一些是Project相關(guān)的。 ProjectBaseProject PerlscriptisusedtoautogeneratesourcefileandheaderMemoryDBPleasemergetheinformationofmemorydevicewhichtheprojectusedinthelastlineofthisfile.PleasegetinformationofdevicewhichhasbeenverifiedfromMTKOnline‐‐‐>QVL(New)MoredetailinformationtocheckandgetMDL,pleaserefer] ForMT6795 tform,onlydiscreteLPDDR3isavailableandthepackageis256‐ballPOPFBGA. PerlScriptPerlScript ChangefileThecustomizationfileforEMIE.g.SupportE.g.Support3#defineBOARD_ID#defineCS_PART_NUMBER[0]partnumberin#defineCS_PART_NUMBER[1]<partnumberin#defineCS_PART_NUMBER[2]<partnumberinmake‐j24pl2>&1|teeOutdiriscdbootable/bootloader/preloaderOutdiris] codebasewhencompilerunUsercanchangememorywithoutre‐compiling/downloadingpre‐loaderimageifrequiredmemorydeviceshavealreadybeenspecifiedinconfigureSelectrunUsercanchangememorywithoutre‐compiling/downloadingpre‐loaderimageifrequiredmemorydeviceshavealreadybeenspecifiedinconfigurefiles(MDLand Pre‐loaderPre‐loadersizewillbecheckedincompile 4DefaultAreas(regions)ofeMMC2xBootAreafor1x ForSecurityData,wenotuse1xUserDataWhenaccessEMMC,youshouldgivearegionandoffsetforthis

USER

11Raw2562Raw512StorethePrimaryGuidPartiion3Raw3StoreProductInfoofMoblePhoneor4Raw5Storebackupcopyofalibrationdta.Ex.RFdata,wifiMAC510StoreSIM_MElock610StorebackupcopyofSIM_MElock7Raw256Storesecuritypatitiononfigure8Raw384Storesecond‐stagebootlader,little9Raw16StorethekernelandramdiskfornormalRaw16Storethekernelandramdiskforrecoveryboot.Alternativeboot6 curityparttionconfigureRaw512Storerecoverydata,systemenvandothermiscRaw8Storelogo55Storecustomimagedata.(EnabledbyconfigRaw101312Storetheentireoperatingsystem,otherthanthekernelandthe112StoretheUser's1180StoreAndroidfrequentlyaccesseddataandapp‐Thispartitionisusedasainternalsdcard(Enabledbyconfigtaw3toreOTPdata.(Enabledby Raw16StoreimageflashRaw512StoretheSecondaryGuidPartitionUseGPTinsteadofUseGPTinsteadofAllpartitionsinformationisrecordedinGPTtableThenumberofpartitionsonaGPTdiskisnotconstrained,allowsatleast128Allowsamuchlargervolumesizegreaterthan2ProvidesgreaterreliabilityduetoreplicationandcyclicalredundancyCriticalGPTdatastructuresarestoredtwiceonthedisk:onceatthestartandagainattheendLBA‐‐LogcalBlockAddressforemmc,logicalblocksizeis512bytes.MoredetailedinformationaboutGPT,refertoUEFIspec Thesizeofpartitionheadertableis128bytesforeachpartitionGUID‐‐GloballyUnique ForMT6795 tform,twopartitiontablestyle:excelandyamlExcelstyleisdirectviewing,bettertomodify.SinceitisaRichTextFormat,hardtomaintain,asgittool. intext,battertomaintainuserelated Excelpartitiontableiseffective IN_TEXT=noorMeanwhile,yamlpartitiontablewillbechangedautomaticallywithexcelpartitiontableafterptgen.yamlpartitiontableiseffective emmcsheetReferto“PartitionLayoutIntroductionandCustomization_AOP_inDCC

UsedbyflashtooltodownloadUsedbyUsedbyflashtooltodownloadUsedbybuildmakefiletocheckimagerealsizeWhendothenewbuildflowtheptgenwillbeexecutedYoucanalsoexecutethefollowingbuildcommandtodoptgen TFORM=MT6795PROJECT=${Project}‐f ‐fptgenforflavor

BooHynixBooUserUserYoudon’tneedYoudon’tneedcareabouttheemmccomboanymoreon

Load

UserUserMT6795onlyusesdiscreteemmcDon’tneedmodifyanyconfigurationfile,youcanusethenewemmcdevicedirectlyonyourHWtarget.NOTEVERYIMPORTANT:ThenewemmcdeivcemustbeverifiedbyMTKbeforeyouuseit. ?Download?DownloadTheagentontargettoperformthedownloadprocedureupontoolDescribethestartaddressofeachpartitiontodownloadThechipnumberisembeddedintoscatterfilePGPTandSGPTpartitiondataarewrittentoemmcbyFlashtooldirectlywithoutpgpt/sgptbin選擇Download選擇Scatter 4

BootIMG

56789***第一

1 1 ??

MTK

2nd支持

USB ?加載

Internal3

26

7511 5.descriptionfiles5.descriptionfilesprojectfile

7.Generated1.HW2.HW1.HW2.HWSettingexcel Copyright?MediaTekInc.All ChipcustomizationAcustomizationfileChipcustomizationAcustomizationfile(ex.mt6xxx.fig)willdescribethehardwarecustomizationrelatedtothischip.Forexample,itwillGPIO’spincount,availablemodes,pullADCchannelExternalinterrupt(EINT)pinKeypadscannermatrix Componentdescription ForeachcomponentComponentdescription Foreachcomponentsupportedbythetool,forexample:GPIO,EINT,ADC,keypadandUEM,therewillbeacomponentvariablefile(xxx.cmp) .cmpfilecontainsvariable Gen GPIOCustomizeFordriverForsoftwareFordriverForsoftware EnableEINTEnableEINTThePinmodeafterGPIOinitIfchecked,willgeneratethemoderelatedmacroInPullEnableInPullInPullInternalInternalThePinmodeafterGPIOinitInput/Outputselect.Justforcheck,wontgenerateany OutputHigh OutputLowGeneratethevariablerelatedmacrodefinitionfordrivercode’NC:NotConnect,thestatusisGPIOMode,Input,’ Generate

AllGPIOdefaultsettingsareinGPIOmode,Pullsetting,gpio Generate

Thereisnomacrodefinitions,ifdidn’tsetVarNameforthe DCTprovideanexternalADCchanneltoanADC GeneratetheSIMhot‐plugEINTrelatedmacro SupportWQHDThroughputupto1.5Gbpsfor1dataDualDSI(1clocklanesand4datalaneseachSupportsframecompressionwithUFOEAlllanescanbeconfiguredasclockAlllanescanbeconfiguredasdataOnlylanesinonecontrollercan DpandDncannotberespectiveDualDSImodeallowsDualDSImodeallowstransmissionaframewith2clocklanesand8datalanes x

mtkfb.h debugc mtk_ovl.cmtk_ovl.hdisp_drv_ hmtkfb_ ddpovl.cddpg .cddpaal.c ddppath.cddpcolor.cddp .cddpirq.cddp_rdmacddp_debug.cddp_manager.cddp_split.cddp_dithercddp_ufoecddp_dpi.cddp_wdma.cddp_misc.cddp_drv.c ecorder.cddp_dsi.cdpmgr_config.cddp_od.cddp_dump.c<kernNTERlcCopyright?MediaTekInc.All Step1:Addyour<lcmAddyour<lcm _rAddyour<lcm Step2:Addyour<lcmconfig>in<project>Addyour<lcmconfing>in<project>.mkIfIfthecaseissingleLCM,addyour<lcm>inCONFIG_CUSTOM_LK_LCMIfIfthecaseismultipleLCMs,addsimplyseparatedbyspacekey Step3:Addyour<lcmmainstructure>intolcmAddyour<lcmmainstructure>intolcmlistin KernelLCM Step1:Addyour<lcm _rl Step2:Linkyour<lcmLinkyourcompiled<lcmobject>inalps\kernel‐Step3:Addyour<lcmmainstructure>intolcmAddyour<lcmmainstructure>intolcmlistinalps\kernel‐Addyour<lcmAddyour<lcm Step4:

Step5:Switchtoyour<lcmType</>tostart Step5:Switchtoyour<lcmTake<nt35595fhddsivdo ts65132>forStep5:Switchtoyour<lcm Step6:RebuildkernelandReturntoalpsfolderinPleasedoublecheckifthePleasedoublecheckiftheFilltheLCMConfigurethebasicinformationaccordingtotheHWconnection,LCMtype,DSImode,LCMsizeandPLL.FilltheLCMConfigurelcm_ifaccordingtowhichDSIportbeconnectedFordualDSIport,Congfiglcm_cmd_ifaccordingtowhichporttobeusedtosendinitialcommandtolcm.?FilltheLCM?FilltheLCM?Configureverticalline,horizontalpixelandrelateddataformat?FilltheLCM??FilltheLCM?modetimingifparams->dsi.modeisnotImplementpowerPleasemovingpowercontrolintotheseAPIfromlcm_init.Otherwise,adaptivelcmdriverwillfailImplementLCMinitAccordingtheinitprocessspecifiedinLCMdatasheetpulldown/uptheresetpin,delayandsetLCMinitregistersettingsImplementLCMupdatefunction(onlyforcommandmode)Pleaserefertocommandqueue)ImplementLCMsuspend/resumeInternalAmpAudioInternalAmpMICFMRXAudio /I2S

Merge

MTK

(SPK

ogpartPMICPMIC ‐\alps\kernel‐使用內(nèi)部‐\alps\kernel‐

SmartSmartExt//

DigitalmicIfIfdigitalmicsupport,kerneldriveropenwithdigitalmicDualmicMTK_DUAL_MIC_SUPPORT=Ifdualmicsupport,kerneldriveropenmicrophonewithdualmicconfiguration. Singlemic

LeftchannelandrightDualmicLeftchannelandright FMChip FMChip MTK_FM_CHIP=MTK_FM_SUPPORT= FM MTK_FM_RX_SUPPORT= ?Config?Hal[By?Config?Hal[By Priority:project ##Useprojectimgsensorifeq($(wildcard…….(buildonlyifthereisnoproject Kerneldriver&build[By Priority:project Note:mustmodifythemakefileforobj ?[By?[By Priority:project userandkernelspace,otherwisewillencountertheio‐ctrluserandkernelspace,otherwisewillencountertheio‐ctrlWhy?Onerule:Androidfile

notAccessKernelspaceSourceHeaderFilesUser

HWInterface1MipiclkMipidataMIPIBase HWHWInterface2SensorinputandoutputMasterclock(CMMCLK,uptoPixelClockonlyforparallelCam_pclkequalcsi2cam_pclkduringparallelSCLandSDAMIPIclock )SCLandSDAThespecificGPIOpinswhichwillconnecttosensorpowerdownpin(byAspecificGPIOpinwhichwillconnecttosensorresetpin(byPowerProvide 3powerpins(IOVDD,AVDD,DVDD)tosensor(by ?V‐Sync?V‐SyncandH‐Sync8bitor10bitRAW(Bayer8bitYUV422DataHWInterface3MIPIsupportNlanes(Nisbymipi1:4lane@15Gbpsmipi2:4lane@1.5Gbpsmipi3:2lane@1.5Gbps ImagesensorinterfaceforImagesensorinterfaceforMIPICSI‐2–2LaneinterfaceformainDifferentialpairofMIPI /RDP0/RDP1/–RDP2/RDP3/DifferentialpairofMIPICSItwoRCP_A/RDP0_A/RDP1_A/ PinmultiplexedwithMIPICSI‐twoCMCMMCLKCMHREFCMVREFCMHREFCMVREFCMDAT[9:0](10‐bitCMPDN(PowerdownformainCMRST(ResetformainCMPDN2(PowerdownforCMRST2(Resetfor 根據(jù)硬件連接,對照HWinterface部分,配置根據(jù)硬件連接,對照HWinterface部分,配置cam各pin.Parallel( 1.ConfigurecamerasensorhaldriverinCUSTOM_HAL_IMGSENSOR=a5142_mipiraw2.Addcamerasensorkerneldriverprojectconfig(<project>_defconfig) configwithconsoletomodifyAddcamerasensorhaldrivercodetothecorresponding[Byproject] MustmodifythecorrespondingAddimagesensorkerneldriverfolder[Byproject]Addthefollowing

(ifit??Addcamerasensorkerneldrivercodetothecorresponding[Byproject] +=+= Iftheimagesensordriverdoesn’texistinthe{Project}directory,buildsystemwillproceedtosearchthedriverin{ tform}directory.Donotneedtomodifythemakefile. 4.Addcamerasensorkerneldrivercodetothecorresponding[Byproject] Mustmodifythecorrespondinglinkyouimagesensorcompiledobject [By 5.Modifyotherrelated CUSTOM_HAL_MAINIMGSENSOR=

MIPIIF:xxxxxx_mipi_rawCUSTOM_HALSUB_IMGSENSOR&CUSTOM_KERNEL_SUB_IMGSENSORsubsensor的配置,如果有兼容, ##

Main,sub支持 ““ RAWUINT32XXXXXX_RAW_SensorInit(PSENSOR_UNCTION_STRUCT#ifYUVUINT32XXXXXX_YUV_SensorInit(PSENSOR_FUNCTION_STRUT#if#if#if #ifEID(不用改變),“l(fā)ens名稱”(不需要改),LensPara(不Ekernel/imgsensor/xxxxxx camera_ips_regs_xx YUVcamera_info_xxxxxxyYUVcamera_ensor_paracamecofig ? ? 1for2forcharchar* Power PDNpin腳配置好 與kd_imgsensor.h里面的定義相對應(yīng) SENSOR_DRVNAME_XXXXXX_YUV“xxxxxxxxx“)PowerOn codegen.dws,projectconfig.mkkd_sensorlisth,kd_imgsensor.hsensorlist.cpp,2、implementinitsetting;4、implementcapture& 4、implementcapture& ] MT6630istheworldwidefirst5‐in‐1wirelessconnectivitycombochipsetDual‐band(2.4/5G)singlestream802.11a/b/g/n/acMAC/BB/RFSoC,20/40/80Mhzbandwidth.SupportANT/ANT+‐thewirelessprotocolstandardforsportSupportANT/ANT+‐thewirelessprotocolstandardforsportfitnessBGF WIFI_INTBGF WIFI_INT EnablePINSysrstPINAgpssyncPINGPS_LNAEN?Compile?Compilealsdevicemediatek<Project_Name>ProectConfi??BO=BO_CHIP=BO_PSM_RX_TH=BO_PSM_TX_TH= = =MoredetailabouttheNVRAM,pleasereferenceasthe named《MT6630_WiFi_MTK_SP_NVRAM.pdf》.Compile????–4.1+QDID:BTfirmwarestoredinNVRAM.ThosesettingswillbesettoMT6630byvendor‐specificHCIcommands.ThosesettingsstoreinAP_CFG_RDEB_FILE_BT_ADDR_LID.thedefaultvaluebestoredCustomizedBluetoothBluetoothVoiceBluetoothPCM???BluetoothSleepmodeTXPowerChannelOffset?BluetoothRFCompile???????GPS

GPShardwarerelatedsettingsasfollowscanbegotthroughNVRAM. thedefaultvaluebestoredDefault0000TSX TSXclockdriftisbad,needF=C3(Tt0)3+C2(T‐t0)2+C1(T‐t0)gps_tcxo_type:TCXOclocktype,defaultisgps_tcxo_hz:TCXOfrequency,inHZunit,defaultgps_tcxo_ppb:TCXOdrift,inppbunit,defaultisGPSSW(MNL)couldsupport0.5ppmand2.0ppmTCXO.GPSpositioningaccuracyisthesamebetween05ppmand2.0ppmTCXO.ButtheTTFFof2.0ppmmaybelongerthan0.5ppmTCXOundersomeconditions:GPSpoweronafteraverylongtime(severalIfcustomersdecidetouse2.0ppmTCXO,Wesuggestcustomerstosetgps_tcxo_ppb=2000ppb.SothatGPSSWcanimprovetheTTFFmaybelongerproblem,andkeepGPShasbetterperformancewhileusing2.0ppmLNAFor NA,itusehostGPIOonMT6572toenableexternal–MNLDwillbelaunchedwhenthesystembootupifyouhavethefollowingUserSystemGroupsystemnvramgpssocketmnldstream666ystemCompile????:SMG門限:表示電 RSSI門限修改FM_RX_RSSI_TH_LONG_MT6630值長短天線場景都使用此RSSI門在adb環(huán)境下可以將的etc/fmr/mt6630_fm_cust.cfg用adbpull命令出來,然后修改門限值,再用adbpush命令到etc/fmr下,重啟后,新門限值即可生

Compile????MTK_FM_RX_SUPPORT=MTK_FM_SHORT_ANTENNASUPPORT=???Compile??SensorSensorLightTouchBatterySDUSB SensorSensorSensorDriver NowAndroidsupport16typesSensorServiceDriverRDSENSORTYPENowAndroidsupport16typesSensorServiceDriverSignificantStepStep SENSOR_TYPE_SHeartTiltGlancePickINTER LinuxLinux SensorManagerSensorManagerlibSensorGensorGyroGensorGyrocmmMensorALSPSnewnewnewnewGyrodrnewnewALSPoldXXX

阻塞方式readMisc

MiscDEV

oldG‐sensordeviceregisterG‐sensoroldG‐sensordeviceregisterG‐sensoroperatecall registerG‐sesoroperatecall

(foruserbuild)(forengbuild) thesensors’configureIfyouwanttosupportsensorinyourproject,pleasealwaysset: GsensordriverIfhavenoGsensor,setasGsensordriverislocationGsensoralps\kernel‐ MsensordriverIfprojectuseMsensorakm8963,pleaseIfhavenoMsensor,setasM‐sensordaemonsourcecode MsensordriverCustomization

‐M‐SensorCheckandAddthemsensordaemonservicein Forexampleakm8963,itsdaemonnameisakmd8963,additsserviceininit.rc SensorHalor\folderhaveprojectcustomizationconfigurefileDefinethesensorname,vendornameandotherinformationwithmacro.ForexampleAddAddsensordriverfolderintofollowing AddSensorDriver Addcontentinthe AddSensorCustomfile(takeGsensor“bma050‐new”forAddsensorcustomfolderintofollowing ’’AddSensorCustomalps\kernel‐ MakefileMakefiles Addcontentinthe AddconfigaddconfigintothefollowingAddcontentinthe configinkernelBuildkernelinalpswilldefaultoutputtoForex:modify$cd Outputto“out”$makeO=out$make Thenselecttheoptionyouwanttochangeandsave$cpout/.configarch/arm/configs/ Copyright?MediaTekInc.All SensorSensorSensorDriver ChangefileFile(Gsensorstructacc_hw{direc CustomercandefinetheI2CnumberusedbyThevaluecouldbedefinedas0~CustomercandefinethefilterlengthofSWlowpassThevaluecouldbedefinedas0~32.0willdisablethe Thevaluecouldbedefinedas0~0{x,y,z}=>{x,y,1{x,y,z}=>{-y,x,2{x,y,z}=>{-x,-y,3{x,y,z}=>{y,-4{x,y,z}=>{-x,y-5{x,y,z}=>{y,x,-6{x,y,z}=>{x,y,-7{x,y,z}=>{-y,-x,-power_id/CustomercoulddefinepowersourceofdeviceaccordingtoschPleaserefertothefollowingfileforpoweridandIfthepowersourcecan’tbeshutdown,pleasesetthepower_idasMT65XX_POWER_NONE ChangefileFilealps\kernel‐3.10\drivers\misc\mediatstructmaghwdirecCustomercandefinetheI2CnumberusedbyThevaluecouldbedefinedas0~ DeviceY- 1X2DeviceY- 1X23DeviceX-DeviceZ- TheobservesideofScrCustomercandefinethedevicedirectionofsensorinThevaluecouldbedefinedas0~0{x,y,z}=>{x,y,1{x,y,z}=>{-y,x,2{x,y,z}=>{-x,- 3{x,y,z}=>{y,- 4{x,y,z}=>{-x,y,-5{x,y,z}=>{y,x,6{x,y,z}=>{x-y,-7{x,y,z}=>{-y,x,-power_id/CustomerCustomercoulddefinepowersourceofaccordingtoPleaserfrtofllfileforpower Ifthepowersourcecan’tbeshutdown,pleasesetpower_idas ChangefileFile#define #defineC_CUST_I2C_ADDR_NUMstructalsps_h{inti2c_num;intpower_id;intpwer_vol;unsignedcharusignedintunsignedintnsigned

CustomercandefinetheI2CnumberusedbyThevaluecouldbedefinedas0~ power_id/CustomercoulddefinepowersourceofdeviceaccordingtoschPleaserefertothefollowingfileforpoweridandvoltageasThisisanarrayofi2caddressusedinasThisisanarrayofi2caddressusedinALS+PSThethresholdisusedtojudgeifobjectiscloseorps_threshold_high,itmeanstheobjectisTheactualvaluerangedependsoneach ThetwoitemsThetwoitemswillremaptherawdatatorange0.0~The(C_CUST_ALS_LEVEL‐1)valuesinals_levelwilldivide[0.010240.0]C_CUST_ALS_LEVELzones.Thevaluesinals_valuewillbereportediftherawdatafallsintothecorrespondingzones.Anexampleofals_valueTheframeworkwillusetheAnexampleofals_valueDCTDCTDCTTheGPIOpinforALSEINT(external TheIDofALSThedebouncecountofALS.It’ssetas0x00 ThetriggertypeofALS.It’ssetaslevellowEnable/disablethedebounce.It’ssetasfor

LiLihLogicalLogicallightdefinedbyAndroidframework

JNI

tableinLEDprovidedLEDprovided

DeviceFilesinLED

channel/PMICchannel/GPIOpin……

??Krnkernel‐3.10driversmiscmediatek/ledsmt6795Cust.bootablebootloader/lktaret 1.1.????9

?Config./kernel3

客制化時,配置data&configdiv:clockdivision,canbeanyvaluewithin0~7(ie.1/2^(div)=/1,/2,/4,/8,/16,/32,/64,freq.=clocksource/2^(div)/256foroldClock0:block 1:block for settingas configdiv:clockdivision,canbeanyvaluewithin freq.=clocksource/(div+1)0:261:1043:156MHz(onlyfor>。 hPnhSelectTPDriverCTPDriver

CTPcustomfile:tpd_custom_xxx.h

‐‐‐‐ TouchCommon‐‐‐‐ C需要加入判斷ID或類似的動作,并在driver中識別ICID到后,把tpd_load_status置1. h hCTPDriverAlskernel‐3.10archarm h Applicati EngineerApplicationUser

InputManager

kernelkernelkernelTPTPDriTP hDrivertpd

configdriver&mtk_tpd h

ICdrivergetdata,calculate,process

Basic

Generally,wedon’tneed Ifvirtualbuttonisneededtobeimplementedbytouchpaneldiver,definethismacro.Ifbuttonlayoutisdifferentwithpredefinedones,thismacroshouldbedefinedandthefunctiontpd_buttonshouldbeimplementedItdefinestheactualycoordinateoftouchpanelwheresoftkeyshouldberecognized.DefinesthenumberofsoftintDefinesthekeycodeofeachsoftFile

Fingurereleaseorthemultipleofxthemultipleofythelongaxisoftheellipseintouchcontact Report Notice:在上報(bào)tpd_down()/tpd_up()完成時每 需要

BothLkBothLklogoandkernellogoarebuiltinForResolutionLCM_WEIGHT=480,LCM_HEIGHT=800,theBOOT_LOGOiswvgaLCM_WEIGHT=720,LCM_HEIGHT=1280,theBOOT_LOGOishd720OPTR_SPEC_SEG_DEF=OP01,theBOOT_LOGOprefixiscmccOPTR_SPEC_SEG_DEF=OP02,theBOOT_LOGOprefixiscu Rules.mkdefindstherulesof ……

……

zi

Ifyouwanttochangethelklogoorkernellog,you cetheresourceoflklogo/kernellogoinlogoRemind:thenewlogofilemustisbmpfiles,andtheresolutionmustbesameastheoriginalone. bootAnimationisbootAnimationisbeenbuiltinYoucanalsopullitfromphoneinEEItisItisbeenstartby Folder1:usuallycontainsaseriesofFolder2:usuallycontainsfewpictures reeatedlDesc.txt:usedtodefinetherulesofLine1080,1920meansthewidthandheightofthiszipfile,shouldbesameasthedisysize.9meansthefps(frameperseconds)ofbootAnimationwhenying.Notes,thisvalueisatheoreticalvalue,ifitishigherthanactualfps,itcan’tworks,becausetheactualfpsisdecidedbyperformance.Line2&LineP:itisooledefaultdesinisastart0/1:meanstherepeattimesofthefolderwhen ying.Whenthisvalueis0,itmeansinfiniteloop. BootAnimationisaindependentnativeservice,soitwillbestoppedafterbootcomplete.

cetheFirst,youneedtomakeanewbootanimation.zip,oryoucanpulltheoldbootAnimation.zip,andre cethepictures.Youcanpushittosystem/mediatoNotes:ifyouedittheBootAnimation.zip,pleasemakesureitdidn’tthumbs.dbinfolder,ifnot,the ywillbefailed.(thumbs.dbwillgenerateinWindowssystem,pleasetrytoeditorcompressthenewoneinlinuxsystem)Youshouldmodifycodein SWSWSW TwoaccessorydetectionsolutionsareForStandard2.5/3.5ForStandard2.5/3.5mmAudioACCDETsupportEarphonewithMutil‐keySupportLowPowerACCDETonlyPopMayhavepopnoisewhenenduserinputheadsetbecauseofthevoltageinheadsetmicMaysuffermoreErrordetectionsforStandard3.5or2.5mmAudioJackthanEINT+ACCDETMayMaysuffermoreerrortriggersforhookdetectionin(hangupinCustomizationCustomizationACCDET_EINT(StronglyuseEINTpin detectingaccessory supportsupportheadsetwiththreeforpowersavingifyouplug4‐poledependon ?TERSEt? 來 Accessorydetectingdependsonthevoltagewhen3‐poleor4poleheadsetplugin/out,anditusesinternal2‐bitcomparatortoseparatewhatkindsofexternalcomponentsIfthevoltageofAccDetishigherthan1.77V,A=1;orelse,IfthevoltageofAccDetishigherthan0.4V,B=1;orelse,SoAccDetisdividedinto3headsetstateaccordingtothevoltagePlugoutstate:1.77V≤Voltage≤1.9V(A=1,MicBiasstate:0.4V≤Voltage<1.77V(A=0,B=1);HookSwitchstate:0V≤Voltage<0.4V(A=0,B=0). AudioFlinger

Call

UserSpace

InputsubKeyeent

workflowflowduringphoneSetcallAccDet

AccDet

User accdetaccdetaccdet FileFeatureoptiosEveryparameterinfitourref.designDCT BatteryFuel ACTIONGetBatteryNativecom_andcom_and UpdateFunctionForAndroidServerBatteryUpdateUpdateFieldBooleanBooleanIntegerStringReadValueFromFileByTheFollowing Fuel

FactoryMode/Enginer

FactoryMode/Enginer

Charging

BB

Every10secondschargerplugin/out(PMIC

Only14linefor

Chargerin/utandChargertype1.GtBatteryDatafromBatteryMeter(VBAT,2MovingAveraging1.ThermalactionifThermalChChekBattery

1.NotifycheckforupperIfCable

Notify

usbubattery_update()(resetBatteryMeterwhile

UpateBatteryInformationToAndroidSystem

Main

2.CVtimertimeout2.CVtimertimeout

Any(USBorAC)

BatteryVoltageVbatistheTOPoffchargingime>=3hr

Ifnochargerandbattery<3.4V),thesystemwillauto

UISOC=

Vbat<38vcall

CC

PreCCmode/CCTopOffMode(CVBatteryBatteryInitthesafetyChecktheVBATtodecidetoenterCCmode,checktoenterbatteryfullstateDoChargerIf(1)1>ifchargervolge>6.5V2>ifbatterytemperature50CstopchargingIf(2)pass,dochargingalgo.:chargng9sandstopchargingDoChargerIf(1)1>ifchargervoltage>6.5VstopchargingIf(2)pass,dochargingalgo.:charging10salwaysdisyNote:Whenrecharging,theexisted,checkcallstate,IfcallisactiveandVbat>4.05V,stopchargingNote:avoidfuelgaugeissue??

11levelbatterypercentageBybattery3400mV(0%)4200mVus CCmodeACchargingRechargingforkeethebattery3900~Abovethehi-temperaturedisble-20~60Belowthelowmperaturedsable2Theresisterormeasuringthebatterysense4ISenseTheresterformeasuringtheIsense4ChargerSense isterformeasuringthechargersenseR_CHARGER_1=330,R_CHARGER_2=Themaxvalueofcharger6500>Theminvaueofcharger4400<Enable/diablethechargervoltage0Thepllupresisterformeasuringbattery16900 1800TheextremevalueforcalculatingKernelPowerOffKernelPowerOffFuel Cha g_boot_arg‐>boot_reason==BR_USB&&charger/usbg_boot_arg‐>boot_reason==BR_USB&&charger/usbNPowerYkernel_power_off_chargingYSetKPOCbootYYCheckifbattery<onYSetLPOCbootY OtherBootModeYPmic6329detectlongpowerkeyYNis_kernel_power_cha TriggeripoenableandenterchargingReboot1Showastaticpicturewhichcanbe PowerYKernelpoweroffcharging&&charge/usbNPowerFuel PowerGetVBATbyCompensateIRdropRunningPowerGetVBATbyCompensateIRdropRunningunderNormal(10sSWTimer)TurnonCoulombFromNormal,update(OCV+AUXADC+Impedance

UseCoulomb MeasureMeasuretheVBATfromUsetheVBATtolookuptheandDotheR_batDotheVBAT(avoidI*RUsethenewVBATtolookupZCV Note1D1=Note1D1=D0+(‐CAR)/D0=initialbatteryIfCARis‐,↓IfCARis+,CAR=coulombvcountingalueVVNote2D%isthedepthPowerOffVVNote2D%isthedepthPowerOff100atdifferenttemperaturesFuelGaugemeasureCARPoweronandstartthecoulomb 現(xiàn)有技術(shù)開迴路電壓onlyuseAUX開迴路電壓onlyuseAUX無需外接sense傳統(tǒng)方式誤差> #define#define#define#define

//50C //25C 0C //‐10C#define#define#define#define

//50C //25C 0C

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論