summaryrefslogtreecommitdiff
path: root/Platform/RaspberryPi/RPi3
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2020-01-28 17:19:55 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2020-02-14 10:06:02 +0100
commit2fc6eb4b707c16a10fa42f0d8e385d52e656a8e8 (patch)
treebb0319181361a6a0f8c4f004e8accb88456ba1aa /Platform/RaspberryPi/RPi3
parentbfe3483019da89274cd9acc56208d1d974e80188 (diff)
Platform/RPi3: Enable the use of DualSerialPortLib
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> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'Platform/RaspberryPi/RPi3')
-rw-r--r--Platform/RaspberryPi/RPi3/RPi3.dsc15
-rw-r--r--Platform/RaspberryPi/RPi3/Readme.md7
2 files changed, 16 insertions, 6 deletions
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 2368b04f..40fb0879 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -114,10 +114,10 @@
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 @@
#
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 797da1ba..58c0124e 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