Skip to contentSkip to conversation

dt-bindings: thermal: mediatek,thermal: document AUXADC 32k clock

PATCH Superseded Rafał Miłecki 2 participants 2 messages Jan 1, 2024 – Jan 4, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: thermal: mediatek,thermal: document AUXADC 32k clock

From: Rafał Miłecki <[email protected]>

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

---
 .../bindings/thermal/mediatek,thermal.yaml    | 24 ++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml +21 -3
index d96a2e32bd8f..a76be9c47fb5 100644
@@ -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:
Signature · 1 line
2.35.3
#1 lore raw
Quoted 13 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

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

Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml +6 -0
+allOf:
+  - $ref: thermal-sensor.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:

Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml required: · line 95

Quoted 10 lines
Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml +10 -0
+            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