Skip to contentSkip to conversation

ARM64: marvell: improve support for Armada 7K/8K

PATCH Superseded Thomas Petazzoni 1 participant 5 messages Apr 14, 2016

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover ARM64: marvell: improve support for Armada 7K/8K

Hello,

This set of patches improve the support for Marvell Armada 7K/8K. Please wait for the clock DT bindings and PCIe DT bindings to be Acked-by before merging.

The first two patches adjust the existing Device Tree to use the newly proposed DT bindings to describe the AP806 clocks.

The last two patches add Device Tree description for a few IPs in the CP110 HW block: one of its system controller, and the PCIe controllers.

Changes since v1:

- Update the CP110 system controller DT description to the latest binding (no more gate-clock-indices), slightly different list of clocks.

- Update the CP110 PCIe controller DT description to the latest DT binding (only one clock needed instead of two).

Thanks!

Thomas

Thomas Petazzoni (4):
arm64: marvell: enable AP806 and CP110 syscon driver
arm64: dts: marvell: use new clock binding on Armada AP806
arm64: dts: marvell: initial DT description of Armada 7K/8K CP110
master
arm64: dts: marvell: enable one PCIe interface on Armada 7040-DB

 arch/arm64/Kconfig.platforms                       |   4 +-
 arch/arm64/boot/dts/marvell/armada-7020.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   6 +
 arch/arm64/boot/dts/marvell/armada-7040.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-8020.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-8040.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi      |  34 ++---
 .../boot/dts/marvell/armada-cp110-master.dtsi      | 140 +++++++++++++++++++++
 8 files changed, 162 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
Signature · 1 line
2.6.4
#1 lore raw

PATCH v2 1/4 arm64: marvell: enable AP806 and CP110 syscon driver

The Marvell Armada 7K/8K support needs the AP806 and CP110 syscon drivers to be enabled, as they provide amongst other things, the main clocks for those platforms.

---
 arch/arm64/Kconfig.platforms | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/Kconfig.platforms +2 -2
index efa77c1..60f4bb5 100644
@@ -64,8 +64,8 @@ config ARCH_MESON
 
 config ARCH_MVEBU
 	bool "Marvell EBU SoC Family"
-	select ARMADA_AP806_CORE_CLK
-	select ARMADA_AP806_RING_CLK
+	select ARMADA_AP806_SYSCON
+	select ARMADA_CP110_SYSCON
 	select MVEBU_ODMI
 	help
 	  This enables support for Marvell EBU familly, including:
Signature · 1 line
2.6.4
#2 lore raw

PATCH v2 2/4 arm64: dts: marvell: use new clock binding on Armada AP806

In reply to Thomas Petazzoni
---
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 34 ++++++++-------------------
 1 file changed, 10 insertions(+), 24 deletions(-)
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +10 -24
index 556a92b..e5da7bd 100644
@@ -175,7 +175,7 @@
 				#size-cells = <0>;
 				cell-index = <0>;
 				interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&ringclk 2>;
+				clocks = <&ap_syscon 3>;
 				status = "disabled";
 			};
 
@@ -186,7 +186,7 @@
 				#size-cells = <0>;
 				interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 				timeout-ms = <1000>;
-				clocks = <&ringclk 2>;
+				clocks = <&ap_syscon 3>;
 				status = "disabled";
 			};
 
@@ -196,7 +196,7 @@
 				reg-shift = <2>;
 				interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
 				reg-io-width = <1>;
-				clocks = <&ringclk 2>;
+				clocks = <&ap_syscon 3>;
 				status = "disabled";
 			};
 
@@ -206,32 +206,18 @@
 				reg-shift = <2>;
 				interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
 				reg-io-width = <1>;
-				clocks = <&ringclk 2>;
+				clocks = <&ap_syscon 3>;
 				status = "disabled";
 
 			};
 
