[edk2-devel] [PATCH v3 0/7] Enable emmc2 controller rpi4

Jeremy Linton posted 7 patches 4 months ago
Failed in applying to current master (apply log)
.../Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c    | 131 ++++++++---
.../Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.h    |   1 +
Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c |  10 +
.../Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c        | 240 ++++++++++++++++++++-
.../RaspberryPi/Include/IndustryStandard/RpiMbox.h |  94 +++++++-
.../RaspberryPi/Include/Protocol/RpiFirmware.h     |  25 +++
.../Library/PlatformBootManagerLib/PlatformBm.c    |   2 +-
.../Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h |  42 ++--
8 files changed, 487 insertions(+), 58 deletions(-)

[edk2-devel] [PATCH v3 0/7] Enable emmc2 controller rpi4

Posted by Jeremy Linton 4 months ago
The rpi4 has a secondary sd controller at offset
0xfe340000. This controller appears to be a mostly
compliant SDHCI controller (a newer more bugfree
arasan?). So the existing arasan driver should be 
bound to it. This allows the rpi4 to boot
with its normal emmc2->sd card, arasan->wifi 
configuration that is described in the linux DT.

To achieve this, it appears we should be tweaking
some of the expansion gpios, and probably telling
the firmware to power everything up. To do that
the vpu mailbox headers are synced with a more recent
list of the mailbox commands, then the rpi
firmware dxe is extended to support some futher
gpio/power commands. Once that is complete we tweak
the arasan driver to use an alternate register base,
add a workaround for a known clock crossing bug, and
set the card voltage.

Of note, this set does _NOT_ change the HID/CID's
and add the additional emmc2 controller to the
DSDT table. That remains an open item waiting
for a proper set of device ids.

v1->v3: Use some mailbox defines rather than opencoded constants

Jeremy Linton (7):
  Platform/RaspberryPi: Update VPU mailbox constants
  Platform/RaspberryPi: Add further mailbox helpers
  Platform/RaspberryPi: Split MMC register defintions
  Platform/RaspberryPi/Arasan: Add write delay and voltage/clock config
  Platform/RaspberryPi/Arasan: Select the correct base frequency
  Platform/RaspberryPi: Power up sd, and tweak GPIOs
  Platform/RaspberryPi: Correct device path removal.

 .../Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c    | 131 ++++++++---
 .../Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.h    |   1 +
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c |  10 +
 .../Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c        | 240 ++++++++++++++++++++-
 .../RaspberryPi/Include/IndustryStandard/RpiMbox.h |  94 +++++++-
 .../RaspberryPi/Include/Protocol/RpiFirmware.h     |  25 +++
 .../Library/PlatformBootManagerLib/PlatformBm.c    |   2 +-
 .../Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h |  42 ++--
 8 files changed, 487 insertions(+), 58 deletions(-)

-- 
2.13.7



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69604): https://edk2.groups.io/g/devel/message/69604
Mute This Topic: https://groups.io/mt/79429619/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-