mbox series

[v2,0/2] Enable i.MX7 SOLO temperature sensor

Message ID 20220124082803.94286-1-francesco.dolcini@toradex.com
Headers show
Series Enable i.MX7 SOLO temperature sensor | expand

Message

Francesco Dolcini Jan. 24, 2022, 8:28 a.m. UTC
To be able to read the T junction on i.MX CPU the imx-cpufreq-dt needs to be
loaded, however this is currently not the case for i.MX7S given that it does
have only one operating frequency.

Add "fsl,imx7s" to cpufreq-dt-platdev blocklist and a single frequency
operating point to the CPU.

With that it is now possible to correctly read the CPU T junction.

Tested on Toradex Colibri iMX7S

[    6.232577] imx-cpufreq-dt imx-cpufreq-dt: cpu speed grade 0 mkt segment 1 supported-hw 0x1 0x2
...
[    6.880624] imx_thermal 30360000.anatop:tempmon: Extended Commercial CPU temperature grade - max:105C critical:100C passive:95C

root@colibri-imx7-02983025:~# cat /sys/class/thermal/thermal_zone0/temp 
38000

v2:
 - removed empty new line
 - rebased and tested on v5.17-rc1


Denys Drozdov (1):
  ARM: dts: imx7s: Define operating points table for cpufreq

Stefan Agner (1):
  cpufreq: Add i.MX7S to cpufreq-dt-platdev blocklist

 arch/arm/boot/dts/imx7s.dtsi         | 16 ++++++++++++++++
 drivers/cpufreq/cpufreq-dt-platdev.c |  1 +
 2 files changed, 17 insertions(+)

Comments

Fabio Estevam Feb. 2, 2022, 6:15 p.m. UTC | #1
On Mon, Jan 24, 2022 at 5:28 AM Francesco Dolcini
<francesco.dolcini@toradex.com> wrote:
>
> From: Stefan Agner <stefan.agner@toradex.com>
>
> The i.MX 7Solo currently does not have multiple operating points,
> however, in order for the i.MX Thermal driver to successfully probe
> a cpufreq device is required. Add it to the cpufreq-dt-platdev
> driver's blocklist to allow using imx-cpufreq-dt.
>
> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> Cc: Stefan Agner <stefan@agner.ch>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>