mtk驱动总结

1. LCD

1.1怎样新建一个LCD驱动

LCD模组主要包括LCD显示屏和驱动IC。比如LF040DNYB16a模组的驱动IC型号为NT35510。要在MTA5573平台上新建这个lcd的驱动,步骤如下:

A.      新建文件夹nt35510:

\mediatek\custom\common\uboot\lcm\ nt35510

\mediatek\custom\common\kernel\lcm\ nt35510

\mediatek\custom\common\lk\lcm\ nt35510//JB  ADD

B.修改\mediatek\custom\common\kernel\lcm\ mt65xx_lcm_list.c, 在lcm_driver_list [ lcm_count ] 中增加nt35510_lcm_drv。

C.打开mediatek\config\ginwave73_gb\ProjectConfig.mk:

BUILD_LK=yes //JB ADD

BUILD_UBOOT=yes

BOOT_LOGO=wsvganl

 

CUSTOM_UBOOT_LCM = nt35510

CUSTOM_KERNEL_LCM = nt35510

CUSTOM_LK_LCM= nt35510//JB  ADD

LCM_WIDTH=

LCM_HEIGHT=

1.2 LCDIC nt35510.c驱动文件移植原则:

根据具体平台,填充对应的函数,不能直接复制整个文件,避免不必要编译和接口错误。

 

1.3 LCD旋转180度(默认竖屏方向,关联到很多界面,需要统一修改)

Driver:MTK_LCM_PHYSICAL_ROTATION =180//驱动层此种改法影响camera\tp\sensor及其他功能。(不推荐此方法)

MMI:PhoneWindowManager.java中修改。(此方法会引起其他MMI问题) (不推荐此方法)

Feature:(横屏竖屏替换)LCM_WIDTH= LCM_HEIGHT=

 

2. leds 配置

CUSTOM_KERNEL_LEDS= mt65xx

 

mediatek\custom\a5\kernel\leds\mt65xx\cust_leds.c

mediatek\custom\a5\uboot\cust_leds.c

static structcust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = {

{"red",     MT65XX_LED_MODE_PMIC,MT65XX_LED_PMIC_NLED_ISINK0,{0}},       //benmodify

{"green",   MT65XX_LED_MODE_PMIC,MT65XX_LED_PMIC_NLED_ISINK1,{0}},       //benmodify

{"blue",    MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}},       //ben modify

{"jogball-backlight",MT65XX_LED_MODE_NONE, -1,{0}},

{"keyboard-backlight",MT65XX_LED_MODE_NONE,-1,{0}},

{"button-backlight",  MT65XX_LED_MODE_NONE, -1,{0}},      //ben modify

{"lcd-backlight",MT65XX_LED_MODE_PWM,PWM1,{PWM_CLK_NEW_MODE_BLOCK,CLK_DIV128,4,4}},          //benmodify

//{"lcd-backlight",MT65XX_LED_MODE_CUST,(int)DISP_SetBacklight,{0}},

};

 

mediatek\source\kernel\drivers\leds\leds.c

 

3. Flash配置:

3.0 Flashemmc scat 分区(emmc) :

可对emmc进行分区,修改preloader\systemimage\userdata\FAT 等各个分区。

T:\jb\a6_homechoice\a6_homechoice_131014\alps\mediatek\build\tools\ptgen\MT6577\partition_table_MT6577.xls

 

Scatter文件参考(可从scat文件反向推断partition_table table便签页,例如是否含OTP分区)

..\out\target\product\a5\MT6577_Android_scatter_emmc.txt//partition_table表中的分区一一对应

 

board 配置与分区信息

mediatek\custom\konka73_gb\kernel\core\src\board.c

 

mediatek\custom\konka73_gb\kernel\core\src\partition.c