-			dfx-server at 6f8000 {
-				compatible = "simple-mfd", "syscon";
-				reg = <0x6f8000 0x70000>;
-
-				coreclk: clk at 204 {
-					compatible = "marvell,armada-ap806-core-clock";
-					#clock-cells = <1>;
-					clock-output-names = "ddr", "ring", "cpu";
-				};
-
-				ringclk: clk at 250 {
-					compatible = "marvell,armada-ap806-ring-clock";
-					#clock-cells = <1>;
-					clock-output-names = "ring-0", "ring-2",
-							     "ring-3", "ring-4",
-							     "ring-5";
-					clocks = <&coreclk 1>;
-				};
+			ap_syscon: system-controller at 6f4000 {
+				compatible = "marvell,ap806-system-controller", "syscon";
+				#clock-cells = <1>;
+				clock-output-names = "ap-cpu-cluster-0", "ap-cpu-cluster-1",
+						     "ap-fixed", "ap-mss";
+				reg = <0x6f4000 0x1000>;
 			};
 		};
 	};
-
 };
-
Signature · 1 line
2.6.4
#3 lore raw

PATCH v2 3/4 arm64: dts: marvell: initial DT description of Armada 7K/8K CP110 master

In reply to Thomas Petazzoni

This commit adds an initial Device Tree description for the CP110 master that is found in the Armada 7K and 8K SoCs. This initial description only describes the system controller (to provide clocks) and three PCIe interfaces.

For the record, the organization of the SoCs is as follows:

- 7020: dual-core AP, one CP110 (master)
- 7040: quad-core AP, one CP110 (master)
- 8020: dual-core AP, two CP110s (master and slave)
- 8040: quad-core AP, two CP110s (master and slave)

For this reason, all of the 7020, 7040, 8020 and 8040 include armada-cp110-master.dtsi. When support for the second CP110 (slave) used in 8020 and 8040 will be added, the .dtsi files for those SoCs will in addition include armada-cp110-slave.dtsi.

---
 arch/arm64/boot/dts/marvell/armada-7020.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-7040.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-8020.dtsi       |   1 +
 arch/arm64/boot/dts/marvell/armada-8040.dtsi       |   1 +
 .../boot/dts/marvell/armada-cp110-master.dtsi      | 140 +++++++++++++++++++++
 5 files changed, 144 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
arch/arm64/boot/dts/marvell/armada-7020.dtsi +1 -0
index 5257575..975e733 100644
@@ -46,6 +46,7 @@
  */
 
 #include "armada-ap806-dual.dtsi"
+#include "armada-cp110-master.dtsi"
 
 / {
 	model = "Marvell Armada 7020";
arch/arm64/boot/dts/marvell/armada-7040.dtsi +1 -0
index 7a2de8b..78d995d 100644
@@ -46,6 +46,7 @@
  */
 
 #include "armada-ap806-quad.dtsi"
+#include "armada-cp110-master.dtsi"
 
 / {
 	model = "Marvell Armada 7040";
arch/arm64/boot/dts/marvell/armada-8020.dtsi +1 -0
index 73d69d9..3753c1c 100644
@@ -46,6 +46,7 @@
  */
 
 #include "armada-ap806-dual.dtsi"
+#include "armada-cp110-master.dtsi"
 
 / {
 	model = "Marvell Armada 8020";
arch/arm64/boot/dts/marvell/armada-8040.dtsi +1 -0
index a1406a4..8bd0d8f 100644
@@ -46,6 +46,7 @@
  */
 
 #include "armada-ap806-quad.dtsi"
+#include "armada-cp110-master.dtsi"
 
 / {
 	model = "Marvell Armada 8040";
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi new file +140 -0

140 lines not on this page · raw message

Signature · 1 line
2.6.4
#4 lore raw

PATCH v2 4/4 arm64: dts: marvell: enable one PCIe interface on Armada 7040-DB

In reply to Thomas Petazzoni

This commit enables one PCIe interface on Armada 7040-DB, now that PCIe support for this SoC has been enabled.

---
 arch/arm64/boot/dts/marvell/armada-7040-db.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +6 -0
index 064a251..33ba5dc 100644
@@ -89,4 +89,10 @@
 			};
 		};
 	};
+
+	cp110-master {
+		pcie at f2640000 {
+			status = "okay";
+		};
+	};
 };
Signature · 1 line
2.6.4