Lines Matching full:xhci
3 * MediaTek xHCI Host Controller Driver
24 #include "xhci.h"
25 #include "xhci-mtk.h"
61 /* xHCI CSR */
145 if (!of_device_is_compatible(dev->of_node, "mediatek,mt8195-xhci")) in xhci_mtk_set_frame_interval()
451 static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_mtk_quirks() argument
453 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_mtk_quirks()
456 xhci->quirks |= XHCI_MTK_HOST; in xhci_mtk_quirks()
461 xhci->quirks |= XHCI_SPURIOUS_SUCCESS; in xhci_mtk_quirks()
463 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_mtk_quirks()
465 xhci->quirks |= XHCI_HW_LPM_DISABLE; in xhci_mtk_quirks()
468 * MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream, in xhci_mtk_quirks()
471 if (xhci->hci_version < 0x100 && HCC_MAX_PSA(xhci->hcc_params) == 4) in xhci_mtk_quirks()
472 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_mtk_quirks()
515 struct xhci_hcd *xhci; in xhci_mtk_probe() local
627 xhci = hcd_to_xhci(hcd); in xhci_mtk_probe()
628 xhci->main_hcd = hcd; in xhci_mtk_probe()
629 xhci->allow_single_roothub = 1; in xhci_mtk_probe()
634 * the xHCI spec on MTK's controller. in xhci_mtk_probe()
636 xhci->imod_interval = 5000; in xhci_mtk_probe()
637 device_property_read_u32(dev, "imod-interval-ns", &xhci->imod_interval); in xhci_mtk_probe()
643 if (!xhci_has_one_roothub(xhci)) { in xhci_mtk_probe()
644 xhci->shared_hcd = usb_create_shared_hcd(driver, dev, in xhci_mtk_probe()
646 if (!xhci->shared_hcd) { in xhci_mtk_probe()
652 usb3_hcd = xhci_get_usb3_hcd(xhci); in xhci_mtk_probe()
653 if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4 && in xhci_mtk_probe()
654 !(xhci->quirks & XHCI_BROKEN_STREAMS)) in xhci_mtk_probe()
657 if (xhci->shared_hcd) { in xhci_mtk_probe()
658 ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED); in xhci_mtk_probe()
680 usb_remove_hcd(xhci->shared_hcd); in xhci_mtk_probe()
683 usb_put_hcd(xhci->shared_hcd); in xhci_mtk_probe()
711 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_mtk_remove() local
712 struct usb_hcd *shared_hcd = xhci->shared_hcd; in xhci_mtk_remove()
716 xhci->xhc_state |= XHCI_STATE_REMOVING; in xhci_mtk_remove()
722 xhci->shared_hcd = NULL; in xhci_mtk_remove()
743 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_mtk_suspend() local
744 struct usb_hcd *shared_hcd = xhci->shared_hcd; in xhci_mtk_suspend()
747 xhci_dbg(xhci, "%s: stop port polling\n", __func__); in xhci_mtk_suspend()
764 xhci_dbg(xhci, "%s: restart port polling\n", __func__); in xhci_mtk_suspend()
778 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_mtk_resume() local
779 struct usb_hcd *shared_hcd = xhci->shared_hcd; in xhci_mtk_resume()
791 xhci_dbg(xhci, "%s: restart port polling\n", __func__); in xhci_mtk_resume()
810 struct xhci_hcd *xhci = hcd_to_xhci(mtk->hcd); in xhci_mtk_runtime_suspend() local
813 if (xhci->xhc_state) in xhci_mtk_runtime_suspend()
826 struct xhci_hcd *xhci = hcd_to_xhci(mtk->hcd); in xhci_mtk_runtime_resume() local
829 if (xhci->xhc_state) in xhci_mtk_runtime_resume()
847 { .compatible = "mediatek,mt8173-xhci"},
848 { .compatible = "mediatek,mt8195-xhci"},
849 { .compatible = "mediatek,mtk-xhci"},
858 .name = "xhci-mtk",
878 MODULE_DESCRIPTION("MediaTek xHCI Host Controller Driver");