Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: thermal: convert hisilicon-thermal.txt to dt-schema

Convert the hisilicon SoCs tsensor txt bindings to dt-schema

Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240618-hisilicon-thermal-dt-bindings-conversion-v4-1-7eba97fbe6d0@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

authored by

Abdulrasaq Lawani and committed by
Daniel Lezcano
bb6972fa be3e224e

+57 -32
+57
Documentation/devicetree/bindings/thermal/hisilicon,tsensor.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/thermal/hisilicon,tsensor.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Temperature Sensor on HiSilicon SoCs 8 + 9 + maintainers: 10 + - Abdulrasaq Lawani <abdulrasaqolawani@gmail.com> 11 + 12 + allOf: 13 + - $ref: thermal-sensor.yaml 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - hisilicon,tsensor 19 + - hisilicon,hi3660-tsensor 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + clocks: 25 + maxItems: 1 26 + 27 + clock-names: 28 + items: 29 + - const: thermal_clk 30 + 31 + interrupts: 32 + maxItems: 1 33 + 34 + '#thermal-sensor-cells': 35 + const: 1 36 + 37 + required: 38 + - compatible 39 + - reg 40 + - interrupts 41 + - '#thermal-sensor-cells' 42 + 43 + unevaluatedProperties: false 44 + 45 + examples: 46 + - | 47 + #include <dt-bindings/clock/hi6220-clock.h> 48 + #include <dt-bindings/interrupt-controller/arm-gic.h> 49 + 50 + temperature-sensor@f7030700 { 51 + compatible = "hisilicon,tsensor"; 52 + reg = <0xf7030700 0x1000>; 53 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 54 + clocks = <&sys_ctrl HI6220_TSENSOR_CLK>; 55 + clock-names = "thermal_clk"; 56 + #thermal-sensor-cells = <1>; 57 + };
-32
Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
··· 1 - * Temperature Sensor on hisilicon SoCs 2 - 3 - ** Required properties : 4 - 5 - - compatible: "hisilicon,tsensor". 6 - - reg: physical base address of thermal sensor and length of memory mapped 7 - region. 8 - - interrupt: The interrupt number to the cpu. Defines the interrupt used 9 - by /SOCTHERM/tsensor. 10 - - clock-names: Input clock name, should be 'thermal_clk'. 11 - - clocks: phandles for clock specified in "clock-names" property. 12 - - #thermal-sensor-cells: Should be 1. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description. 13 - 14 - Example : 15 - 16 - for Hi6220: 17 - tsensor: tsensor@0,f7030700 { 18 - compatible = "hisilicon,tsensor"; 19 - reg = <0x0 0xf7030700 0x0 0x1000>; 20 - interrupts = <0 7 0x4>; 21 - clocks = <&sys_ctrl HI6220_TSENSOR_CLK>; 22 - clock-names = "thermal_clk"; 23 - #thermal-sensor-cells = <1>; 24 - } 25 - 26 - for Hi3660: 27 - tsensor: tsensor@fff30000 { 28 - compatible = "hisilicon,hi3660-tsensor"; 29 - reg = <0x0 0xfff30000 0x0 0x1000>; 30 - interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>; 31 - #thermal-sensor-cells = <1>; 32 - };