[Wind] MT6750 眼圖 host 測試代碼修改點

來源:互聯網
上載者:User

標籤:sse   count   int   exp   bsp   active   class   action   asi   

眼圖相關知識請查看 https://wenku.baidu.com/view/03272d48cc17552706220820.html

MT6750 平台需要修改兩個地方:

1、kernel-3.18/drivers/misc/mediatek/mu3phy/mt6755/mtk-phy-asic.c

PHY_INT32 phy_init_soc(struct u3phy_info *info){        PHY_INT32 ret;        os_printk(K_INFO, "%s+\n", __func__);        ... ...        U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_USBPHYACR1, RG_USB20_VRT_VREF_SEL_OFST, RG_USB20_VRT_VREF_SEL, 7);      // 新加        U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_USBPHYACR1, RG_USB20_TERM_VREF_SEL_OFST, RG_USB20_TERM_VREF_SEL, 7);    // 新加                /*Wait 800 usec */        udelay(800);                U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_U2PHYDTM1, FORCE_VBUSVALID_OFST, FORCE_VBUSVALID, 1);        U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_U2PHYDTM1, FORCE_AVALID_OFST, FORCE_AVALID, 1);        U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_U2PHYDTM1, FORCE_SESSEND_OFST, FORCE_SESSEND, 1);                /* USB PLL Force settings */        usb20_pll_settings(false, false);        os_printk(K_DEBUG, "%s-\n", __func__);        return PHY_TRUE;}

2、kernel-3.18/drivers/misc/mediatek/xhci/xhci-mtk-driver.c

void mtk_xhci_mode_switch(struct work_struct *work){        static bool is_load;        static bool is_pwoff;        int ret = 0;                mtk_xhci_mtk_printk(K_DEBUG, "mtk_xhci_mode_switch\n");        if (musb_check_ipo_state() == true)        {                enable_irq(mtk_idpin_irqnum); /* prevent from disable irq twice*/                return;        }        if (mtk_idpin_cur_stat == IDPIN_OUT)        {                is_load = false;                /* expect next isr is for id-pin out action */                mtk_idpin_cur_stat = (mtk_is_charger_4_vol()) ? IDPIN_IN_DEVICE : IDPIN_IN_HOST;                /* make id pin to detect the plug-out */                mtk_set_iddig_out_detect();                if (mtk_idpin_cur_stat == IDPIN_IN_DEVICE)                        goto done;                U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_USBPHYACR1, RG_USB20_VRT_VREF_SEL_OFST, RG_USB20_VRT_VREF_SEL, 4);      // 新加                U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_USBPHYACR1, RG_USB20_TERM_VREF_SEL_OFST, RG_USB20_TERM_VREF_SEL, 4);    // 新加                ret = mtk_xhci_driver_load();                if (!ret)                 {                        is_load = true;                        mtk_xhci_wakelock_lock();#ifndef CONFIG_USBIF_COMPLIANCE                        switch_set_state(&mtk_otg_state, 1);#endif                }        }        else         {       /* IDPIN_OUT */                if (is_load)                 {                        if (!is_pwoff)                                mtk_xhci_disPortPower();                        /* prevent hang here */                        /* if(mtk_is_hub_active())                        {                                is_pwoff = true;                                schedule_delayed_work_on(0, &mtk_xhci_delaywork, msecs_to_jiffies(mtk_iddig_debounce));                                mtk_xhci_mtk_printk(K_DEBUG, "wait, hub is still active, ep cnt %d !!!\n", mtk_ep_count);                                return;                        } */                        /* USB PLL Force settings */#ifdef CONFIG_PROJECT_PHY                        usb20_pll_settings(true, false);#endif                        U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_USBPHYACR1, RG_USB20_VRT_VREF_SEL_OFST, RG_USB20_VRT_VREF_SEL, 7);      // 新加                        U3PhyWriteField32((phys_addr_t) (uintptr_t) U3D_USBPHYACR1, RG_USB20_TERM_VREF_SEL_OFST, RG_USB20_TERM_VREF_SEL, 7);    // 新加                        mtk_xhci_driver_unload();                        is_pwoff = false;                        is_load = false;#ifndef CONFIG_USBIF_COMPLIANCE                        switch_set_state(&mtk_otg_state, 0);#endif                        mtk_xhci_wakelock_unlock();                }                /* expect next isr is for id-pin in action */                mtk_idpin_cur_stat = IDPIN_OUT;                /* make id pin to detect the plug-in */                mtk_set_iddig_in_detect();        }done:        mtk_xhci_mtk_printk(K_ALET, "current mode is %s, ret(%d), switch(%d)\n", (mtk_idpin_cur_stat == IDPIN_IN_HOST) ? "host" : (mtk_idpin_cur_stat == IDPIN_IN_DEVICE) ? "id_device" : "device", ret, mtk_otg_state.state);}

 

[Wind] MT6750 眼圖 host 測試代碼修改點

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.