All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/9] imx: thermal: Allow trip point configuration from DT
@ 2022-06-17  7:08 ` Francesco Dolcini
  0 siblings, 0 replies; 42+ messages in thread
From: Francesco Dolcini @ 2022-06-17  7:08 UTC (permalink / raw)
  To: Daniel Lezcano, Rob Herring, Rafael J. Wysocki,
	Krzysztof Kozlowski, Shawn Guo, Marco Felsch, Anson Huang
  Cc: Francesco Dolcini, Amit Kucheria, Zhang Rui, linux-pm,
	devicetree, Pengutronix Kernel Team, Sascha Hauer, Fabio Estevam,
	NXP Linux Team, linux-arm-kernel

This series allows to specify the imx thermal drivers trip point from the device tree,
without this change the threshold are hard-coded and this might not be correct given the
thermal design of the final system.

This change is backward compatible with the existing device tree, and even
with this change in by default the thresholds are the same as before.

Toradex board are also updated to use a system-specific thresholds.

Discussion on the current design is here:
https://lore.kernel.org/all/4ba1d7d2-3e8c-ba60-37fd-9598f415c076@linaro.org/

One side note, after this change the dtbs checker starts complaining with this message

```
linux/arch/arm/boot/dts/imx6dl-alti6p.dtb: tempmon: '#thermal-sensor-cells' does not match any of the regexes: '^(automotive|commercial|extended-commercial|industrial)-thermal$', 'pinctrl-[0-9]+'
	From schema: linux/Documentation/devicetree/bindings/thermal/imx-thermal.yaml
```

to my understanding this is just a side effect, '#thermal-sensor-cells' is not changed in
any way by this series. I can fix that, I wonder if I should remove the property from the
imx dtsi files or add it to the binding yaml definition, not sure about it.
Anybody can advise?

Changes in v2:
 - fix build error without CONFIG_THERMAL_OF
 - more verbose error reporting in case the dts is not correct
 - additional comment on the threshold fixup in case the passive threshold is
   higher than critical
 - while parsing the dts thermal, return immediately if the node is not there


Francesco Dolcini (9):
  dt-bindings: thermal: Define trips node in $defs
  thermal: thermal: Export OF trip helper function
  dt-bindings: thermal: imx: Add trips point
  imx: thermal: Configure trip point from DT
  ARM: dts: imx[67]: Add trips points
  ARM: dts: imx6qdl-apalis: Set CPU critical trip point
  ARM: dts: imx7-colibri: Set CPU critical trip point
  ARM: dts: imx6ull-colibri: Set CPU critical trip point
  ARM: dts: imx6qdl-colibri: Set CPU critical trip point

 .../bindings/thermal/imx-thermal.yaml         |  27 ++++
 .../bindings/thermal/thermal-zones.yaml       | 130 +++++++++---------
 arch/arm/boot/dts/imx-thermal.dtsi            |  61 ++++++++
 arch/arm/boot/dts/imx6qdl-apalis.dtsi         |  12 ++
 arch/arm/boot/dts/imx6qdl-colibri.dtsi        |  12 ++
 arch/arm/boot/dts/imx6qdl.dtsi                |   2 +
 arch/arm/boot/dts/imx6sl.dtsi                 |   2 +
 arch/arm/boot/dts/imx6sll.dtsi                |   2 +
 arch/arm/boot/dts/imx6sx.dtsi                 |   2 +
 arch/arm/boot/dts/imx6ul.dtsi                 |   2 +
 arch/arm/boot/dts/imx6ull-colibri.dtsi        |  12 ++
 arch/arm/boot/dts/imx7-colibri.dtsi           |  12 ++
 arch/arm/boot/dts/imx7s.dtsi                  |   2 +
 drivers/thermal/imx_thermal.c                 |  58 ++++++++
 drivers/thermal/thermal_core.h                |   7 +
 drivers/thermal/thermal_of.c                  |   5 +-
 16 files changed, 283 insertions(+), 65 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx-thermal.dtsi

-- 
2.25.1


^ permalink raw reply	[flat|nested] 42+ messages in thread
* [PATCH v1 0/9] imx: thermal: Allow trip point configuration from DT
@ 2022-06-15  9:47 ` Francesco Dolcini
  0 siblings, 0 replies; 42+ messages in thread
From: Francesco Dolcini @ 2022-06-15  9:47 UTC (permalink / raw)
  To: Daniel Lezcano, Rob Herring, Rafael J. Wysocki,
	Krzysztof Kozlowski, Shawn Guo, Marco Felsch, Anson Huang
  Cc: Francesco Dolcini, Amit Kucheria, Zhang Rui, linux-pm,
	devicetree, Pengutronix Kernel Team, Sascha Hauer, Fabio Estevam,
	NXP Linux Team, linux-arm-kernel

This series allows to specify the imx thermal drivers trip point from the device tree,
without this change the threshold are hard-coded and this might not be correct given the
thermal design of the final system.

This change is backward compatible with the existing device tree, and even
with this change in by default the thresholds are the same as before.

Toradex board are also updated to use a system-specific thresholds.

Discussion on the current design is here:
https://lore.kernel.org/all/4ba1d7d2-3e8c-ba60-37fd-9598f415c076@linaro.org/

One side note, after this change the dtbs checker starts complaining with this message

```
linux/arch/arm/boot/dts/imx6dl-alti6p.dtb: tempmon: '#thermal-sensor-cells' does not match any of the regexes: '^(automotive|commercial|extended-commercial|industrial)-thermal$', 'pinctrl-[0-9]+'
	From schema: linux/Documentation/devicetree/bindings/thermal/imx-thermal.yaml
```

to my understanding this is just a side effect, '#thermal-sensor-cells' is not changed in
any way by this series. I can fix that, I wonder if I should remove the property from the
imx dtsi files or add it to the binding yaml definition, not sure about it.
Anybody can advise?


Francesco Dolcini (9):
  dt-bindings: thermal: Define trips node in $defs
  thermal: thermal: Export OF trip helper function
  dt-bindings: thermal: imx: Add trips point
  imx: thermal: Configure trip point from DT
  ARM: dts: imx[67]: Add trips points
  ARM: dts: imx6qdl-apalis: Set CPU critical trip point
  ARM: dts: imx7-colibri: Set CPU critical trip point
  ARM: dts: imx6ull-colibri: Set CPU critical trip point
  ARM: dts: imx6qdl-colibri: Set CPU critical trip point

 .../bindings/thermal/imx-thermal.yaml         |  27 ++++
 .../bindings/thermal/thermal-zones.yaml       | 130 +++++++++---------
 arch/arm/boot/dts/imx-thermal.dtsi            |  61 ++++++++
 arch/arm/boot/dts/imx6qdl-apalis.dtsi         |  12 ++
 arch/arm/boot/dts/imx6qdl-colibri.dtsi        |  12 ++
 arch/arm/boot/dts/imx6qdl.dtsi                |   2 +
 arch/arm/boot/dts/imx6sl.dtsi                 |   2 +
 arch/arm/boot/dts/imx6sll.dtsi                |   2 +
 arch/arm/boot/dts/imx6sx.dtsi                 |   2 +
 arch/arm/boot/dts/imx6ul.dtsi                 |   2 +
 arch/arm/boot/dts/imx6ull-colibri.dtsi        |  12 ++
 arch/arm/boot/dts/imx7-colibri.dtsi           |  12 ++
 arch/arm/boot/dts/imx7s.dtsi                  |   2 +
 drivers/thermal/imx_thermal.c                 |  49 +++++++
 drivers/thermal/thermal_core.h                |   7 +
 drivers/thermal/thermal_of.c                  |   5 +-
 16 files changed, 274 insertions(+), 65 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx-thermal.dtsi

-- 
2.25.1



^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2022-06-20 18:21 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17  7:08 [PATCH v1 0/9] imx: thermal: Allow trip point configuration from DT Francesco Dolcini
2022-06-17  7:08 ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 1/9] dt-bindings: thermal: Define trips node in $defs Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-18  1:02   ` Krzysztof Kozlowski
2022-06-18  1:02     ` Krzysztof Kozlowski
2022-06-20 15:48     ` Francesco Dolcini
2022-06-20 15:48       ` Francesco Dolcini
2022-06-20 16:44       ` Krzysztof Kozlowski
2022-06-20 16:44         ` Krzysztof Kozlowski
2022-06-20 17:43         ` Francesco Dolcini
2022-06-20 17:43           ` Francesco Dolcini
2022-06-20 18:05           ` Krzysztof Kozlowski
2022-06-20 18:05             ` Krzysztof Kozlowski
2022-06-20 18:19             ` Francesco Dolcini
2022-06-20 18:19               ` Francesco Dolcini
2022-06-20 16:45       ` Krzysztof Kozlowski
2022-06-20 16:45         ` Krzysztof Kozlowski
2022-06-20 17:46         ` Francesco Dolcini
2022-06-20 17:46           ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 2/9] thermal: thermal: Export OF trip helper function Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 3/9] dt-bindings: thermal: imx: Add trips point Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 4/9] imx: thermal: Configure trip point from DT Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 5/9] ARM: dts: imx[67]: Add trips points Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 6/9] ARM: dts: imx6qdl-apalis: Set CPU critical trip point Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 7/9] ARM: dts: imx7-colibri: " Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 8/9] ARM: dts: imx6ull-colibri: " Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-17  7:08 ` [PATCH v2 9/9] ARM: dts: imx6qdl-colibri: " Francesco Dolcini
2022-06-17  7:08   ` Francesco Dolcini
2022-06-18  0:45 ` [PATCH v1 0/9] imx: thermal: Allow trip point configuration from DT Krzysztof Kozlowski
2022-06-18  0:45   ` Krzysztof Kozlowski
  -- strict thread matches above, loose matches on Subject: below --
2022-06-15  9:47 Francesco Dolcini
2022-06-15  9:47 ` Francesco Dolcini
2022-06-15 10:42 ` Marco Felsch
2022-06-15 10:42   ` Marco Felsch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.