devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add Thermal support for RZ/G2L
@ 2021-11-20 19:47 Biju Das
  2021-11-20 19:47 ` [PATCH v2 1/2] dt-bindings: thermal: Document Renesas RZ/G2L TSU Biju Das
  0 siblings, 1 reply; 3+ messages in thread
From: Biju Das @ 2021-11-20 19:47 UTC (permalink / raw)
  To: Rob Herring, Philipp Zabel
  Cc: Biju Das, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui, linux-pm, devicetree, Geert Uytterhoeven,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad,
	linux-renesas-soc

RZ/G2L SoC incorporates a thermal sensor unit (TSU) that measures
the temperature inside the LSI.
 
The thermal sensor in this unit measures temperatures in the range from
−40°C to 125°C with an accuracy of ±3°C. The TSU repeats measurement at
20-µs intervals, and automatically updates the results of measurement.

The TSU has no external pins as well as no interrupts.

This patch series aims to add TSU driver support for RZ/G2L SoC.

v1->v2:
 * Removed clk patch and dts pthes from this series
 * Removed devm_add_action_or_reset from probe.

Biju Das (2):
  dt-bindings: thermal: Document Renesas RZ/G2L TSU
  thermal/drivers: Add TSU driver for RZ/G2L

 .../bindings/thermal/rzg2l-thermal.yaml       |  76 ++++++
 drivers/thermal/Kconfig                       |   9 +
 drivers/thermal/Makefile                      |   1 +
 drivers/thermal/rzg2l_thermal.c               | 235 ++++++++++++++++++
 4 files changed, 321 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml
 create mode 100644 drivers/thermal/rzg2l_thermal.c

-- 
2.17.1


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

* [PATCH v2 1/2] dt-bindings: thermal: Document Renesas RZ/G2L TSU
  2021-11-20 19:47 [PATCH v2 0/2] Add Thermal support for RZ/G2L Biju Das
@ 2021-11-20 19:47 ` Biju Das
  2021-11-30  2:04   ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Biju Das @ 2021-11-20 19:47 UTC (permalink / raw)
  To: Rob Herring
  Cc: Biju Das, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui, linux-pm, devicetree, Geert Uytterhoeven,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad,
	linux-renesas-soc

Document the Thermal Sensor Unit(TSU) in the RZ/G2L SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2:
 * No change
---
 .../bindings/thermal/rzg2l-thermal.yaml       | 76 +++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml

diff --git a/Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml b/Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml
new file mode 100644
index 000000000000..ccab9511a042
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/rzg2l-thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RZ/G2L Thermal Sensor Unit
+
+description:
+  On RZ/G2L SoCs, the thermal sensor unit (TSU) measures the
+  temperature(Tj) inside the LSI.
+
+maintainers:
+  - Biju Das <biju.das.jz@bp.renesas.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - renesas,r9a07g044-tsu # RZ/G2{L,LC}
+      - const: renesas,rzg2l-tsu
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  "#thermal-sensor-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - power-domains
+  - resets
+  - "#thermal-sensor-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/r9a07g044-cpg.h>
+
+    tsu: thermal@10059400 {
+            compatible = "renesas,r9a07g044-tsu",
+                         "renesas,rzg2l-tsu";
+            reg = <0x10059400 0x400>;
+            clocks = <&cpg CPG_MOD R9A07G044_TSU_PCLK>;
+            resets = <&cpg R9A07G044_TSU_PRESETN>;
+            power-domains = <&cpg>;
+            #thermal-sensor-cells = <1>;
+    };
+
+    thermal-zones {
+            cpu-thermal {
+                    polling-delay-passive = <250>;
+                    polling-delay = <1000>;
+                    thermal-sensors = <&tsu 0>;
+
+                    trips {
+                            sensor_crit: sensor-crit {
+                                    temperature = <125000>;
+                                    hysteresis = <1000>;
+                                    type = "critical";
+                            };
+                    };
+            };
+    };
-- 
2.17.1


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

* Re: [PATCH v2 1/2] dt-bindings: thermal: Document Renesas RZ/G2L TSU
  2021-11-20 19:47 ` [PATCH v2 1/2] dt-bindings: thermal: Document Renesas RZ/G2L TSU Biju Das
@ 2021-11-30  2:04   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2021-11-30  2:04 UTC (permalink / raw)
  To: Biju Das
  Cc: Geert Uytterhoeven, Prabhakar Mahadev Lad, linux-pm, Biju Das,
	Rafael J. Wysocki, Zhang Rui, Rob Herring, Daniel Lezcano,
	Amit Kucheria, devicetree, linux-renesas-soc, Chris Paterson

On Sat, 20 Nov 2021 19:47:10 +0000, Biju Das wrote:
> Document the Thermal Sensor Unit(TSU) in the RZ/G2L SoC.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2:
>  * No change
> ---
>  .../bindings/thermal/rzg2l-thermal.yaml       | 76 +++++++++++++++++++
>  1 file changed, 76 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-11-30  2:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-20 19:47 [PATCH v2 0/2] Add Thermal support for RZ/G2L Biju Das
2021-11-20 19:47 ` [PATCH v2 1/2] dt-bindings: thermal: Document Renesas RZ/G2L TSU Biju Das
2021-11-30  2:04   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).