All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K
@ 2016-02-15  8:47 Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 1/5] Documentation: arm: improve Armada 37xx description Thomas Petazzoni
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  8:47 UTC (permalink / raw
  To: linux-arm-kernel

Hello,

This series adds initial support for the new Armada 7K and 8K Marvell
64 bits processors. Details about those processors based on the
Cortex-A72 can be found at:

  http://www.marvell.com/embedded-processors/armada-70xx/
  http://www.marvell.com/embedded-processors/armada-80xx/

One characteristic of those processors is that internally they are
built from several components:

 - One "AP", which contains the processor itself and a few core IP
   blocks. The AP in 7K and 8K is called AP806, and is available on
   two variants: dual Cortex-A72 and quad Cortex-A72.

 - Or or two "CP", which contains most of the I/Os (SATA, PCIe,
   etc.). The CP in 7K and 8K is called CP110. One CP110 is available
   in the 7K family, while two CP110 are available in the 8K family,
   doubling the number of I/O interfaces.

The support added in this series only brings minimal support for the
AP side (and not yet all IP blocks, obviously). Support for the CP
part will come in the future.

Since the series touches similar files as the Armada 3700 series from
Gregory Clement, it is based on it.

Best regards,

Thomas

Thomas Petazzoni (5):
  Documentation: arm: improve Armada 37xx description
  Documentation: arm: add Marvell Armada 7K and 8K families
  Documentation: arm: improve Marvell EBU Armada documentation
  arm64: update ARCH_MVEBU for Marvell Armada 7K/8K support
  arm64: marvell: add Device Tree files for Armada 7K/8K

 Documentation/arm/Marvell/README                   |  39 +++-
 .../bindings/arm/marvell/armada-7k-8k.txt          |  24 +++
 arch/arm64/Kconfig.platforms                       |  11 +-
 arch/arm64/boot/dts/marvell/Makefile               |   1 +
 arch/arm64/boot/dts/marvell/armada-7020.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     |  92 ++++++++
 arch/arm64/boot/dts/marvell/armada-7040.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-8020.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-8040.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi |  71 +++++++
 arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi |  84 ++++++++
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi      | 235 +++++++++++++++++++++
 12 files changed, 762 insertions(+), 11 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.txt
 create mode 100644 arch/arm64/boot/dts/marvell/armada-7020.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-7040-db.dts
 create mode 100644 arch/arm64/boot/dts/marvell/armada-7040.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-8020.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-8040.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806.dtsi

-- 
2.6.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/5] Documentation: arm: improve Armada 37xx description
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
@ 2016-02-15  8:47 ` Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 2/5] Documentation: arm: add Marvell Armada 7K and 8K families Thomas Petazzoni
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  8:47 UTC (permalink / raw
  To: linux-arm-kernel

In preparation to the introduction of other SoCs in the ARMv8 Armada
EBU family, this commit tweaks the existing description of Armada 37xx
by making the core, homepage and other informations be visible "under"
the Armada 37xx item. Indeed, the new SoCs will not share the same
core or homepage.

In addition, a link to the Product Brief is added.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Documentation/arm/Marvell/README | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index ddbc048..b92ee66 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -124,12 +124,11 @@ EBU Armada family ARMv8
   Armada 3710/3720 Flavors:
 	88F3710
 	88F3720
+	Core: ARM Cortex A53 (ARMv8)
 
-  Core: ARM Cortex A53 (ARMv8)
-
-  Homepage     : http://www.marvell.com/embedded-processors/armada-3700/
-
-  Device tree descritpion located in arch/arm64/boot/dts/marvell/armada-37*
+	Homepage: http://www.marvell.com/embedded-processors/armada-3700/
+	Product Brief: http://www.marvell.com/embedded-processors/assets/PB-88F3700-FNL.pdf
+	Device tree files: arch/arm64/boot/dts/marvell/armada-37*
 
 Avanta family
 -------------
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/5] Documentation: arm: add Marvell Armada 7K and 8K families
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 1/5] Documentation: arm: improve Armada 37xx description Thomas Petazzoni
@ 2016-02-15  8:47 ` Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 3/5] Documentation: arm: improve Marvell EBU Armada documentation Thomas Petazzoni
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  8:47 UTC (permalink / raw
  To: linux-arm-kernel

As we are adding support for the Armada 7K and 8K families, this
commit adds them to the Marvell documentation listing all supported
SoCs, together with references to their Product Brief, Homepage and
Device Tree files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Documentation/arm/Marvell/README | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index b92ee66..74f7ce3 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -130,6 +130,26 @@ EBU Armada family ARMv8
 	Product Brief: http://www.marvell.com/embedded-processors/assets/PB-88F3700-FNL.pdf
 	Device tree files: arch/arm64/boot/dts/marvell/armada-37*
 
+  Armada 7K Flavors:
+	88F7020 (AP806 Dual + one CP110)
+	88F7040 (AP806 Quad + one CP110)
+	Core: ARM Cortex A72
+
+	Homepage: http://www.marvell.com/embedded-processors/armada-70xx/
+	Product Brief: http://www.marvell.com/embedded-processors/assets/Armada7020PB-Jan2016.pdf
+		       http://www.marvell.com/embedded-processors/assets/Armada7040PB-Jan2016.pdf
+	Device tree files: arch/arm64/boot/dts/marvell/armada-70*
+
+  Armada 8K Flavors:
+	88F8020 (AP806 Dual + two CP110)
+	88F8040 (AP806 Quad + two CP110)
+	Core: ARM Cortex A72
+
+	Homepage: http://www.marvell.com/embedded-processors/armada-80xx/
+	Product Brief: http://www.marvell.com/embedded-processors/assets/Armada8020PB-Jan2016.pdf
+		       http://www.marvell.com/embedded-processors/assets/Armada8040PB-Jan2016.pdf
+	Device tree files: arch/arm64/boot/dts/marvell/armada-80*
+
 Avanta family
 -------------
 
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/5] Documentation: arm: improve Marvell EBU Armada documentation
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 1/5] Documentation: arm: improve Armada 37xx description Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 2/5] Documentation: arm: add Marvell Armada 7K and 8K families Thomas Petazzoni
@ 2016-02-15  8:47 ` Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 4/5] arm64: update ARCH_MVEBU for Marvell Armada 7K/8K support Thomas Petazzoni
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  8:47 UTC (permalink / raw
  To: linux-arm-kernel

This commit improves the Marvell EBU Armada documentation by:

 - Clarifying which core is used by each SoC. Indeed, the Armada 370
   and XP use a Marvell ARMv7 compatible core, while Armada 375, 38x
   and 39x use the ARM Cortex-A9 core.

 - Adding a link to the web form that allows to get the Armada 38x
   Functional Specifications.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Documentation/arm/Marvell/README | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index 74f7ce3..57f8293 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -86,20 +86,25 @@ EBU Armada family
     Product Brief:   http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
     Hardware Spec:   http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
     Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
+    Core:            Marvell PJ4B, ARMv7 compatible
 
   Armada 375 Flavors:
 	88F6720
     Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
+    Core:          ARM Cortex-A9
 
   Armada 380/385 Flavors:
 	88F6810
 	88F6820
 	88F6828
+    Functional spec: https://marvellcorp.wufoo.com/forms/marvell-armada-38x-functional-specifications/
+    Core:          ARM Cortex-A9
 
   Armada 390/398 Flavors:
 	88F6920
 	88F6928
     Product infos: http://www.marvell.com/embedded-processors/armada-39x/
+    Core:          ARM Cortex-A9
 
   Armada XP Flavors:
         MV78230
@@ -112,8 +117,7 @@ EBU Armada family
       http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF
       http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF
       http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF
-
-  Core: Sheeva ARMv7 compatible
+    Core: Marvell PJ4B-MP, ARMv7 compatible
 
   Linux kernel mach directory: arch/arm/mach-mvebu
   Linux kernel plat directory: none
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/5] arm64: update ARCH_MVEBU for Marvell Armada 7K/8K support
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2016-02-15  8:47 ` [PATCH 3/5] Documentation: arm: improve Marvell EBU Armada documentation Thomas Petazzoni
@ 2016-02-15  8:47 ` Thomas Petazzoni
  2016-02-15  8:47 ` [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K Thomas Petazzoni
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  8:47 UTC (permalink / raw
  To: linux-arm-kernel

This commit updates the ARCH_MVEBU Kconfig option introduced for
Armada 3700 to also be used for the Armada 7K and 8K platforms, by:

 - Selecting the appropriate clock and irqchip drivers
 - Updating the help text to mention Armada 7K and 8K

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm64/Kconfig.platforms | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index d6fee5c..cadb7ff 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -2,9 +2,14 @@ menu "Platform selection"
 
 config ARCH_MVEBU
 	bool "Marvell EBU SoC Family"
-	help
-	  This enables support for Marvell EBU familly such as the
-	  Armada 3700 SoC Family.
+	select ARMADA_AP806_CORE_CLK
+	select ARMADA_AP806_RING_CLK
+	select MVEBU_ODMI
+	help
+	  This enables support for Marvell EBU familly, including:
+	   - Armada 3700 SoC Family
+	   - Armada 7K SoC Family
+	   - Armada 8K SoC Family
 
 config ARCH_BCM_IPROC
 	bool "Broadcom iProc SoC Family"
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2016-02-15  8:47 ` [PATCH 4/5] arm64: update ARCH_MVEBU for Marvell Armada 7K/8K support Thomas Petazzoni
@ 2016-02-15  8:47 ` Thomas Petazzoni
  2016-02-15  9:32   ` Marc Zyngier
  2016-02-16  5:42   ` Jisheng Zhang
  2016-02-15  9:24 ` [PATCH 0/5] arm64: Initial support for Marvell " Arnd Bergmann
  2016-02-15  9:26 ` [PATCH] ARM: documentation: update Marvell product listing Arnd Bergmann
  6 siblings, 2 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  8:47 UTC (permalink / raw
  To: linux-arm-kernel

This commit adds the base Device Tree files for the Armada 7K and 8K
SoCs, as well as the Armada 8040 DB board.

The Armada 7020, 7040 (7K family) and 8020, 8040 (8K family) are
composed of:

 - An AP806 block that contains the CPU core and a few basic
   peripherals. The AP806 is available in dual core configurations
   (used in 7020 and 8020) and quad core configurations (used in 8020
   and 8040).

 - One or two CP110 blocks that contain all the high-speed interfaces
   (SATA, PCIe, Ethernet, etc.). The 7K family chips have one CP110,
   and the 8K family chips have two CP110, giving them twice the
   number of HW interfaces.

In order to represent this from a Device Tree point of view, this
commit creates the following hierarchy:

 * armada-ap806.dtsi - definitions common to dual/quad ap806
   * armada-ap806-dual.dtsi - description of the two CPUs
     * armada-7020.dtsi - description of the 7020 SoC
     * armada-8020.dtsi - description of the 8020 SoC
   * armada-ap806-quad.dtsi - description of the four CPUs
     * armada-7040.dtsi - description of the 7040 SoC
       * armada-7040-db.dts - description of the 7040 board
     * armada-8040.dtsi - description of the 8040 SoC

The CP110 blocks are not described yet, and will be part of future
patch series.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../bindings/arm/marvell/armada-7k-8k.txt          |  24 +++
 arch/arm64/boot/dts/marvell/Makefile               |   1 +
 arch/arm64/boot/dts/marvell/armada-7020.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     |  92 ++++++++
 arch/arm64/boot/dts/marvell/armada-7040.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-8020.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-8040.dtsi       |  54 +++++
 arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi |  71 +++++++
 arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi |  84 ++++++++
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi      | 235 +++++++++++++++++++++
 10 files changed, 723 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.txt
 create mode 100644 arch/arm64/boot/dts/marvell/armada-7020.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-7040-db.dts
 create mode 100644 arch/arm64/boot/dts/marvell/armada-7040.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-8020.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-8040.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806.dtsi

diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.txt b/Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.txt
new file mode 100644
index 0000000..df98a9c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.txt
@@ -0,0 +1,24 @@
+Marvell Armada 7K/8K Platforms Device Tree Bindings
+---------------------------------------------------
+
+Boards using a SoC of the Marvell Armada 7K or 8K families must carry
+the following root node property:
+
+ - compatible, with one of the following values:
+
+   - "marvell,armada7020", "marvell,armada-ap806-dual", "marvell,armada-ap806"
+      when the SoC being used is the Armada 7020
+
+   - "marvell,armada7040", "marvell,armada-ap806-quad", "marvell,armada-ap806"
+      when the SoC being used is the Armada 7040
+
+   - "marvell,armada8020", "marvell,armada-ap806-dual", "marvell,armada-ap806"
+      when the SoC being used is the Armada 8020
+
+   - "marvell,armada8040", "marvell,armada-ap806-quad", "marvell,armada-ap806"
+      when the SoC being used is the Armada 8040
+
+Example:
+
+compatible = "marvell,armada7040-db", "marvell,armada7040",
+             "marvell,armada-ap806-quad", "marvell,armada-ap806";
diff --git a/arch/arm64/boot/dts/marvell/Makefile b/arch/arm64/boot/dts/marvell/Makefile
index 2114af8..308468d 100644
--- a/arch/arm64/boot/dts/marvell/Makefile
+++ b/arch/arm64/boot/dts/marvell/Makefile
@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += berlin4ct-stb.dtb
 
 # Mvebu SoC Family
 dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-db.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += armada-7040-db.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/marvell/armada-7020.dtsi b/arch/arm64/boot/dts/marvell/armada-7020.dtsi
new file mode 100644
index 0000000..5257575
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-7020.dtsi
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for the Armada 7020 SoC, made of an AP806 Dual and
+ * one CP110.
+ */
+
+#include "armada-ap806-dual.dtsi"
+
+/ {
+	model = "Marvell Armada 7020";
+	compatible = "marvell,armada7020", "marvell,armada-ap806-dual",
+		     "marvell,armada-ap806";
+};
diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
new file mode 100644
index 0000000..064a251
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for Marvell Armada 7040 Development board platform
+ */
+
+#include "armada-7040.dtsi"
+
+/ {
+	model = "Marvell Armada 7040 DB board";
+	compatible = "marvell,armada7040-db", "marvell,armada7040",
+		     "marvell,armada-ap806-quad", "marvell,armada-ap806";
+
+	memory at 00000000 {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
+	};
+
+	ap806 {
+		config-space {
+			spi at 510600 {
+				status = "okay";
+
+				spi-flash at 0 {
+					#address-cells = <1>;
+					#size-cells = <1>;
+					compatible = "n25q128a13";
+					reg = <0>; /* Chip select 0 */
+					spi-max-frequency = <10000000>;
+
+					partition at 0 {
+						label = "U-Boot";
+						reg = <0 0x200000>;
+					};
+					partition at 400000 {
+						label = "Filesystem";
+						reg = <0x200000 0xce0000>;
+					};
+				};
+			};
+
+			i2c at 511000 {
+				status = "okay";
+				clock-frequency = <100000>;
+			};
+
+			serial at 512000 {
+				status = "okay";
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/marvell/armada-7040.dtsi b/arch/arm64/boot/dts/marvell/armada-7040.dtsi
new file mode 100644
index 0000000..7a2de8b
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-7040.dtsi
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for the Armada 7040 SoC, made of an AP806 Quad and
+ * one CP110.
+ */
+
+#include "armada-ap806-quad.dtsi"
+
+/ {
+	model = "Marvell Armada 7040";
+	compatible = "marvell,armada7040", "marvell,armada-ap806-quad",
+		     "marvell,armada-ap806";
+};
diff --git a/arch/arm64/boot/dts/marvell/armada-8020.dtsi b/arch/arm64/boot/dts/marvell/armada-8020.dtsi
new file mode 100644
index 0000000..73d69d9
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-8020.dtsi
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for the Armada 8020 SoC, made of an AP806 Dual and
+ * two CP110.
+ */
+
+#include "armada-ap806-dual.dtsi"
+
+/ {
+	model = "Marvell Armada 8020";
+	compatible = "marvell,armada8020", "marvell,armada-ap806-dual",
+		     "marvell,armada-ap806";
+};
diff --git a/arch/arm64/boot/dts/marvell/armada-8040.dtsi b/arch/arm64/boot/dts/marvell/armada-8040.dtsi
new file mode 100644
index 0000000..a1406a4
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-8040.dtsi
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for the Armada 8040 SoC, made of an AP806 Quad and
+ * two CP110.
+ */
+
+#include "armada-ap806-quad.dtsi"
+
+/ {
+	model = "Marvell Armada 8040";
+	compatible = "marvell,armada8040", "marvell,armada-ap806-quad",
+		     "marvell,armada-ap806";
+};
diff --git a/arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi
new file mode 100644
index 0000000..f25c5c1
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for Marvell Armada AP806.
+ */
+
+#include "armada-ap806.dtsi"
+
+/ {
+	model = "Marvell Armada AP806 Dual";
+	compatible = "marvell,armada-ap806-dual", "marvell,armada-ap806";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 000 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a72", "arm,armv8";
+			reg = <0x000>;
+			enable-method = "psci";
+		};
+		cpu at 001 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a72", "arm,armv8";
+			reg = <0x001>;
+			enable-method = "psci";
+		};
+	};
+};
+
diff --git a/arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
new file mode 100644
index 0000000..baa7d9a
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for Marvell Armada AP806.
+ */
+
+#include "armada-ap806.dtsi"
+
+/ {
+	model = "Marvell Armada AP806 Quad";
+	compatible = "marvell,armada-ap806-quad", "marvell,armada-ap806";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 000 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a72", "arm,armv8";
+			reg = <0x000>;
+			enable-method = "psci";
+		};
+		cpu at 001 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a72", "arm,armv8";
+			reg = <0x001>;
+			enable-method = "psci";
+		};
+		cpu at 100 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a72", "arm,armv8";
+			reg = <0x100>;
+			enable-method = "psci";
+		};
+		cpu at 101 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a72", "arm,armv8";
+			reg = <0x101>;
+			enable-method = "psci";
+		};
+	};
+
+};
+
diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
new file mode 100644
index 0000000..3303db2
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2016 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for Marvell Armada AP806.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/dts-v1/;
+
+/ {
+	model = "Marvell Armada AP806";
+	compatible = "marvell,armada-ap806";
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+
+	ap806 {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		compatible = "simple-bus";
+		interrupt-parent = <&gic>;
+		ranges;
+
+		config-space {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "simple-bus";
+			ranges = <0x0 0x0 0xf0000000 0x1000000>;
+
+			gic: interrupt-controller at 210000 {
+				compatible = "arm,cortex-a15-gic",
+					     "arm,cortex-a9-gic";
+				#interrupt-cells = <3>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges;
+				interrupt-controller;
+				interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+				reg = <0x210000 0x1000>,
+				      <0x220000 0x1000>,
+				      <0x240000 0x2000>,
+				      <0x260000 0x2000>;
+
+				gic_v2m0: v2m at 280000 {
+					compatible = "arm,gic-v2m-frame";
+					msi-controller;
+					reg = <0x280000 0x1000>;
+					arm,msi-base-spi = <160>;
+					arm,msi-num-spis = <32>;
+				};
+				gic_v2m1: v2m at 290000 {
+					compatible = "arm,gic-v2m-frame";
+					msi-controller;
+					reg = <0x290000 0x1000>;
+					arm,msi-base-spi = <192>;
+					arm,msi-num-spis = <32>;
+				};
+				gic_v2m2: v2m at 2a0000 {
+					compatible = "arm,gic-v2m-frame";
+					msi-controller;
+					reg = <0x2a0000 0x1000>;
+					arm,msi-base-spi = <224>;
+					arm,msi-num-spis = <32>;
+				};
+				gic_v2m3: v2m at 2b0000 {
+					compatible = "arm,gic-v2m-frame";
+					msi-controller;
+					reg = <0x2b0000 0x1000>;
+					arm,msi-base-spi = <256>;
+					arm,msi-num-spis = <32>;
+				};
+			};
+
+			timer {
+				compatible = "arm,armv8-timer";
+				interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>,
+					     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>,
+					     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>,
+					     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
+			};
+
+			odmi: odmi at 300000 {
+				compatible = "marvell,odmi-controller";
+				interrupt-controller;
+				msi-controller;
+				marvell,odmi-frames = <4>;
+				reg = <0x300000 0x4000>,
+				      <0x304000 0x4000>,
+				      <0x308000 0x4000>,
+				      <0x30C000 0x4000>;
+				marvell,spi-base = <128>, <136>, <144>, <152>;
+			};
+
+			spi0: spi at 510600 {
+				compatible = "marvell,armada-380-spi";
+				reg = <0x510600 0x50>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				cell-index = <0>;
+				interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&ringclk 2>;
+				status = "disabled";
+			};
+
+			i2c0: i2c at 511000 {
+				compatible = "marvell,mv64xxx-i2c";
+				reg = <0x511000 0x20>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+				timeout-ms = <1000>;
+				clocks = <&ringclk 2>;
+				status = "disabled";
+			};
+
+			serial at 512000 {
+				compatible = "snps,dw-apb-uart";
+				reg = <0x512000 0x100>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+				reg-io-width = <1>;
+				clocks = <&ringclk 2>;
+				status = "disabled";
+			};
+
+			serial at 512100 {
+				compatible = "snps,dw-apb-uart";
+				reg = <0x512100 0x100>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+				reg-io-width = <1>;
+				clocks = <&ringclk 2>;
+				status = "disabled";
+
+			};
+
+			coreclk: clk at 0x6F8204 {
+				compatible = "marvell,armada-ap806-core-clock";
+				reg = <0x6F8204 0x04>;
+				#clock-cells = <1>;
+				clock-output-names = "ddr", "ring", "cpu";
+			};
+
+			ringclk: clk at 0x6F8250 {
+				compatible = "marvell,armada-ap806-ring-clock";
+				reg = <0x6F8250 0x04>;
+				#clock-cells = <1>;
+				clock-output-names = "ring-0", "ring-2",
+						     "ring-3", "ring-4",
+						     "ring-5";
+				clocks = <&coreclk 1>;
+			};
+
+			xor0 at 400000 {
+				compatible = "marvell,mv-xor-v2";
+				reg = <0x400000 0x1000>,
+				      <0x410000 0x1000>;
+				msi-parent = <&gic_v2m0>;
+				dma-coherent;
+			};
+
+			xor1 at 420000 {
+				compatible = "marvell,mv-xor-v2";
+				reg = <0x420000 0x1000>,
+				      <0x430000 0x1000>;
+				msi-parent = <&gic_v2m0>;
+				dma-coherent;
+			};
+
+			xor2 at 440000 {
+				compatible = "marvell,mv-xor-v2";
+				reg = <0x440000 0x1000>,
+				      <0x450000 0x1000>;
+				msi-parent = <&gic_v2m0>;
+				dma-coherent;
+			};
+
+			xor3 at 460000 {
+				compatible = "marvell,mv-xor-v2";
+				reg = <0x460000 0x1000>,
+				      <0x470000 0x1000>;
+				msi-parent = <&gic_v2m0>;
+				dma-coherent;
+			};
+		};
+	};
+
+};
+
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2016-02-15  8:47 ` [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K Thomas Petazzoni
@ 2016-02-15  9:24 ` Arnd Bergmann
  2016-02-15  9:37   ` Thomas Petazzoni
  2016-02-15  9:26 ` [PATCH] ARM: documentation: update Marvell product listing Arnd Bergmann
  6 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2016-02-15  9:24 UTC (permalink / raw
  To: linux-arm-kernel

On Monday 15 February 2016 09:47:40 Thomas Petazzoni wrote:
> Hello,
> 
> This series adds initial support for the new Armada 7K and 8K Marvell
> 64 bits processors. Details about those processors based on the
> Cortex-A72 can be found at:
> 
>   http://www.marvell.com/embedded-processors/armada-70xx/
>   http://www.marvell.com/embedded-processors/armada-80xx/
> 
> One characteristic of those processors is that internally they are
> built from several components:
> 
>  - One "AP", which contains the processor itself and a few core IP
>    blocks. The AP in 7K and 8K is called AP806, and is available on
>    two variants: dual Cortex-A72 and quad Cortex-A72.
> 
>  - Or or two "CP", which contains most of the I/Os (SATA, PCIe,
>    etc.). The CP in 7K and 8K is called CP110. One CP110 is available
>    in the 7K family, while two CP110 are available in the 8K family,
>    doubling the number of I/O interfaces.
> 
> The support added in this series only brings minimal support for the
> AP side (and not yet all IP blocks, obviously). Support for the CP
> part will come in the future.
> 
> Since the series touches similar files as the Armada 3700 series from
> Gregory Clement, it is based on it.

The new code looks ok, but I think I need to resubmit my cleanup of the
Documentation/arm/Marvell/README fiel that I submitted a while ago,
which now conflicts with the changes you did in patch 3.

If you don't mind, can you add my patch to your series to resolve
the conflict? I'll resend in a minute.

	Arnd

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] ARM: documentation: update Marvell product listing
  2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2016-02-15  9:24 ` [PATCH 0/5] arm64: Initial support for Marvell " Arnd Bergmann
@ 2016-02-15  9:26 ` Arnd Bergmann
  6 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2016-02-15  9:26 UTC (permalink / raw
  To: linux-arm-kernel

I'm still getting confused regarding which core specifically
is used in which SoC, so I've added some more detail to the
Marvell README file. I got most of this from random sources
on the internet, so it's possible that some of the information
is wrong, but most of it should be pretty obvious.

There are a few remaining points I could not find out:

* The CPU core in Orion 88F6183
* The difference (if any) between PJ4B-MP and PJ4C
* The naming of Feroceon/Jolteon/Flareon/Sheeva/Mohawk/PJ1/PJ4
  is still confusing, as they tend to overlap.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---


diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index ae89b67d8e23..1f7523df0302 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -22,7 +22,7 @@ Orion family
         88F5281
                Datasheet               : http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf
         88F6183
-  Core: Feroceon ARMv5 compatible
+  Core: Feroceon 88fr331 (88f51xx) or 88fr531-vd (88f52xx) ARMv5 compatible
   Linux kernel mach directory: arch/arm/mach-orion5x
   Linux kernel plat directory: arch/arm/plat-orion
 
@@ -52,7 +52,7 @@ Kirkwood family
                 Hardware Spec  : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
                 Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
   Homepage: http://www.marvell.com/embedded-processors/kirkwood/
-  Core: Feroceon ARMv5 compatible
+  Core: Feroceon 88fr131 ARMv5 compatible
   Linux kernel mach directory: arch/arm/mach-mvebu
   Linux kernel plat directory: none
 
@@ -71,7 +71,7 @@ Discovery family
         MV76100
                 Not supported by the Linux kernel.
 
-  Core: Feroceon ARMv5 compatible
+  Core: Feroceon 88fr571-vd ARMv5 compatible
 
   Linux kernel mach directory: arch/arm/mach-mv78xx0
   Linux kernel plat directory: arch/arm/plat-orion
@@ -86,20 +86,30 @@ EBU Armada family
     Product Brief:   http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
     Hardware Spec:   http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
     Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
+    Core: Sheeva ARMv7 compatible PJ4B
 
   Armada 375 Flavors:
 	88F6720
     Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
-
-  Armada 380/385 Flavors:
-	88F6810
-	88F6820
-	88F6828
-
-  Armada 390/398 Flavors:
-	88F6920
-	88F6928
+    Core: ARM Cortex-A9
+
+  Armada 38x Flavors:
+	88F6810	Armada 380
+	88F6820 Armada 385
+	88F6828 Armada 388
+    Produce infos: http://www.marvell.com/embedded-processors/armada-38x/
+    Core: ARM Cortex-A9
+
+  Armada 39x Flavors:
+	88F6920 Armada 390
+	88F6928 Armada 398
     Product infos: http://www.marvell.com/embedded-processors/armada-39x/
+    Core: ARM Cortex-A9
+
+  Armada SP:
+	88RC1580
+    Product infos: http://www.marvell.com/embedded-processors/armada-sp/
+    Core: Sheeva ARMv7 comatible Quad-core PJ4C
 
   Armada XP Flavors:
         MV78230
@@ -113,7 +123,7 @@ EBU Armada family
       http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF
       http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF
 
-  Core: Sheeva ARMv7 compatible
+  Core: Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP
 
   Linux kernel mach directory: arch/arm/mach-mvebu
   Linux kernel plat directory: none
@@ -155,7 +165,7 @@ PXA 2xx/3xx/93x/95x family
   Flavors:
         PXA21x, PXA25x, PXA26x
              Application processor only
-             Core: ARMv5 XScale core
+             Core: ARMv5 XScale1 core
         PXA270, PXA271, PXA272
              Product Brief         : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_pb.pdf
              Design guide          : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_design_guide.pdf
@@ -163,7 +173,7 @@ PXA 2xx/3xx/93x/95x family
              Specification         : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_emts.pdf
              Specification update  : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf
              Application processor only
-             Core: ARMv5 XScale core
+             Core: ARMv5 XScale2 core
         PXA300, PXA310, PXA320
              PXA 300 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA300_PB_R4.pdf
              PXA 310 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA310_PB_R4.pdf
@@ -174,10 +184,10 @@ PXA 2xx/3xx/93x/95x family
              Specification Update  : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Spec_Update.zip
              Reference Manual      : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_TavorP_BootROM_Ref_Manual.pdf
              Application processor only
-             Core: ARMv5 XScale core
+             Core: ARMv5 XScale3 core
         PXA930, PXA935
              Application processor with Communication processor
-             Core: ARMv5 XScale core
+             Core: ARMv5 XScale3 core
         PXA955
              Application processor with Communication processor
              Core: ARMv7 compatible Sheeva PJ4 core
@@ -196,7 +206,7 @@ PXA 2xx/3xx/93x/95x family
    Linux kernel mach directory: arch/arm/mach-pxa
    Linux kernel plat directory: arch/arm/plat-pxa
 
-MMP/MMP2 family (communication processor)
+MMP/MMP2/MMP3 family (communication processor)
 -----------------------------------------
 
    Flavors:
@@ -209,16 +219,32 @@ MMP/MMP2 family (communication processor)
              Boot ROM manual      : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_ref_manual.pdf
              App node package     : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_app_note_package.pdf
              Application processor only
-             Core: ARMv5 compatible Marvell PJ1 (Mohawk)
-        PXA910
+             Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk)
+        PXA910/PXA920
              Homepage             : http://www.marvell.com/communication-processors/pxa910/
              Product Brief        : http://www.marvell.com/communication-processors/pxa910/assets/Marvell_PXA910_Platform-001_PB_final.pdf
              Application processor with Communication processor