structpart_name_map g_part_name_map[PART_MAX_COUNT] = {

         {"preloader", PART_PRELOADER,       "rawdata",    0,       0,       0},

         {"dsp_bl",    PART_DSP_DL,     "rawdata",    1,       0,       0},

         {"mbr",        PART_MBR,          "raw data",    2,       1,       1},

         {"ebr1",        PART_EBR1,         "raw data",    3,       1,       1},

         {"pmt",        PART_PMT, "raw data",    4,       0,       0},

         {"nvram",     PART_NVRAM,     "rawdata",    5,       0,       0},

         {"seccfg",     PART_SECURE,    "raw data",    6,       0,       0},

         {"uboot",      PART_UBOOT,      "raw data",    7,       1,       1},

         {"boot",       PART_BOOTIMG,  "raw data",    8,       1,       1},

         {"recovery",  PART_RECOVERY,         "rawdata",    9,       1,       1},

         {"sec_ro",     PART_SECSTATIC,         "ext4",         10,     0,       0},

         {"misc",       PART_MISC,         "raw data",    11,     0,       0},

         {"logo",       PART_LOGO,        "raw data",    12,     1,       1},

         {"expdb",     PART_APANIC,     "raw data",    13,     0,       0},

         {"system",    PART_ANDSYSIMG,       "ext4",         14,     1,       1},

         {"cache",      PART_CACHE,      "ext4",         15,     1,       1},

         {"userdata",   PART_USER,         "ext4",         16,     1,       1},

         {"fat", PART_FAT,   "fat",  17,     0,       0},

};

 

3.1 FLASH参数配置文件位置(MemoryDeviceList_MT6577.xls)

MEMORY_DEVICE_XLS =

mediatek\build\tools\emigen\$(MTK_PLATFORM)\MemoryDeviceList_$(MTK_PLATFORM).xls

.xls文件含三个页面:

MT6577(page one):配置Flash Vendor Id 对应的硬件参数。

NAND(page two):

emmc_region(pagethree)

 

3.2 型号配置:

3.2.1 CUSTOM_MEMORY_HDR

mediatek\custom\$(PROJECT)\preloader\inc\custom_MemoryDevice.h

#defineBOARD_ID                MT6577_EVB

#defineCS_PART_NUMBER[0]      H9TP32A4GDMCPR_KDM

#defineCS_PART_NUMBER[1]       KMKUS000VM_B410

 

3.2.2 CUSTOM_NAND_HDR

mediatek\custom\$(PROJECT)\common\nand_device_list.h

static constflashdev_info gen_FlashTable[]={

         {0xECBC, 0x006656, 5, 16, 512, 256,4096,  128,0x21044333,"KA100O015E_BJ", 1},

         {0xECBC, 0x006A56, 5, 16, 512, 256,4096,  128,0x10801011,"K524G2GACH_B0", 0},

         {0xADBC, 0x801620, 5, 16, 512, 256,4096,  128,0x10801011,"H9DA4VH2GJAMC", 3},

         {0x98BC, 0x906676, 5, 16, 512, 256,4096,  128,0x10401000,"KSLCCBL1FB4G3", 0},

         {0x0000, 0x000000, 0, 0, 0, 0, 0, 0,0,"xxxxxxxxxx", 0},

};

 

备注:(以下2部分为附属内容,不做主要调试)

3.3 emmc开关配置

EMMC_CHIP=

MTK_EMMC_SUPPORT=yes

MTK_EMMC_SUPPORT_OTP=no

MTK_NAND_PAGE_SIZE=4K

 

 

3.4 EEPROM

CUSTOM_HAL_EEPROM =dummy_eeprom

CUSTOM_KERNEL_EEPROM= dummy_eeprom   #s24cs64a_eeprom

mediatek\custom\common\kernel\eeprom\dummy_eeprom\dummy_eeprom.c

 

 

4.GPIO/EINT/ADC/KEYPAD/PMIC 配置(根据原理图设计):

..\mediatek\custom\a5\kernel\dct\dct\codegen.dws

..\mediatek\source\dct\DrvGen.exe

 

 

5.keypad

5.1按键配置(根据原理图):DCT(Driver Customization Tool):

..\mediatek\custom\a5\kernel\dct\dct\codegen.dws

..\mediatek\source\dct\DrvGen.exe

客制化:按键定义表、de-bounce time 、Power key Eint Gpio、DownLoadKey、|Mode Key、Factory Key、Recovery Key

 

5.2 物理按键工程模式之名称定义

..\mediatek\custom\a5\factory\inc\cust_keys.h

#defineKEYS_PWRKEY_MAP            { KEY_POWER,"Power" }

 

#defineDEFINE_KEYS_KEYMAP(x)             \

struct key x[] = {                       \

         KEYS_PWRKEY_MAP,             \

         { KEY_HOME,       "Home" },        \

         { KEY_MENU,       "Menu" },         \

         { KEY_HOMEPAGE,   "HomePage" },          \

}

#define CUST_KEY_UP             KEY_UP

 

6.PM 充电

6.1 配置文件位置:

CUSTOM_KERNEL_BATTERY= battery

mediatek\custom\a5\kernel\battery\battery\cust_battery.h

mediatek\custom\a5\kernel\battery\battery\custom_fuel_gauge.h

mediatek\platform\mt6573\kernel\drivers\power\mt6573_battery.c

 

6.2充电常用参数修改:

..\mediatek\custom\a5\kernel\battery\battery\cust_battery.h

6.2.1充电电流修改:

#defineUSB_CHARGER_CURRENT                                         Cust_CC_550MA   //  :Cust_CC_450MA

#defineAC_CHARGER_CURRENT                                           Cust_CC_800MA   // : Cust_CC_650MA

6.2.2.充电电阻设定(根据硬件的bom):

#defineR_CURRENT_SENSE 2                              //0.2 Ohm// 0.2欧姆

6.2.3  充电温度检测设定

开启、关闭:

#defineBAT_TEMP_PROTECT_ENABLE    1       //

// #defineBAT_NTC_TSM_1

NTC修改为10K电阻或者47K电阻(NTC 为电池温度保护NegativeTemperature Coefficient)

#define BAT_NTC_101    //#define BAT_NTC_47 0

// #defineBAT_NTC_TSM_1      //

 

其他:

#defineV_CHARGER_MIN 4400                                      //benmodify //4400 // 4.4 V

#defineV_CHARGER_ENABLE 1                                    //1:ON , 0:OFF      //

 

6.3 电池电量检测(FUEL GAUGE方式,比voltagemapping 方式更精确):

..\mediatek\custom\a5\kernel\battery\battery\cust_fuel_gauge.h

#defineQ_MAX_POS_50  ((BATT_CAPACITY * 1316) /1307)      //ben modify //3121 //  : 2561

#defineQ_MAX_POS_25  BATT_CAPACITY         //ben modfiy //3100 //  : 2561

#define Q_MAX_POS_0             ((BATT_CAPACITY * 1220) / 1307)      //ben modfiy //2893 //  : 2561

#defineQ_MAX_NEG_10  ((BATT_CAPACITY * 1162) /1307)      //ben modfiy //2756 //  : 2561

 

#defineQ_MAX_POS_50_H_CURRENT         ((BATT_CAPACITY* 1295) / 1307)      //ben modfiy //3071 //  : 2534

#defineQ_MAX_POS_25_H_CURRENT         ((BATT_CAPACITY* 1270) / 1307)      //ben modfiy //3012 //  : 2534

#defineQ_MAX_POS_0_H_CURRENT ((BATT_CAPACITY *1102) / 1307)      //ben modfiy //2613 //  : 2534

#defineQ_MAX_NEG_10_H_CURRENT        ((BATT_CAPACITY* 599) / 1307)       //ben modfiy //1420 //  : 2534

 

6.4 FUEL GAUGE 电池电量检测方法及原理(备注)

随着大容量电池的使用,如果设备能够精确的了解电池的电量,不仅能够很好地保护了电池,防止其过放电,同时也能够让用户精确地知道剩余电量来估算所能使用的时间,及时地保存重要数据。电池电量的检测有三种种不同电量计的实现方法,

详细出处:http://www.52rd.com/bbs/Dispbbs.asp?BoardID=58&ID=237149

 

6.5  MTK Android 充电概念

目前充电主要包括Power Off Charging(关机充电) 、IPO Charging(假关机充电)和 OS Charging(开机充电) 三个部分

1),Power Off Charging 部分,可以仔细阅读如下部分的code:

alps\mediatek\platform\mt6575\uboot\mt6575_bat.c // Power Off Charging 的控制流程, 建议从函数mt65xx_bat_init() 开始看code

alps\mediatek\custom\[project]\uboot\inc\cust_battery.h // Power off Charging的一些充电参数的配置

2),OS charging部分,可以仔细阅读如下部分的code:

alps\mediatek\platform\mt6575\kernel\drivers\power\mt6575_battery.c // OS Charging 的控制流程, 建议从函数BAT_thread()开始看

alps\mediatek\custom\[project]\kernel\battery\battery\cust_battery.h    // OS Charging的一些充电参数的配置

建议将alps\mediatek\platform\mt6575\kernel\drivers\power\ 目录下的所有文件都仔细阅读一遍

3), IPO Charging部分实际使用的还是OSCharging部分的code,IPO可以参考  alps\mediatek\source\external\ipod\  目录下的相关文件

 

6.7充电界面显示修改:

\mediatek\custom\a5\lk\include\target\cust_display.h

\mediatek\external\ipod\bootlogo.cpp

 

6.8 电池型号、容量替换,需修改:电池曲线(电池厂商提供),修改对应文件:

mediatek\custom\a5\kernel\battery\battery\cust_battery.h

mediatek\custom\a5\kernel\battery\battery\custom_fuel_gauge.h

 

 

7.camera

7.1 相关代码位置:

CUSTOM_HAL_CAMERA =camera

CUSTOM_HAL_IMGSENSOR= gc2015_yuv

CUSTOM_KERNEL_IMGSENSOR= gc2015_yuv

CUSTOM_HAL_MAIN_IMGSENSOR= gc2015_yuv

CUSTOM_KERNEL_MAIN_IMGSENSOR= gc2015_yuv

 

kernel

\mediatek\custom\common\kernel\imgsensor\

\mediatek\custom\common\kernel\imgsensor\src

kd_imgsensor.h

kd_sensorlist.h

 

hal

\mediatek\custom\common\hal\imgsensor\

sensorlist.cpp

MTKCameraHardware.cpp

 

7.2 拍照图片尺寸设置:

..\mediatek\custom\a5\hal\camera\camera\cfg_ftbl_custom_raw_main.h

//Capture Size

CONFIG_FEATURE(FID_CAP_SIZE,

    BY_DEFAULT(CAPTURE_SIZE_1600_1200),

    /*BY_DEFAULT(CAPTURE_SIZE_2560_1920), benmodify*/

    CAPTURE_SIZE_640_480,

    CAPTURE_SIZE_1280_960,CAPTURE_SIZE_1600_1200,

)

 

7.3 Camera角度旋转

..\\alps\mediatek\config\a5\ProjectConfig.mk

MTK_LCM_PHYSICAL_ROTATION=0

 

8. Voice coil motor摄像头上的自动调焦音圈马达

CUSTOM_HAL_LENS =dummy_lens dummy_lens

CUSTOM_KERNEL_LENS= dummy_lens dummy_lens

 

CUSTOM_HAL_MAIN_LENS= dummy_lens

CUSTOM_HAL_MAIN_BACKUP_LENS=

CUSTOM_HAL_SUB_LENS= dummy_lens

CUSTOM_HAL_SUB_BACKUP_LENS=

 

CUSTOM_KERNEL_MAIN_LENS= dummy_lens

CUSTOM_KERNEL_MAIN_BACKUP_LENS=

CUSTOM_KERNEL_SUB_LENS= dummy_lens

CUSTOM_KERNEL_SUB_BACKUP_LENS=

 

mediatek\custom\common\kernel\lens\dummy_lens\dummy_lens.c

 

 

9.gpio

9.1配置文件位置:

.\mediatek\build\makemtk.mk

 

mediatek\source\dct\DrvGen

mediatek\custom\$(PROJECT)\kernel\dct\dct\codegen.dws

 

9.2设置方法:

mt_set_gpio_mode(GPIO_CTP_EN_PIN,GPIO_CTP_EN_PIN_M_GPIO);

mt_set_gpio_dir(GPIO_CTP_EN_PIN,GPIO_DIR_OUT); //GPIO_DIR_IN);

mt_set_gpio_out(GPIO_CTP_EN_PIN,GPIO_OUT_ZERO); // GPIO_OUT_ONE);

 

10. TouchPanel

10.1配置

CUSTOM_KERNEL_TOUCHPANEL= gt818b

 

..\mediatek\custom\common\kernel\touchpanel\src\mtk_tpd.c

tpd_driver_add(&tpd_device_driver);

platform_driver_unregister(&tpd_driver);

 

10.2 TP原点由IC商现场调试后释放方案设计公司。

 

10.3 引脚定义

复位脚、中断、I2C

 

13.4 物理概念

T+G 双层玻璃

P+G 单层玻璃

 

10.4 TP实现距离感应功能宏开关:

mediatek\custom\common\kernel\touchpanel\gslX680\ gslX680_driver.c

//#defineTPD_PS_SUPPORT

 

11      震动马达

CUSTOM_KERNEL_VIBRATOR=vibrator

11.1马达震动幅度:

.. \mediatek\custom\a5\kernel\vibrator\cust_vibrator.c

static structvibrator_hw cust_vibrator_hw = {

         .vib_timer = 80,//30,         //ben modify

};

 

12. RTC

12.1配置文件位置:

CUSTOM_KERNEL_RTC =rtc

 

mediatek\custom\konka73_gb\kernel\rtc\rtc\rtc-mt6573.h

mediatek\platform\mt6573\kernel\drivers\rtc\mtk_rtc.c

 

12.2. RTC默认日期

\alps\mediatek\custom\[project]\preloader\inc\cust_rtc.h

\alps\mediatek\custom\[project]\kernel\rtc\rtc\rtc-mt65XX.h

#defineRTC_DEFAULT_YEA               2013//2010//cbk.a5.default.date.2013.07.12

#defineRTC_DEFAULT_MTH              7// 1ff

 

 

13. wifi

CUSTOM_KERNEL_WIFI=

MTK_SCREEN_OFF_WIFI_OFF= no

MTK_WIFI_P2P_SUPPORT= yes

MTK_WIFI_HOTSPOT_SUPPORT= yes

 

mediatek\custom\common\kernel\wifi\mt592x\dummy.c

 

14.. HEADSET

CUSTOM_KERNEL_HEADSET= accdet

MTK_HEADSET_ICON_SUPPORT= yes

 

mediatek\custom\konka73_gb\kernel\headset\accdet\accdet_custom.h

 

14 SIM

15.1双卡、单卡版本切换:

Double SIM

GEMINI = yes

MTK_GEMINI_ENHANCEMENT= yes

MTK_SHARE_MODEM_SUPPORT= 2

MTK_SHARE_MODEM_CURRENT= 2

Single SIM

GEMINI = no

MTK_GEMINI_ENHANCEMENT= no

MTK_SHARE_MODEM_SUPPORT= 2

MTK_SHARE_MODEM_CURRENT= 1

 

16. 传感器

MTK_SENSOR_SUPPORT= yes

CUSTOM_KERNEL_ACCELEROMETER= auto//重力加速度传感器

CUSTOM_KERNEL_MAGNETOMETER=akm8975//磁感应器

CUSTOM_KERNEL_ALSPS= tmd2771//光感 距离传感器

