[PATCH v6 1/3] dt-bindings: thermal: samsung: Adjust '#thermal-sensor-cells' to 1

Shin Son posted 3 patches 4 months, 1 week ago
There is a newer version of this series
[PATCH v6 1/3] dt-bindings: thermal: samsung: Adjust '#thermal-sensor-cells' to 1
Posted by Shin Son 4 months, 1 week ago
The ExynosAuto v920 SoC includes multiple TMU instances; each instance
monitors a subset of the SoC's up to 16 hardware thermal sensors.

Additionally, add myself to the bindings' maintainers list, as I plan
to actively work on the exynosautov920 TMU support and handle further
updates in this area.

Signed-off-by: Shin Son <shin.son@samsung.com>
---
 .../thermal/samsung,exynos-thermal.yaml       | 32 ++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
index 29a08b0729ee..f9b399a7b82f 100644
--- a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
@@ -8,6 +8,7 @@ title: Samsung Exynos SoC Thermal Management Unit (TMU)
 
 maintainers:
   - Krzysztof Kozlowski <krzk@kernel.org>
+  - Shin Son <shin.son@samsung.com>
 
 description: |
   For multi-instance tmu each instance should have an alias correctly numbered
@@ -27,6 +28,7 @@ properties:
       - samsung,exynos5420-tmu-ext-triminfo
       - samsung,exynos5433-tmu
       - samsung,exynos7-tmu
+      - samsung,exynosautov920-tmu
 
   clocks:
     minItems: 1
@@ -62,11 +64,17 @@ properties:
     minItems: 1
 
   '#thermal-sensor-cells':
-    const: 0
+    enum: [0, 1]
 
   vtmu-supply:
     description: The regulator node supplying voltage to TMU.
 
+  samsung,sensors:
+    description: Number of thermal sensors monitored by this TMU instance.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 0
+    maximum: 15
+
 required:
   - compatible
   - clocks
@@ -97,6 +105,8 @@ allOf:
         reg:
           minItems: 2
           maxItems: 2
+        '#thermal-sensor-cells':
+          const: 0
   - if:
       properties:
         compatible:
@@ -119,6 +129,8 @@ allOf:
         reg:
           minItems: 1
           maxItems: 1
+        '#thermal-sensor-cells':
+          const: 0
 
   - if:
       properties:
@@ -139,6 +151,24 @@ allOf:
         reg:
           minItems: 1
           maxItems: 1
+        '#thermal-sensor-cells':
+          const: 0
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynosautov920-tmu
+    then:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 1
+        reg:
+          minItems: 1
+          maxItems: 1
+        '#thermal-sensor-cells':
+          const: 1
 
 additionalProperties: false
 
-- 
2.50.1
Re: [PATCH v6 1/3] dt-bindings: thermal: samsung: Adjust '#thermal-sensor-cells' to 1
Posted by Krzysztof Kozlowski 4 months ago
On 30/09/2025 02:51, Shin Son wrote:
>          reg:
>            minItems: 1
>            maxItems: 1
> +        '#thermal-sensor-cells':
> +          const: 0
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: samsung,exynosautov920-tmu
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 1

You can drop minItems. Existing binding has it unnecessarily.

> +          maxItems: 1

You also need clock-names restriction, just like clocks or just ": false".

> +        reg:
> +          minItems: 1

This also drop.

> +          maxItems: 1
> +        '#thermal-sensor-cells':
> +          const: 1
>  


Rest looks fine, so with changes above:


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
RE: [PATCH v6 1/3] dt-bindings: thermal: samsung: Adjust '#thermal-sensor-cells' to 1
Posted by 손신 3 months, 3 weeks ago
Hello Krzysztof Kozlowski,

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> Sent: Friday, October 10, 2025 9:44 PM
> To: Shin Son <shin.son@samsung.com>; Bartlomiej Zolnierkiewicz
> <bzolnier@gmail.com>; Rafael J . Wysocki <rafael@kernel.org>; Daniel
> Lezcano <daniel.lezcano@linaro.org>; Zhang Rui <rui.zhang@intel.com>;
> Lukasz Luba <lukasz.luba@arm.com>; Rob Herring <robh@kernel.org>; Conor
> Dooley <conor+dt@kernel.org>; Alim Akhtar <alim.akhtar@samsung.com>;
> Henrik Grimler <henrik@grimler.se>
> Cc: linux-pm@vger.kernel.org; linux-samsung-soc@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v6 1/3] dt-bindings: thermal: samsung: Adjust
> '#thermal-sensor-cells' to 1
> 
> On 30/09/2025 02:51, Shin Son wrote:
> >          reg:
> >            minItems: 1
> >            maxItems: 1
> > +        '#thermal-sensor-cells':
> > +          const: 0
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: samsung,exynosautov920-tmu
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 1
> 
> You can drop minItems. Existing binding has it unnecessarily.

Ok, I'll drop it.

> 
> > +          maxItems: 1
> 
> You also need clock-names restriction, just like clocks or just ": false".
>

I'll add the clock-names restriction. Thanks.

 
> > +        reg:
> > +          minItems: 1
> 
> This also drop.

Ok, I'll also drop it.

 
> > +          maxItems: 1
> > +        '#thermal-sensor-cells':
> > +          const: 1
> >
> 
> 
> Rest looks fine, so with changes above:
> 
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Ok, I'll add the reviewer tag on the patches.

> 
> 
> Best regards,
> Krzysztof

Best regards,
Shin Son