public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
	nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com,
	jaz@semihalf.com
Subject: [platforms: PATCH v2 3/9] Marvell/Armada70x0Db: Enable device tree support
Date: Tue,  7 Aug 2018 10:58:12 +0200	[thread overview]
Message-ID: <1533632298-4981-4-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1533632298-4981-1-git-send-email-mw@semihalf.com>

This patch enables compilation of the Armada 7040 DB
device tree. Necessary adjustments are added, so that
the OS can use efi-rtc and has no access to the SPI
flash

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc            |  4 +++
 Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc           |  3 +++
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf                |  8 ++++++
 Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf   | 28 ++++++++++++++++++++
 Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf.inc       |  3 +++
 Silicon/Marvell/Armada7k8k/DeviceTree/armada-7040-db.dts |  2 +-
 Silicon/Marvell/Armada7k8k/DeviceTree/armada-cp110.dtsi  |  1 +
 7 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf

diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
index 2d38ea4..f1ccda0 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -200,6 +200,7 @@
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
+  DtPlatformDtbLoaderLib|EmbeddedPkg/Library/DxeDtPlatformDtbLoaderLibDefault/DxeDtPlatformDtbLoaderLibDefault.inf
 
 [LibraryClasses.common.UEFI_APPLICATION]
   UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
@@ -585,6 +586,9 @@
       gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
   }
 
+  # DTB
+  EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
+
 !ifdef $(INCLUDE_TFTP_COMMAND)
   ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc b/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc
index 0c08328..d3dffb0 100644
--- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc
+++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc
@@ -48,6 +48,9 @@
 
 !include Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
 
+[Components.common]
+  Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf
+
 ################################################################################
 #
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
index 0f38978..909ad3e 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
@@ -212,6 +212,9 @@ FvNameGuid         = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
   }
 !endif
 
+  # DTB
+  INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
+
 !include $(BOARD_DXE_FV_COMPONENTS)
 
 # PEI phase firmware volume
@@ -400,3 +403,8 @@ READ_LOCK_STATUS   = TRUE
      UI       STRING="$(MODULE_NAME)" Optional
      VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
   }
+
+[Rule.Common.USER_DEFINED.DTB]
+  FILE FREEFORM = $(NAMED_GUID) {
+    RAW BIN                |.dtb
+  }
diff --git a/Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf b/Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf
new file mode 100644
index 0000000..1f2d9ea
--- /dev/null
+++ b/Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf
@@ -0,0 +1,28 @@
+## @file
+#
+#  Device tree description of the Marvell Armada 7040 DB platform
+#
+#  Copyright (c) 2018, Marvell International Ltd. All rights reserved.
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD License
+#  which accompanies this distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+  INF_VERSION    = 0x0001001A
+  BASE_NAME      = Armada70x0DbDeviceTree
+  FILE_GUID      = 25462CDA-221F-47DF-AC1D-259CFAA4E326 # gDtPlatformDefaultDtbFileGuid
+  MODULE_TYPE    = USER_DEFINED
+  VERSION_STRING = 1.0
+
+[Sources]
+  armada-7040-db.dts
+
+[Packages]
+  MdePkg/MdePkg.dec
diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf.inc b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf.inc
index 984cf7e..b4c3e20 100644
--- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf.inc
+++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf.inc
@@ -11,3 +11,6 @@
 #
 
 # Per-board additional content of the DXE phase firmware volume
+
+  # DTB
+  INF RuleOverride = DTB Silicon/Marvell/Armada7k8k/DeviceTree/Armada70x0Db.inf
diff --git a/Silicon/Marvell/Armada7k8k/DeviceTree/armada-7040-db.dts b/Silicon/Marvell/Armada7k8k/DeviceTree/armada-7040-db.dts
index 6b28bbe..f5878ef 100644
--- a/Silicon/Marvell/Armada7k8k/DeviceTree/armada-7040-db.dts
+++ b/Silicon/Marvell/Armada7k8k/DeviceTree/armada-7040-db.dts
@@ -168,7 +168,7 @@
 };
 
 &cp0_spi1 {
-        status = "okay";
+        status = "disabled";
 
         spi-flash@0 {
                 #address-cells = <0x1>;
diff --git a/Silicon/Marvell/Armada7k8k/DeviceTree/armada-cp110.dtsi b/Silicon/Marvell/Armada7k8k/DeviceTree/armada-cp110.dtsi
index b9504a3..3337034 100644
--- a/Silicon/Marvell/Armada7k8k/DeviceTree/armada-cp110.dtsi
+++ b/Silicon/Marvell/Armada7k8k/DeviceTree/armada-cp110.dtsi
@@ -163,6 +163,7 @@
                         reg = <0x284000 0x20>, <0x284080 0x24>;
                         reg-names = "rtc", "rtc-soc";
                         interrupts = <ICU_GRP_NSR 77 IRQ_TYPE_LEVEL_HIGH>;
+                        status = "disabled";
                 };
 
                 CP110_LABEL(thermal): thermal@400078 {
-- 
2.7.4



  parent reply	other threads:[~2018-08-07  9:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07  8:58 [platforms: PATCH v2 0/9] Armada7k8k DT/ACPI support Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 1/9] Marvell/Armada7k8k: Import device tree Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 2/9] Marvell/Armada7k8k: Enable including additional DXE FV components Marcin Wojtas
2018-08-07  8:58 ` Marcin Wojtas [this message]
2018-08-07  8:58 ` [platforms: PATCH v2 4/9] Marvell/Armada80x0Db: Enable device tree support Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 5/9] Marvell/Armada80x0McBin: " Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 6/9] Marvell/Armada7k8k: Add common ACPI tables Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 7/9] Marvell/Armada70x0Db: Enable ACPI support Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 8/9] Marvell/Armada80x0Db: " Marcin Wojtas
2018-08-07  8:58 ` [platforms: PATCH v2 9/9] Marvell/Armada80x0McBin: " Marcin Wojtas
2018-08-07  9:18 ` [platforms: PATCH v2 0/9] Armada7k8k DT/ACPI support Ard Biesheuvel
2018-08-07 11:28   ` Marcin Wojtas
2018-08-07 21:48     ` Mark Kettenis
2018-08-07 23:03       ` Marcin Wojtas

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=1533632298-4981-4-git-send-email-mw@semihalf.com \
    --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