Skip to contentSkip to conversation

arm64: dts: marvell: Move arch timer and pmu nodes to top-level

PATCH In review Rob Herring (Arm) 3 participants 5 messages Feb 26, 2025 – Apr 14, 2025

Subsystems (2)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/3 arm64: dts: marvell: Move arch timer and pmu nodes to top-level

The Arm arch timer and PMU are not memory-mapped peripherals, and therefore should not be under a "simple-bus" node. Move them to the top-level like other platforms.

---
 arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 29 ++++++++++---------
 .../boot/dts/marvell/armada-ap810-ap0.dtsi    | 18 ++++++------
 2 files changed, 24 insertions(+), 23 deletions(-)
arch/arm64/boot/dts/marvell/armada-ap80x.dtsi +15 -14
index fdf88cd0eb02..e206d03a2867 100644
@@ -48,6 +48,21 @@ tee@4400000 {
 		};
 	};
 
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupt-parent = <&gic>;
+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+				<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+				<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+				<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+	};
+
+	pmu {
+		compatible = "arm,cortex-a72-pmu";
+		interrupt-parent = <&pic>;
+		interrupts = <17>;
+	};
+
 	AP_NAME {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -122,20 +137,6 @@ gic_v2m3: v2m@2b0000 {
 				};
 			};
 
