[PATCH v5 0/6] thermal: tegra: add SOCTHERM support for Tegra114

Svyatoslav Ryhel posted 6 patches 1 month ago
.../thermal/nvidia,tegra124-soctherm.yaml     |   2 +
arch/arm/boot/dts/nvidia/tegra114.dtsi        | 197 +++++++++++++++++
drivers/soc/tegra/fuse/fuse-tegra30.c         | 122 ++++++++++
drivers/thermal/tegra/Makefile                |   1 +
drivers/thermal/tegra/soctherm-fuse.c         |  18 +-
drivers/thermal/tegra/soctherm.c              |  13 ++
drivers/thermal/tegra/soctherm.h              |  11 +-
drivers/thermal/tegra/tegra114-soctherm.c     | 209 ++++++++++++++++++
drivers/thermal/tegra/tegra124-soctherm.c     |   4 +
drivers/thermal/tegra/tegra132-soctherm.c     |   4 +
drivers/thermal/tegra/tegra210-soctherm.c     |   4 +
.../dt-bindings/thermal/tegra114-soctherm.h   |  19 ++
12 files changed, 597 insertions(+), 7 deletions(-)
create mode 100644 drivers/thermal/tegra/tegra114-soctherm.c
create mode 100644 include/dt-bindings/thermal/tegra114-soctherm.h
[PATCH v5 0/6] thermal: tegra: add SOCTHERM support for Tegra114
Posted by Svyatoslav Ryhel 1 month ago
SOCTHERM is thermal sensor and thermal throttling controller found in Tegra
SoC starting from Tegra114. Existing Tegra124 setup is mostly compatible
with Tegra114 and needs only a few slight adjustmets of fuse calibration
process.

---
Changes in v2:
- no changes, resend.

Changes in v3:
- expanded desciption of "thermal: tegra: soctherm-fuse: parametrize
  configuration further" commit
- changes title of "thermal: tegra: soctherm-fuse: parametrize
  configuration further" to "thermal: tegra: soctherm-fuse: prepare
  calibration for Tegra114 support"
- Tegra11x > Tegra114 and Tegra12x > Tegra124
- ft and cp shift bits dropped
- clarified tegra114 precision
- lower_precision > use_lower_precision
- nominal calibration ft and cp hardcoded into SoC specific structures
- added tegra114-soctherm header into dt-bindings

Changes in v4:
- fixed Tegra124/132/210 cp mask
- dropped TEGRA114_SOCTHERM_SENSOR_NUM from header
- TEGRA_SOCTHERM_THROT_LEVEL_ made SoC specific
- adjusted soctherm node and inclusions in tegra114.dtsi
- dropped use_lower_presision and nominal_calib_cp options

Changes in v5:
- fixed CPU and GPU hotspot offset values
- added static_assert()s to assert the TEGRA114_* and TEGRA124_*
  counterparts are equal
---

Svyatoslav Ryhel (6):
  soc: tegra: fuse: add Tegra114 nvmem cells and fuse lookups
  dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management
    System
  thermal: tegra: soctherm-fuse: prepare calibration for Tegra114
    support
  dt-bindings: thermal: add Tegra114 soctherm header
  thermal: tegra: add Tegra114 specific SOCTHERM driver
  ARM: tegra: Add SOCTHERM support on Tegra114

 .../thermal/nvidia,tegra124-soctherm.yaml     |   2 +
 arch/arm/boot/dts/nvidia/tegra114.dtsi        | 197 +++++++++++++++++
 drivers/soc/tegra/fuse/fuse-tegra30.c         | 122 ++++++++++
 drivers/thermal/tegra/Makefile                |   1 +
 drivers/thermal/tegra/soctherm-fuse.c         |  18 +-
 drivers/thermal/tegra/soctherm.c              |  13 ++
 drivers/thermal/tegra/soctherm.h              |  11 +-
 drivers/thermal/tegra/tegra114-soctherm.c     | 209 ++++++++++++++++++
 drivers/thermal/tegra/tegra124-soctherm.c     |   4 +
 drivers/thermal/tegra/tegra132-soctherm.c     |   4 +
 drivers/thermal/tegra/tegra210-soctherm.c     |   4 +
 .../dt-bindings/thermal/tegra114-soctherm.h   |  19 ++
 12 files changed, 597 insertions(+), 7 deletions(-)
 create mode 100644 drivers/thermal/tegra/tegra114-soctherm.c
 create mode 100644 include/dt-bindings/thermal/tegra114-soctherm.h

-- 
2.48.1
Re: [PATCH v5 0/6] thermal: tegra: add SOCTHERM support for Tegra114
Posted by Thierry Reding 3 weeks ago
On Thu, Aug 28, 2025 at 08:50:58AM +0300, Svyatoslav Ryhel wrote:
> SOCTHERM is thermal sensor and thermal throttling controller found in Tegra
> SoC starting from Tegra114. Existing Tegra124 setup is mostly compatible
> with Tegra114 and needs only a few slight adjustmets of fuse calibration
> process.
> 
> ---
> Changes in v2:
> - no changes, resend.
> 
> Changes in v3:
> - expanded desciption of "thermal: tegra: soctherm-fuse: parametrize
>   configuration further" commit
> - changes title of "thermal: tegra: soctherm-fuse: parametrize
>   configuration further" to "thermal: tegra: soctherm-fuse: prepare
>   calibration for Tegra114 support"
> - Tegra11x > Tegra114 and Tegra12x > Tegra124
> - ft and cp shift bits dropped
> - clarified tegra114 precision
> - lower_precision > use_lower_precision
> - nominal calibration ft and cp hardcoded into SoC specific structures
> - added tegra114-soctherm header into dt-bindings
> 
> Changes in v4:
> - fixed Tegra124/132/210 cp mask
> - dropped TEGRA114_SOCTHERM_SENSOR_NUM from header
> - TEGRA_SOCTHERM_THROT_LEVEL_ made SoC specific
> - adjusted soctherm node and inclusions in tegra114.dtsi
> - dropped use_lower_presision and nominal_calib_cp options
> 
> Changes in v5:
> - fixed CPU and GPU hotspot offset values
> - added static_assert()s to assert the TEGRA114_* and TEGRA124_*
>   counterparts are equal
> ---
> 
> Svyatoslav Ryhel (6):
>   soc: tegra: fuse: add Tegra114 nvmem cells and fuse lookups
>   dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management
>     System
>   thermal: tegra: soctherm-fuse: prepare calibration for Tegra114
>     support
>   dt-bindings: thermal: add Tegra114 soctherm header
>   thermal: tegra: add Tegra114 specific SOCTHERM driver
>   ARM: tegra: Add SOCTHERM support on Tegra114

Hi Daniel,

there's a build-time dependency on patch 4 in both patches 5 and 6. Do
you want to pick up patches 2-5 from this series and I pick up patch 1
and hold off on applying patch 6 until after the merge window? We could
also do a shared branch, but it may not be worth the extra hassle.

Thanks,
Thierry
Re: [PATCH v5 0/6] thermal: tegra: add SOCTHERM support for Tegra114
Posted by Daniel Lezcano 3 weeks ago
On 11/09/2025 18:27, Thierry Reding wrote:
> On Thu, Aug 28, 2025 at 08:50:58AM +0300, Svyatoslav Ryhel wrote:
>> SOCTHERM is thermal sensor and thermal throttling controller found in Tegra
>> SoC starting from Tegra114. Existing Tegra124 setup is mostly compatible
>> with Tegra114 and needs only a few slight adjustmets of fuse calibration
>> process.
>>
>> ---
>> Changes in v2:
>> - no changes, resend.
>>
>> Changes in v3:
>> - expanded desciption of "thermal: tegra: soctherm-fuse: parametrize
>>    configuration further" commit
>> - changes title of "thermal: tegra: soctherm-fuse: parametrize
>>    configuration further" to "thermal: tegra: soctherm-fuse: prepare
>>    calibration for Tegra114 support"
>> - Tegra11x > Tegra114 and Tegra12x > Tegra124
>> - ft and cp shift bits dropped
>> - clarified tegra114 precision
>> - lower_precision > use_lower_precision
>> - nominal calibration ft and cp hardcoded into SoC specific structures
>> - added tegra114-soctherm header into dt-bindings
>>
>> Changes in v4:
>> - fixed Tegra124/132/210 cp mask
>> - dropped TEGRA114_SOCTHERM_SENSOR_NUM from header
>> - TEGRA_SOCTHERM_THROT_LEVEL_ made SoC specific
>> - adjusted soctherm node and inclusions in tegra114.dtsi
>> - dropped use_lower_presision and nominal_calib_cp options
>>
>> Changes in v5:
>> - fixed CPU and GPU hotspot offset values
>> - added static_assert()s to assert the TEGRA114_* and TEGRA124_*
>>    counterparts are equal
>> ---
>>
>> Svyatoslav Ryhel (6):
>>    soc: tegra: fuse: add Tegra114 nvmem cells and fuse lookups
>>    dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management
>>      System
>>    thermal: tegra: soctherm-fuse: prepare calibration for Tegra114
>>      support
>>    dt-bindings: thermal: add Tegra114 soctherm header
>>    thermal: tegra: add Tegra114 specific SOCTHERM driver
>>    ARM: tegra: Add SOCTHERM support on Tegra114
> 
> Hi Daniel,
> 
> there's a build-time dependency on patch 4 in both patches 5 and 6. Do
> you want to pick up patches 2-5 from this series and I pick up patch 1
> and hold off on applying patch 6 until after the merge window? We could
> also do a shared branch, but it may not be worth the extra hassle.

