public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Not getting a device handle for USB controller connected in Pcie switch
@ 2022-02-10 11:06 Antony Abee
  0 siblings, 0 replies; only message in thread
From: Antony Abee @ 2022-02-10 11:06 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]

Hi,

We are using a custom board based Ampere SOC. We have two Renesas USB controller uPD720201 in our setup.

1. Renesas USB controller on custom module based on Ampere SOC.
      - Connected to Pcie Root complex port directly.

2. Renesas USB controller on custom carrier board.
      - Connected to Pericom Pcie Switch (PI7C9X2G) and the switch in-turn
        connected to another Pcie Root complex port.

We are using the below driver for downloading the USB controller firmware.
https://github.com/Linaro/OpenPlatformPkg/tree/4edacd6541c22eac97098c9f68186438e775fb0c/Drivers/Xhci/RenesasFirmwarePD720202

This driver will just download the firmware for the controller. It will not drive the device.
This driver will be called in preference, and XhciDxe will be invoked
after RenesasPD720202DriverSupported returns EFI_UNSUPPORTED.

Firmware downloading successfully and device is driven successfully with XhciDxe for the device connected directly in Pcie Root complex port.

Issues with USB controller connected in Pcie switch:

RenesasFirmwarePD720202 driver:
For USB controller connected in Pcie switch, firmware is not downloading as the device handle is not passed to Supported() function during ExitBootService (ConnectController()) of edk2.

NOTE: Device is detected during pci bus enumeration. Also verified device detection in uefi shell using "pci" command.

We did a workaround implementation which will do pci bus scan to detect the USB controller connected in Pcie switch and download the firmware. Device detected and firmware downloaded successfully.
But still the USB devices (mass storage/keyboard) are not detecting in Setup page and Uefi Shell.

We feel the XhciDxe driver did not drive this device as only the parent devices handle passed to this driver.

NOTE: USB ports are active, devices detected and working well in OS side.
We feel the Xhci driver in OS, drives the USB controller device when the controller has firmware.

How to pass the device handle for the USB controller connected in Pcie switch during ExitBootService ?

We understand if RenesasFirmwarePD720202 driver and XhciDxe get the device handle for the USB controller that is connected in Pcie switch, the above mentioned issues will get resolved. Please advise if our understanding is wrong here.

Please provide your inputs.

Thanks,
Antony

[-- Attachment #2: Type: text/html, Size: 2733 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-10 11:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10 11:06 Not getting a device handle for USB controller connected in Pcie switch Antony Abee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox