@@ -14,6 +14,7 @@
#include <lcd.h>
#include <memalign.h>
#include <mmc.h>
+#include <usb/xhci.h>
#include <asm/gpio.h>
#include <asm/arch/mbox.h>
#include <asm/arch/msg.h>
@@ -494,3 +495,8 @@ int ft_board_setup(void *blob, bd_t *bd)
return 0;
}
+
+void xhci_pci_fixup(struct udevice *dev)
+{
+ bcm2711_notify_vl805_reset();
+}
@@ -11,6 +11,10 @@
#include <usb.h>
#include <usb/xhci.h>
+__weak void xhci_pci_fixup(struct udevice *dev)
+{
+}
+
static void xhci_pci_init(struct udevice *dev, struct xhci_hccr **ret_hccr,
struct xhci_hcor **ret_hcor)
{
@@ -40,6 +44,8 @@ static int xhci_pci_probe(struct udevice *dev)
struct xhci_hccr *hccr;
struct xhci_hcor *hcor;
+ xhci_pci_fixup(dev);
+
xhci_pci_init(dev, &hccr, &hcor);
return xhci_register(dev, hccr, hcor);
@@ -16,6 +16,7 @@
#ifndef HOST_XHCI_H_
#define HOST_XHCI_H_
+#include <usb.h>
#include <asm/types.h>
#include <asm/cache.h>
#include <asm/io.h>
@@ -1281,4 +1282,6 @@ extern struct dm_usb_ops xhci_usb_ops;
struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev);
+extern void xhci_pci_fixup(struct udevice *dev);
+
#endif /* HOST_XHCI_H_ */
When needed, RPi4's co-processor (called VideoCore) has to be instructed to load VL805's firmware (the chip providing xHCI support). VideCore's firmware expects the board's PCIe bus to be already configured in order for it to load the xHCI chip firmware. So we have to make sure this happens in between the PCIe configuration and xHCI startup. Introduce a callback in xhci_pci_probe() to run this platform specific routine. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne at suse.de> --- Changes since v2: - Get rid of #ifdef CONFIG_BCM2711 - Get rid of redundant error message Changes since v1: - Create callback board/raspberrypi/rpi/rpi.c | 6 ++++++ drivers/usb/host/xhci-pci.c | 6 ++++++ include/usb/xhci.h | 3 +++ 3 files changed, 15 insertions(+)