Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drivers/OptionRomPkg: Add Renesas uPD720202 firmware loader #225

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Drivers/OptionRomPkg/OptionRomPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
[Guids]
gOptionRomPkgTokenSpaceGuid = { 0x1e43298f, 0x3478, 0x41a7, { 0xb5, 0x77, 0x86, 0x6, 0x46, 0x35, 0xc7, 0x28 } }

## GUID for RenesasFirmwarePD720202 firmware image
gRenesasFirmwarePD720202ImageId = {0xA059EBC4, 0xD73D, 0x4279, {0x81,0xBF,0xE4,0xA8,0x93,0x08,0xB9,0x23}}

[PcdsFeatureFlag]
gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru|TRUE|BOOLEAN|0x00010001
gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru|TRUE|BOOLEAN|0x00010002
Expand Down
4 changes: 4 additions & 0 deletions Drivers/OptionRomPkg/OptionRomPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf
OptionRomPkg/UndiRuntimeDxe/UndiRuntimeDxe.inf
OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDxe.inf
OptionRomPkg/RenesasFirmwarePD720202/RenesasFirmwarePD720202.inf {
<LibraryClasses>
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
}

[Components.IA32, Components.X64]
OptionRomPkg/Application/BltLibSample/BltLibSample.inf
51 changes: 51 additions & 0 deletions Drivers/OptionRomPkg/RenesasFirmwarePD720202/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# RenesasFirmwarePD720202

RenesasFirmwarePD720202 is a firmware loader for Renesas
uPD720201/uPD720202 family USB 3.0 controllers.

It provides the functionality to upload the firmware required for
certain extension cards before they can used.

## Usage

* First, a firmware image for the chipset is required.
The final release 2.0.2.6 (K2026090.mem) can be downloaded from
[https://www.renesas.com/en/products/interface/usb-switches-hubs/upd720202-usb-30-host-controller#documents](https://www.renesas.com/en/products/interface/usb-switches-hubs/upd720202-usb-30-host-controller#documents)
after registering for a free account.
* The firmware image is uploaded into the chipset.
This process is non-persistent, the chipset RAM is cleared when the power supply is removed.

To use this driver, update the platform .dsc file:
```
#
# Renesas PD720202 XHCI firmware uploader
#
Drivers/OptionRomPkg/RenesasFirmwarePD720202/RenesasFirmwarePD720202.inf
```
Then update the platform .fdf file:
```
#
# Renesas PD720202 XHCI firmware uploader, requires firmware image
# in directory $(WORKSPACE)
#
INF Drivers/OptionRomPkg/RenesasFirmwarePD720202/RenesasFirmwarePD720202.inf
FILE FREEFORM = A059EBC4-D73D-4279-81BF-E4A89308B923 {
SECTION RAW = $(WORKSPACE)/K2026090.mem
}
```

## Some technical details

The uPD72020x USB 3.0 chipset familiy supports two modes of operation.
Either the firmware is stored in an external EEPROM chip and downloaded
into the chipset at boot time, or it must be uploaded into the chipset
by the operating system / driver.
The second option always works and overrides any firmware stored into
the EEPROM of the card.

The story behind the upd72020x-load tool and more technical details are
discussed in a [blog post](https://mjott.de/blog/881-renesas-usb-3-0-controllers-vs-linux/).

## Acknowledgements

This document is mostly based on README.md from https://github.com/markusj/upd72020x-load.
Loading
Loading