-             Core: ARMv5 compatible Marvell PJ1 (Mohawk)
-        MMP2, a.k.a Armada 610
+             Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk)
+        PXA688, a.k.a. MMP2, a.k.a Armada 610
              Product Brief        : http://www.marvell.com/application-processors/armada-600/assets/armada610_pb.pdf
              Application processor only
-             Core: ARMv7 compatible Sheeva PJ4 core
+             Core: ARMv7 compatible Sheeva PJ4 88sv581x core
+	PXA2128, a.k.a. MMP3 (OLPC XO4, Linux support not upstream)
+	     Product Brief	  : http://www.marvell.com/application-processors/armada/pxa2128/assets/Marvell-ARMADA-PXA2128-SoC-PB.pdf
+	     Application processor only
+	     Core: Dual-core ARMv7 compatible Sheeva PJ4C core
+	PXA960/PXA968/PXA978 (Linux support not upstream)
+	     Application processor with Communication Processor
+	     Core: ARMv7 compatible Sheeva PJ4 core
+	PXA986/PXA988 (Linux support not upstream)
+	     Application processor with Communication Processor
+	     Core: Dual-core ARMv7 compatible Sheeva PJ4B-MP core
+	PXA1088/PXA1920 (Linux support not upstream)
+	     Application processor with Communication Processor
+	     Core: quad-core ARMv7 Cortex-A7
+	PXA1908/PXA1928/PXA1936
+	     Application processor with Communication Processor
+	     Core: multi-core ARMv8 Cortex-A53
 
    Comments:
 
