[PATCH v2 1/2] dt-bindings: thermal: amlogic: describe bus clock for t7-thermal

From: Ronald Claveau via B4 Relay

Date: Wed Sep 23 2026 - 11:36:00 EST


From: Ronald Claveau <linux-kernel-dev@xxxxxxxx>

The t7 thermal sensor needs a bus clock, in addition to the existing
functional clock, to gate register access to the sensor. This bus
clock is specific to each sensor, unlike the functional clock which
is shared between sensors. The current binding only describes a
single unnamed clock and therefore cannot represent this hardware
requirement, so add a second clock entry and clock-names for clarity.
Make the second clock mandatory for the t7-thermal compatible only,
via an additional if/then/else, to avoid breaking other Amlogic SoCs
that still use a single clock. Update the t7 example to match.

Fixes: b1c8ccdbd4e9 ("dt-bindings: thermal: amlogic: Add support for T7")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
Signed-off-by: Ronald Claveau <linux-kernel-dev@xxxxxxxx>
---
.../bindings/thermal/amlogic,thermal.yaml | 29 ++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 8cfa44dcda58c..e72cb39ac635d 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -32,7 +32,15 @@ properties:
maxItems: 1

clocks:
- maxItems: 1
+ minItems: 1
+ items:
+ - description: Bus clock, gates register access to the sensor.
+ - description: Functional clock of the temperature sensor, shared between sensors.
+
+ clock-names:
+ items:
+ - const: bus
+ - const: core

power-domains:
maxItems: 1
@@ -72,6 +80,22 @@ allOf:
else:
required:
- amlogic,secure-monitor
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: amlogic,t7-thermal
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ required:
+ - clock-names
+ else:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names: false

unevaluatedProperties: false

@@ -94,7 +118,8 @@ examples:
compatible = "amlogic,t7-thermal";
reg = <0x20000 0x50>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clkc_periphs CLKID_TS>;
+ clocks = <&clkc_periphs CLKID_SYS_TS_A73>, <&clkc_periphs CLKID_TS>;
+ clock-names = "bus", "core";
#thermal-sensor-cells = <0>;
amlogic,secure-monitor = <&sm 1>;
};

--
2.49.0