public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Antony Abee" <antonyabee.prakashxv@adlinktech.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: XhciDxe driver not driving USB controller connected in Pcie switch
Date: Wed, 9 Feb 2022 04:09:59 +0000	[thread overview]
Message-ID: <PH0PR05MB87506061EF49EC4093D7BCAEF82E9@PH0PR05MB8750.namprd05.prod.outlook.com> (raw)

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

Hi,

We are using a custom board based on 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: 3225 bytes --]

                 reply	other threads:[~2022-02-09  4:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR05MB87506061EF49EC4093D7BCAEF82E9@PH0PR05MB8750.namprd05.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox