82上打开OTG问题
1、dsw里配置:一个GPIO模式:varname GPIO_OTG_DRVVBUS_PIN
一个IDDIG模式:varname GPIO_OTG_IDDIG_EINT_PIN
在EINT_Setting里还需要配IDDIG吗?
2、alps/mediatek/config/[project]/autoconfig/kconfig/project 最后添加
CONFIG_ION=y
CONFIG_ION_mtk=y
CONFIG_power_EXT=n
CONFIG_USB_MTK_OTG =y
CONFIG_USB_MTK_HDRC_HCD = y
3、alps/mediatek/config/[project]/init.project.rc 最开头添加
# MTK project .rc configure
on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root
on early-init
on post-fs-data
#
# Connectivity related device nodes & configuration (begin)
#
#/dev/ttyMT2 for Connectivity BT/FM/gps usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2
最后添加
on boot
# Refer to http://source.android.com/devices/tech/storage/index.html
# It said, "Starting in android 4.4, multiple external storage devices are surfaced to developers through
# Context.getExternalFilesDirs(), Context.getExternalCacheDirs(), and Context.getObbDirs().
# External storage devices surfaced through these APIs must be a semi-permanent part of the device (such as an SD card slot in a Battery compartment).
# Developers expect data stored in these locations to be available over long periods of time."
# Therefore, if the target has the SD card slot in a battery compartment, we need to specify SECONDARY_STORAGE (*** UN-Comment the following command ***)
#
# For MT6582_phone_qhd, the sd slot is blocked by battery. So we need to specify SECONDARY_STORAGE.
export SECONDARY_STORAGE /storage/sdcard1
service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
class late_start
disabled
#
# Connectivity related services (Begin)
#
service wmtLoader /system/bin/logwrapper /system/bin/wmt_loader
user root
group root
class main
oneshot
4、alps/mediatek/config/[project]/fstab
这目录里只找到了recovery.fstab,在最后添加
/sdcard vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0
/system yaffs2 system
/devices/platform/mt_usb auto vfat defaults volDMAnaged=usbotg:auto
5、project.mak里直接设置RESOURCE_OVERLAY_SUPPORT=sd_in_ex_otg,就不改storage_list.xml了
查了下对应目录下alps\mediatek\custom\common\resource_overlay\sd_in_ex_otg\php?mod=tag&id=6090" target="_blank" class="relatedlink">Frameworks\base\core\res\res\xml\storage_list.xml
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<!-- removable is not set in nosdcard product -->
<storage android:mountPoint="/storage/sdcard0"
android:storageDescription="@string/storage_phone"
android:primary="true"
android:allowMassStorage="true" />
<storage android:mountPoint="/storage/sdcard1"
android:storageDescription="@string/storage_sd_card"
android:removable="true"
android:allowMassStorage="true" />
<storage android:mountPoint="/storage/usbotg"
android:storageDescription="@string/storage_external_usb"
android:removable="true" />
</StorageList>
大家帮我看看哪个过程配置的有问题,谢谢
版本是KK版本,总感觉是第4步alps/mediatek/config/[project]/fstab,是不是那个文件,看里面的内容和添加的东西也不是很相像。还有第5步的.xml里是否应该改点什么
第四步错了,alps\mediatek\config\common\fstab,改这个,或提到私有里面再改
好的 我试试 改了这个需要怎么编译最快
刘总好厉害!
EINT pin脚量下电压
电压是什么样的才算正常
第一步里的dws配置,在GPIO_Settings里配置了,需要在EINT_Settings里配置那个中断名吗
都是大拿,高手,学习一下
要的呢,不设置不可以的
IDDIG默认是1.8,OTG_EN是低
直接new吧,靠谱些
中断正常吗?
要设成什么 IDDIG 还是OTG_IDDIG
不是一个IDDIG和OTG_VBUS吗 OTG_EN是什么
现在测量了IDDIG默认是1.8,OTG插入会变为0
OTG_EN默认是低,OTG插入后还是低,感觉是代码流程里没走
现在测量了IDDIG默认是1.8,OTG插入会变为0
OTG_EN默认是低,OTG插入后还是低,感觉是代码流程里没走
查了下代码在usb20_host.c中#ifdef CONFIG_USB_MTK_OTG下面的东西根本没编译到。
第一步:在alps/mediatek/config/[project]/autoconfig/kconfig/project中打开
CONFIG_USB_MTK_OTG和CONFIG_USB_MTK_HDRC_HCD
CONFIG_MT6582_EVB_BOARD=y
# CONFIG_MT6582_FPGA_CA7 is not set
# CONFIG_MT6582_FPGA is not set
CONFIG_EARLY_LINUX_PORTING=y
CONFIG_MTK_VIDEOCODEC_DRIVER=y
CONFIG_SOUND=y
CONFIG_MTK_NFC=y
CONFIG_MTK_CIRQ=y
CONFIG_MTK_NFC=y
CONFIG_NFC_MT6605=y
# CONFIG_NFC_MSR3110 is not set
# CONFIG_PN544_NFC is not set
# CONFIG_NFC_PN533 is not set
# CONFIG_NFC_WILINK is not set
#
# ION Support
#
CONFIG_ION=y
CONFIG_ION_MTK=y
CONFIG_POWER_EXT=n
CONFIG_USB_MTK_OTG =y
CONFIG_USB_MTK_HDRC_HCD = y
这地方配好了 而且new了 这样还没编译到 有什么问题吗
等号前后都不要加空格
按你说的去掉空格,编译编到了,OTG功能也OK了
目前出现一个问题,插入U盘,在文件管理里不显示,下拉菜单可以显示一行:blank external usb storage,点这个提示需要format sd card,必须format才能在文件管理是显示出来。换另一个U盘,下拉菜单又显示damaged external usb storage,点击之后还是提示需要format sd card,必须format才能在文件管理是显示出来。这个过程就是这样吗,每插一个U盘前都要format?
我没遇到过这个问题
问题搞清楚了 应该是格式的问题 好像需要fat格式的 如果是NTFS的 就必须先格式化成FAT 反正是格式支持问题
恭喜