From: Mikko Perttunen <mperttunen@nvidia.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
Thierry Reding <treding@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Dmitry Osipenko <digetx@gmail.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v3 01/11] devfreq: tegra30-devfreq: add support for Tegra114
Date: Thu, 13 Nov 2025 13:20:06 +0900 [thread overview]
Message-ID: <15510199.O9o76ZdvQC@senjougahara> (raw)
In-Reply-To: <CAPVz0n3qXBLEVDKDDc6DRrN+WFiAdeL1wDaA94DkdST7NoRXyQ@mail.gmail.com>
On Tuesday, November 11, 2025 10:34 PM Svyatoslav Ryhel wrote:
> вт, 11 лист. 2025 р. о 10:55 Mikko Perttunen <mperttunen@nvidia.com> пише:
> >
> > On Monday, September 15, 2025 5:01 PM Svyatoslav Ryhel wrote:
> > > Lets add Tegra114 support to activity monitor device as a preparation to
> > > upcoming EMC controller support.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > ---
> > > drivers/devfreq/tegra30-devfreq.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
> > > index 8ea5b482bfb3..d976077d4757 100644
> > > --- a/drivers/devfreq/tegra30-devfreq.c
> > > +++ b/drivers/devfreq/tegra30-devfreq.c
> > > @@ -980,6 +980,7 @@ static const struct tegra_devfreq_soc_data tegra30_soc = {
> > >
> > > static const struct of_device_id tegra_devfreq_of_match[] = {
> > > { .compatible = "nvidia,tegra30-actmon", .data = &tegra30_soc, },
> > > + { .compatible = "nvidia,tegra114-actmon", .data = &tegra124_soc, },
> > > { .compatible = "nvidia,tegra124-actmon", .data = &tegra124_soc, },
> > > { },
> > > };
> > >
> >
> > Looking at my copy of L4T r21, the EMC count_weight should be 256 on Tegra114, while it is 4*256 on Tegra124, so different SoC data should be used. (I haven't checked if anything else is different)
> >
>
> You are correct, tegra114 seems to use 1 EMC clock per transaction. I
> will move and expand comment from tegra124 entry regarding
> count_weight to include info about all 3 supported entries if you
> don't mind.
>
> I have a question regarding tegra_devfreq_device_config to be used
> with tegra114. From tegratab kernel I have, existing
> tegra124_device_configs configuration seems to fit tegra114, may you
> confirm this? Or, if L4T r21 you use, uses different values, may you
> provide those to fill up tegra_devfreq_device_config for tegra114.
Can confirm the offset and irq mask are the same. The coefficients are a bit different in the L4T tree but they don't match the upstream tegra124 values either so I guess that's fine.
Here's the exact values:
static struct actmon_dev actmon_dev_emc = {
.reg = 0x1c0,
.glb_status_irq_mask = (0x1 << 26),
.dev_id = "tegra_actmon",
.con_id = "emc",
/* EMC suspend floor to guarantee suspend entry on PLLM */
.suspend_freq = EMC_PLLP_FREQ_MAX + 2000,
.boost_freq_step = 16000,
.boost_up_coef = 200,
.boost_down_coef = 50,
#if (defined(CONFIG_ARCH_TEGRA_14x_SOC) || \
defined(CONFIG_ARCH_TEGRA_12x_SOC) || \
defined(CONFIG_ARCH_TEGRA_13x_SOC))
.boost_up_threshold = 70,
.boost_down_threshold = 50,
#else
.boost_up_threshold = 60,
.boost_down_threshold = 40,
#endif
.up_wmark_window = 1,
.down_wmark_window = 3,
.avg_window_log2 = ACTMON_DEFAULT_AVG_WINDOW_LOG2,
#if defined(CONFIG_ARCH_TEGRA_3x_SOC) || defined(CONFIG_ARCH_TEGRA_14x_SOC)
.count_weight = 0x200,
#elif defined(CONFIG_ARCH_TEGRA_12x_SOC) || defined(CONFIG_ARCH_TEGRA_13x_SOC)
.count_weight = 0x400,
#else
.count_weight = 0x100,
#endif
.type = ACTMON_FREQ_SAMPLER,
.state = ACTMON_UNINITIALIZED,
.rate_change_nb = {
.notifier_call = actmon_rate_notify_cb,
},
};
#if defined(CONFIG_ARCH_TEGRA_12x_SOC) || defined(CONFIG_ARCH_TEGRA_13x_SOC)
#define CPU_AVG_ACT_THRESHOLD 2000
#else
#define CPU_AVG_ACT_THRESHOLD 50000
#endif
/* EMC-cpu activity monitor: frequency sampling device:
* activity counter is incremented every 256 memory transactions, and
* each transaction takes 2 EMC clocks; count_weight = 512 on Tegra3.
* On Tegra11 there is only 1 clock per transaction, hence weight = 256.
*/
static struct actmon_dev actmon_dev_cpu_emc = {
.reg = 0x200,
.glb_status_irq_mask = (0x1 << 25),
.dev_id = "tegra_mon",
.con_id = "cpu_emc",
.boost_freq_step = 16000,
.boost_up_coef = 800,
.boost_down_coef = 90,
.boost_up_threshold = 27,
.boost_down_threshold = 10,
.avg_dependency_threshold = CPU_AVG_ACT_THRESHOLD,
.up_wmark_window = 1,
.down_wmark_window = 3,
.avg_window_log2 = ACTMON_DEFAULT_AVG_WINDOW_LOG2,
#if defined(CONFIG_ARCH_TEGRA_3x_SOC) || defined(CONFIG_ARCH_TEGRA_14x_SOC)
.count_weight = 0x200,
#elif defined(CONFIG_ARCH_TEGRA_12x_SOC) || defined(CONFIG_ARCH_TEGRA_13x_SOC)
.count_weight = 0x400,
#else
.count_weight = 0x100,
#endif
.type = ACTMON_FREQ_SAMPLER,
.state = ACTMON_UNINITIALIZED,
.rate_change_nb = {
.notifier_call = actmon_rate_notify_cb,
},
};
>
> > Cheers,
> > Mikko
> >
> >
next prev parent reply other threads:[~2025-11-13 4:20 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 8:01 [PATCH v3 00/11] Tegra114: implement EMC support Svyatoslav Ryhel
2025-09-15 8:01 ` [PATCH v3 01/11] devfreq: tegra30-devfreq: add support for Tegra114 Svyatoslav Ryhel
2025-11-11 8:55 ` Mikko Perttunen
2025-11-11 13:34 ` Svyatoslav Ryhel
2025-11-13 4:20 ` Mikko Perttunen [this message]
2025-09-15 8:01 ` [PATCH v3 02/11] ARM: tegra: Add ACTMON node to Tegra114 device tree Svyatoslav Ryhel
2025-11-11 9:00 ` Mikko Perttunen
2025-09-15 8:01 ` [PATCH v3 03/11] dt-bindings: memory: Document Tegra114 Memory Controller Svyatoslav Ryhel
2025-09-22 16:00 ` Rob Herring
2025-09-22 16:18 ` Svyatoslav Ryhel
2025-09-24 15:24 ` Rob Herring
2025-12-01 14:18 ` Thierry Reding
2025-09-15 8:01 ` [PATCH v3 04/11] memory: tegra: implement EMEM regs and ICC ops for Tegra114 Svyatoslav Ryhel
2025-11-13 4:36 ` Mikko Perttunen
2025-09-15 8:01 ` [PATCH v3 05/11] dt-bindings: memory: Add Tegra114 memory client IDs Svyatoslav Ryhel
2025-11-13 4:47 ` Mikko Perttunen
2025-09-15 8:01 ` [PATCH v3 06/11] clk: tegra: remove EMC to MC clock mux in Tegra114 Svyatoslav Ryhel
2025-09-21 17:54 ` Stephen Boyd
2025-11-13 14:21 ` Svyatoslav Ryhel
2025-11-25 10:21 ` Svyatoslav Ryhel
2025-11-13 5:05 ` Mikko Perttunen
2025-11-13 14:29 ` Svyatoslav Ryhel
2025-09-15 8:01 ` [PATCH v3 07/11] dt-bindings: memory: Document Tegra114 External Memory Controller Svyatoslav Ryhel
2025-09-15 8:01 ` [PATCH v3 08/11] memory: tegra: Add Tegra114 EMC driver Svyatoslav Ryhel
2025-11-18 7:08 ` Mikko Perttunen
2025-11-18 8:05 ` Svyatoslav Ryhel
2025-11-21 4:03 ` Mikko Perttunen
2025-11-21 8:54 ` Svyatoslav Ryhel
2025-11-25 3:29 ` Mikko Perttunen
2025-09-15 8:01 ` [PATCH v3 09/11] ARM: tegra: Add External Memory Controller node on Tegra114 Svyatoslav Ryhel
2025-09-15 8:01 ` [PATCH v3 10/11] ARM: tegra: Add EMC OPP and ICC properties to Tegra114 EMC and ACTMON device-tree nodes Svyatoslav Ryhel
2025-09-15 8:01 ` [PATCH v3 11/11] ARM: tegra: add DC interconnections for Tegra114 Svyatoslav Ryhel
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=15510199.O9o76ZdvQC@senjougahara \
--to=mperttunen@nvidia.com \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=myungjoo.ham@samsung.com \
--cc=pgaikwad@nvidia.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.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