From: Mikko Perttunen <mperttunen@nvidia.com>
To: Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-clk@vger.kernel.org
Cc: Svyatoslav Ryhel <clamor95@gmail.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Patrick Fischer <admin@tsv-stahl-riesa.de>,
admin@tsv-stahl-riesa.de
Subject: Re: [PATCH 1/3] soc/tegra: fuse: Fix Tegra114 speedo fuse offsets
Date: Mon, 02 Nov 2026 16:41:45 +0900 [thread overview]
Message-ID: <N-ws7JFVRJmI356qTqMaEQ@nvidia.com> (raw)
In-Reply-To: <20261029-upstream-speedo-t114-v1-1-81457cc9d94c@tsv-stahl-riesa.de>
On Thursday, October 29, 2026 6:32 PM Patrick Fischer via B4 Relay wrote:
> From: Patrick Fischer <admin@tsv-stahl-riesa.de>
>
> tegra_fuse_read_early() takes offsets relative to the start of the fuse
> words at FUSE_BEGIN (0x100). When the fuse driver moved out of
> mach-tegra, the Tegra30 speedo code was converted to such offsets
> (FUSE_SPEEDO_CALIB_0 0x114 became 0x14), and the Tegra124 code uses
> them as well. The Tegra114 code kept the absolute offsets from the
> vendor kernel, so since then it reads the CPU and SoC speedo values and
> the A01 CPU2/3 fuses 0x100 bytes too far.
>
> On a Tegra Note 7 (Tegra114 A02, SKU 5) the fuses at the correct
> offsets 0x2c and 0x34 read 718 and 1156. That gives CPU speedo 1742 and
> SoC speedo 1156, which is exactly what the vendor kernel prints for this
> device. The current code reads 172094 and 0, and so reports SoC process
> 0 instead of 1.
>
> Today only the reported process IDs depend on these values, since the
> Tegra114 core OPPs are selected by the SoC speedo ID and the CPU DVFS
> tables apply to all process IDs. The CPU speedo value is needed,
> however, to compute correct CPU DFLL voltages, which the next patch
> fixes.
>
> Fixes: 783c8f4c8445 ("soc/tegra: Add efuse driver for Tegra")
> Cc: stable@vger.kernel.org
> Signed-off-by: Patrick Fischer <admin@tsv-stahl-riesa.de>
> ---
> drivers/soc/tegra/fuse/speedo-tegra114.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/tegra/fuse/speedo-tegra114.c b/drivers/soc/tegra/fuse/speedo-tegra114.c
> index 6695702bdb4c..1e6c2b5be759 100644
> --- a/drivers/soc/tegra/fuse/speedo-tegra114.c
> +++ b/drivers/soc/tegra/fuse/speedo-tegra114.c
> @@ -14,6 +14,11 @@
> #define SOC_PROCESS_CORNERS 2
> #define CPU_PROCESS_CORNERS 2
>
> +#define FUSE_CPU_SPEEDO_1 0x2c
> +#define FUSE_SOC_SPEEDO_0 0x34
> +#define FUSE_OPT_CPU23_DISABLE 0x16c
> +#define FUSE_OPT_CPU23_REENABLE 0x170
> +
> enum {
> THRESHOLD_INDEX_0,
> THRESHOLD_INDEX_1,
> @@ -63,8 +68,8 @@ static void __init rev_sku_to_speedo_ids(struct tegra_sku_info *sku_info,
> }
>
> if (rev == TEGRA_REVISION_A01) {
> - tmp = tegra_fuse_read_early(0x270) << 1;
> - tmp |= tegra_fuse_read_early(0x26c);
> + tmp = tegra_fuse_read_early(FUSE_OPT_CPU23_REENABLE) << 1;
> + tmp |= tegra_fuse_read_early(FUSE_OPT_CPU23_DISABLE);
> if (!tmp)
> sku_info->cpu_speedo_id = 0;
> }
> @@ -84,8 +89,8 @@ void __init tegra114_init_speedo_data(struct tegra_sku_info *sku_info)
>
> rev_sku_to_speedo_ids(sku_info, &threshold);
>
> - cpu_speedo_val = tegra_fuse_read_early(0x12c) + 1024;
> - soc_speedo_val = tegra_fuse_read_early(0x134);
> + cpu_speedo_val = tegra_fuse_read_early(FUSE_CPU_SPEEDO_1) + 1024;
> + soc_speedo_val = tegra_fuse_read_early(FUSE_SOC_SPEEDO_0);
>
> for (i = 0; i < CPU_PROCESS_CORNERS; i++)
> if (cpu_speedo_val < cpu_process_speedos[threshold][i])
>
> --
> 2.56.0
>
>
>
Nice!
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: Mikko Perttunen <mperttunen@nvidia.com> # Dalmore
next prev parent reply other threads:[~2026-11-02 7:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 9:32 [PATCH 0/3] Tegra114: Fix CPU DFLL voltages Patrick Fischer via B4 Relay
2026-10-29 9:32 ` [PATCH 1/3] soc/tegra: fuse: Fix Tegra114 speedo fuse offsets Patrick Fischer via B4 Relay
2026-10-29 10:11 ` Svyatoslav Ryhel
2026-11-02 7:41 ` Mikko Perttunen [this message]
2026-10-29 9:33 ` [PATCH 2/3] soc/tegra: fuse: Store Tegra114 CPU and SoC speedo values Patrick Fischer via B4 Relay
2026-10-29 10:11 ` Svyatoslav Ryhel
2026-11-02 7:47 ` Mikko Perttunen
2026-10-29 9:33 ` [PATCH 3/3] clk: tegra: dfll: Get the voltage step of range-based regulators Patrick Fischer via B4 Relay
2026-10-29 10:15 ` Svyatoslav Ryhel
2026-11-02 8:30 ` Mikko Perttunen
2026-11-02 20:45 ` (subset) [PATCH 0/3] Tegra114: Fix CPU DFLL voltages Brian Masney
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=N-ws7JFVRJmI356qTqMaEQ@nvidia.com \
--to=mperttunen@nvidia.com \
--cc=admin@tsv-stahl-riesa.de \
--cc=bmasney+clk@redhat.com \
--cc=clamor95@gmail.com \
--cc=jbrunet+clk@baylibre.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pgaikwad@nvidia.com \
--cc=sboyd@kernel.org \
--cc=stable@vger.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®