[PATCH v1 1/3] drivers: cpufreq: add Tegra 4 support

Svyatoslav Ryhel posted 3 patches 9 months ago
There is a newer version of this series
[PATCH v1 1/3] drivers: cpufreq: add Tegra 4 support
Posted by Svyatoslav Ryhel 9 months ago
Tegra 4 is fully compatible with existing Tegra K1 cpufreq driver.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
 drivers/cpufreq/tegra124-cpufreq.c   | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 18942bfe9c95..7d15a1224d37 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -140,6 +140,7 @@ static const struct of_device_id blocklist[] __initconst = {
 
 	{ .compatible = "nvidia,tegra20", },
 	{ .compatible = "nvidia,tegra30", },
+	{ .compatible = "nvidia,tegra114", },
 	{ .compatible = "nvidia,tegra124", },
 	{ .compatible = "nvidia,tegra210", },
 	{ .compatible = "nvidia,tegra234", },
diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
index 514146d98bca..6ff2ccc08e5e 100644
--- a/drivers/cpufreq/tegra124-cpufreq.c
+++ b/drivers/cpufreq/tegra124-cpufreq.c
@@ -189,8 +189,9 @@ static int __init tegra_cpufreq_init(void)
 	int ret;
 	struct platform_device *pdev;
 
-	if (!(of_machine_is_compatible("nvidia,tegra124") ||
-		of_machine_is_compatible("nvidia,tegra210")))
+	if (!(of_machine_is_compatible("nvidia,tegra114") ||
+	      of_machine_is_compatible("nvidia,tegra124") ||
+	      of_machine_is_compatible("nvidia,tegra210")))
 		return -ENODEV;
 
 	/*
-- 
2.43.0
Re: [PATCH v1 1/3] drivers: cpufreq: add Tegra 4 support
Posted by Mikko Perttunen 3 months, 3 weeks ago
On Friday, March 21, 2025 6:55 PM Svyatoslav Ryhel wrote:
> Tegra 4 is fully compatible with existing Tegra K1 cpufreq driver.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
>  drivers/cpufreq/tegra124-cpufreq.c   | 5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c
> b/drivers/cpufreq/cpufreq-dt-platdev.c index 18942bfe9c95..7d15a1224d37
> 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -140,6 +140,7 @@ static const struct of_device_id blocklist[] __initconst
> = {
> 
>  	{ .compatible = "nvidia,tegra20", },
>  	{ .compatible = "nvidia,tegra30", },
> +	{ .compatible = "nvidia,tegra114", },
>  	{ .compatible = "nvidia,tegra124", },
>  	{ .compatible = "nvidia,tegra210", },
>  	{ .compatible = "nvidia,tegra234", },
> diff --git a/drivers/cpufreq/tegra124-cpufreq.c
> b/drivers/cpufreq/tegra124-cpufreq.c index 514146d98bca..6ff2ccc08e5e
> 100644
> --- a/drivers/cpufreq/tegra124-cpufreq.c
> +++ b/drivers/cpufreq/tegra124-cpufreq.c
> @@ -189,8 +189,9 @@ static int __init tegra_cpufreq_init(void)
>  	int ret;
>  	struct platform_device *pdev;
> 
> -	if (!(of_machine_is_compatible("nvidia,tegra124") ||
> -		of_machine_is_compatible("nvidia,tegra210")))
> +	if (!(of_machine_is_compatible("nvidia,tegra114") ||
> +	      of_machine_is_compatible("nvidia,tegra124") ||
> +	      of_machine_is_compatible("nvidia,tegra210")))
>  		return -ENODEV;
> 
>  	/*

I also prefer using Tegra114 and Tegra124 in the commit message, perhaps with 
the marketing names in parentheses, as the chip IDs are more consistent and 
(IMO) easier to decipher than the product names.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Re: [PATCH v1 1/3] drivers: cpufreq: add Tegra 4 support
Posted by Svyatoslav Ryhel 3 months, 3 weeks ago
пт, 22 серп. 2025 р. о 05:58 Mikko Perttunen <mperttunen@nvidia.com> пише:
>
> On Friday, March 21, 2025 6:55 PM Svyatoslav Ryhel wrote:
> > Tegra 4 is fully compatible with existing Tegra K1 cpufreq driver.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
> >  drivers/cpufreq/tegra124-cpufreq.c   | 5 +++--
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c
> > b/drivers/cpufreq/cpufreq-dt-platdev.c index 18942bfe9c95..7d15a1224d37
> > 100644
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -140,6 +140,7 @@ static const struct of_device_id blocklist[] __initconst
> > = {
> >
> >       { .compatible = "nvidia,tegra20", },
> >       { .compatible = "nvidia,tegra30", },
> > +     { .compatible = "nvidia,tegra114", },
> >       { .compatible = "nvidia,tegra124", },
> >       { .compatible = "nvidia,tegra210", },
> >       { .compatible = "nvidia,tegra234", },
> > diff --git a/drivers/cpufreq/tegra124-cpufreq.c
> > b/drivers/cpufreq/tegra124-cpufreq.c index 514146d98bca..6ff2ccc08e5e
> > 100644
> > --- a/drivers/cpufreq/tegra124-cpufreq.c
> > +++ b/drivers/cpufreq/tegra124-cpufreq.c
> > @@ -189,8 +189,9 @@ static int __init tegra_cpufreq_init(void)
> >       int ret;
> >       struct platform_device *pdev;
> >
> > -     if (!(of_machine_is_compatible("nvidia,tegra124") ||
> > -             of_machine_is_compatible("nvidia,tegra210")))
> > +     if (!(of_machine_is_compatible("nvidia,tegra114") ||
> > +           of_machine_is_compatible("nvidia,tegra124") ||
> > +           of_machine_is_compatible("nvidia,tegra210")))
> >               return -ENODEV;
> >
> >       /*
>
> I also prefer using Tegra114 and Tegra124 in the commit message, perhaps with
> the marketing names in parentheses, as the chip IDs are more consistent and
> (IMO) easier to decipher than the product names.
>
> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
>

Yes, this was applied in v2 already and all other my Tegra patches,
this exact commit was already picked from v2.
Re: [PATCH v1 1/3] drivers: cpufreq: add Tegra 4 support
Posted by Thierry Reding 6 months, 1 week ago
On Fri, Mar 21, 2025 at 11:55:54AM +0200, Svyatoslav Ryhel wrote:
> Tegra 4 is fully compatible with existing Tegra K1 cpufreq driver.

It might be confusing to refer to this as both Tegra 4 and Tegra114. I
think it'd be better to stick with just Tegra114. Otherwise:

Reviewed-by: Thierry Reding <treding@nvidia.com>
Re: [PATCH v1 1/3] drivers: cpufreq: add Tegra 4 support
Posted by Svyatoslav Ryhel 4 months, 1 week ago
вт, 10 черв. 2025 р. о 14:09 Thierry Reding <thierry.reding@gmail.com> пише:
>
> On Fri, Mar 21, 2025 at 11:55:54AM +0200, Svyatoslav Ryhel wrote:
> > Tegra 4 is fully compatible with existing Tegra K1 cpufreq driver.
>
> It might be confusing to refer to this as both Tegra 4 and Tegra114. I
> think it'd be better to stick with just Tegra114. Otherwise:
>
> Reviewed-by: Thierry Reding <treding@nvidia.com>

Your review applies only to this patch to to entire series?