Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org, linux-kernel@vger.kernel.org,
	mathieu.poirier@linaro.org,
	Suzuki K Poulose <suzuki.poulose@arm.com>
Subject: [TEST PATCH 31/30][EDK2] edk2-platform: juno: Update ACPI CoreSight Bindings
Date: Wed, 22 May 2019 11:35:04 +0100
Message-ID: <1558521304-27469-32-git-send-email-suzuki.poulose@arm.com> (raw)
In-Reply-To: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com>

ACPI bindings for CoreSight components on the Juno-r0 board.
Please note that the bindings apply only for the juno-r0.
The layout on r1 and r2 are slightly different and will need
dynamic ACPI table support to be able to use a single UEFI
image.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 Platform/ARM/JunoPkg/AcpiTables/Dsdt.asl | 241 +++++++++++++++++++++++++++++++
 1 file changed, 241 insertions(+)

diff --git a/Platform/ARM/JunoPkg/AcpiTables/Dsdt.asl b/Platform/ARM/JunoPkg/AcpiTables/Dsdt.asl
index 702b057..c70e8ac 100644
--- a/Platform/ARM/JunoPkg/AcpiTables/Dsdt.asl
+++ b/Platform/ARM/JunoPkg/AcpiTables/Dsdt.asl
@@ -14,6 +14,51 @@
 
 #include "ArmPlatform.h"
 
+#define ACPI_GRAPH_REV		0
+#define ACPI_GRAPH_UUID		"ab02a46b-74c7-45a2-bd68-f7d344ef2153"
+
+#define CORESIGHT_GRAPH_UUID	"3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
+
+#define CS_LINK_MASTER		1
+#define CS_LINK_SLAVE		0
+
+
+#define DSD_CS_GRAPH_BEGIN(_nports)			\
+        Package () {					\
+          1,		// GraphID			\
+          ToUUID(CORESIGHT_GRAPH_UUID),			\
+          _nports,
+
+#define DSD_CS_GRAPH_END				\
+	}
+
+#define DSD_GRAPH_BEGIN(_nports)			\
+     ToUUID(ACPI_GRAPH_UUID),				\
+     Package() {					\
+       ACPI_GRAPH_REV,					\
+       1,						\
+       DSD_CS_GRAPH_BEGIN(_nports)
+
+#define DSD_GRAPH_END					\
+       DSD_CS_GRAPH_END					\
+     }
+
+#define DSD_PORTS_BEGIN(_nports)			\
+   Name (_DSD,  Package () {				\
+     DSD_GRAPH_BEGIN(_nports)
+
+#define DSD_PORTS_END					\
+   DSD_GRAPH_END					\
+  })
+
+#define CS_PORT(_port, _rport, _rphandle, _dir)		\
+    Package () { _port, _rport, _rphandle, _dir}
+
+#define CS_INPUT_PORT(_port, _rport, _rphandle)		\
+    CS_PORT(_port, _rport, _rphandle, CS_LINK_SLAVE)
+#define CS_OUTPUT_PORT(_port, _rport, _rphandle)		\
+    CS_PORT(_port, _rport, _rphandle, CS_LINK_MASTER)
+
 DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_OEM_REVISION) {
   Scope(_SB) {
     //
@@ -122,15 +167,56 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_O
         Method (_LPI, 0, NotSerialized) {
           return(PLPI)
         }
+
+        Device(ETM0) { // ETM on Cluster0 CPU0
+          Name (_HID, "ARMHC500")
+          Name (_CID, "ARMHC500")
+          Name (_CRS, ResourceTemplate() {
+            Memory32Fixed(ReadWrite, 0x22040000, 0x1000)
+          })
+
+          DSD_PORTS_BEGIN(1)
+          CS_OUTPUT_PORT(0, 0, \_SB_.CLU0.FUN0)
+          DSD_PORTS_END
+
+        } // ETM0
       }
+
       Device(CPU1) { // A57-1: Cluster 0, Cpu 1
         Name(_HID, "ACPI0007")
         Name(_UID, 5)
         Method (_LPI, 0, NotSerialized) {
           return(PLPI)
         }
+        Device(ETM1) { // ETM on Cluster0 CPU1
+          Name (_HID, "ARMHC500")
+          Name (_CID, "ARMHC500")
+          Name (_CRS, ResourceTemplate() {
+            Memory32Fixed(ReadWrite, 0x22140000, 0x1000)
+          })
+
+          DSD_PORTS_BEGIN(1)
+          CS_OUTPUT_PORT(0, 1, \_SB_.CLU0.FUN0)
+          DSD_PORTS_END
+
+        } // ETM1
       }
+
+      Device(FUN0) {
+        Name(_HID, "ARMHC9FF")
+        Name(_CID, "ARMHC9FF")
+        Name(_CRS, ResourceTemplate() {
+          Memory32Fixed(ReadWrite, 0x220c0000, 0x1000)
+        })
+
+        DSD_PORTS_BEGIN(3)
+        CS_OUTPUT_PORT(0, 0, \_SB_.MFUN),
+        CS_INPUT_PORT(0, 0, \_SB_.CLU0.CPU0.ETM0),
+        CS_INPUT_PORT(1, 0, \_SB_.CLU0.CPU1.ETM1)
+        DSD_PORTS_END
+      } // CL0.FUN0
     }
