1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/thermal/ti,j72xx-thermal.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Texas Instruments J72XX VTM (DTS)
8
9maintainers:
10  - Keerthy <j-keerthy@ti.com>
11
12description: |
13  The TI K3 family of SoCs typically have a Voltage & Thermal
14  Management (VTM) device to control up to 8 temperature diode
15  sensors to measure silicon junction temperatures from different
16  hotspots of the chip as well as provide temperature, interrupt
17  and alerting information.
18
19  The following polynomial equation can then be used to convert
20  value returned by this device into a temperature in Celsius
21
22  Temp(C) = (-9.2627e-12) * x^4 + (6.0373e-08) * x^3 + \
23            (-1.7058e-04) * x^2 + (3.2512e-01) * x   + (-4.9003e+01)
24
25properties:
26  compatible:
27    enum:
28      - ti,j721e-vtm
29      - ti,j7200-vtm
30
31  reg:
32    items:
33      - description: VTM cfg1 register space
34      - description: VTM cfg2 register space
35      - description: |
36          A software trimming method must be applied to some Jacinto
37          devices to function properly. This eFuse region provides
38          the information needed for these SoCs to report
39          temperatures accurately.
40    minItems: 2
41
42  power-domains:
43    maxItems: 1
44
45  "#thermal-sensor-cells":
46    const: 1
47
48allOf:
49  - if:
50      properties:
51        compatible:
52          contains:
53            const: ti,j721e-vtm
54    then:
55      properties:
56        reg:
57          minItems: 3
58    else:
59      properties:
60        reg:
61          maxItems: 2
62
63required:
64  - compatible
65  - reg
66  - power-domains
67  - "#thermal-sensor-cells"
68
69additionalProperties: false
70
71examples:
72  - |
73    #include <dt-bindings/soc/ti,sci_pm_domain.h>
74    wkup_vtm0: thermal-sensor@42040000 {
75        compatible = "ti,j721e-vtm";
76        reg = <0x42040000 0x350>,
77              <0x42050000 0x350>,
78              <0x43000300 0x10>;
79        power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
80        #thermal-sensor-cells = <1>;
81    };
82
83    mpu_thermal: mpu-thermal {
84        polling-delay-passive = <250>; /* milliseconds */
85        polling-delay = <500>; /* milliseconds */
86        thermal-sensors = <&wkup_vtm0 0>;
87
88        trips {
89            mpu_crit: mpu-crit {
90                temperature = <125000>; /* milliCelsius */
91                hysteresis = <2000>; /* milliCelsius */
92                type = "critical";
93            };
94        };
95    };
96...
97