@@ -237,6 +263,10 @@ Berlin family (Multimedia Solutions)
 -------------------------------------
 
   Flavors:
+	88DE3010, Armada 1000 (no Linux support)
+		Core:		Marvell PJ1 (ARMv5TE), Dual-core
+		Product Brief:	http://www.marvell.com.cn/digital-entertainment/assets/armada_1000_pb.pdf
+	88DE3005, Armada 1500-mini
 	88DE3005, Armada 1500 Mini
 		Design name:	BG2CD
 		Core:		ARM Cortex-A9, PL310 L2CC
@@ -247,14 +277,16 @@ Berlin family (Multimedia Solutions)
                 Homepage:       http://www.marvell.com/multimedia-solutions/armada-1500-mini-plus/
 	88DE3100, Armada 1500
 		Design name:	BG2
-		Core:		Marvell PJ4B (ARMv7), Tauros3 L2CC
-		Product Brief:	http://www.marvell.com/multimedia-solutions/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf
+		Core:		Marvell PJ4B-MP (ARMv7), Tauros3 L2CC
+		Product Brief:	http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf
 	88DE3114, Armada 1500 Pro
 		Design name:	BG2Q
 		Core:		Quad Core ARM Cortex-A9, PL310 L2CC
-	88DE????
+	88DE3214, Armada 1500 Pro 4K
 		Design name:	BG3
 		Core:		ARM Cortex-A15, CA15 integrated L2CC
