devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: thermal: mediatek,thermal: document AUXADC 32k clock
@ 2024-01-01 20:51 Rafał Miłecki
  2024-01-04  8:04 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2024-01-01 20:51 UTC (permalink / raw)
  To: Rafael J . Wysocki, Daniel Lezcano, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Zhang Rui, Lukasz Luba, Matthias Brugger,
	AngeloGioacchino Del Regno, Sascha Hauer, linux-pm, devicetree,
	linux-arm-kernel, linux-mediatek, Rafał Miłecki,
	Daniel Golle, Sam Shih

From: Rafał Miłecki <rafal@milecki.pl>

SoCs MT7981 and MT7986 include a newer thermal block (V3) that requires
enabling one more clock called AUXADC 32k. Require it in binding.

Cc: Daniel Golle <daniel@makrotopia.org>
Cc: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../bindings/thermal/mediatek,thermal.yaml    | 24 ++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
index d96a2e32bd8f..a76be9c47fb5 100644
--- a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
@@ -15,9 +15,6 @@ description:
   controls a mux in the apmixedsys register space via AHB bus accesses, so a
   phandle to the APMIXEDSYS is also needed.
 
-allOf:
-  - $ref: thermal-sensor.yaml#
-
 properties:
   compatible:
     enum:
@@ -38,14 +35,18 @@ properties:
     maxItems: 1
 
   clocks:
+    minItems: 2
     items:
       - description: Main clock needed for register access
       - description: The AUXADC clock
+      - description: AUXADC 32k clock
 
   clock-names:
+    minItems: 2
     items:
       - const: therm
       - const: auxadc
+      - const: adc_32k
 
   mediatek,auxadc:
     $ref: /schemas/types.yaml#/definitions/phandle
@@ -76,6 +77,23 @@ required:
   - mediatek,auxadc
   - mediatek,apmixedsys
 
+allOf:
+  - $ref: thermal-sensor.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt7981-thermal
+              - mediatek,mt7986-thermal
+    then:
+      properties:
+        clocks:
+          minItems: 3
+
+        clock-names:
+          minItems: 3
+
 unevaluatedProperties: false
 
 examples:
-- 
2.35.3


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

* Re: [PATCH] dt-bindings: thermal: mediatek,thermal: document AUXADC 32k clock
  2024-01-01 20:51 [PATCH] dt-bindings: thermal: mediatek,thermal: document AUXADC 32k clock Rafał Miłecki
@ 2024-01-04  8:04 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-04  8:04 UTC (permalink / raw)
  To: Rafał Miłecki, Rafael J . Wysocki, Daniel Lezcano,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Zhang Rui, Lukasz Luba, Matthias Brugger,
	AngeloGioacchino Del Regno, Sascha Hauer, linux-pm, devicetree,
	linux-arm-kernel, linux-mediatek, Rafał Miłecki,
	Daniel Golle, Sam Shih

On 01/01/2024 21:51, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> SoCs MT7981 and MT7986 include a newer thermal block (V3) that requires
> enabling one more clock called AUXADC 32k. Require it in binding.
> 

>  
> +allOf:
> +  - $ref: thermal-sensor.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mt7981-thermal
> +              - mediatek,mt7986-thermal
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 3
> +
> +        clock-names:
> +          minItems: 3

else:
Is the clock valid for other variants?

Best regards,
Krzysztof


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

end of thread, other threads:[~2024-01-04  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-01 20:51 [PATCH] dt-bindings: thermal: mediatek,thermal: document AUXADC 32k clock Rafał Miłecki
2024-01-04  8:04 ` Krzysztof Kozlowski

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).