summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-20 17:41:11 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-23 15:58:35 +0000
commitd8e4d45658415ad2c734e14582f633c3df2b495b (patch)
tree4896a4a0b8c04fc5a78a31b17ac8fab5c9071e66
parent6aa7daf85f46fab7fef1a27aafe9c98f1125a587 (diff)
downloadedk2-platforms-d8e4d45658415ad2c734e14582f633c3df2b495b.tar.xz
Platform/Socionext/DeveloperBox: add 96Boards mezzanine support
Wire up the various drivers for the 96Boards LS connector and the optional Secure96 mezzanine board. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
-rw-r--r--Platform/Socionext/DeveloperBox/DeveloperBox.dsc34
-rw-r--r--Platform/Socionext/DeveloperBox/DeveloperBox.fdf10
-rw-r--r--Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c9
-rw-r--r--Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf2
4 files changed, 55 insertions, 0 deletions
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 3c109b495f..afd0a4f59f 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -31,6 +31,9 @@
[BuildOptions]
RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+ # add ample padding to the DTC so we can apply 96boards mezzanine overlays
+ *_*_*_DTC_FLAGS = -p 1024
+
[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION]
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
@@ -396,6 +399,28 @@
!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER)
+ #
+ # 96boards mezzanine support
+ #
+ g96BoardsTokenSpaceGuid.PcdI2c0Parent|"/i2c@51210000"
+ g96BoardsTokenSpaceGuid.PcdI2c0BusFrequencyHz|100000
+ g96BoardsTokenSpaceGuid.PcdSpiParent|"/spi@54810000"
+ g96BoardsTokenSpaceGuid.PcdGpioParent|"/gpio@51000000"
+ g96BoardsTokenSpaceGuid.PcdGpioPolarity|0
+
+ g96BoardsTokenSpaceGuid.PcdGpioPinA|10
+ g96BoardsTokenSpaceGuid.PcdGpioPinB|11
+ g96BoardsTokenSpaceGuid.PcdGpioPinC|12
+ g96BoardsTokenSpaceGuid.PcdGpioPinD|13
+ g96BoardsTokenSpaceGuid.PcdGpioPinE|18
+ g96BoardsTokenSpaceGuid.PcdGpioPinF|19
+ g96BoardsTokenSpaceGuid.PcdGpioPinG|20
+ g96BoardsTokenSpaceGuid.PcdGpioPinH|21
+ g96BoardsTokenSpaceGuid.PcdGpioPinI|22
+ g96BoardsTokenSpaceGuid.PcdGpioPinJ|23
+ g96BoardsTokenSpaceGuid.PcdGpioPinK|24
+ g96BoardsTokenSpaceGuid.PcdGpioPinL|25
+
[PcdsPatchableInModule]
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
@@ -642,6 +667,15 @@
SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
#
+ # 96board mezzanine support
+ #
+ Platform/96Boards/Secure96Dxe/Secure96Dxe.inf
+ Silicon/Atmel/AtSha204a/AtSha204aDxe.inf
+ Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf
+ Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf
+
+ #
# I2C
#
Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf
+ MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index b668f42c79..130572009f 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -237,9 +237,18 @@ READ_LOCK_STATUS = TRUE
}
#
+ # 96board mezzanine support
+ #
+ INF Platform/96Boards/Secure96Dxe/Secure96Dxe.inf
+ INF Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf
+ INF Silicon/Atmel/AtSha204a/AtSha204aDxe.inf
+ INF Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf
+
+ #
# I2C
#
INF Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf
+ INF MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf
[FV.FVMAIN_COMPACT]
FvAlignment = 16
@@ -421,6 +430,7 @@ CAPSULE_HEADER_INIT_VERSION = 0x1
DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
UI STRING="$(MODULE_NAME)" Optional
+ RAW BIN Optional |.dtb
}
[Rule.Common.DXE_RUNTIME_DRIVER]
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
index aab830dc3a..8787aa6288 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
@@ -313,6 +313,15 @@ PlatformDxeEntryPoint (
&Handle);
ASSERT_EFI_ERROR (Status);
+ //
+ // Install the g96BoardsI2c0MasterGuid GUID onto the same handle,
+ // identifying I2C #1 on our SoC as I2C #0 on the 96boards low speed connector
+ //
+ Status = gBS->InstallProtocolInterface (&Handle,
+ &g96BoardsI2c0MasterGuid,
+ EFI_NATIVE_INTERFACE, NULL);
+ ASSERT_EFI_ERROR (Status);
+
SmmuEnableCoherentDma ();
SetMmioTimerFrequency ();
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
index 49d9deee57..fca66799eb 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
@@ -34,6 +34,7 @@
EmbeddedPkg/EmbeddedPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
+ Platform/96Boards/96Boards.dec
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec
Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.dec
Silicon/Socionext/SynQuacer/SynQuacer.dec
@@ -56,6 +57,7 @@
UefiRuntimeServicesTableLib
[Guids]
+ g96BoardsI2c0MasterGuid
gEfiHiiPlatformSetupFormsetGuid
gFdtTableGuid
gNetsecNonDiscoverableDeviceGuid