From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::141; helo=mail-lf1-x141.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A4DE4210DA140 for ; Sun, 5 Aug 2018 16:28:50 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id v22-v6so7721534lfe.8 for ; Sun, 05 Aug 2018 16:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7iZ8A3OdRvSWpSyGu6Yp4S30g19XWiMC7XU6ONgoB6U=; b=wVIjRzvUrtn/WexuU74ZQT8aepiB9J+Ju6LkCve5it37hydxovmP+m3FsH97/wtP/u z1ZvOeUVfs4LFiMi9/bw8pEU+VlLBntIKgc4GkLw8r80kLRfzFE5vLi3wiQyayaAUkU2 9liRdwvbFH10YJ2IcNcpTsCIW7TH7a3q/5oY01/h/nbvZaz/ozz16L2eKdx5GxC7/Qd5 7oIC77QZUX4ol+korEExz1YMYXvT6MIUQ/x0fpiikvPJo7OIwhrK6FI43IdTpF/hYKLm lk3RJk+MmvbwepM7hGyOrYLKLOqESSqswAq67iGiNjJRqhoGl8KmLih0Zfeka9Xh3MBL KHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7iZ8A3OdRvSWpSyGu6Yp4S30g19XWiMC7XU6ONgoB6U=; b=fgYHQLDWAua2YXHUv6fXPIUYGU9MEZekvn+y+piCwpdpkZjWu2UC5OrdkflcLyLvxA A554VdY8dQrTvdwRouENhGnZtmAEXoDWRmO+bJ5+2MLyP3P/Aa6+b6m2oEPsrlP4AdAq VM/MJxUvsEMf757FqOLHzOM/lAAOAr3hyXn5VkHj0enbb8mPZz0Tm0uzCV5bVdJdtwaT MQkNpcV5YM2iF0Lm4g8ED/Sy8FyQPhECI27Wz7MTRG2Mpq0gn6vf7JCNkvtdDnVFnSRz mBsFvUfKiX704UDb6YgeoioECkwCzoyVoLAG3Qm9nB/XcISJHF2pZu3aBSlZRSjgiko/ l/3w== X-Gm-Message-State: AOUpUlHM+YxEuwhzIbXy1KhiQwh3v9HjxlLoZrBRH0914paKc5nt5m5H 7602w5XjHj8lCIZG5h4tk8suiaod7U6Jig== X-Google-Smtp-Source: AAOMgpeigarkwIr1uQCVOvct8yafp1CpWvZl5wWMqHl8zHYQiy5g496Gsw33yGMcwODzZ0jCepc6kg== X-Received: by 2002:a19:1510:: with SMTP id l16-v6mr9256634lfi.88.1533511728319; Sun, 05 Aug 2018 16:28:48 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v136-v6sm1861994lfa.10.2018.08.05.16.28.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Aug 2018 16:28:47 -0700 (PDT) From: Marcin Wojtas 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 Date: Mon, 6 Aug 2018 01:28:20 +0200 Message-Id: <1533511706-9344-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533511706-9344-1-git-send-email-mw@semihalf.com> References: <1533511706-9344-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH 3/9] Marvell/Armada70x0Db: Enable device tree support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2018 23:28:51 -0000 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 --- 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 = ; + status = "disabled"; }; CP110_LABEL(thermal): thermal@400078 { -- 2.7.4