From: MANNURU VENKATESWARLU <v-mannuru@ti.com>
To: <will@kernel.org>, <mark.rutland@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <n-francis@ti.com>, <s-k6@ti.com>,
<bb@ti.com>, <v-mannuru@ti.com>
Subject: [RFC PATCH 08/22] docs: perf: Add TI K3 DDR PMU documentation
Date: Tue, 14 Jul 2026 18:26:00 +0530 [thread overview]
Message-ID: <20260714125600.3304330-2-v-mannuru@ti.com> (raw)
In-Reply-To: <20260714125600.3304330-1-v-mannuru@ti.com>
From: Aarya Chaumal <a-chaumal@ti.com>
Add documentation for the TI K3 DDR PMU driver describing the
counter layout, supported events and perf tool usage examples.
Signed-off-by: MANNURU VENKATESWARLU <v-mannuru@ti.com>
Signed-off-by: Aarya Chaumal <a-chaumal@ti.com>
---
Documentation/admin-guide/perf/index.rst | 1 +
Documentation/admin-guide/perf/k3-ddr.rst | 57 +++++++++++++++++++++++
2 files changed, 58 insertions(+)
create mode 100644 Documentation/admin-guide/perf/k3-ddr.rst
diff --git a/Documentation/admin-guide/perf/index.rst b/Documentation/admin-guide/perf/index.rst
index aa12708ddb965..752384d2d050f 100644
--- a/Documentation/admin-guide/perf/index.rst
+++ b/Documentation/admin-guide/perf/index.rst
@@ -31,3 +31,4 @@ Performance monitor support
ampere_cspmu
mrvl-pem-pmu
fujitsu_uncore_pmu
+ k3-ddr
diff --git a/Documentation/admin-guide/perf/k3-ddr.rst b/Documentation/admin-guide/perf/k3-ddr.rst
new file mode 100644
index 0000000000000..3788bd41d15ff
--- /dev/null
+++ b/Documentation/admin-guide/perf/k3-ddr.rst
@@ -0,0 +1,57 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+==========================================================
+Texas Instruments K3 DDR Performance Monitoring Unit (PMU)
+==========================================================
+
+TI K3 SoCs contain DDR performance counters inside the MSMC2DDR bridge within
+the DDR subsystem (SSCFG region). The PMU provides four programmable counters,
+each tracking one event type simultaneously.
+
+Counter Select Register (Base + 0x100):
+
+ - Bits [5:0] - Event select for counter 0
+ - Bits [13:8] - Event select for counter 1
+ - Bits [21:16] - Event select for counter 2
+ - Bits [29:24] - Event select for counter 3
+
+Writing the event ID for a given counter causes it to begin counting. Counter
+values are read as 32-bit unsigned integers; the driver accumulates overflow
+using an hrtimer set to 1-second period.
+
+The ``format`` directory describes format of the config (event ID) field of the
+``perf_event_attr`` structure:
+``/sys/bus/event_source/devices/k3_ddr0/format/``.
+
+The ``events`` directory lists the hardware events that can be used with the
+perf tool: ``/sys/bus/event_source/devices/k3_ddr0/events/``.
+
+Supported SoCs
+==============
+
+* J721E
+* J721S2 (dual DDR channels: k3_ddr0, k3_ddr1)
+* J784S4 (four DDR channels: k3_ddr0 - k3_ddr3)
+* J7200
+* AM62
+* AM62A
+* AM62P
+* AM64
+
+Examples
+========
+
+To track read and write commands during a test, run:
+
+.. code-block:: bash
+
+ perf stat -a -e k3_ddr0/read/,k3_ddr0/write/ bw_mem -N 30 8M rd
+
+To monitor memory bandwidth (metric name varies by SoC, e.g. for J7 family):
+
+.. code-block:: bash
+
+ perf stat -a \
+ -M k3_ddr_j7.read_bandwidth_mbytes_sec,k3_ddr_j7.write_bandwidth_mbytes_sec \
+ -I 1000
+
--
2.34.1
prev parent reply other threads:[~2026-07-14 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 12:55 [RFC PATCH 07/22] perf: ti_k3_ddr: Add TI K3 DDR performance monitor driver MANNURU VENKATESWARLU
2026-07-14 12:56 ` MANNURU VENKATESWARLU [this message]
Reply instructions:
You may reply publicly 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=20260714125600.3304330-2-v-mannuru@ti.com \
--to=v-mannuru@ti.com \
--cc=bb@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=n-francis@ti.com \
--cc=s-k6@ti.com \
--cc=will@kernel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox