[edk2,edk2-platforms,5/5] Platform/Socionext/DeveloperBox: add Secure96 support

Message ID 20180215172054.27452-6-ard.biesheuvel@linaro.org
State New
Headers show
Series
  • Add Secure96 mezzanine support
Related show

Commit Message

Ard Biesheuvel Feb. 15, 2018, 5:20 p.m.
Add the drivers and set the PCD values according to our integration
of the LS connector on Developer Box so that, when selected in the
menu, the device tree presented in the OS is augmented with nodes
describing the various peripherals that are present on the Secure96
mezzanine board.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 21 ++++++++++++++++++++
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf |  6 ++++++
 2 files changed, 27 insertions(+)

-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 1e39c29d7910..39bee17dccc1 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -33,6 +33,9 @@  [Defines]
 [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,18 @@  [PcdsFixedAtBuild.common]
 !endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER)
 
+  #
+  # 96boards Secure96 mezzanine support
+  #
+  gSecure96TokenSpaceGuid.PcdGpioLedPolarity|0
+  gSecure96TokenSpaceGuid.PcdGpioLedU1|20
+  gSecure96TokenSpaceGuid.PcdGpioLedU2|19
+  gSecure96TokenSpaceGuid.PcdGpioLedU3|22
+  gSecure96TokenSpaceGuid.PcdGpioLedU4|21
+  gSecure96TokenSpaceGuid.PcdGpioParent|"/gpio@51000000"
+  gSecure96TokenSpaceGuid.PcdI2cParent|"/i2c@51210000"
+  gSecure96TokenSpaceGuid.PcdSpiParent|"/spi@54810000"
+
 [PcdsPatchableInModule]
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
@@ -642,6 +657,12 @@  [Components.common]
   SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
 
   #
+  # 96board mezzanine support
+  #
+  Platform/96boards/Secure96/DeviceTree/DeviceTree.inf
+  Platform/96boards/Secure96/Secure96Dxe/Secure96Dxe.inf
+
+  #
   # I2C
   #
   Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index c2bc5aa85739..35e2e64c8c93 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -237,6 +237,12 @@  [FV.FvMain]
   }
 
   #
+  # 96board mezzanine support
+  #
+  INF RuleOverride = DTB Platform/96boards/Secure96/DeviceTree/DeviceTree.inf
+  INF Platform/96boards/Secure96/Secure96Dxe/Secure96Dxe.inf
+
+  #
   # I2C
   #
   INF Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf