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::241; helo=mail-lj1-x241.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (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 9E89A210D97B2 for ; Tue, 7 Aug 2018 02:00:20 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id q127-v6so12773036ljq.11 for ; Tue, 07 Aug 2018 02:00:20 -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=mL+j60w7NLrfRbCNuTsGRu7Sg6iaxpRLK8FGHcmDAZHuMAPurTI7vr5UwWZ4XuYAn3 Yir8GJtya82p91YRfPx2Tu4V1gcCNN9uIQJ+TbgnfhiA5HnqRy/hAe14cw5GIc9USZP+ VulBC9/ixNPG+eHGU03xK7dC0B99gFB2Te3+rzjcujPqc41P4uL2vsTvT0sUfVqYWt53 wiCGcxLijNRWApRO6fkUMn2xE8hDVZ/lifGiBPnvbMkZY3GljvL9t9Sazzz2FkCgvXRe tYcZzFMOgENRJ9GrqJiSopBNhsKs5pjMZC8KuE+vnGmoDCbZSVtoMRe6+gC8Vg1q/LDF 0jPQ== 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=YkX/qnSqX3ogyDI82KEkuB3ecHCCzCh+NkEliRBb1qs010qxZ5Z1EKV22zoTY/WlK2 keN/0t6j85aws4g+rCUi9tMFCxw3KbAYzCVlh8LzIeq+lbgXEh7RImO6CDWxt+gYCMAg X7skL9mM4orlQnMtYA6HiIPmtx93FmS6tz3AoQUSeztWbWpB8DXDgC0I8zTsKLHKGzbz y748gsBG9A8BcMNWQH/OUJeQShFuHn5lP/mqBcrAS47xK0rJYK/YzVkzkOU/QBtUsMiX OxwVqVlncpE/w9BfruJ9AE0tJzH3oGsuJn2/64f2yYmE1BKFQIE6C3Uvx8rkKPmz7cK+ t78A== X-Gm-Message-State: AOUpUlGJndzGuQJ57wx2C31QhdatyIh6n4esHjtLVlKU+pA+77jJtxg+ irsHWhAIyaP+CuLuoCP6CuFX11Rw/vCB+w== X-Google-Smtp-Source: AAOMgpez66Hh74W62W+klykRCGzWdh9jGEp8kYR9BYNr6a4E1sdj6hJLZ+AsB13h1FY07QZC9w/FJw== X-Received: by 2002:a2e:9a16:: with SMTP id o22-v6mr15969154lji.17.1533632418601; Tue, 07 Aug 2018 02:00:18 -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 w27-v6sm181697lfk.5.2018.08.07.02.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Aug 2018 02:00:17 -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: Tue, 7 Aug 2018 10:58:12 +0200 Message-Id: <1533632298-4981-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533632298-4981-1-git-send-email-mw@semihalf.com> References: <1533632298-4981-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH v2 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: Tue, 07 Aug 2018 09:00:21 -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