+
     Device (CLU1) { // Cluster1 state
       Name(_HID, "ACPI0010")
       Name(_UID, 2)
@@ -208,19 +294,45 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_O
           "CorePwrDn"
         },
       })
+
       Device(CPU2) { // A53-0: Cluster 1, Cpu 0
         Name(_HID, "ACPI0007")
         Name(_UID, 0)
         Method (_LPI, 0, NotSerialized) {
           return(PLPI)
         }
+        Device(ETM2) { // ETM on Cluster1, CPU0
+          Name (_HID, "ARMHC500")
+          Name (_CID, "ARMHC500")
+          Name (_CRS, ResourceTemplate() {
+            Memory32Fixed(ReadWrite, 0x23040000, 0x1000)
+          })
+
+          DSD_PORTS_BEGIN(1)
+          CS_OUTPUT_PORT(0, 0, \_SB_.CLU1.FUN1)
+          DSD_PORTS_END
+
+        } // ETM2
       }
+
       Device(CPU3) { // A53-1: Cluster 1, Cpu 1
         Name(_HID, "ACPI0007")
         Name(_UID, 1)
         Method (_LPI, 0, NotSerialized) {
           return(PLPI)
         }
+        Device(ETM3) { // ETM on Cluster1, CPU1
+          Name (_HID, "ARMHC500")
+          Name (_CID, "ARMHC500")
+          Name (_CRS, ResourceTemplate() {
+            Memory32Fixed(ReadWrite, 0x23140000, 0x1000)
+          })
+
+          DSD_PORTS_BEGIN(1)
+          CS_OUTPUT_PORT(0, 1, \_SB_.CLU1.FUN1)
+          DSD_PORTS_END
+
+        } // ETM3
       }
       Device(CPU4) { // A53-2: Cluster 1, Cpu 2
         Name(_HID, "ACPI0007")
@@ -228,6 +340,18 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_O
         Method (_LPI, 0, NotSerialized) {
           return(PLPI)
         }
+        Device(ETM4) { // ETM on Cluster1, CPU2
+          Name (_HID, "ARMHC500")	// ETM
+          Name (_CID, "ARMHC500")	// ETM
+          Name (_CRS, ResourceTemplate() {
+            Memory32Fixed(ReadWrite, 0x23240000, 0x1000)
+          })
+
+          DSD_PORTS_BEGIN(1)
+          CS_OUTPUT_PORT(0, 2, \_SB_.CLU1.FUN1)
+          DSD_PORTS_END
+
+        } // ETM4
       }
       Device(CPU5) { // A53-3: Cluster 1, Cpu 3
         Name(_HID, "ACPI0007")
@@ -235,9 +359,126 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_O
         Method (_LPI, 0, NotSerialized) {
           return(PLPI)
         }
+        Device(ETM5) { // ETM on Cluster1, CPU3
+          Name (_HID, "ARMHC500")	// ETM
+          Name (_CID, "ARMHC500")	// ETM
+          Name (_CRS, ResourceTemplate() {
+            Memory32Fixed(ReadWrite, 0x23340000, 0x1000)
+          })
+
+          DSD_PORTS_BEGIN(1)
+          CS_OUTPUT_PORT(0, 3, \_SB_.CLU1.FUN1)
+          DSD_PORTS_END
+        } // ETM5
       }
+      Device(FUN1) {
+        Name(_HID, "ARMHC9FF")
+        Name(_CID, "ARMHC9FF")
+        Name(_CRS, ResourceTemplate() {
+          Memory32Fixed(ReadWrite, 0x230c0000, 0x1000)
+        })
+
+        DSD_PORTS_BEGIN(5)
+        CS_OUTPUT_PORT(0, 1, \_SB_.MFUN),
+        CS_INPUT_PORT(0, 0, \_SB_.CLU1.CPU2.ETM2),
+        CS_INPUT_PORT(1, 0, \_SB_.CLU1.CPU3.ETM3),
+        CS_INPUT_PORT(2, 0, \_SB_.CLU1.CPU4.ETM4),
+        CS_INPUT_PORT(3, 0, \_SB_.CLU1.CPU5.ETM5)
+        DSD_PORTS_END
+      } // CL1.FUN1
     }
 
+    Device(STM0) {
+      Name(_HID, "ARMHC502")	// STM
+      Name(_CID, "ARMHC502")
+      Name(_CRS, ResourceTemplate() {
+        Memory32Fixed(ReadWrite, 0x20100000, 0x1000)
+        Memory32Fixed(ReadWrite, 0x28000000, 0x1000000)
+      })
+      DSD_PORTS_BEGIN(1)
+      CS_OUTPUT_PORT(0, 2, \_SB_.MFUN)
+      DSD_PORTS_END
+    }
+
+    Device(MFUN) {
+      Name(_HID, "ARMHC9FF")	// Funnel
+      Name(_CID, "ARMHC9FF")	// Funnel
+      Name(_CRS, ResourceTemplate() {
+        Memory32Fixed(ReadWrite, 0x20040000, 0x1000)
+      })
+
+      DSD_PORTS_BEGIN(4)
+      CS_OUTPUT_PORT(0, 0, \_SB_.ETF0),
+      CS_INPUT_PORT(0, 0, \_SB_.CLU0.FUN0),
+      CS_INPUT_PORT(1, 0, \_SB_.CLU1.FUN1),
+      CS_INPUT_PORT(2, 0, \_SB_.STM0)
+      DSD_PORTS_END
+
+    } // MFUN-nel
+
+    Device(ETF0) {
+      Name(_HID, "ARMHC97C")	// TMC
+      Name(_CID, "ARMHC97C")	// TMC
+      Name(_CRS, ResourceTemplate() {
+        Memory32Fixed(ReadWrite, 0x20010000, 0x1000)
+      })
+
+      DSD_PORTS_BEGIN(2)
+      CS_OUTPUT_PORT(0, 1, \_SB_.RPL),
+      CS_INPUT_PORT(0, 0, \_SB_.MFUN)
+      DSD_PORTS_END
+
+    } // ETF0
+
+    Device(RPL) {
+      Name(_HID, "ARMHC98D")	// Replicator
+      Name(_CID, "ARMHC98D")	// Replicator
+      Name(_CRS, ResourceTemplate() {
+        Memory32Fixed(ReadWrite, 0x20120000, 0x1000)
+      })
+
+      DSD_PORTS_BEGIN(3)
+      CS_OUTPUT_PORT(0, 0, \_SB_.TPIU),
+      CS_OUTPUT_PORT(1, 0, \_SB_.ETR),
+      CS_INPUT_PORT(0, 0, \_SB_.ETF0)
+      DSD_PORTS_END
+
+    } // RPL
+
+    Device(ETR) {
+      Name(_HID, "ARMHC97C")	// TMC
+      Name(_CID, "ARMHC97C")	// TMC
+      Name(_CCA, 0) // The ETR on this platform is not coherent
+      Name(_CRS, ResourceTemplate() {
+        Memory32Fixed(ReadWrite, 0x20070000, 0x1000)
+      })
+
+      Name(_DSD, Package() {
+         DSD_GRAPH_BEGIN(1)
+         CS_INPUT_PORT(0, 1, \_SB_.RPL)
+         DSD_GRAPH_END,
+
+         ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+         Package() {
+            Package(2) {"arm,scatter-gather", 1}
+         }
+      })
+
+    } // ETR
+
+    Device(TPIU) {
+      Name(_HID, "ARMHC979")	// TPIU
+      Name(_CID, "ARMHC979")	// TPIU
+      Name(_CRS, ResourceTemplate() {
+        Memory32Fixed(ReadWrite, 0x20030000, 0x1000)
+      })
+
+      DSD_PORTS_BEGIN(1)
+      CS_INPUT_PORT(0, 0, \_SB_.RPL)
+      DSD_PORTS_END
+
+    } // TPIU
+
     //
     // Keyboard and Mouse
     //
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply index

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 10:34 [PATCH v4 00/30] coresight: Support for ACPI bindings Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 01/30] coresight: funnel: Clean up device book keeping Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 02/30] coresight: replicator: Cleanup device tracking Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 03/30] coresight: tmc: Clean up device specific data Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 04/30] coresight: catu: Cleanup " Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 05/30] coresight: tpiu: Clean up " Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 06/30] coresight: stm: Cleanup " Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 07/30] coresight: etm: Clean up " Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 08/30] coresight: etb10: " Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 09/30] coresight: Use coresight device names for sinks in PMU attribute Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 10/30] coresight: Rename of_coresight to coresight-platform Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 11/30] coresight: etm3x: Rearrange cp14 access detection Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 12/30] coresight: stm: Rearrange probing the stimulus area Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 13/30] coresight: tmc-etr: Rearrange probing default buffer size Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 14/30] coresight: platform: Make memory allocation helper generic Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 15/30] coresight: Make sure device uses DT for obsolete compatible check Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 16/30] coresight: Introduce generic platform data helper Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 17/30] coresight: Make device to CPU mapping generic Suzuki K Poulose
2019-06-03 10:07   ` Mike Leach
2019-06-06 12:56     ` Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 18/30] coresight: Remove cpu field from platform data Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 19/30] coresight: Remove name from platform description Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 20/30] coresight: Cleanup coresight_remove_conns Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 21/30] coresight: Reuse platform data structure for connection tracking Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 22/30] coresight: Rearrange platform data probing Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 23/30] coresight: Add support for releasing platform specific data Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 24/30] coresight: platform: Use fwnode handle for device search Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 25/30] coresight: Use fwnode handle instead of device names Suzuki K Poulose
2019-05-22 10:34 ` [PATCH v4 26/30] coresight: Use platform agnostic names Suzuki K Poulose
2019-05-29  9:32   ` Mike Leach
2019-06-03 10:12     ` Suzuki K Poulose
2019-05-22 10:35 ` [PATCH v4 27/30] coresight: stm: ACPI support for parsing stimulus base Suzuki K Poulose
2019-05-22 10:35 ` [PATCH v4 28/30] coresight: Support for ACPI bindings Suzuki K Poulose
2019-05-22 10:35 ` [PATCH v4 29/30] coresight: acpi: Support for AMBA components Suzuki K Poulose
2019-05-22 10:35 ` [PATCH v4 30/30] coresight: acpi: Support for platform devices Suzuki K Poulose
2019-05-22 10:35 ` Suzuki K Poulose [this message]
2019-05-23 13:37 ` [PATCH v4 00/30] coresight: Support for ACPI bindings Suzuki K Poulose
2019-05-23 14:32 ` Leo Yan
2019-05-23 15:31   ` Suzuki K Poulose
2019-05-24  1:38     ` Leo Yan
2019-05-24 13:19     ` Mike Leach
2019-05-28  5:19 ` Leo Yan
2019-05-28  8:08   ` Leo Yan
2019-05-28 14:51   ` Mathieu Poirier
2019-05-29  6:34     ` Leo Yan
2019-05-28 17:32 ` Mathieu Poirier
2019-05-28 17:36   ` Mathieu Poirier
2019-05-28 17:40     ` Suzuki K Poulose
  -- strict thread matches above, loose matches on Subject: below --
2019-05-07 10:52 [PATCH v3 " Suzuki K Poulose
2019-05-07 10:52 ` [TEST PATCH 31/30][EDK2] edk2-platform: juno: Update ACPI CoreSight Bindings Suzuki K Poulose

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558521304-27469-32-git-send-email-suzuki.poulose@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=coresight@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox