Skip to contentSkip to conversation

arm64: zynqmp: Add coresight cpu debug support

PATCH Applied Sean Anderson 2 participants 2 messages May 3, 2024 – Jun 4, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: zynqmp: Add coresight cpu debug support

Add coresight debug support to the device tree. This can be useful when panicking, especially when a core is hung in EL3.

---

 .../arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 16 +++++++++++
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi        | 28 +++++++++++++++++++
 2 files changed, 44 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi +16 -0
index dd4569e7bd95..60d1b1acf9a0 100644
@@ -70,6 +70,22 @@ &cpu0 {
 	clocks = <&zynqmp_clk ACPU>;
 };
 
+&cpu0_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
+&cpu1_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
+&cpu2_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
+&cpu3_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
 &fpd_dma_chan1 {
 	clocks = <&zynqmp_clk GDMA_REF>, <&zynqmp_clk LPD_LSBUS>;
 };
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +28 -0
index 25d20d803230..ec8d5d19ac1c 100644
@@ -330,6 +330,34 @@ pmu@9000 {
 			};
 		};
 
+		cpu0_debug: debug@fec10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfec10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu0>;
+		};
+
+		cpu1_debug: debug@fed10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfed10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu1>;
+		};
+
+		cpu2_debug: debug@fee10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfee10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu2>;
+		};
+
+		cpu3_debug: debug@fef10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfef10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu3>;
+		};
+
 		/* GDMA */
 		fpd_dma_chan1: dma-controller@fd500000 {
 			status = "disabled";
Signature · 1 line
2.35.1.1320.gc452695387.dirty
maintainer Applied
#1 lore raw
Quoted 66 lines · Sean Anderson

Add coresight debug support to the device tree. This can be useful when panicking, especially when a core is hung in EL3.

---

  .../arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 16 +++++++++++
  arch/arm64/boot/dts/xilinx/zynqmp.dtsi        | 28 +++++++++++++++++++
  2 files changed, 44 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi +16 -0
index dd4569e7bd95..60d1b1acf9a0 100644
@@ -70,6 +70,22 @@ &cpu0 {
  	clocks = <&zynqmp_clk ACPU>;
  };
 
+&cpu0_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
+&cpu1_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
+&cpu2_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
+&cpu3_debug {
+	clocks = <&zynqmp_clk DBF_FPD>;
+};
+
  &fpd_dma_chan1 {
  	clocks = <&zynqmp_clk GDMA_REF>, <&zynqmp_clk LPD_LSBUS>;
  };
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +21 -0
index 25d20d803230..ec8d5d19ac1c 100644
@@ -330,6 +330,34 @@ pmu@9000 {
  			};
  		};
 
+		cpu0_debug: debug@fec10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfec10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu0>;
+		};
+
+		cpu1_debug: debug@fed10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfed10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu1>;
+		};
+
+		cpu2_debug: debug@fee10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfee10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu2>;
+		};
+

arch/arm64/boot/dts/xilinx/zynqmp.dtsi pmu@9000 { · line 363

Quoted 10 lines
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +7 -0
+		cpu3_debug: debug@fef10000 {
+			compatible = "arm,coresight-cpu-debug", "arm,primecell";
+			reg = <0x0 0xfef10000 0x0 0x1000>;
+			clock-names = "apb_pclk";
+			cpu = <&cpu3>;
+		};
+
  		/* GDMA */
  		fpd_dma_chan1: dma-controller@fd500000 {
  			status = "disabled";

Applied.
M