From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 28 Apr 2020 19:59:57 +0200 Subject: [PATCH 2/2] usb: xhci: Load Raspberry Pi 4 VL805's firmware In-Reply-To: <20200428174449.27953-3-nsaenzjulienne@suse.de> References: <20200428174449.27953-1-nsaenzjulienne@suse.de> <20200428174449.27953-3-nsaenzjulienne@suse.de> Message-ID: <44226fe2-feff-307d-a78b-a89b0765332f@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 4/28/20 7:44 PM, Nicolas Saenz Julienne wrote: > 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. > > Signed-off-by: Nicolas Saenz Julienne > --- > drivers/usb/host/xhci-pci.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c > index c1f60da541..5c17ea6932 100644 > --- a/drivers/usb/host/xhci-pci.c > +++ b/drivers/usb/host/xhci-pci.c > @@ -11,6 +11,8 @@ > #include > #include > > +#include > + > static void xhci_pci_init(struct udevice *dev, struct xhci_hccr **ret_hccr, > struct xhci_hcor **ret_hcor) > { > @@ -18,6 +20,10 @@ static void xhci_pci_init(struct udevice *dev, struct xhci_hccr **ret_hccr, > struct xhci_hcor *hcor; > u32 cmd; > > +#ifdef CONFIG_BCM2711 > + bcm2711_load_vl805_firmware(); > +#endif > + > hccr = (struct xhci_hccr *)dm_pci_map_bar(dev, > PCI_BASE_ADDRESS_0, PCI_REGION_MEM); > hcor = (struct xhci_hcor *)((uintptr_t) hccr + I think socfpga arria10 has some firmware loader implementation that is generic, so can't we use that ?