+	88DE3218, ARMADA 1500 Ultra
+		Core:		ARM Cortex-A53
 
   Homepage: http://www.marvell.com/multimedia-solutions/
   Directory: arch/arm/mach-berlin
@@ -263,6 +295,49 @@ Berlin family (Multimedia Solutions)
    * This line of SoCs is based on Marvell Sheeva or ARM Cortex CPUs
      with Synopsys DesignWare (IRQ, GPIO, Timers, ...) and PXA IP (SDHCI, USB, ETH, ...).
 
+CPU Cores
+---------
+
+The XScale cores were designed by Intel, and shipped by Marvell in the older
+PXA processors. Feroceon is a Marvell designed core that developed in-house,
+and that evolved into Sheeva. The XScale and Feroceon cores were phased out
+over time and replaced with Sheeva cores in later products, which subsequently
+got replaced with licensed ARM Cortex-A cores.
+
+  XScale 1
+	CPUID 0x69052xxx
+	ARMv5, iWMMXt
+  XScale 2
+	CPUID 0x69054xxx
+	ARMv5, iWMMXt
+  XScale 3
+	CPUID 0x69056xxx or 0x69056xxx
+	ARMv5, iWMMXt
+  Feroceon-1850 88fr331 "Mohawk"
+	CPUID 0x5615331x or 0x41xx926x
+	ARMv5TE, single issue
+  Feroceon-2850 88fr531-vd "Jolteon"
+	CPUID 0x5605531x or 0x41xx926x
+	ARMv5TE, VFP, dual-issue
+  Feroceon 88fr571-vd "Jolteon"
+	CPUID 0x5615571x
+	ARMv5TE, VFP, dual-issue
+  Feroceon 88fr131 "Mohawk-D"
+	CPUID 0x5625131x
+	ARMv5TE, single-issue in-order
+  Sheeva PJ1 88sv331 "Mohawk"
+	CPUID 0x561584xx
+	ARMv5, single-issue iWMMXt v2
+  Sheeva PJ4 88sv581x "Flareon"
+	CPUID 0x560f581x
+	ARMv7, idivt, optional iWMMXt v2
+  Sheeva PJ4B 88sv581x
+	CPUID 0x561f581x
+	ARMv7, idivt, optional iWMMXt v2
+  Sheeva PJ4B-MP / PJ4C
+	CPUID 0x562f584x
+	ARMv7, idivt/idiva, LPAE, optional iWMMXt v2 and/or NEON
+
 Long-term plans
 ---------------
 

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-15  8:47 ` [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K Thomas Petazzoni
@ 2016-02-15  9:32   ` Marc Zyngier
  2016-02-16 16:31     ` Thomas Petazzoni
  2016-02-16  5:42   ` Jisheng Zhang
  1 sibling, 1 reply; 18+ messages in thread
From: Marc Zyngier @ 2016-02-15  9:32 UTC (permalink / raw
  To: linux-arm-kernel

Hi Thomas,

On 15/02/16 08:47, Thomas Petazzoni wrote:
> This commit adds the base Device Tree files for the Armada 7K and 8K
> SoCs, as well as the Armada 8040 DB board.
> 
> The Armada 7020, 7040 (7K family) and 8020, 8040 (8K family) are
> composed of:
> 
>  - An AP806 block that contains the CPU core and a few basic
>    peripherals. The AP806 is available in dual core configurations
>    (used in 7020 and 8020) and quad core configurations (used in 8020
>    and 8040).
> 
>  - One or two CP110 blocks that contain all the high-speed interfaces
>    (SATA, PCIe, Ethernet, etc.). The 7K family chips have one CP110,
>    and the 8K family chips have two CP110, giving them twice the
>    number of HW interfaces.
> 
> In order to represent this from a Device Tree point of view, this
> commit creates the following hierarchy:
> 
>  * armada-ap806.dtsi - definitions common to dual/quad ap806
>    * armada-ap806-dual.dtsi - description of the two CPUs
>      * armada-7020.dtsi - description of the 7020 SoC
>      * armada-8020.dtsi - description of the 8020 SoC
>    * armada-ap806-quad.dtsi - description of the four CPUs
>      * armada-7040.dtsi - description of the 7040 SoC
>        * armada-7040-db.dts - description of the 7040 board
>      * armada-8040.dtsi - description of the 8040 SoC
> 
> The CP110 blocks are not described yet, and will be part of future
> patch series.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  .../bindings/arm/marvell/armada-7k-8k.txt          |  24 +++
>  arch/arm64/boot/dts/marvell/Makefile               |   1 +
>  arch/arm64/boot/dts/marvell/armada-7020.dtsi       |  54 +++++
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     |  92 ++++++++
>  arch/arm64/boot/dts/marvell/armada-7040.dtsi       |  54 +++++
>  arch/arm64/boot/dts/marvell/armada-8020.dtsi       |  54 +++++
>  arch/arm64/boot/dts/marvell/armada-8040.dtsi       |  54 +++++
>  arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi |  71 +++++++
>  arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi |  84 ++++++++
>  arch/arm64/boot/dts/marvell/armada-ap806.dtsi      | 235 +++++++++++++++++++++
>  10 files changed, 723 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.txt
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-7020.dtsi
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-7040-db.dts
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-7040.dtsi
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-8020.dtsi
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-8040.dtsi
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
>  create mode 100644 arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> 

[...[

> diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> new file mode 100644
> index 0000000..3303db2
> --- /dev/null
> +++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> @@ -0,0 +1,235 @@
> +/*
> + * Copyright (C) 2016 Marvell Technology Group Ltd.
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPLv2 or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This library is distributed in the hope that it will be useful,
> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *     GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/*
> + * Device Tree file for Marvell Armada AP806.
> + */
> +
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +/dts-v1/;
> +
> +/ {
> +	model = "Marvell Armada AP806";
> +	compatible = "marvell,armada-ap806";
> +	#address-cells = <2>;
> +	#size-cells = <2>;
> +
> +	psci {
> +		compatible = "arm,psci-0.2";
> +		method = "smc";
> +	};
> +
> +
> +	ap806 {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&gic>;
> +		ranges;
> +
> +		config-space {
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			compatible = "simple-bus";
> +			ranges = <0x0 0x0 0xf0000000 0x1000000>;
> +
> +			gic: interrupt-controller at 210000 {
> +				compatible = "arm,cortex-a15-gic",
> +					     "arm,cortex-a9-gic";
> +				#interrupt-cells = <3>;
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges;
> +				interrupt-controller;
> +				interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> +				reg = <0x210000 0x1000>,
> +				      <0x220000 0x1000>,

Assuming we do have a GIC400 here (which is extremely likely), the GICC
block should be at least 8kB to reflect the fact that this is a GICv2.

> +				      <0x240000 0x2000>,
> +				      <0x260000 0x2000>;
> +
> +				gic_v2m0: v2m at 280000 {
> +					compatible = "arm,gic-v2m-frame";
> +					msi-controller;
> +					reg = <0x280000 0x1000>;
> +					arm,msi-base-spi = <160>;
> +					arm,msi-num-spis = <32>;
> +				};
> +				gic_v2m1: v2m at 290000 {
> +					compatible = "arm,gic-v2m-frame";
> +					msi-controller;
> +					reg = <0x290000 0x1000>;
> +					arm,msi-base-spi = <192>;
> +					arm,msi-num-spis = <32>;
> +				};
> +				gic_v2m2: v2m at 2a0000 {
> +					compatible = "arm,gic-v2m-frame";
> +					msi-controller;
> +					reg = <0x2a0000 0x1000>;
> +					arm,msi-base-spi = <224>;
> +					arm,msi-num-spis = <32>;
> +				};
> +				gic_v2m3: v2m at 2b0000 {
> +					compatible = "arm,gic-v2m-frame";
> +					msi-controller;
> +					reg = <0x2b0000 0x1000>;
> +					arm,msi-base-spi = <256>;
> +					arm,msi-num-spis = <32>;
> +				};
> +			};

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K
  2016-02-15  9:24 ` [PATCH 0/5] arm64: Initial support for Marvell " Arnd Bergmann
@ 2016-02-15  9:37   ` Thomas Petazzoni
  2016-02-15  9:42     ` Arnd Bergmann
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-15  9:37 UTC (permalink / raw
  To: linux-arm-kernel

Arnd,

On Mon, 15 Feb 2016 10:24:29 +0100, Arnd Bergmann wrote:

> The new code looks ok, but I think I need to resubmit my cleanup of the
> Documentation/arm/Marvell/README fiel that I submitted a while ago,
> which now conflicts with the changes you did in patch 3.
> 
> If you don't mind, can you add my patch to your series to resolve
> the conflict? I'll resend in a minute.

Before my series, Gregory's series is already doing some changes to the
Marvell README file, though it is possible that they don't conflict
with your changes. Anyway, we'll take care of merging your file, I'll
sync with Gregory on this.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K
  2016-02-15  9:37   ` Thomas Petazzoni
@ 2016-02-15  9:42     ` Arnd Bergmann
  0 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2016-02-15  9:42 UTC (permalink / raw
  To: linux-arm-kernel

On Monday 15 February 2016 10:37:12 Thomas Petazzoni wrote:
> Arnd,
> 
> On Mon, 15 Feb 2016 10:24:29 +0100, Arnd Bergmann wrote:
> 
> > The new code looks ok, but I think I need to resubmit my cleanup of the
> > Documentation/arm/Marvell/README fiel that I submitted a while ago,
> > which now conflicts with the changes you did in patch 3.
> > 
> > If you don't mind, can you add my patch to your series to resolve
> > the conflict? I'll resend in a minute.
> 
> Before my series, Gregory's series is already doing some changes to the
> Marvell README file, though it is possible that they don't conflict
> with your changes. Anyway, we'll take care of merging your file, I'll
> sync with Gregory on this.
> 

Ok, thanks!

	Arnd

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-15  8:47 ` [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K Thomas Petazzoni
  2016-02-15  9:32   ` Marc Zyngier
@ 2016-02-16  5:42   ` Jisheng Zhang
  2016-02-16 16:38     ` Thomas Petazzoni
  1 sibling, 1 reply; 18+ messages in thread
From: Jisheng Zhang @ 2016-02-16  5:42 UTC (permalink / raw
  To: linux-arm-kernel

Dear Thomas,

On Mon, 15 Feb 2016 09:47:45 +0100 Thomas Petazzoni wrote:

> This commit adds the base Device Tree files for the Armada 7K and 8K
> SoCs, as well as the Armada 8040 DB board.
> 
> The Armada 7020, 7040 (7K family) and 8020, 8040 (8K family) are
> composed of:
> 
>  - An AP806 block that contains the CPU core and a few basic
>    peripherals. The AP806 is available in dual core configurations
>    (used in 7020 and 8020) and quad core configurations (used in 8020
>    and 8040).
> 
>  - One or two CP110 blocks that contain all the high-speed interfaces
>    (SATA, PCIe, Ethernet, etc.). The 7K family chips have one CP110,
>    and the 8K family chips have two CP110, giving them twice the
>    number of HW interfaces.
> 

[...]

> diff --git a/arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
> new file mode 100644
> index 0000000..baa7d9a
> --- /dev/null
> +++ b/arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi
> @@ -0,0 +1,84 @@
> +/*
> + * Copyright (C) 2016 Marvell Technology Group Ltd.
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPLv2 or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This library is distributed in the hope that it will be useful,
> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *     GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/*
> + * Device Tree file for Marvell Armada AP806.
> + */
> +
> +#include "armada-ap806.dtsi"
> +
> +/ {
> +	model = "Marvell Armada AP806 Quad";
> +	compatible = "marvell,armada-ap806-quad", "marvell,armada-ap806";
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu at 000 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a72", "arm,armv8";
> +			reg = <0x000>;
> +			enable-method = "psci";
> +		};
> +		cpu at 001 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a72", "arm,armv8";
> +			reg = <0x001>;
> +			enable-method = "psci";
> +		};
> +		cpu at 100 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a72", "arm,armv8";
> +			reg = <0x100>;
> +			enable-method = "psci";
> +		};
> +		cpu at 101 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a72", "arm,armv8";
> +			reg = <0x101>;
> +			enable-method = "psci";
> +		};
> +	};
> +
> +};
> +
> diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> new file mode 100644
> index 0000000..3303db2
> --- /dev/null
> +++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> @@ -0,0 +1,235 @@
> +/*
> + * Copyright (C) 2016 Marvell Technology Group Ltd.
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPLv2 or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This library is distributed in the hope that it will be useful,
> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *     GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/*
> + * Device Tree file for Marvell Armada AP806.
> + */
> +
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +/dts-v1/;
> +
> +/ {
> +	model = "Marvell Armada AP806";
> +	compatible = "marvell,armada-ap806";
> +	#address-cells = <2>;
> +	#size-cells = <2>;
> +
> +	psci {
> +		compatible = "arm,psci-0.2";

I guess the firmware is also psci-1.0 compatible.

> +		method = "smc";
> +	};
> +
> +
> +	ap806 {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&gic>;
> +		ranges;
> +
> +		config-space {
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			compatible = "simple-bus";
> +			ranges = <0x0 0x0 0xf0000000 0x1000000>;
> +
> +			gic: interrupt-controller at 210000 {
> +				compatible = "arm,cortex-a15-gic",
> +					     "arm,cortex-a9-gic";

I guess the GIC is neither the one in cortex-a15 or cortex-a9. 

Thanks

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-15  9:32   ` Marc Zyngier
@ 2016-02-16 16:31     ` Thomas Petazzoni
  2016-02-16 17:06       ` Marc Zyngier
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-16 16:31 UTC (permalink / raw
  To: linux-arm-kernel

Marc,

Thanks for the review!

On Mon, 15 Feb 2016 09:32:08 +0000, Marc Zyngier wrote:

> > +				interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> > +				reg = <0x210000 0x1000>,
> > +				      <0x220000 0x1000>,
> 
> Assuming we do have a GIC400 here (which is extremely likely), the GICC
> block should be at least 8kB to reflect the fact that this is a GICv2.

According to the datasheet I have, the GICD, GICC, GICV and GICH blocks
are all 0x10000 in size. Not sure the entire 0x10000 is actually used,
but th memory map is pretty clear.

I'll fix that in the next iteration. Thanks for spotting the
potential issue!

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-16  5:42   ` Jisheng Zhang
@ 2016-02-16 16:38     ` Thomas Petazzoni
  2016-02-17  2:21       ` Jisheng Zhang
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-16 16:38 UTC (permalink / raw
  To: linux-arm-kernel

Hello,

On Tue, 16 Feb 2016 13:42:19 +0800, Jisheng Zhang wrote:

> > +/ {
> > +	model = "Marvell Armada AP806";
> > +	compatible = "marvell,armada-ap806";
> > +	#address-cells = <2>;
> > +	#size-cells = <2>;
> > +
> > +	psci {
> > +		compatible = "arm,psci-0.2";
> 
> I guess the firmware is also psci-1.0 compatible.

At boot time, the kernel queries the PSCI firmware, and it says:

[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs

So I think psci-0.2 is correct here. Should this change for the
production revision of the chip, we'll send an update to the Device
Tree accordingly.

> > +	ap806 {
> > +		#address-cells = <2>;
> > +		#size-cells = <2>;
> > +		compatible = "simple-bus";
> > +		interrupt-parent = <&gic>;
> > +		ranges;
> > +
> > +		config-space {
> > +			#address-cells = <1>;
> > +			#size-cells = <1>;
> > +			compatible = "simple-bus";
> > +			ranges = <0x0 0x0 0xf0000000 0x1000000>;
> > +
> > +			gic: interrupt-controller at 210000 {
> > +				compatible = "arm,cortex-a15-gic",
> > +					     "arm,cortex-a9-gic";
> 
> I guess the GIC is neither the one in cortex-a15 or cortex-a9. 

What makes you think this?

The GIC is a GIC400, which is GICv2 compliant, and arm-cortex-a15-gic /
arm-cortex-a9-gic are valid compatible strings to identify a GICv2
compliant interrupt controller.

See:

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi:              compatible = "arm,gic-400", "arm,cortex-a15-gic";
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi:           compatible = "arm,gic-400", "arm,cortex-a15-gic";
arch/arm64/boot/dts/apm/apm-shadowcat.dtsi:             compatible = "arm,cortex-a15-gic";
arch/arm64/boot/dts/apm/apm-storm.dtsi:         compatible = "arm,cortex-a15-gic";
arch/arm64/boot/dts/arm/foundation-v8.dts:              compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
arch/arm64/boot/dts/arm/juno-base.dtsi:         compatible = "arm,gic-400", "arm,cortex-a15-gic";
arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts:             compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
arch/arm64/boot/dts/marvell/armada-ap806.dtsi:                          compatible = "arm,cortex-a15-gic",
arch/arm64/boot/dts/nvidia/tegra132.dtsi:               compatible = "arm,cortex-a15-gic";
arch/arm64/boot/dts/xilinx/zynqmp.dtsi:                 compatible = "arm,gic-400", "arm,cortex-a15-gic";

Or do you have a more specific reason to think that this compatible
string is wrong?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-16 16:31     ` Thomas Petazzoni
@ 2016-02-16 17:06       ` Marc Zyngier
  2016-02-17 14:06         ` Thomas Petazzoni
  0 siblings, 1 reply; 18+ messages in thread
From: Marc Zyngier @ 2016-02-16 17:06 UTC (permalink / raw
  To: linux-arm-kernel

On 16/02/16 16:31, Thomas Petazzoni wrote:
> Marc,
> 
> Thanks for the review!
> 
> On Mon, 15 Feb 2016 09:32:08 +0000, Marc Zyngier wrote:
> 
>>> +				interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
>>> +				reg = <0x210000 0x1000>,
>>> +				      <0x220000 0x1000>,
>>
>> Assuming we do have a GIC400 here (which is extremely likely), the GICC
>> block should be at least 8kB to reflect the fact that this is a GICv2.
> 
> According to the datasheet I have, the GICD, GICC, GICV and GICH blocks
> are all 0x10000 in size. Not sure the entire 0x10000 is actually used,
> but th memory map is pretty clear.

No, that's just a way to make sure that you can give the GICV block to a
guest while using 64k pages.

Talking about GICV: are you sure it is 0x10000 and not 0x20000? SBSA
recommends to have the first 4kB GICV page aliased over 64kB, and the
second 4kB page over the second 64kB block. That is to ensure that a
hypervisor can trap access to GICV_DIR register independently of the
rest of the virtual CPU interface.

But hey, almost everybody got it wrong so far, so I wouldn't be
surprised if that was broken on this platform as well...

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-16 16:38     ` Thomas Petazzoni
@ 2016-02-17  2:21       ` Jisheng Zhang
  2016-02-17  8:30         ` Thomas Petazzoni
  0 siblings, 1 reply; 18+ messages in thread
From: Jisheng Zhang @ 2016-02-17  2:21 UTC (permalink / raw
  To: linux-arm-kernel

Dear Thomas,

On Tue, 16 Feb 2016 17:38:40 +0100 Thomas Petazzoni wrote:

> Hello,
> 
> On Tue, 16 Feb 2016 13:42:19 +0800, Jisheng Zhang wrote:
> 
> > > +/ {
> > > +	model = "Marvell Armada AP806";
> > > +	compatible = "marvell,armada-ap806";
> > > +	#address-cells = <2>;
> > > +	#size-cells = <2>;
> > > +
> > > +	psci {
> > > +		compatible = "arm,psci-0.2";  
> > 
> > I guess the firmware is also psci-1.0 compatible.  
> 
> At boot time, the kernel queries the PSCI firmware, and it says:
> 
> [    0.000000] psci: probing for conduit method from DT.
> [    0.000000] psci: PSCIv0.2 detected in firmware.
> [    0.000000] psci: Using standard PSCI v0.2 function IDs
> 
> So I think psci-0.2 is correct here. Should this change for the
> production revision of the chip, we'll send an update to the Device
> Tree accordingly.

Thanks for the information.

> 
> > > +	ap806 {
> > > +		#address-cells = <2>;
> > > +		#size-cells = <2>;
> > > +		compatible = "simple-bus";
> > > +		interrupt-parent = <&gic>;
> > > +		ranges;
> > > +
> > > +		config-space {
> > > +			#address-cells = <1>;
> > > +			#size-cells = <1>;
> > > +			compatible = "simple-bus";
> > > +			ranges = <0x0 0x0 0xf0000000 0x1000000>;
> > > +
> > > +			gic: interrupt-controller at 210000 {
> > > +				compatible = "arm,cortex-a15-gic",
> > > +					     "arm,cortex-a9-gic";  
> > 
> > I guess the GIC is neither the one in cortex-a15 or cortex-a9.   
> 
> What makes you think this?
> 
> The GIC is a GIC400, which is GICv2 compliant, and arm-cortex-a15-gic /

That's my point, why not "gic-400" explicitly?

Thanks,
Jisheng

> arm-cortex-a9-gic are valid compatible strings to identify a GICv2
> compliant interrupt controller.
> 
> See:
> 
> arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi:              compatible = "arm,gic-400", "arm,cortex-a15-gic";
> arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi:           compatible = "arm,gic-400", "arm,cortex-a15-gic";
> arch/arm64/boot/dts/apm/apm-shadowcat.dtsi:             compatible = "arm,cortex-a15-gic";
> arch/arm64/boot/dts/apm/apm-storm.dtsi:         compatible = "arm,cortex-a15-gic";
> arch/arm64/boot/dts/arm/foundation-v8.dts:              compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
> arch/arm64/boot/dts/arm/juno-base.dtsi:         compatible = "arm,gic-400", "arm,cortex-a15-gic";
> arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts:             compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
> arch/arm64/boot/dts/marvell/armada-ap806.dtsi:                          compatible = "arm,cortex-a15-gic",
> arch/arm64/boot/dts/nvidia/tegra132.dtsi:               compatible = "arm,cortex-a15-gic";
> arch/arm64/boot/dts/xilinx/zynqmp.dtsi:                 compatible = "arm,gic-400", "arm,cortex-a15-gic";
> 
> Or do you have a more specific reason to think that this compatible
> string is wrong?
> 
> Best regards,
> 
> Thomas

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-17  2:21       ` Jisheng Zhang
@ 2016-02-17  8:30         ` Thomas Petazzoni
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-17  8:30 UTC (permalink / raw
  To: linux-arm-kernel

Hello,

On Wed, 17 Feb 2016 10:21:24 +0800, Jisheng Zhang wrote:

> > > I guess the GIC is neither the one in cortex-a15 or cortex-a9.   
> > 
> > What makes you think this?
> > 
> > The GIC is a GIC400, which is GICv2 compliant, and arm-cortex-a15-gic /
> 
> That's my point, why not "gic-400" explicitly?

Yes, we could use arm,gic-400 instead. Note that implementation-wise,
there is currently zero difference between arm,cortex-a9-gic,
arm,cortex-a15-gic and arm,gic-400. But indeed arm,gic-400 looks better.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K
  2016-02-16 17:06       ` Marc Zyngier
@ 2016-02-17 14:06         ` Thomas Petazzoni
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2016-02-17 14:06 UTC (permalink / raw
  To: linux-arm-kernel

Marc,

On Tue, 16 Feb 2016 17:06:00 +0000, Marc Zyngier wrote:

> > According to the datasheet I have, the GICD, GICC, GICV and GICH blocks
> > are all 0x10000 in size. Not sure the entire 0x10000 is actually used,
> > but th memory map is pretty clear.
> 
> No, that's just a way to make sure that you can give the GICV block to a
> guest while using 64k pages.
> 
> Talking about GICV: are you sure it is 0x10000 and not 0x20000? SBSA
> recommends to have the first 4kB GICV page aliased over 64kB, and the
> second 4kB page over the second 64kB block. That is to ensure that a
> hypervisor can trap access to GICV_DIR register independently of the
> rest of the virtual CPU interface.
> 
> But hey, almost everybody got it wrong so far, so I wouldn't be
> surprised if that was broken on this platform as well...

It seems like Marvell didn't get it wrong, and that my eyes were the
issue.

What I have in the datasheet is:

GICD 0x210000 0x21FFFF Distributor
GICC 0x220000 0x23FFFF Banked per CPU
GICV 0x240000 0x25FFFF Virtual Control
GICH 0x260000 0x27FFFF Hypervisor Control

So: GICD is 64 KB in size, while GICC, GICV and GICH are all 128 KB in
size. I'll fix that up in my v2.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-02-17 14:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15  8:47 [PATCH 0/5] arm64: Initial support for Marvell Armada 7K/8K Thomas Petazzoni
2016-02-15  8:47 ` [PATCH 1/5] Documentation: arm: improve Armada 37xx description Thomas Petazzoni
2016-02-15  8:47 ` [PATCH 2/5] Documentation: arm: add Marvell Armada 7K and 8K families Thomas Petazzoni
2016-02-15  8:47 ` [PATCH 3/5] Documentation: arm: improve Marvell EBU Armada documentation Thomas Petazzoni
2016-02-15  8:47 ` [PATCH 4/5] arm64: update ARCH_MVEBU for Marvell Armada 7K/8K support Thomas Petazzoni
2016-02-15  8:47 ` [PATCH 5/5] arm64: marvell: add Device Tree files for Armada 7K/8K Thomas Petazzoni
2016-02-15  9:32   ` Marc Zyngier
2016-02-16 16:31     ` Thomas Petazzoni
2016-02-16 17:06       ` Marc Zyngier
2016-02-17 14:06         ` Thomas Petazzoni
2016-02-16  5:42   ` Jisheng Zhang
2016-02-16 16:38     ` Thomas Petazzoni
2016-02-17  2:21       ` Jisheng Zhang
2016-02-17  8:30         ` Thomas Petazzoni
2016-02-15  9:24 ` [PATCH 0/5] arm64: Initial support for Marvell " Arnd Bergmann
2016-02-15  9:37   ` Thomas Petazzoni
2016-02-15  9:42     ` Arnd Bergmann
2016-02-15  9:26 ` [PATCH] ARM: documentation: update Marvell product listing Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.