mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johnny Liu <johnliu@nvidia.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"Prashant Gaikwad" <pgaikwad@nvidia.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	"Douglas Anderson" <dianders@chromium.org>,
	Aniruddha Rao <anrao@nvidia.com>, <devicetree@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-clk@vger.kernel.org>
Cc: Johnny Liu <johnliu@nvidia.com>
Subject: [PATCH 4/5] firmware: tegra: bpmp: Add per-SoC EMC clock ID
Date: Wed, 28 Oct 2026 08:48:59 +0000	[thread overview]
Message-ID: <20261028084900.1047287-5-johnliu@nvidia.com> (raw)
In-Reply-To: <20261028084900.1047287-1-johnliu@nvidia.com>

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 <johnliu@nvidia.com>
---
 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


  parent reply	other threads:[~2026-10-28  8:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  8:48 [PATCH 0/5] Add Tegra238 BPMP support and fix stale EMC clock rate Johnny Liu
2026-10-28  8:48 ` [PATCH 1/5] dt-bindings: clock: Add Tegra238 BPMP clock IDs Johnny Liu
2026-10-28 13:52   ` Krzysztof Kozlowski
2026-10-28 15:54     ` Johnny Liu
2026-10-28  8:48 ` [PATCH 2/5] dt-bindings: firmware: tegra186-bpmp: Add Tegra238 compatible Johnny Liu
2026-10-28 13:54   ` Krzysztof Kozlowski
2026-10-28 15:19     ` Johnny Liu
2026-10-28  8:48 ` [PATCH 3/5] firmware: tegra: bpmp: Add Tegra238 support Johnny Liu
2026-10-28  8:48 ` Johnny Liu [this message]
2026-10-28  8:49 ` [PATCH 5/5] clk: tegra: bpmp: Do not cache the EMC clock rate Johnny Liu

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=20261028084900.1047287-5-johnliu@nvidia.com \
    --to=johnliu@nvidia.com \
    --cc=anrao@nvidia.com \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pgaikwad@nvidia.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@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

all inboxes | Powered by JetHome®