Browse Source

Marvell/Armada80x0McBin: Enable device tree support

This patch enables compilation of the Armada 8040 MacchiatoBin
device tree. Disable OS acccess to the SPI flash and extend
PCI ranges to use 256MB mmio32 and 4GB mmio64.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Marcin Wojtas 5 years ago
parent
commit
9e08c33fd3

+ 3 - 0
Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc

@@ -49,6 +49,9 @@
 
 !include Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
 
+[Components.common]
+  Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0McBin.inf
+
 ################################################################################
 #
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform

+ 3 - 0
Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.fdf.inc

@@ -11,3 +11,6 @@
 #
 
 # Per-board additional content of the DXE phase firmware volume
+
+  # DTB
+  INF RuleOverride = DTB Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0McBin.inf

+ 28 - 0
Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0McBin.inf

@@ -0,0 +1,28 @@
+## @file
+#
+#  Device tree description of the Marvell Armada 8040 MacchiatoBin 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      = Armada80x0McBinDeviceTree
+  FILE_GUID      = 25462CDA-221F-47DF-AC1D-259CFAA4E326 # gDtPlatformDefaultDtbFileGuid
+  MODULE_TYPE    = USER_DEFINED
+  VERSION_STRING = 1.0
+
+[Sources]
+  armada-8040-mcbin.dts
+
+[Packages]
+  MdePkg/MdePkg.dec

+ 4 - 1
Silicon/Marvell/Armada7k8k/DeviceTree/armada-8040-mcbin.dts

@@ -185,6 +185,9 @@
         num-lanes = <4>;
         num-viewport = <8>;
         reset-gpio = <&cp0_gpio1 20 GPIO_ACTIVE_LOW>;
+        ranges = <0x1000000 0x0 0x00000000 0x0 0xeff00000 0x0 0x00010000>,
+                 <0x2000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>,
+                 <0x3000000 0x8 0x00000000 0x8 0x00000000 0x1 0x00000000>;
         status = "okay";
 };
 
@@ -355,7 +358,7 @@
 &cp1_spi1 {
         pinctrl-names = "default";
         pinctrl-0 = <&cp1_spi1_pins>;
-        status = "okay";
+        status = "disabled";
 
         spi-flash@0 {
                 compatible = "st,w25q32";