usb: dwc3: pci: add dr-mode for Intel dwc3
It's know that Intel's SoCs' dwc3 integration is peripheral-only since Intel implements its own portmux for role-swapping. In order to prevent dwc3 from ever registering and XHCI platform_device, let's just set dr-mode to peripheral-only on Intel SoCs. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
@@ -76,8 +76,19 @@ static int dwc3_pci_quirks(struct pci_dev *pdev, struct platform_device *dwc3)
|
|||||||
return platform_device_add_properties(dwc3, properties);
|
return platform_device_add_properties(dwc3, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
|
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
|
||||||
pdev->device == PCI_DEVICE_ID_INTEL_BYT) {
|
int ret;
|
||||||
|
|
||||||
|
struct property_entry properties[] = {
|
||||||
|
PROPERTY_ENTRY_STRING("dr-mode", "peripheral"),
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
|
ret = platform_device_add_properties(dwc3, properties);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
if (pdev->device == PCI_DEVICE_ID_INTEL_BYT) {
|
||||||
struct gpio_desc *gpio;
|
struct gpio_desc *gpio;
|
||||||
|
|
||||||
acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
|
acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
|
||||||
@@ -105,6 +116,7 @@ static int dwc3_pci_quirks(struct pci_dev *pdev, struct platform_device *dwc3)
|
|||||||
usleep_range(10000, 11000);
|
usleep_range(10000, 11000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
|
if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
|
||||||
(pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ||
|
(pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user