xref: /freebsd/sys/contrib/device-tree/Bindings/thermal/ti,j72xx-thermal.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/ti,j72xx-thermal.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Texas Instruments J72XX VTM (DTS)
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Keerthy <j-keerthy@ti.com>
11d5b0e70fSEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription: |
138bab661aSEmmanuel Vadot  The TI K3 family of SoCs typically have a Voltage & Thermal
148bab661aSEmmanuel Vadot  Management (VTM) device to control up to 8 temperature diode
158bab661aSEmmanuel Vadot  sensors to measure silicon junction temperatures from different
168bab661aSEmmanuel Vadot  hotspots of the chip as well as provide temperature, interrupt
178bab661aSEmmanuel Vadot  and alerting information.
188bab661aSEmmanuel Vadot
198bab661aSEmmanuel Vadot  The following polynomial equation can then be used to convert
208bab661aSEmmanuel Vadot  value returned by this device into a temperature in Celsius
218bab661aSEmmanuel Vadot
228bab661aSEmmanuel Vadot  Temp(C) = (-9.2627e-12) * x^4 + (6.0373e-08) * x^3 + \
238bab661aSEmmanuel Vadot            (-1.7058e-04) * x^2 + (3.2512e-01) * x   + (-4.9003e+01)
248bab661aSEmmanuel Vadot
25*0e8011faSEmmanuel Vadot$ref: thermal-sensor.yaml#
26*0e8011faSEmmanuel Vadot
27d5b0e70fSEmmanuel Vadotproperties:
28d5b0e70fSEmmanuel Vadot  compatible:
29d5b0e70fSEmmanuel Vadot    enum:
30d5b0e70fSEmmanuel Vadot      - ti,j721e-vtm
31d5b0e70fSEmmanuel Vadot      - ti,j7200-vtm
32d5b0e70fSEmmanuel Vadot
33d5b0e70fSEmmanuel Vadot  reg:
34d5b0e70fSEmmanuel Vadot    items:
35d5b0e70fSEmmanuel Vadot      - description: VTM cfg1 register space
36d5b0e70fSEmmanuel Vadot      - description: VTM cfg2 register space
378bab661aSEmmanuel Vadot      - description: |
388bab661aSEmmanuel Vadot          A software trimming method must be applied to some Jacinto
398bab661aSEmmanuel Vadot          devices to function properly. This eFuse region provides
408bab661aSEmmanuel Vadot          the information needed for these SoCs to report
418bab661aSEmmanuel Vadot          temperatures accurately.
428bab661aSEmmanuel Vadot    minItems: 2
43d5b0e70fSEmmanuel Vadot
44d5b0e70fSEmmanuel Vadot  power-domains:
45d5b0e70fSEmmanuel Vadot    maxItems: 1
46d5b0e70fSEmmanuel Vadot
47d5b0e70fSEmmanuel Vadot  "#thermal-sensor-cells":
48d5b0e70fSEmmanuel Vadot    const: 1
49d5b0e70fSEmmanuel Vadot
508bab661aSEmmanuel VadotallOf:
518bab661aSEmmanuel Vadot  - if:
528bab661aSEmmanuel Vadot      properties:
538bab661aSEmmanuel Vadot        compatible:
548bab661aSEmmanuel Vadot          contains:
558bab661aSEmmanuel Vadot            const: ti,j721e-vtm
568bab661aSEmmanuel Vadot    then:
578bab661aSEmmanuel Vadot      properties:
588bab661aSEmmanuel Vadot        reg:
598bab661aSEmmanuel Vadot          minItems: 3
608bab661aSEmmanuel Vadot    else:
618bab661aSEmmanuel Vadot      properties:
628bab661aSEmmanuel Vadot        reg:
638bab661aSEmmanuel Vadot          maxItems: 2
648bab661aSEmmanuel Vadot
65d5b0e70fSEmmanuel Vadotrequired:
66d5b0e70fSEmmanuel Vadot  - compatible
67d5b0e70fSEmmanuel Vadot  - reg
68d5b0e70fSEmmanuel Vadot  - power-domains
69d5b0e70fSEmmanuel Vadot
70*0e8011faSEmmanuel VadotunevaluatedProperties: false
71d5b0e70fSEmmanuel Vadot
72d5b0e70fSEmmanuel Vadotexamples:
73d5b0e70fSEmmanuel Vadot  - |
74d5b0e70fSEmmanuel Vadot    #include <dt-bindings/soc/ti,sci_pm_domain.h>
75d5b0e70fSEmmanuel Vadot    wkup_vtm0: thermal-sensor@42040000 {
76d5b0e70fSEmmanuel Vadot        compatible = "ti,j721e-vtm";
77d5b0e70fSEmmanuel Vadot        reg = <0x42040000 0x350>,
78d5b0e70fSEmmanuel Vadot              <0x42050000 0x350>,
79d5b0e70fSEmmanuel Vadot              <0x43000300 0x10>;
80d5b0e70fSEmmanuel Vadot        power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
81d5b0e70fSEmmanuel Vadot        #thermal-sensor-cells = <1>;
82d5b0e70fSEmmanuel Vadot    };
83d5b0e70fSEmmanuel Vadot
84d5b0e70fSEmmanuel Vadot    mpu_thermal: mpu-thermal {
85d5b0e70fSEmmanuel Vadot        polling-delay-passive = <250>; /* milliseconds */
86d5b0e70fSEmmanuel Vadot        polling-delay = <500>; /* milliseconds */
87d5b0e70fSEmmanuel Vadot        thermal-sensors = <&wkup_vtm0 0>;
88d5b0e70fSEmmanuel Vadot
89d5b0e70fSEmmanuel Vadot        trips {
90d5b0e70fSEmmanuel Vadot            mpu_crit: mpu-crit {
91d5b0e70fSEmmanuel Vadot                temperature = <125000>; /* milliCelsius */
92d5b0e70fSEmmanuel Vadot                hysteresis = <2000>; /* milliCelsius */
93d5b0e70fSEmmanuel Vadot                type = "critical";
94d5b0e70fSEmmanuel Vadot            };
95d5b0e70fSEmmanuel Vadot        };
96d5b0e70fSEmmanuel Vadot    };
97d5b0e70fSEmmanuel Vadot...
98