[7/9] usb: host: pci-quirks: Bypass xHCI quirks for Raspberry Pi 4

Message ID 20200608192701.18355-8-nsaenzjulienne@suse.de
State New
Headers show
Series
  • Raspberry Pi 4 USB firmware initialization rework
Related show

Commit Message

Nicolas Saenz Julienne June 8, 2020, 7:26 p.m.
The board doesn't need the quirks to be run, and takes case of its own
initialization trough a reset controller device. So let's bypass it
quirk.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 drivers/usb/host/pci-quirks.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 92150ecdb036..4b3be05d1290 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -16,6 +16,8 @@ 
 #include <linux/export.h>
 #include <linux/acpi.h>
 #include <linux/dmi.h>
+#include <linux/of.h>
+
 #include "pci-quirks.h"
 #include "xhci-ext-caps.h"
 
@@ -1248,6 +1250,16 @@  static void quirk_usb_early_handoff(struct pci_dev *pdev)
 	 */
 	if (pdev->vendor == 0x184e)	/* vendor Netlogic */
 		return;
+
+	/*
+	 * Bypass the Raspberry Pi 4 controller xHCI controller, things are
+	 * taken care by the board's co-processor.
+	 */
+	if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483 &&
+	    of_device_is_compatible(of_get_parent(pdev->bus->dev.of_node),
+				    "brcm,bcm2711-pcie"))
+		return;
+
 	if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
 			pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
 			pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&