[PATCH 4/5] firmware: tegra: bpmp: Add per-SoC EMC clock ID

From
Johnny Liu <hidden>
Date
2026-10-28 08:49:37
Also in
linux-clk, linux-tegra, lkml
Reply to
Johnny Liu, 2026-10-28
The EMC clock ID differs per chip (TEGRA234_CLK_EMC=31,
TEGRA238_CLK_EMC=43, TEGRA264_CLK_EMC=290).

Add an emc_clk_id field to struct tegra_bpmp_soc and set it for
Tegra234, Tegra238 and Tegra264. Tegra186 and Tegra194 have no EMC clock
ID and leave it unset.

Signed-off-by: Johnny Liu <redacted>
---
 drivers/firmware/tegra/bpmp.c | 7 +++++++
 include/soc/tegra/bpmp.h      | 1 +
 2 files changed, 8 insertions(+)
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index beeb385870f5..06da888535dc 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -21,6 +21,10 @@
 #include <soc/tegra/bpmp-abi.h>
 #include <soc/tegra/ivc.h>
 
+#include <dt-bindings/clock/nvidia,tegra238.h>
+#include <dt-bindings/clock/nvidia,tegra264.h>
+#include <dt-bindings/clock/tegra234-clock.h>
+
 #include "bpmp-private.h"
 
 #define MSG_ACK		BIT(0)
@@ -1158,14 +1162,17 @@ static const struct tegra_bpmp_soc tegra186_soc = {
 
 static const struct tegra_bpmp_soc tegra234_soc = {
 	TEGRA186_BPMP_SOC_COMMON,
+	.emc_clk_id = TEGRA234_CLK_EMC,
 };
 
 static const struct tegra_bpmp_soc tegra238_soc = {
 	TEGRA186_BPMP_SOC_COMMON,
+	.emc_clk_id = TEGRA238_CLK_EMC,
 };
 
 static const struct tegra_bpmp_soc tegra264_soc = {
 	TEGRA186_BPMP_SOC_COMMON,
+	.emc_clk_id = TEGRA264_CLK_EMC,
 };
 #endif
 
diff --git a/include/soc/tegra/bpmp.h b/include/soc/tegra/bpmp.h
index f55db918ccb1..40e2db8e69cc 100644
--- a/include/soc/tegra/bpmp.h
+++ b/include/soc/tegra/bpmp.h
@@ -31,6 +31,7 @@ struct tegra_bpmp_soc {
 	const struct tegra_bpmp_ops *ops;
 	const struct tegra_bpmp_mbwt_soc *mbwt;
 	unsigned int num_resets;
+	unsigned int emc_clk_id;
 };
 
 struct tegra_bpmp_mb_data {
-- 
2.43.0
Thread (11 messages) 11 messages, 3 authors, last reply 21d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help