72otg问题。
时间:10-02
整理:3721RD
点击:
根据论坛上的配置,都配置好了,IDDIG 72默认是GPIO129脚,配置成了 USB_IDDIG,发现不通,然后去查代码,,发现usb20.c中间没有 GPIO_OTG_IDDIG_EINT_PIN 的调用,,搜索整个工程,也没有看到。
usb20.c文件中,
void otg_int_init(void)
{
//bool is_ready = mtk_musb->is_ready;
#ifdef ID_PIN_USE_EX_EINT
mt_set_gpio_mode(ID_PIN_GPIO, GPIO_ID_PIN_EINT_PIN_M_EINT);
mt_set_gpio_dir(ID_PIN_GPIO, GPIO_DIR_IN);
mt_set_gpio_pull_enable(ID_PIN_GPIO, GPIO_PULL_ENABLE);
mt_set_gpio_pull_select(ID_PIN_GPIO, GPIO_PULL_UP);
#else
u32 phy_id_pull = 0;
phy_id_pull = __raw_readl(U2PHYDTM1);
phy_id_pull |= ID_PULL_UP;
__raw_writel(phy_id_pull,U2PHYDTM1);
#endif
//mt65xx_eint_set_sens(ID_PIN_EINT, MT65xx_LEVEL_SENSITIVE);
//mt65xx_eint_set_hw_debounce(ID_PIN_EINT,64);
//mtk_musb->is_ready = FALSE;
//mt65xx_eint_registration(ID_PIN_EINT, FALSE, !DEVICE_INTTERRUPT, musb_id_pin_interrup,FALSE);
//mtk_musb->is_ready = is_ready;
musb_writel(mtk_musb->mregs,USB_L1INTM,IDDIG_INT_STATUS|musb_readl(mtk_musb->mregs,USB_L1INTM));
}
#endif
改为
}
void otg_int_init(void)
{
//bool is_ready = mtk_musb->is_ready;
#if 1 //def ID_PIN_USE_EX_EINT
mt_set_gpio_mode(GPIO_OTG_IDDIG_EINT_PIN, GPIO_ID_PIN_EINT_PIN_M_EINT);
mt_set_gpio_dir(GPIO_OTG_IDDIG_EINT_PIN, GPIO_DIR_IN);
mt_set_gpio_pull_enable(GPIO_OTG_IDDIG_EINT_PIN, GPIO_PULL_ENABLE);
mt_set_gpio_pull_select(GPIO_OTG_IDDIG_EINT_PIN, GPIO_PULL_UP);
#else
u32 phy_id_pull = 0;
phy_id_pull = __raw_readl(U2PHYDTM1);
phy_id_pull |= ID_PULL_UP;
__raw_writel(phy_id_pull,U2PHYDTM1);
#endif
//mt65xx_eint_set_sens(ID_PIN_EINT, MT65xx_LEVEL_SENSITIVE);
//mt65xx_eint_set_hw_debounce(ID_PIN_EINT,64);
//mtk_musb->is_ready = FALSE;
//mt65xx_eint_registration(ID_PIN_EINT, FALSE, !DEVICE_INTTERRUPT, musb_id_pin_interrup,FALSE);
//mtk_musb->is_ready = is_ready;
musb_writel(mtk_musb->mregs,USB_L1INTM,IDDIG_INT_STATUS|musb_readl(mtk_musb->mregs,USB_L1INTM));
}
#endif
后,开机依旧量不到IDD脚电压,打印log是有跑到这里。求大侠帮忙看看是什么问题。
usb20.c文件中,
void otg_int_init(void)
{
//bool is_ready = mtk_musb->is_ready;
#ifdef ID_PIN_USE_EX_EINT
mt_set_gpio_mode(ID_PIN_GPIO, GPIO_ID_PIN_EINT_PIN_M_EINT);
mt_set_gpio_dir(ID_PIN_GPIO, GPIO_DIR_IN);
mt_set_gpio_pull_enable(ID_PIN_GPIO, GPIO_PULL_ENABLE);
mt_set_gpio_pull_select(ID_PIN_GPIO, GPIO_PULL_UP);
#else
u32 phy_id_pull = 0;
phy_id_pull = __raw_readl(U2PHYDTM1);
phy_id_pull |= ID_PULL_UP;
__raw_writel(phy_id_pull,U2PHYDTM1);
#endif
//mt65xx_eint_set_sens(ID_PIN_EINT, MT65xx_LEVEL_SENSITIVE);
//mt65xx_eint_set_hw_debounce(ID_PIN_EINT,64);
//mtk_musb->is_ready = FALSE;
//mt65xx_eint_registration(ID_PIN_EINT, FALSE, !DEVICE_INTTERRUPT, musb_id_pin_interrup,FALSE);
//mtk_musb->is_ready = is_ready;
musb_writel(mtk_musb->mregs,USB_L1INTM,IDDIG_INT_STATUS|musb_readl(mtk_musb->mregs,USB_L1INTM));
}
#endif
改为
}
void otg_int_init(void)
{
//bool is_ready = mtk_musb->is_ready;
#if 1 //def ID_PIN_USE_EX_EINT
mt_set_gpio_mode(GPIO_OTG_IDDIG_EINT_PIN, GPIO_ID_PIN_EINT_PIN_M_EINT);
mt_set_gpio_dir(GPIO_OTG_IDDIG_EINT_PIN, GPIO_DIR_IN);
mt_set_gpio_pull_enable(GPIO_OTG_IDDIG_EINT_PIN, GPIO_PULL_ENABLE);
mt_set_gpio_pull_select(GPIO_OTG_IDDIG_EINT_PIN, GPIO_PULL_UP);
#else
u32 phy_id_pull = 0;
phy_id_pull = __raw_readl(U2PHYDTM1);
phy_id_pull |= ID_PULL_UP;
__raw_writel(phy_id_pull,U2PHYDTM1);
#endif
//mt65xx_eint_set_sens(ID_PIN_EINT, MT65xx_LEVEL_SENSITIVE);
//mt65xx_eint_set_hw_debounce(ID_PIN_EINT,64);
//mtk_musb->is_ready = FALSE;
//mt65xx_eint_registration(ID_PIN_EINT, FALSE, !DEVICE_INTTERRUPT, musb_id_pin_interrup,FALSE);
//mtk_musb->is_ready = is_ready;
musb_writel(mtk_musb->mregs,USB_L1INTM,IDDIG_INT_STATUS|musb_readl(mtk_musb->mregs,USB_L1INTM));
}
#endif
后,开机依旧量不到IDD脚电压,打印log是有跑到这里。求大侠帮忙看看是什么问题。
需要加PATCH。默认是不支持的。
PATCH ID多少。
不知道,我们没有做,没有申请。这个肯定要申请才有的。
IDDIG这个脚连到usb座子中间那个稳压管电路能省掉吗?
换一个版本新一点的软件包。我们用v44的是可以的,不需要patch
怎么要稳压管?
你是不是看错了?
请问小编,你是否搞定了,我也同样问题,我是72平台,jb3的代码;
我也发现usb20目录下没有对IDDIG的gpio的调用。
打patch,iddig这个脚要按照mtk规定的来,不能乱搞
能指导下,需要哪些patch,因为要请朋友搞mtk的patch,需要跟他们说清楚。
你的软件版本最好与他们的相同。不然给你PATCH估计移上去也不一定能用。
是的,朋友那边也是用这个版本,之前没有打补丁,开机搞了2周;
哪可以的
兄弟 搞定没?我也在搞72 jb3的otg
去找你代码对应的patch吧
兄弟 你这个搞定没?我们用的和你的版本一样的代码 搞到不定没有?
有搞定的没?
