Debian Codegraph @

Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/thermal/mediatek,lvts-thermal.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: MediaTek SoC Low Voltage Thermal Sensor (LVTS)
8
9 maintainers:
10 - Balsam CHIHI <[email protected]>
11
12 description: |
13 LVTS is a thermal management architecture composed of three subsystems,
14 a Sensing device - Thermal Sensing Micro Circuit Unit (TSMCU),
15 a Converter - Low Voltage Thermal Sensor converter (LVTS), and
16 a Digital controller (LVTS_CTRL).
17
18 properties:
19 compatible:
20 enum:
21 - mediatek,mt7987-lvts-ap
22 - mediatek,mt7988-lvts-ap
23 - mediatek,mt8186-lvts
24 - mediatek,mt8188-lvts-ap
25 - mediatek,mt8188-lvts-mcu
26 - mediatek,mt8192-lvts-ap
27 - mediatek,mt8192-lvts-mcu
28 - mediatek,mt8195-lvts-ap
29 - mediatek,mt8195-lvts-mcu
30 - mediatek,mt8196-lvts-ap
31 - mediatek,mt8196-lvts-mcu
32
33 reg:
34 maxItems: 1
35
36 interrupts:
37 maxItems: 1
38
39 clocks:
40 maxItems: 1
41
42 resets:
43 maxItems: 1
44 description: LVTS reset for clearing temporary data on AP/MCU.
45
46 nvmem-cells:
47 minItems: 1
48 items:
49 - description: Calibration eFuse data 1 for LVTS
50 - description: Calibration eFuse data 2 for LVTS
51
52 nvmem-cell-names:
53 minItems: 1
54 items:
55 - const: lvts-calib-data-1
56 - const: lvts-calib-data-2
57
58 "#thermal-sensor-cells":
59 const: 1
60
61 allOf:
62 - $ref: thermal-sensor.yaml#
63
64 - if:
65 properties:
66 compatible:
67 contains:
68 enum:
69 - mediatek,mt8188-lvts-ap
70 - mediatek,mt8188-lvts-mcu
71 - mediatek,mt8192-lvts-ap
72 - mediatek,mt8192-lvts-mcu
73 then:
74 properties:
75 nvmem-cells:
76 maxItems: 1
77
78 nvmem-cell-names:
79 maxItems: 1
80
81 - if:
82 properties:
83 compatible:
84 contains:
85 enum:
86 - mediatek,mt8186-lvts
87 - mediatek,mt8195-lvts-ap
88 - mediatek,mt8195-lvts-mcu
89 then:
90 properties:
91 nvmem-cells:
92 minItems: 2
93
94 nvmem-cell-names:
95 minItems: 2
96
97 required:
98 - compatible
99 - reg
100 - interrupts
101 - clocks
102 - resets
103 - nvmem-cells
104 - nvmem-cell-names
105
106 additionalProperties: false
107
108 examples:
109 - |
110 #include <dt-bindings/interrupt-controller/arm-gic.h>
111 #include <dt-bindings/clock/mt8195-clk.h>
112 #include <dt-bindings/reset/mt8195-resets.h>
113 #include <dt-bindings/thermal/mediatek,lvts-thermal.h>
114
115 soc {
116 #address-cells = <2>;
117 #size-cells = <2>;
118
119 lvts_mcu: thermal-sensor@11278000 {
120 compatible = "mediatek,mt8195-lvts-mcu";
121 reg = <0 0x11278000 0 0x1000>;
122 interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH 0>;
123 clocks = <&infracfg_ao CLK_INFRA_AO_THERM>;
124 resets = <&infracfg_ao MT8195_INFRA_RST4_THERM_CTRL_MCU_SWRST>;
125 nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>;
126 nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2";
127 #thermal-sensor-cells = <1>;
128 };
129 };
130
131 thermal_zones: thermal-zones {
132 cpu0-thermal {
133 polling-delay = <1000>;
134 polling-delay-passive = <250>;
135 thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU0>;
136
137 trips {
138 cpu0_alert: trip-alert {
139 temperature = <85000>;
140 hysteresis = <2000>;
141 type = "passive";
142 };
143
144 cpu0_crit: trip-crit {
145 temperature = <100000>;
146 hysteresis = <2000>;
147 type = "critical";
148 };
149 };
150 };
151 };