I can take the patches 2-5. Regarding a shared branch or wait for the 
next version, I would prefer the latter

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH v5 0/6] thermal: tegra: add SOCTHERM support for Tegra114
Posted by Thierry Reding 3 weeks ago
On Thu, Sep 11, 2025 at 08:56:12PM +0200, Daniel Lezcano wrote:
> On 11/09/2025 18:27, Thierry Reding wrote:
> > On Thu, Aug 28, 2025 at 08:50:58AM +0300, Svyatoslav Ryhel wrote:
> > > SOCTHERM is thermal sensor and thermal throttling controller found in Tegra
> > > SoC starting from Tegra114. Existing Tegra124 setup is mostly compatible
> > > with Tegra114 and needs only a few slight adjustmets of fuse calibration
> > > process.
> > > 
> > > ---
> > > Changes in v2:
> > > - no changes, resend.
> > > 
> > > Changes in v3:
> > > - expanded desciption of "thermal: tegra: soctherm-fuse: parametrize
> > >    configuration further" commit
> > > - changes title of "thermal: tegra: soctherm-fuse: parametrize
> > >    configuration further" to "thermal: tegra: soctherm-fuse: prepare
> > >    calibration for Tegra114 support"
> > > - Tegra11x > Tegra114 and Tegra12x > Tegra124
> > > - ft and cp shift bits dropped
> > > - clarified tegra114 precision
> > > - lower_precision > use_lower_precision
> > > - nominal calibration ft and cp hardcoded into SoC specific structures
> > > - added tegra114-soctherm header into dt-bindings
> > > 
> > > Changes in v4:
> > > - fixed Tegra124/132/210 cp mask
> > > - dropped TEGRA114_SOCTHERM_SENSOR_NUM from header
> > > - TEGRA_SOCTHERM_THROT_LEVEL_ made SoC specific
> > > - adjusted soctherm node and inclusions in tegra114.dtsi
> > > - dropped use_lower_presision and nominal_calib_cp options
> > > 
> > > Changes in v5:
> > > - fixed CPU and GPU hotspot offset values
> > > - added static_assert()s to assert the TEGRA114_* and TEGRA124_*
> > >    counterparts are equal
> > > ---
> > > 
> > > Svyatoslav Ryhel (6):
> > >    soc: tegra: fuse: add Tegra114 nvmem cells and fuse lookups
> > >    dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management
> > >      System
> > >    thermal: tegra: soctherm-fuse: prepare calibration for Tegra114
> > >      support
> > >    dt-bindings: thermal: add Tegra114 soctherm header
> > >    thermal: tegra: add Tegra114 specific SOCTHERM driver
> > >    ARM: tegra: Add SOCTHERM support on Tegra114
> > 
> > Hi Daniel,
> > 
> > there's a build-time dependency on patch 4 in both patches 5 and 6. Do
> > you want to pick up patches 2-5 from this series and I pick up patch 1
> > and hold off on applying patch 6 until after the merge window? We could
> > also do a shared branch, but it may not be worth the extra hassle.
> 
> I can take the patches 2-5. Regarding a shared branch or wait for the next
> version, I would prefer the latter

Alright, let's do it that way. I've picked up patch 1. If you take
patches 2-5 now I'll pick up patch 6 once v6.18-rc1 has released.

Thanks,
Thierry
Re: [PATCH v5 0/6] thermal: tegra: add SOCTHERM support for Tegra114
Posted by Daniel Lezcano 2 weeks ago
On 12/09/2025 12:26, Thierry Reding wrote:
> On Thu, Sep 11, 2025 at 08:56:12PM +0200, Daniel Lezcano wrote:

[ ... ]

>>
>> I can take the patches 2-5. Regarding a shared branch or wait for the next
>> version, I would prefer the latter
> 
> Alright, let's do it that way. I've picked up patch 1. If you take
> patches 2-5 now I'll pick up patch 6 once v6.18-rc1 has released.

Applied 2-5, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog