Skip to content

cpufreq: tegra194: add Tegra264 support

Sumit Gupta linux-devicetree linux-pm linux-tegra lkml 3 versions – Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 7 repliesApplied
  2. v29 patches 3 repliesSuperseded
  3. v19 patches 6 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/9cpufreq: tegra194: move MPIDR read to CPU hotplug callbackdrivers/cpufreq/tegra194-cpufreq.c+89 -390 replies
2/9cpufreq: tegra194: remove duplicate counter sampling loopsdrivers/cpufreq/tegra194-cpufreq.c+37 -560 replies
3/9cpufreq: tegra194: add tegra_counter_delta helperdrivers/cpufreq/tegra194-cpufreq.c+18 -190 replies
4/9cpufreq: tegra194: add per-SoC counter maskdrivers/cpufreq/tegra194-cpufreq.c+13 -70 replies
5/9cpufreq: tegra194: split MMIO mapping from ACTMON offsetdrivers/cpufreq/tegra194-cpufreq.c+4 -20 replies
6/9dt-bindings: arm: nvidia: Document the Tegra264 CCPLEX clusterDocumentation/devicetree/bindings/arm/tegra/nvidia,tegra-ccplex-cluster.yaml+26 -11 reply
7/9cpufreq: tegra194: derive frequency domain from device treedrivers/cpufreq/tegra194-cpufreq.c+35 -90 replies
8/9cpufreq: tegra194: Add support for Tegra264drivers/cpufreq/Kconfig.arm drivers/cpufreq/tegra194-cpufreq.c+163 -70 replies
9/9arm64: tegra: Add CCPLEX cluster node for Tegra264arch/arm64/boot/dts/nvidia/tegra264.dtsi+21 -00 replies

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchZhongqiu Han
SeriesR-b
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] cpufreq: tegra194: add Tegra264 support

This series adds cpufreq support for Tegra264, which joins the SoCs already supported by the tegra194-cpufreq driver.

Tegra264 keeps the existing model, where BPMP provides the NDIV limits. The driver derives the current frequency from the core clock and reference counters.

The main differences are:
- Frequency read: through system registers, as on Tegra194, but from the 64-bit architected AMU counters. The reference counter ticks at the system counter rate (CNTFRQ).

- Frequency request: through MMIO, as on Tegra234. The driver writes NDIV to a core_freq_req register in the CCPLEX register space. Each register controls a clock shared by two single-CPU clusters, so both CPUs form one cpufreq policy.

The patches fall into four groups:
- Fix (patch 1): read each CPU's MPIDR from a CPU hotplug callback instead of at probe. A CPU that is offline at probe then also gets valid cluster and core IDs.

- Preparation (patches 2 to 5): cleanups, mostly of the counter code, to make room for a 64-bit counter and for an MMIO mapping without ACTMON counters.

- Improvement (patches 6 and 7): group CPUs by the generic "performance-domains" property, which cluster-based grouping cannot express on Tegra264. Device trees without it keep the existing grouping.

- Tegra264 support (patches 8 and 9): the driver support, followed by the device tree changes it relies on.

v2[2] -> v3:
- Patch 8: read the AMU counters with interrupts disabled (Zhongqiu).
- Add Reviewed-by from Zhongqiu to patches 1-7 and 9.

v1[1] -> v2:
- Patch 1: drop the cpu argument of get_cpu_cluster_id() (Zhongqiu). Check for a bad MPIDR in tegra194_get_speed() (Sashiko).
- Patch 7: check the BPMP table in tegra194_get_speed() (Sashiko).
- Patch 8: fail probe if AMU is not available (Zhongqiu).

Sumit Gupta (9):
cpufreq: tegra194: move MPIDR read to CPU hotplug callback
cpufreq: tegra194: remove duplicate counter sampling loops
cpufreq: tegra194: add tegra_counter_delta helper
cpufreq: tegra194: add per-SoC counter mask
cpufreq: tegra194: split MMIO mapping from ACTMON offset
dt-bindings: arm: nvidia: Document the Tegra264 CCPLEX cluster
cpufreq: tegra194: derive frequency domain from device tree
cpufreq: tegra194: Add support for Tegra264
arm64: tegra: Add CCPLEX cluster node for Tegra264

 .../tegra/nvidia,tegra-ccplex-cluster.yaml    |  27 +-
 arch/arm64/boot/dts/nvidia/tegra264.dtsi      |  21 +
 drivers/cpufreq/Kconfig.arm                   |   4 +-
 drivers/cpufreq/tegra194-cpufreq.c            | 456 +++++++++++++-----
 4 files changed, 387 insertions(+), 121 deletions(-)

[1] v1: https://lore.kernel.org/lkml/[email protected]/
[2] v2: https://lore.kernel.org/lkml/[email protected]/

base-commit: e8017d29067fd1310a65c3494ce1a1b492adbac6

Signature · 1 line
2.34.1