[PATCH 0/5] Add Tegra238 BPMP support and fix stale EMC clock rate
From: Johnny Liu
Date: Wed Oct 28 2026 - 04:52:10 EST
EMC clock scaling is handled by the BPMP firmware without kernel
involvement, so clk_get_rate() on the EMC clock can return a stale value
cached by the common clock framework. This series makes the EMC clock
rate uncached on Tegra234, Tegra238 and Tegra264, and adds the pieces
needed to identify the EMC clock on each of these chips.
The EMC clock ID differs per chip (TEGRA234_CLK_EMC=31,
TEGRA238_CLK_EMC=43, TEGRA264_CLK_EMC=290), while the
"nvidia,tegra186-bpmp" fallback compatible and the tegra186_soc data are
shared across several chips. To avoid detecting the chip at runtime, the
EMC clock ID is carried in per-SoC BPMP data selected by the device tree
compatible.
Patch 1 adds the Tegra238 clock ID header, following the format and
naming used for Tegra264. Patch 2 adds the "nvidia,tegra238-bpmp"
compatible to the binding. Patch 3 adds dedicated SoC data for Tegra234,
Tegra238 and Tegra264, selected by their specific compatibles, and
builds the BPMP driver for CONFIG_ARCH_TEGRA_238_SOC. Patch 4 adds an
emc_clk_id field to struct tegra_bpmp_soc and sets it using the
TEGRA*_CLK_EMC clock ID macros. Patch 5 then sets CLK_GET_RATE_NOCACHE
on the clock matching that ID.
The series touches both the clock and the firmware code. Patch 5 depends
on patch 4, which in turn depends on patch 1, so I would suggest taking
the whole series through the Tegra tree with an Acked-by from the clock
maintainers.
Johnny Liu (5):
dt-bindings: clock: Add Tegra238 BPMP clock IDs
dt-bindings: firmware: tegra186-bpmp: Add Tegra238 compatible
firmware: tegra: bpmp: Add Tegra238 support
firmware: tegra: bpmp: Add per-SoC EMC clock ID
clk: tegra: bpmp: Do not cache the EMC clock rate
.../firmware/nvidia,tegra186-bpmp.yaml | 1 +
drivers/clk/tegra/clk-bpmp.c | 3 +
drivers/firmware/tegra/Makefile | 1 +
drivers/firmware/tegra/bpmp.c | 61 ++--
include/dt-bindings/clock/nvidia,tegra238.h | 279 ++++++++++++++++++
include/soc/tegra/bpmp.h | 1 +
6 files changed, 329 insertions(+), 17 deletions(-)
create mode 100644 include/dt-bindings/clock/nvidia,tegra238.h
--
2.43.0