CUSTOM_KERNEL_BAROMETER=//气压计

CUSTOM_KERNEL_GYROSCOPE=//陀螺仪

 

16.1  重力加速度传感器(G-sensor感应器

CUSTOM_KERNEL_ACCELEROMETER= auto//传感器

#ifdefined(MTK_AUTO_DETECT_ACCELEROMETER)

\mediatek\source\kernel\drivers\hwmon\hwmsen\Hwmsen_dev.c

inthwmsen_gsensor_add(struct sensor_init_info* obj)

\mediatek\custom\common\kernel\accelerometer\auto\

 

16.2 ALS\PS 光感距离传感器

CUSTOM_KERNEL_ALSPS= tmd2771

 

mediatek\custom\common\kernel\alsps\tmd2771\tmd2771.c

mediatek\custom\common\kernel\alsps\tmd2771\tmd2771.h

mediatek\custom\konka73_gb\kernel\alsps\tmd2771\cust_alsps.c

 

16.3 GYRO-sensormotion sensor 陀螺仪

CUSTOM_KERNEL_GYROSCOPE= l3g4200d

 

mediatek\custom\common\kernel\gyroscope\l3g4200d\l3g4200d.c

mediatek\custom\konka73_gb\kernel\gyroscope\l3g4200d\cust_gyro.c

 

16.4 BAROMETER-sensor气压计

CUSTOM_KERNEL_BAROMETER= ms5607

 

mediatek\custom\konka73_gb\kernel\barometer\ms5607\cust_baro.c

mediatek\custom\common\kernel\barometer\ms5607\ms5607.c

 

16.6 compass 指南针

CUSTOM_KERNEL_MAGNETOMETER= akm8975

 

mediatek\custom\common\kernel\magnetometer\akm8975\akm8975.c

mediatek\custom\konka73_gb\kernel\magnetometer\akm8975\cust_mag.c

 

17. flashlight

CUSTOM_HAL_FLASHLIGHT= dummy_flashlight

CUSTOM_KERNEL_FLASHLIGHT= dummy_flashlight

#constant_flashlight  补光灯(camera闪光灯)

#peak_flashlight

#torch_flashlight  手电筒

# dummy_flashlight

备注:camera闪光灯与camera驱动无关,只需要打开开关,这是由MTK开发的独立功能。

 

mediatek\custom\common\kernel\flashlight\dummy_flashlight\dummy_flashlight.c

mediatek\custom\common\kernel\flashlight\src\kd_flashlightlist.c

mediatek\custom\common\kernel\flashlight\

 

17.1 LED闪光灯配置为手电筒模式:

 

 

 

18. jogball 轨迹球

CUSTOM_KERNEL_JOGBALL=

 

mediatek\custom\common\kernel\jogball\

 

18. atv

CUSTOM_HAL_MATV =

CUSTOM_KERNEL_MATV=

 

HAVE_MATV_FEATURE=yes#no  #Armin

MTK_ATV_CHIP=MTK_MT5193   # Armin

 

MTK_MATV_ANALOG_SUPPORT=yes#no//模拟通道、数字通道切换功能开关

 

mediatek\custom\common\kernel\matv\mt5193\matv.c

 

19. sound

MTK_SOUNDRECORDER_APP= yes

CUSTOM_KERNEL_SOUND= speaker

 

mediatek\custom\common\kernel\sound\inc\yusu_android_speaker.h

mediatek\custom\konka73_gb\kernel\sound\speaker\yusu_android_speaker.c

 

20. USB

CUSTOM_KERNEL_USB =mt6577

 

mediatek\custom\common\kernel\usb\src\Makefile

mediatek\custom\mt6573\kernel\usb\src\mtk_usb_custom.c

mediatek\custom\mt6573\kernel\usb\src\mtk_usb_custom.h

mediatek\custom\mt6573\uboot\inc\cust_sdc.h

mediatek\platform\mt6573\kernel\drivers\usb-gadget\

mediatek\platform\mt6573\kernel\drivers\power\

 

20.1 USB OTG功能(终端连接外接U盘)

alps/mediatek/config/{project}/autoconfig/kconfig/project中打开

CONFIG_USB_MTK_OTG=y

CONFIG_USB_MTK_HDRC_HCD= y

 

20.2 MTP(MediaTransfer Protocol)

USB连接设备,可选存储方式介绍:

USB存储设备、MTP(媒体设备)、PTP(相机)、只充电、内置光盘。

 

21. BT

MTK_WLAN_CHIP =MT6620    # candidate settings: MT6620

MTK_BT_CHIP =MTK_MT6620  # candidate settings:MTK_MT6611\MTK_MT6612\MTK_MT6616\MTK_MT6620

MTK_WLAN_SUPPORT =yes

MTK_BT_SUPPORT =yes

MTK_WLAN_SUPPORT =yes

MTK_WLANBT_SINGLEANT= no

MTK_BT_30_HS_SUPPORT= yes

####config BTfeature###########

# please do notmodify these options

MTK_BT_21_SUPPORT =yes

MTK_BT_30_SUPPORT =yes

MTK_BT_40_SUPPORT =yes

MTK_BT_FM_OVER_BT_VIA_CONTROLLER= yes

MTK_BT_PROFILE_OPP= yes

MTK_BT_PROFILE_SIMAP= yes

MTK_BT_PROFILE_PRXM= yes//蓝牙距离感应装置

MTK_BT_PROFILE_PRXR= yes//蓝牙距离感应装置

MTK_BT_PROFILE_HIDH= yes//无线输入设备

MTK_BT_PROFILE_FTP= yes

MTK_BT_PROFILE_PBAP= yes

MTK_BT_PROFILE_MANAGER= yes

MTK_BT_PROFILE_BPP= yes

MTK_BT_PROFILE_BIP= yes

MTK_BT_PROFILE_DUN= yes

MTK_BT_PROFILE_PAN= yes

MTK_BT_PROFILE_HFP= yes

MTK_BT_PROFILE_A2DP= yes

MTK_BT_PROFILE_AVRCP= yes

MTK_BT_PROFILE_AVRCP14= yes

MTK_BT_PROFILE_TIMEC= no

MTK_BT_PROFILE_TIMES= no

MTK_BT_PROFILE_MAPS= no

MTK_BT_PROFILE_MAPC= no

MTK_BT_PROFILE_SPP= yes

####config BTfeature end ####

 

mediatek\custom\common\kernel\btwlanem\btwlanem\btwlanem.c

 

22. FM

MTK_FM_CHIP =MT6620_FM

MTK_FM_SUPPORT =yes

MTK_FM_TX_SUPPORT =yes

MTK_FM_AUDIO =FM_ANALOG_INPUT

#FM_DIGITAL_INPUT 

 

mediatek\custom\common\kernel\fm\mt6620\dummy.c

 

24. OFN 光学手指鼠标

CUSTOM_KERNEL_OFN =ofn1090

mediatek\custom\common\kernel\ofn\inc

mediatek\custom\konka73_gb\kernel\ofn\ofn1090\cust_ofn.c

 

 

26.modem

modem配置和编译方法参照MTK feature phone

 

26.1modem模块位置及组成(内嵌在一个类似于MTK feature phone 的文件工程中)

配置文件位置:\surplus77\modem\make\SURPLUS_HSPA.mak

工程名称配置:BOARD_VER = SURPLUS_BB

版本号名称设置:\surplus77\modem\make\Verno_SURPLUS.bld

编译生成镜像位置:

 

26.2 modem源码工程编译(../prj/modem)

 

26.3 modem库替换编译(..prj/alps/mediate/custom/common/modem)

CUSTOM_MODEM=YOUR_MODEM

此编译表示:已将在modem源码工程中编译好的镜像放入MTKAndroid 工程中后,存放位置:

./mediatek/custom/common/modem/YOUR_MODEM

执行如下编译命令:./mk update-modem,这个命令会依次做如下步骤:

1. custgen     2. check modem      3. sign modem        4.update modem

 

26.4

WCDMA B1+B8:主要是欧洲

Wcdma B1+B2+B5:南美

Wcdma B2+B4+B5:北美

 

 

27.RF

RF模块存放在modem大的模块中,配置方法参照MTK feature phone

 

27.1 参数配置示例:

RF模块名配置:

\surplus77\modem\make\SURPLUS_HSPA.mak

GSM射频模块:RF_MODULE = MT6162_CUSTOM

3G射频模块:UMTS_RF_MODULE = CUSTOM_MT6162

 

射频参数配置:

GSM射频参数:

\surplus77\modem\custom\l1_rf\MT6162_CUSTOM\m12193.c

\surplus77\modem\custom\l1_rf\MT6162_CUSTOM\l1d_custom_rf.h

\surplus77\modem\custom\l1_rf\MT6162_CUSTOM\l1d_custom_rf_A5.h

\surplus77\modem\custom\l1_rf\MT6162_CUSTOM\l1d_custom_rf_A6.h

3G射频参数:

\surplus77\modem\custom\ul1_rf\CUSTOM_MT6162\u12193.c

\surplus77\modem\custom\ul1_rf\CUSTOM_MT6162\ul1d_custom_rf.h

\surplus77\modem\custom\ul1_rf\CUSTOM_MT6162\ul1d_custom_rf_A5.h

\surplus77\modem\custom\ul1_rf\CUSTOM_MT6162\ul1d_custom_rf_A6.h

 

27.2射频频段

2G:850/900/1800/1900

3G:850/1900/2100

Band1 2100

Band2

Band5

Band8

 

28.SIM卡

SIM卡模块存放在modem大的模块中,配置方法参照MTK feature phone

 

28.1 simcard热插拔功能

\surplus77\modem\make\SURPLUS_HSPA.mak

SIM_HOT_SWAP= NONE

 

 

29.SD卡

27.1热插拔功能

1,sd卡热插拔机制的实现需要软件和硬件同时配合才能实现。

2,在电路上,需要一根单独的检测pin脚,通过检测pin脚的高低电平来检测sd卡的插拔动作,并在dws中将其配置成上拉或下拉

3,软件上的配置主要就是在\mediatek\custom\<proj>\kernel\core\src\board.c中,msdc1_hw 结构体中的 flags 的 MSDC_CD_PIN_EN 和MSDC_REMOVABLE,这两个flag是热插拔的flag,如果不需要热插拔,请把这两个flag移除。

4,如果是低电平触发,将msdc1_hw中的.cd_level  设置成 MSDC_CD_LOW,否则设置成MSDC_CD_HIGH

 

备注:

(1),从hardware的角度,sd 卡槽中的CD 引脚与chip的EINT的某个脚连在一起,且chip内部会有上拉电阻。

(2),dct的配置如下:

注:EINT16使用的哪个GPIO,可以参考硬件hw_config.xls文档

 

 

30.module(四合一芯片:FM/BT/WIFI/GPS)MT6628、MT6620

CUSTOM_HAL_COMBO=mt6628

CUSTOM_KERNEL_FM=mt6628

MTK_BT_CHIP=MTK_MT6628

MTK_FM_CHIP=MT6628_FM

MTK_WLAN_CHIP=MT6628

MTK_COMBO_CHIP=MT6628

MTK_GPS_CHIP=MTK_GPS_MT6628

 

30.音频参数集成(具体参数由硬件提供)

默认音量等级修改:(normal/headset/handfree)

\mediatek\custom\a6\cgen\inc\audio_volume_custom_default.h

 

\mediatek\custom\a6\cgen\inc\audio_custom.h

\mediatek\custom\a6\cgen\inc\med_audio_default.h

\mediatek\custom\a6\cgen\inc\sph_coeff_default.h

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值