From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com
Subject: [edk2-platforms][PATCH 3/4] Platform/RPi3: Enable the use of DualSerialPortLib
Date: Tue, 28 Jan 2020 17:19:55 +0000 [thread overview]
Message-ID: <20200128171956.9680-4-pete@akeo.ie> (raw)
In-Reply-To: <20200128171956.9680-1-pete@akeo.ie>
Note that, for the time being, the TF-A binary only outputs to the
miniUART, but work is underway to add runtime UART detection to TF-A,
after which we will use such a binary.
Also note that this patch currently enforces the use of miniUART in
the ACPI tables, as we have to pick one until we can switch to using
DynamicTablesPkg/ConfigurationManagerDxe for ACPI generation.
Signed-off-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/RPi3/RPi3.dsc | 15 +++++++++------
Platform/RaspberryPi/RPi3/Readme.md | 7 +++++++
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 2368b04f40a4..40fb0879c2ed 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -114,10 +114,10 @@ [LibraryClasses.common]
ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
- PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
- PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
- PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
- SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+ # Dual serial port library
+ PL011UartClockLib|ArmPlatformPkg/Library/PL011UartClockLib/PL011UartClockLib.inf
+ PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
+ SerialPortLib|Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf
# Cryptographic libraries
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
@@ -379,14 +379,17 @@ [PcdsFixedAtBuild.common]
#
gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0x3f000000
- ## NS16550 compatible UART
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f215040
+ # UARTs
+ gArmPlatformTokenSpaceGuid.PL011UartInteger|0
+ gArmPlatformTokenSpaceGuid.PL011UartFractional|0
+ gArmPlatformTokenSpaceGuid.PL011UartClkInHz|48000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|4
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x27
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|8
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
## Default Terminal Type
## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi3/Readme.md
index 797da1bab4a9..58c0124ef75e 100644
--- a/Platform/RaspberryPi/RPi3/Readme.md
+++ b/Platform/RaspberryPi/RPi3/Readme.md
@@ -52,6 +52,13 @@ Build instructions from the top level edk2-platforms Readme.md apply.
armstub=RPI_EFI.fd
disable_commandline_tags=1
```
+ Additionally, if you want to use PL011 instead of the miniUART, you can add the lines:
+ ```
+ device_tree_address=0x20000
+ device_tree_end=0x30000
+ device_tree=bcm2710-rpi-3-b[-plus].dtb
+ dtoverlay=miniuart-bt
+ ```
5. Insert the uSD card and power up the Pi.
Note that if you have a model 3+ or a model 3 where you enabled USB boot through OTP
--
2.21.0.windows.1
next prev parent reply other threads:[~2020-01-28 17:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 17:19 [edk2-platforms][PATCH 0/4] Platform/RPi: Automate runtime UART selection Pete Batard
2020-01-28 17:19 ` [edk2-platforms][PATCH 1/4] Silicon/Broadcom/Bcm283x: Add clock manager constants Pete Batard
2020-01-28 17:19 ` [edk2-platforms][PATCH 2/4] Platform/RPi: Add serial lib for runtime PL011 vs miniUART detection Pete Batard
2020-01-28 17:19 ` Pete Batard [this message]
2020-01-28 17:19 ` [edk2-platforms][PATCH 4/4] Platform/RPi4: Enable the use of DualSerialPortLib Pete Batard
2020-01-28 17:50 ` [edk2-platforms][PATCH 0/4] Platform/RPi: Automate runtime UART selection Ard Biesheuvel
2020-02-14 9:48 ` Ard Biesheuvel
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=20200128171956.9680-4-pete@akeo.ie \
--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