public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, joakim.bech@linaro.org,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms 5/5] Platform/Socionext/DeveloperBox: add Secure96 support
Date: Thu, 15 Feb 2018 17:20:54 +0000	[thread overview]
Message-ID: <20180215172054.27452-6-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20180215172054.27452-1-ard.biesheuvel@linaro.org>

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(+)

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
-- 
2.11.0



  parent reply	other threads:[~2018-02-15 17:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 17:20 [PATCH edk2-platforms 0/5] Add Secure96 mezzanine support Ard Biesheuvel
2018-02-15 17:20 ` [PATCH edk2-platforms 1/5] Silicon/SynQuaver/DeviceTree: add node for SPI controller Ard Biesheuvel
2018-02-16 17:00   ` Leif Lindholm
2018-02-16 18:34     ` Ard Biesheuvel
2018-02-18 11:39       ` Leif Lindholm
2018-02-19  8:20         ` Ard Biesheuvel
2018-02-19 11:48           ` Leif Lindholm
2018-02-15 17:20 ` [PATCH edk2-platforms 2/5] Silicon/SynQuaver/DeviceTree: add node for I2C controller Ard Biesheuvel
2018-02-15 17:20 ` [PATCH edk2-platforms 3/5] Platform: add support for 96boards Secure96 mezzanine adapter Ard Biesheuvel
2018-02-15 17:20 ` [PATCH edk2-platforms 4/5] Silicon/SynQuacer/PlatformDxe: add menu option to select mezzanine Ard Biesheuvel
2018-02-15 17:20 ` Ard Biesheuvel [this message]
2018-02-16 17:35 ` [PATCH edk2-platforms 0/5] Add Secure96 mezzanine support Leif Lindholm
2018-02-16 18:41   ` Ard Biesheuvel
2018-02-21 12:10 ` 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=20180215172054.27452-6-ard.biesheuvel@linaro.org \
    --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