Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/perf/brcm,bcm2835-axiperf.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom BCM2835/2711/2712 AXI Performance Monitor

maintainers:
- Ian Rogers <irogers@google.com>
- Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>

description: |
The Broadcom BCM2835 series (including BCM2711 and BCM2712) features hardware
performance monitors on the AXI bus for evaluating memory bandwidth and
system traffic. Depending on the SoC architecture, multiple monitors exist.
The primary monitor evaluates the System fabric, while the secondary monitor
evaluates the VideoCore VPU hardware.

Older silicon generally restricts direct MMIO access to the VPU endpoints,
requiring them to be accessed over the Raspberry Pi firmware mailbox
interface. If the VPU endpoints are memory-mapped, they are supplied as
secondary resources.

properties:
compatible:
enum:
- brcm,bcm2835-axiperf
- brcm,bcm2711-axiperf
- brcm,bcm2712-axiperf

reg:
minItems: 1
items:
- description: System monitor MMIO surface
- description: VPU monitor MMIO surface
description: |
Memory-mapped I/O resource regions for the AXI PMU endpoints.
Typically ordered as System monitor, followed by VPU monitor if directly
mapped.

required:
- compatible
- reg

allOf:
- if:
properties:
compatible:
contains:
enum:
- brcm,bcm2712-axiperf
then:
properties:
reg:
maxItems: 1

additionalProperties: false

examples:
- |
pmu@7e009800 {
compatible = "brcm,bcm2835-axiperf";
reg = <0x7e009800 0x100>,
<0x7ee08000 0x100>;
};
- |
pmu@7c012800 {
compatible = "brcm,bcm2712-axiperf";
reg = <0x7c012800 0x100>;
};
13 changes: 13 additions & 0 deletions drivers/perf/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,17 @@ config MARVELL_PEM_PMU
Enable support for PCIe Interface performance monitoring
on Marvell platform.

config RPI_AXI_PMU
tristate "Raspberry Pi AXI Performance Monitor"
depends on ARCH_BCM2835 || COMPILE_TEST
depends on !RPI_AXIPERF
depends on RASPBERRYPI_FIRMWARE || RASPBERRYPI_FIRMWARE=n
help
Enable support for the Raspberry Pi AXI Performance Monitor.
This provides access to the System and VideoCore performance
counters on Broadcom BCM2835, BCM2711, and BCM2712 platforms.

Expect 100ms ping latencies to the VideoCore firmware mailbox
when reading counters on these platforms.

endmenu
1 change: 1 addition & 0 deletions drivers/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ obj-$(CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU) += arm_cspmu/
obj-$(CONFIG_MESON_DDR_PMU) += amlogic/
obj-$(CONFIG_CXL_PMU) += cxl_pmu.o
obj-$(CONFIG_RPI_AXIPERF) += raspberrypi_axi_monitor.o
obj-$(CONFIG_RPI_AXI_PMU) += rpi_axi_pmu.o
Loading