From: Aaron Kling via B4 Relay <devnull+webgeek1234.gmail.com@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Joseph Lo <josephl@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
Thierry Reding <treding@nvidia.com>,
Aaron Kling <webgeek1234@gmail.com>
Subject: [PATCH v2 3/4] clk: tegra: dfll: Support limiting max clock per device
Date: Wed, 03 Sep 2025 14:30:18 -0500 [thread overview]
Message-ID: <20250903-tegra210-speedo-v2-3-89e6f86b8942@gmail.com> (raw)
In-Reply-To: <20250903-tegra210-speedo-v2-0-89e6f86b8942@gmail.com>
From: Aaron Kling <webgeek1234@gmail.com>
Some devices like the Jetson Nano report a cpu speedo value that scales
past the thermal limits of the device. This allows limiting the maximum
scaling to a lower value within the table.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
index 0251618b82c8321724ba0aec7a5bd90b2c2ffaf2..0c84f7e85baaa96fee005a1c9a5dd6afbd1875fa 100644
--- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
+++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
@@ -556,6 +556,7 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev)
struct tegra_dfll_soc_data *soc;
const struct dfll_fcpu_data *fcpu_data;
struct rail_alignment align;
+ u32 max_freq;
fcpu_data = of_device_get_match_data(&pdev->dev);
if (!fcpu_data)
@@ -589,7 +590,12 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev)
return err;
}
- soc->max_freq = fcpu_data->cpu_max_freq_table[speedo_id];
+ if (!of_property_read_u32(pdev->dev.of_node,
+ "nvidia,dfll-max-freq",
+ &max_freq))
+ soc->max_freq = max_freq;
+ else
+ soc->max_freq = fcpu_data->cpu_max_freq_table[speedo_id];
soc->cvb = tegra_cvb_add_opp_table(soc->dev, fcpu_data->cpu_cvb_tables,
fcpu_data->cpu_cvb_tables_size,
--
2.50.1
next prev parent reply other threads:[~2025-09-03 19:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 19:30 [PATCH v2 0/4] Properly Limit Tegra210 Clock Rates Aaron Kling via B4 Relay
2025-09-03 19:30 ` [PATCH v2 1/4] dt-bindings: clock: tegra124-dfll: Add property to limit frequency Aaron Kling via B4 Relay
2025-09-03 20:03 ` Aaron Kling
2025-09-04 19:34 ` Rob Herring
2025-09-04 21:49 ` Rob Herring
2025-09-03 19:30 ` [PATCH v2 2/4] soc: tegra: fuse: speedo-tegra210: Update speedo ids Aaron Kling via B4 Relay
2025-09-03 19:30 ` Aaron Kling via B4 Relay [this message]
2025-09-03 19:30 ` [PATCH v2 4/4] arm64: tegra: Limit max cpu frequency on P3450 Aaron Kling via B4 Relay
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=20250903-tegra210-speedo-v2-3-89e6f86b8942@gmail.com \
--to=devnull+webgeek1234.gmail.com@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=josephl@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=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.com \
--cc=webgeek1234@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).