public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jeremy Linton" <jeremy.linton@arm.com>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie,
	samer.el-haj-mahmoud@arm.com, awarkentin@vmware.com,
	Jeremy Linton <jeremy.linton@arm.com>
Subject: [PATCH v4 0/7] rpi4: Enable eMMC2 controller
Date: Tue,  5 Jan 2021 10:34:13 -0600	[thread overview]
Message-ID: <20210105163420.1711652-1-jeremy.linton@arm.com> (raw)

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.

v3->v4: Commit message tweaks, variable rename.
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 definitions
  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 |   7 +
 .../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, 484 insertions(+), 58 deletions(-)

-- 
2.13.7


             reply	other threads:[~2021-01-05 16:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 16:34 Jeremy Linton [this message]
2021-01-05 16:34 ` [PATCH v4 1/7] Platform/RaspberryPi: Update VPU mailbox constants Jeremy Linton
2021-01-05 16:34 ` [PATCH v4 2/7] Platform/RaspberryPi: Add further mailbox helpers Jeremy Linton
2021-01-05 16:34 ` [PATCH v4 3/7] Platform/RaspberryPi: Split MMC register definitions Jeremy Linton
2021-01-05 18:45   ` [edk2-devel] " Philippe Mathieu-Daudé
2021-01-05 16:34 ` [PATCH v4 4/7] Platform/RaspberryPi/Arasan: Add write delay and voltage/clock config Jeremy Linton
2021-01-05 16:34 ` [PATCH v4 5/7] Platform/RaspberryPi/Arasan: Select the correct base frequency Jeremy Linton
2021-01-05 16:34 ` [PATCH v4 6/7] Platform/RaspberryPi: Power up SD, and tweak GPIOs Jeremy Linton
2021-01-05 16:34 ` [PATCH v4 7/7] Platform/RaspberryPi: Correct device path removal Jeremy Linton
2021-01-06  9:11 ` [PATCH v4 0/7] rpi4: Enable eMMC2 controller Ard Biesheuvel
2021-01-06 11:23   ` Andrei Warkentin
2021-01-06 14:04   ` [edk2-devel] " Jeremy Linton

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=20210105163420.1711652-1-jeremy.linton@arm.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