-			timer {
-				compatible = "arm,armv8-timer";
-				interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-					     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-					     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-					     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
-			};
-
-			pmu {
-				compatible = "arm,cortex-a72-pmu";
-				interrupt-parent = <&pic>;
-				interrupts = <17>;
-			};
-
 			odmi: odmi@300000 {
 				compatible = "marvell,odmi-controller";
 				msi-controller;
arch/arm64/boot/dts/marvell/armada-ap810-ap0.dtsi +9 -9
index 2f9ab6b4a2c9..f5a89af154d4 100644
@@ -14,6 +14,7 @@ / {
 	compatible = "marvell,armada-ap810";
 	#address-cells = <2>;
 	#size-cells = <2>;
+	interrupt-parent = <&gic>;
 
 	aliases {
 		serial0 = &uart0_ap0;
@@ -25,11 +26,18 @@ psci {
 		method = "smc";
 	};
 
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+				<GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+				<GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+				<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+	};
+
 	ap810-ap0 {
 		#address-cells = <2>;
 		#size-cells = <2>;
 		compatible = "simple-bus";
-		interrupt-parent = <&gic>;
 		ranges;
 
 		config-space@e8000000 {
@@ -62,14 +70,6 @@ gic_its_ap0: msi-controller@3040000 {
 				};
 			};
 
-			timer {
-				compatible = "arm,armv8-timer";
-				interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
-					     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
-					     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
-					     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
-			};
-
 			xor@400000 {
 				compatible = "marvell,armada-7k-xor", "marvell,xor-v2";
 				reg = <0x400000 0x1000>,
Signature · 1 line
2.47.2
author maintainer
#1 lore raw

PATCH 2/3 arm64: dts: marvell: Drop unused CP11X_TYPE define

The CP11X_TYPE define is not used anywhere, remove it.

---
 arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 4 ----
 arch/arm64/boot/dts/marvell/armada-cp115.dtsi | 4 ----
 2 files changed, 8 deletions(-)
arch/arm64/boot/dts/marvell/armada-cp110.dtsi +0 -4
index 4fd33b0fa56e..e3cfd168becc 100644
@@ -5,8 +5,4 @@
  * Device Tree file for Marvell Armada CP110.
  */
 
-#define CP11X_TYPE cp110
-
 #include "armada-cp11x.dtsi"
-
-#undef CP11X_TYPE
arch/arm64/boot/dts/marvell/armada-cp115.dtsi +0 -4
index 1d0a9653e681..ec6432c8db7c 100644
@@ -5,8 +5,4 @@
  * Device Tree file for Marvell Armada CP115.
  */
 
-#define CP11X_TYPE cp115
-
 #include "armada-cp11x.dtsi"
-
-#undef CP11X_TYPE
Signature · 1 line
2.47.2
author maintainer
#2 lore raw

PATCH 3/3 arm64: dts: marvell: Use preferred node names for "simple-bus"

In reply to Rob Herring (Arm)

The "simple-bus" binding has preferred node names such as "bus", ".*-bus", or "soc". Rename the Marvell platforms to use these names.

---
 arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi     | 2 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi      | 2 +-
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi     | 1 -
 arch/arm64/boot/dts/marvell/armada-ap807.dtsi     | 1 -
 arch/arm64/boot/dts/marvell/armada-ap80x.dtsi     | 4 ++--
 arch/arm64/boot/dts/marvell/armada-ap810-ap0.dtsi | 4 ++--
 arch/arm64/boot/dts/marvell/armada-cp11x.dtsi     | 4 ++--
 7 files changed, 8 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi +1 -1
index 75377c292bcb..605f5be1538c 100644
@@ -78,7 +78,7 @@ soc {
 		#size-cells = <2>;
 		ranges;
 
-		internal-regs@7f000000 {
+		bus@7f000000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +1 -1
index 9603223dd761..6ec22eaaf816 100644
@@ -78,7 +78,7 @@ soc {
 		#size-cells = <2>;
 		ranges;
 
-		internal-regs@d0000000 {
+		bus@d0000000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +0 -1
index 866628679ac7..e421d454daa7 100644
@@ -5,7 +5,6 @@
  * Device Tree file for Marvell Armada AP806.
  */
 
-#define AP_NAME		ap806
 #include "armada-ap80x.dtsi"
 
 / {
arch/arm64/boot/dts/marvell/armada-ap807.dtsi +0 -1
index a3328d05fc94..7150ce83abf2 100644
@@ -5,7 +5,6 @@
  * Copyright (C) 2019 Marvell Technology Group Ltd.
  */
 
-#define AP_NAME		ap807
 #include "armada-ap80x.dtsi"
 
 / {
arch/arm64/boot/dts/marvell/armada-ap80x.dtsi +2 -2
index e206d03a2867..40e146982921 100644
@@ -63,14 +63,14 @@ pmu {
 		interrupts = <17>;
 	};
 
-	AP_NAME {
+	soc {
 		#address-cells = <2>;
 		#size-cells = <2>;
 		compatible = "simple-bus";
 		interrupt-parent = <&gic>;
 		ranges;
 
-		config-space@f0000000 {
+		bus@f0000000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm64/boot/dts/marvell/armada-ap810-ap0.dtsi +2 -2
index f5a89af154d4..a143d84bcf23 100644
@@ -34,13 +34,13 @@ timer {
 				<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
 	};
 
-	ap810-ap0 {
+	soc {
 		#address-cells = <2>;
 		#size-cells = <2>;
 		compatible = "simple-bus";
 		ranges;
 
-		config-space@e8000000 {
+		bus@e8000000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm64/boot/dts/marvell/armada-cp11x.dtsi +2 -2
index 161beec0b6b0..a057e119492f 100644
@@ -17,7 +17,7 @@ / {
 	 * The contents of the node are defined below, in order to
 	 * save one indentation level
 	 */
-	CP11X_NAME: CP11X_NAME { };
+	CP11X_NAME: CP11X_NODE_NAME(bus) { };
 
 	/*
 	 * CPs only have one sensor in the thermal IC.
@@ -51,7 +51,7 @@ &CP11X_NAME {
 	interrupt-parent = <&CP11X_LABEL(icu_nsr)>;
 	ranges;
 
-	config-space@CP11X_BASE {
+	bus@CP11X_BASE {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "simple-bus";
Signature · 1 line
2.47.2
#3 lore raw

Re: [PATCH 3/3] arm64: dts: marvell: Use preferred node names for "simple-bus"

Hello,

Quoted 19 lines · Rob Herring (Arm)

The "simple-bus" binding has preferred node names such as "bus", ".*-bus", or "soc". Rename the Marvell platforms to use these names.

---
 arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi     | 2 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi      | 2 +-
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi     | 1 -
 arch/arm64/boot/dts/marvell/armada-ap807.dtsi     | 1 -
 arch/arm64/boot/dts/marvell/armada-ap80x.dtsi     | 4 ++--
 arch/arm64/boot/dts/marvell/armada-ap810-ap0.dtsi | 4 ++--
 arch/arm64/boot/dts/marvell/armada-cp11x.dtsi     | 4 ++--
 7 files changed, 8 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +0 -0
index 9603223dd761..6ec22eaaf816 100644

arch/arm64/boot/dts/marvell/armada-37xx.dtsi soc { · line 84

Quoted 8 lines
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +1 -1
@@ -78,7 +78,7 @@ soc {
 		#size-cells = <2>;
 		ranges;
 
-		internal-regs@d0000000 {
+		bus@d0000000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";

Thank you for your patch, which is now commit
ed9c2b28ebef3333f25cefdc2ef37ee1f05cad95.

I have an off-the-shelf Turris MOX board, which was shipped with a U-Boot older than the commit linked below (does not contain it):
https://github.com/u-boot/u-boot/commit/bcf6971d536793eb99e12ff857cc018963d7cd46

and as such, is incapable of loading current mainline device trees, which contain your change, because it is hardcoded to perform FDT fixups based on paths such as:
#define ETH1_PATH "/soc/internal-regs@d0000000/ethernet@40000"
#define MDIO_PATH "/soc/internal-regs@d0000000/mdio@32004"
#define SFP_GPIO_PATH "/soc/internal-regs@d0000000/spi@10600/moxtet@1/gpio@0"

which no longer exist.

Relevant portion of boot log:

## Flattened Device Tree blob at 04f00000
Booting using the fdt blob at 0x4f00000
Loading Device Tree to 000000003bf16000, end 000000003bf1e11e ... OK
ERROR: board-specific fdt fixup failed: FDT_ERR_NOTFOUND
- must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

Note that the hint about what is wrong is only visible with a serial console which I happen to have. The board does not rely on it for normal operation, which could pose a problem to typical users.

Just bringing this to everyone's attention. In the meantime, I'm going off to figure out how to build and flash a new U-Boot using the steps at
https://github.com/turris-cz/mox-boot-builder.

#4 lore raw

Re: [PATCH 3/3] arm64: dts: marvell: Use preferred node names for "simple-bus"

I will fix the U-Boot code in upstream, and schedule U-Boot upgrade on MOXes running Turris OS...

Marek

Quoted 65 lines · Vladimir Oltean

Hello,

Quoted 19 lines · Rob Herring (Arm)

The "simple-bus" binding has preferred node names such as "bus", ".*-bus", or "soc". Rename the Marvell platforms to use these names.

---
 arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi     | 2 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi      | 2 +-
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi     | 1 -
 arch/arm64/boot/dts/marvell/armada-ap807.dtsi     | 1 -
 arch/arm64/boot/dts/marvell/armada-ap80x.dtsi     | 4 ++--
 arch/arm64/boot/dts/marvell/armada-ap810-ap0.dtsi | 4 ++--
 arch/arm64/boot/dts/marvell/armada-cp11x.dtsi     | 4 ++--
 7 files changed, 8 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +0 -0
index 9603223dd761..6ec22eaaf816 100644

arch/arm64/boot/dts/marvell/armada-37xx.dtsi soc { · line 84

Quoted 8 lines
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +1 -1
@@ -78,7 +78,7 @@ soc {
 		#size-cells = <2>;
 		ranges;
 
-		internal-regs@d0000000 {
+		bus@d0000000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";

Thank you for your patch, which is now commit
ed9c2b28ebef3333f25cefdc2ef37ee1f05cad95.

I have an off-the-shelf Turris MOX board, which was shipped with a U-Boot older than the commit linked below (does not contain it):
https://github.com/u-boot/u-boot/commit/bcf6971d536793eb99e12ff857cc018963d7cd46

and as such, is incapable of loading current mainline device trees, which contain your change, because it is hardcoded to perform FDT fixups based on paths such as:
#define ETH1_PATH "/soc/internal-regs@d0000000/ethernet@40000"
#define MDIO_PATH "/soc/internal-regs@d0000000/mdio@32004"
#define SFP_GPIO_PATH "/soc/internal-regs@d0000000/spi@10600/moxtet@1/gpio@0"

which no longer exist.

Relevant portion of boot log:

## Flattened Device Tree blob at 04f00000
Booting using the fdt blob at 0x4f00000
Loading Device Tree to 000000003bf16000, end 000000003bf1e11e ... OK
ERROR: board-specific fdt fixup failed: FDT_ERR_NOTFOUND
- must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

Note that the hint about what is wrong is only visible with a serial console which I happen to have. The board does not rely on it for normal operation, which could pose a problem to typical users.

Just bringing this to everyone's attention. In the meantime, I'm going off to figure out how to build and flash a new U-Boot using the steps at
https://github.com/turris-cz/mox-boot-builder.