警告本仅向三星电子株式会社人员提供其内容含有商业保护成果_第1页
警告本仅向三星电子株式会社人员提供其内容含有商业保护成果_第2页
警告本仅向三星电子株式会社人员提供其内容含有商业保护成果_第3页
警告本仅向三星电子株式会社人员提供其内容含有商业保护成果_第4页
警告本仅向三星电子株式会社人员提供其内容含有商业保护成果_第5页
已阅读5页,还剩27页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ImportantSamsungElectronicsCo.Ltd.(“Samsung”)reservestherighttomakechangestotheinformationinthispublicationatanytimewithoutImportantSamsungElectronicsCo.Ltd.(“Samsung”)reservestherighttomakechangestotheinformationinthispublicationatanytimewithoutpriornotice.Allinformationprovidedisforreferencepurposeonly.Samsungassumesnoresponsibilityforpossibleerrorsoromissions,orforanyconsequencesresultingfromtheuseoftheinformationcontainedherein.anyinformationprovidedinthispublication.CustomershallindemnifyandholdSamsunganditsofficers,employees,subsidiaries,affiliates,anddistributorsharmlessagainstallclaims,costs,damages,expenses,andreasonableattorneyfeesarisingoutof,eitherdirectlyorindirectly,anyclaim(includingbutnotlimitedtopersonalinjuryordeath)thatmaybeassociatedwithsuchunintended,unauthorizedand/orillegaluse.Thispublicationonitsowndoesnotconveyanylicense,eitherexpressorimplied,relatingtoanySamsungand/orthird-partyproducts,undertheintellectualpropertyrightsofSamsungand/oranythirdparties.WARNINGNopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeans,electricormechanical,byphotocopying,recording,orotherwise,withoutthepriorwrittenconsentofSamsung.Thispublicationisintendedforusebydesignatedrecipientsonly.Thispublicationcontainsconfidentialinformation(includingtradesecrets)ofSamsungprotectedbyCompetitionLaw,TradeSecretsProtectionActandotherrelatedlaws,andthereforemaynotbe,inpartorinwhole,directlyorindirectlypublicized,distributed,photocopiedorSamsungmakesnowarranty,representation,orguaranteeregardingthesuitabilityofitsproductsforanyparticularpurpose,nordoesSamsungassumeanyliabilityarisingoutoftheapplicationoruseofanyproductorcircuitandspecificallydisclaimsanyandallliability,includingwithoutlimitationanyconsequentialorincidentaldamages.used(includinginapostingontheInternetCustomersareresponsiblefortheirownproductsSAMSUNGunspecifiedaccessispossible)byanyunauthorizedapplications."Typical"parameterscananddovaryparty.Samsungreservesitsrighttotakeanyandmeasuresbothinequityandlawavailabletoitandclaim"Typicals"mustbevalidatedforeachcustomerdamagesagainstanypartythatmisappropriatesbythectm'stptJeff_cuiattrt/riilifration.Samsungproductsarenotdesigned,intended,orauthorizedforuseinapplicationsintendedtosupportorsustainlife,orforanyotherapplicationinwhichthefailureoftheSamsung警 本文件仅向经韩国三星电子株式会社授权的人员提供productcouldreasonablybeexpectedtocreateasituationwherepersonalinjuryordeathmayoccur.CustomersacknowledgeandagreethattheyaresolelyresponsibletomeetallotherlegalandregulatoryrequirementsregardingtheirapplicationsusingSamsungproductsnotwithstandingCopyright©2011SamsungElectronicsCo.,SamsungElectronicsCo.,San#24Nongseo-Dong,Giheung-GuContactUs:HomePage:Allbrandnames,Allbrandnames,trademarksandregisteredtrademarksbelongtotheirrespectiveExynos,Exynos4212,FlexOneNAND,andOneNANDaretrademarksofSamsungARM,Jazelle,TrustZone,andThumbareregisteredtrademarksofARMLimited.Cortex,ETM,ETB,Coresight,ISA,andNeonaretrademarksofARMLimited.JavaisatrademarkofSunMicrosystems,SDisaregisteredtrademarkofToshibaMMCandeMMCaretrademarksofMultiMediaCardAssociation.JTAGisaregisteredtrademarkofJTAGTechnologies,Inc.SynopsysisaregisteredtrademarkofSynopsys,Inc.I2SisatrademarkofPhillipsElectronics.I2CisatrademarkofPhillipsSemiconductorMIPIandSlimbusareregisteredtrademarksoftheMobileIndustryProcessorInterface(MIPI)AllothertrademarksusedinthispublicationarethepropertyoftheirrespectiveSAMSUNGsi-plaza/Jeff_cuiatChipHandlingPrecautionagainstElectrostaticWhenhandlingsemiconductordevices,ChipHandlingPrecautionagainstElectrostaticWhenhandlingsemiconductordevices,besurethattheenvironmentisprotectedagainststaticOperatorsshouldwearanti-staticclothinganduseearthAllobjectsthatcomeindirectcontactwithdevicesshouldbemadeofmaterialsthatdonotproducestaticelectricitythatwouldcausedamage.EquipmentandworktablemustbeIonizerisrecommendedtoremoveelectronBesuretousesemiconductorproductsintheenvironmentthatmaynotbeexposedtodustordirtSemiconductordevicesaresensitivetoenvironmenttemperatureandhumidity.Hightemperatureorhumiditymaydeterioratesemiconductordevice’scharacteristics.Thereforeavoidstorageoruseinsuchconditions.kSUNGCareshoudrtt/ycvilkrccrdevice.DonotexposesemiconductordevicetochemicalbecausereactiontochemicalmaycausedeteriorationofdeviceLightIncaseofnon-EMC(EpoxyMoldingCompound)package,donotexposesemiconductorICtostronglight.Itmaycausedevice’smalfunction.(But,somespecialproductswhichutilizethelightorhavesecurityfunctionareexceptedfromthisguide)Semiconductordevicescanbeinfluencedbyradioactive,cosmicrayorX-ray.Radioactive,cosmicandX-raymaycausesofterrorduringdeviceoperation.Thereforesemiconductordevicesmustbeshieldedunderenvironmentthatmaybeexposedtoradioactive,cosmicrayorX-ray.Notethatsemiconductordevice’scharacteristicsmaybeaffectedbystrongelectromagneticwaveormagneticfieldduringoperationunderinsufficientPCBcircuitdesignforEMS.SAMSUNGsi-plaza/Jeff_cuiatSAMSUNGsi-plaza/Jeff_cuiatRevisionFeb.27,Mar.8,AddChapter2.3.2TC4I2CdevicesTableofTableofStartandStop DataTransfer ACKSignal FlowchartsofOperationsinEach ConnectionofExynosandI2C TC4I2C 2.4.1RegisterMap KernelSetupand I2C Platform SAMSUNGsi-plaza/Jeff_cuiatListofListofFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureTC4I2C-BusBlock StartandStop I2C-BusInterfaceData DataTransferontheI2C- AcknowledgementontheI2C- OperationsforMaster/Receive I2CDriver SAMSUNGsi-plaza/Jeff_cuiatListofListofTableTableTableTableTableTableTable SupportedI2C ListofPinstobeUsedtoConnectExynosand TC4I2C RegisterMap I2C I2CSystemDriverFile SAMSUNGsi-plaza/Jeff_cuiatListofListofExampleExampleExampleExampleExampleTC4KernelSetupand Platform MachineDriver-mach- MachineDriver-setup- DeviceDriver-i2c- SAMSUNGsi-plaza/Jeff_cuiatListofRegisterRWAccessTypeRegisterValueSAMSUNGResetVleoListofRegisterRWAccessTypeRegisterValueSAMSUNGResetVleona/Jeff_cuiat Somebitsofcontrolregistersaredrivenbyhardwareorwriteoperationonly.Asaresulttheindicatedresetvalueandthereadvalueafterresetmightbedifferent.0Clearstheregister1SetstheregisterxDon'tcarexXUndefinedmultiple?Undefined,butdependsonthedeviceorpinDeviceThevaluedependsonthePinThevaluedependsonthepinRReadTheapplicationhaspermissiontoreadtheRegisterfield.Writestoread-onlyfieldshavenoeffect.WWriteTheapplicationhaspermissiontowriteintheRegisterRead&TheapplicationhaspermissiontoreadandwritesintheRegisterfield.Theapplicationsetsthisfieldbywriting1’b1andclearsitbywriting1’b0.ListofSAMSUNGsi-plaza/Jeff_cuiatListofSAMSUNGsi-plaza/Jeff_cuiatDeviceInter-IntegratedSamsungTC4I2CSystem_DriverDeveloper's11.1ThisdocumentdescribeshowtoapplytheSamsungTC4I2CSystem_DriverDeveloper's11.1ThisdocumentdescribeshowtoapplytheI2CdriverofAndroid4.0.3BSPbasedontheTC4referenceboardandisintendedforthedeveloperswhohaveexperienceddevelopmentofLinuxkernelandAndroid.1.2DocumentThemainpurposeofthisdocumentistoguideontheapplicationofTC4I2CsystemTherefore,itneedstounderstandtheI2C-relatedhardwareandsoftwareontheLinuxkerneldriverandAndroidplatformofTC4.ThisdocumentdescribessomehardwareIPslikeI2CSubsystem,andI2CdriverofLinuxkernelforSAMSUNGBlocksforI2CofExynos:I2C-BusBlockPartforI2CofTC4board:I2C-BusBlocksi-plaza/Jeff_cuiatSoftwareLinuxkernel:I2CdeviceConfigurationforTC4Android4.0.3DefaultI2CconfigurationforLinuxkernelandDriverI2Cdriver:Machine,CPU,PlatformandI2CdriversinLinuxSamsungTC4I2CSystem_DriverDeveloper's1.3OperationTableTableSamsungTC4I2CSystem_DriverDeveloper's1.3OperationTableTableSAMSUNGsi-plaza/Jeff_cuiatOut/MasterReceiveSlaveReceiveSlaveReceiveTC4ReferenceBoardforLinuxKernel3.0,Android4.0.3IceCreamBootU-Boot:SamsungTC4I2CSystem_DriverDeveloper's2H/WSamsungTC4I2CSystem_DriverDeveloper's2H/W2.1TC4I2CTheI2CinterfaceofExynossupports9channelsmulti-master,slaveI2Cbusinterfaces.Supportsupto100kbit/sintheStandardmodeandupto400kbit/sintheFastmode.TheI2C-BusBlockDiagramofTC4areshowninFigureFigureTC4I2C-BusBlockSAMSUNGsi-plaza/Jeff_cuiatSamsungTC4I2CSystem_DriverDeveloper's2.2I2C-BusInterfaceSamsungTC4I2CSystem_DriverDeveloper's2.2I2C-BusInterfaceThefunctionalrelationshipsamongtheseoperatingmodesaredescribedinthesesections:StartandStopconditionsDatatransferformatRead-WriteoperationAbortconditionsConfiguringIIC-bus2.2.1StartandStopTheStartandStopconditionisshowninFigureSAMSUNGsi-plaza/Jeff_cuiatFigureStartandStopSamsungTC4I2CSystem_DriverDeveloper's2.2.2DataSamsungTC4I2CSystem_DriverDeveloper's2.2.2DataTransfersi-plaza/JFue-usIf2FigureDataTransferontheI2C-SAMSUNGSamsungTC4I2CSystem_DriverDeveloper's2.2.3ACKSamsungTC4I2CSystem_DriverDeveloper's2.2.3ACKSignalFigureSAMSUNG2.2.4FlowchartsofOperationsinEachsi-plaza/Jeff_cuiatSamsungTC4I2CSystem_DriverDeveloper'sSamsungTC4I2CSystem_DriverDeveloper'sFigureFigure7illustratestheoperationsforMaster/ReceiverSAMSUNGsi-plaza/Jeff_cuiatSamsungTC4I2CSystem_DriverDeveloper'sSamsungTC4I2CSystem_DriverDeveloper'sFigureSAMSUNGsi-plaza/Jeff_cuiatSamsungTC4I2CSystem_DriverDeveloper'sSamsungTC4I2CSystem_DriverDeveloper'sFigureSAMSUNGsi-plaza/Jeff_cuiatSamsungTC4I2CSystem_DriverDeveloper'sSamsungTC4I2CSystem_DriverDeveloper'sFigure9illustratestheoperationsforSlave/ReceiverFigureSAMSUNGsi-plaza/Jeff_cuiatSamsungTC4I2CSystem_DriverDeveloper'sDeviceConnectionsofTC4I2CConnectionofExynosandI2CTableListofPinstobeUsedtoConnectExynosandSAMSUNG2.3.2TC4I2CTableTC4I2CI2CFuelSamsungTC4I2CSystem_DriverDeveloper'sDeviceConnectionsofTC4I2CConnectionofExynosandI2CTableListofPinstobeUsedtoConnectExynosandSAMSUNG2.3.2TC4I2CTableTC4I2CI2CFuelUSBInput/I2C-businterface0serialclockInput/I2C-businterface0serialdataInput/I2C-businterface1serialclockInput/I2C-businterface1serialdataInput/I2C-businterface2serialclockInput/I2C-businterface2serialdataInput/I2C-businterface3serialclockInput/I2C-businterface3serialdataInput/I2C-businterface4serialclockInput/I2C-businterface4serialdataInput/I2C-businterface5serialclockInput/I2C-businterface5serialdataInput/I2C-businterface6serialclockInput/I2C-businterface6serialdataInput/I2C-businterface7serialclockIOutptiat1I2C-businterface7serialdataSamsungTC4I2CSystem_DriverDeveloper'sI2CRegisterRegisterMapBaseAddress:0x1386_0000,0x1387_0000,0x1388_0000,0x1389_0000,TableRegisterMapSAMSUNGsi-plazaSamsungTC4I2CSystem_DriverDeveloper'sI2CRegisterRegisterMapBaseAddress:0x1386_0000,0x1387_0000,0x1388_0000,0x1389_0000,TableRegisterMapSAMSUNGsi-plaza/Jeff_cuiatResetSpecifiestheI2C-businterface0controlSpecifiestheI2C-businterface0addressSpecifiestheI2C-businterface0transmit/receivedatashiftregisterSpecifiestheI2C-businterface0multi-masterlinecontrolregisterSamsungTC4I2CSystem_DriverDeveloper's3S/W3.1I2CDeviceI2CdevicedriverisSamsungTC4I2CSystem_DriverDeveloper's3S/W3.1I2CDeviceI2Cdevicedriverisplacedat3.2I2CTableI2CSThisfunctionregistersanI2CdrivertotheThisfunctionunregistersanI2Cdrivertothe*adap,u32ThisfunctioncheckswhethertheI2Cadapterhastheneededfunctionality.tticilievidictcit(ticit*dev,void*data)isfcitsertetatei2lsi-plaza)eff_cuiatThisfunctiongetstheprivatedatafrom01,2012ici.*msgs,intThisfunctionexecutesasingleorcombinedI2Cmessage. initi2c_register_board_info(intbusnum,structi2c_board_infoconst*info,unsignedlen)ThisfunctionregistersthedeviceinfototheSamsungTC4I2CSystem_DriverDeveloper's44.1SamsungTC4I2CSystem_DriverDeveloper's44.1KernelThischapterdescribestheconfigurationofLinuxkernelforTC4I2C4.1.1KernelSetupand"maketc4_dvt_icecream_defconfig"enablesthekernelsetupforTC4Android,anduse"makemenuconfig"fordetailedconfiguration.ExampleTC4KernelSetupandSAMSUNGsi-plaza/Jeff_cuiatandroid-kernel-samsung-dev$makemenuconfigSamsungTC4I2CSystem_DriverDeveloper's4.1.2I2CSamsungTC4I2CSystem_DriverDeveloper's4.1.2I2CThischapterdescribesthekernelconfigurationforI2CofTC4I2Csystem.InitialscreenofkernelconfigurationisshowninFigure10:si-plaza/Fgfcnit-gSelect"DeviceDriversI2CsupportI2CHardwareBussupportS3C2410I2CFigureI2CDriverSAMSUNGSamsungTC4I2CSystem_DriverDeveloper's5ThischapterdescribeshowtoapplytheI2CsystemSamsungTC4I2CSystem_DriverDeveloper's5ThischapterdescribeshowtoapplytheI2CsystemofAndroid4.0.3BSPbasedontheTC4reference5.1I2CDeviceDriverofTable7isthefiledeploymentofI2CsystemTableI2CSystemDriverFilePlatformDevice:I2CchannelSAMSUNGFile:dev-oSourceExample Platformstatistrucrsorec2ee] [0]=.start= =S3C_PA_IIC1+SZ_4K- [1]=.start= =3840structplatform_devices3c_device_i2c1{ ="s3c2410- = = 45};47voidinits3c_i2c1_set_platdata(structs3c2410_platform_i2c*pd)48{PlatformMachineDeviceSamsungTC4I2CSystem_DriverDeveloper's5.1.2MachineSamsungTC4I2CSystem_DriverDeveloper's5.1.2MachineFile:mach-oSourceExampleMachineDriver-mach-oSourceExampleMachineDriver-setup- , //ForS5K4EC(usingi2c6) i2c_register_board_info(7,i2c_devs7, if(!pd)pd=pd->bus_num=1;}npd=s3c_set_platdata(pd,sizeof(structif(!npd-npd->cfg_gpio=s3c_i2c1_cfg_gpio;61}SamsungTC4I2CSystem_DriverDeveloper's5.1.3DeviceSamsungTC4I2CSystem_DriverDeveloper's5.1.3DeviceoSourceExampleDeviceDriver-i2c-1124inti2c_register_driver(structmodule*owner,structi2c_driver*driver)1125{ int /*Can'tregisteruntilafterdrivermodelinitf return- s*dhivrothflfiventhrvrce*07.11 driver->driver.owner=owner; driver->driver.bus=&i2c_bus_type; /*Whenregistrationreturns,thedriver *willhavecalledprobe()forallmatching-but-unbounddevices. res=driver_register(&driver->driver); if(res) return /*Driversshouldswitchtodev_pm_opsinstead.*/ if(driver->suspend) pr_warn("i2c-core:driver[%s]usinglegacysuspendmethod\n", if(driver- pr_warn("i2c-core:driver[%s]usinglegacyresumemethod\n", pr_debug("i2c-core:driver[%s]registered\n",driver->); INIT_LIST_HEAD(&driver- /*Walktheadaptersthatarealreadypresent20voids3c_i2c1_cfg_gpio(structplatform_device*dev)21{if(soc_is_exynos5210()||S3C_GPIO_SFN(2),28}SamsungTC4I2CSystem_DriverSamsungTC4I2CS

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论