← Documents Documentation/devicetree/bindings/thermal/thermal-idle.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Thermal

Thermal Idle Cooling Device

Idle cycle 주입 시간과 cooling-map 상태 범위를 설명합니다.

Source pathDocumentation/devicetree/bindings/thermal/thermal-idle.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

thermal-idle.yaml:1-152

Idle cycle 주입 시간과 cooling-map 상태 범위를 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·수식·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright 2020 Linaro Ltd.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/thermal/thermal-idle.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Thermal idle cooling device
9
10 maintainers:
11 - Daniel Lezcano <[email protected]>
12
13 description: |
14 The thermal idle cooling device allows the system to passively
15 mitigate the temperature on the device by injecting idle cycles,
16 forcing it to cool down.
17
18 This binding describes the thermal idle node.
19
20 properties:
21 $nodename:
22 const: thermal-idle
23 description: |
24 A thermal-idle node describes the idle cooling device properties to
25 cool down efficiently the attached thermal zone.
26
27 '#cooling-cells':
28 const: 2
29 description: |
30 Must be 2, in order to specify minimum and maximum cooling state used in
31 the cooling-maps reference. The first cell is the minimum cooling state
32 and the second cell is the maximum cooling state requested.
33
34 duration-us:
35 description: |
36 The idle duration in microsecond the device should cool down.
37
38 exit-latency-us:
39 description: |
40 The exit latency constraint in microsecond for the injected idle state
41 for the device. It is the latency constraint to apply when selecting an
42 idle state from among all the present ones.
43
44 required:
45 - '#cooling-cells'
46
47 additionalProperties: false
48
49 examples:
50 - |
51 /{
52 #include <dt-bindings/thermal/thermal.h>
53
54 compatible = "foo";
55 model = "foo";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 // Example: Combining idle cooling device on big CPUs with cpufreq cooling device
60 cpus {
61 #address-cells = <2>;
62 #size-cells = <0>;
63
64 /* ... */
65
66 cpu_b0: cpu@100 {
67 device_type = "cpu";
68 compatible = "arm,cortex-a72";
69 reg = <0x0 0x100>;
70 enable-method = "psci";
71 capacity-dmips-mhz = <1024>;
72 dynamic-power-coefficient = <436>;
73 #cooling-cells = <2>; /* min followed by max */
74 cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>;
75 cpu_b0_therm: thermal-idle {
76 #cooling-cells = <2>;
77 duration-us = <10000>;
78 exit-latency-us = <500>;
79 };
80 };
81
82 cpu_b1: cpu@101 {
83 device_type = "cpu";
84 compatible = "arm,cortex-a72";
85 reg = <0x0 0x101>;
86 enable-method = "psci";
87 capacity-dmips-mhz = <1024>;
88 dynamic-power-coefficient = <436>;
89 #cooling-cells = <2>; /* min followed by max */
90 cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>;
91 cpu_b1_therm: thermal-idle {
92 #cooling-cells = <2>;
93 duration-us = <10000>;
94 exit-latency-us = <500>;
95 };
96 };
97
98 /* ... */
99
100 };
101
102 /* ... */
103
104 thermal_zones {
105 cpu_thermal: cpu {
106 polling-delay-passive = <100>;
107 polling-delay = <1000>;
108
109 /* ... */
110
111 trips {
112 cpu_alert0: cpu_alert0 {
113 temperature = <65000>;
114 hysteresis = <2000>;
115 type = "passive";
116 };
117
118 cpu_alert1: cpu_alert1 {
119 temperature = <70000>;
120 hysteresis = <2000>;
121 type = "passive";
122 };
123
124 cpu_alert2: cpu_alert2 {
125 temperature = <75000>;
126 hysteresis = <2000>;
127 type = "passive";
128 };
129
130 cpu_crit: cpu_crit {
131 temperature = <95000>;
132 hysteresis = <2000>;
133 type = "critical";
134 };
135 };
136
137 cooling-maps {
138 map0 {
139 trip = <&cpu_alert1>;
140 cooling-device = <&cpu_b0_therm 0 15 >,
141 <&cpu_b1_therm 0 15>;
142 };
143
144 map1 {
145 trip = <&cpu_alert2>;
146 cooling-device = <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
147 <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
148 };
149 };
150 };
151 };
152 };
153

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Thermal idle cooling device

1-19

이 GPL-2.0-only 또는 BSD-2-Clause YAML 스키마는 thermal idle cooling device를 정의합니다. 이 장치는 device에 idle cycle을 주입해 수동으로 온도를 낮춥니다. Binding은 `thermal-idle` node를 설명하며 maintainer는 Daniel Lezcano입니다.

Cooling range와 idle 제약

20-48

Node 이름은 정확히 `thermal-idle`입니다. `#cooling-cells = 2`이며 `cooling-maps` reference의 첫 cell은 최소 cooling state, 둘째 cell은 요청할 최대 cooling state입니다. `duration-us`는 device를 식히기 위해 주입할 idle duration을 microsecond로 지정합니다. `exit-latency-us`는 사용할 idle state를 고를 때 적용하는 exit latency 제약입니다. `#cooling-cells`가 필수이고 추가 속성은 금지합니다.

properties:
  $nodename:
    const: thermal-idle
    description: |
      A thermal-idle node describes the idle cooling device properties to
      cool down efficiently the attached thermal zone.

  '#cooling-cells':
    const: 2
    description: |
      Must be 2, in order to specify minimum and maximum cooling state used in
      the cooling-maps reference. The first cell is the minimum cooling state
      and the second cell is the maximum cooling state requested.

  duration-us:
    description: |
      The idle duration in microsecond the device should cool down.

  exit-latency-us:
    description: |
      The exit latency constraint in microsecond for the injected idle state
      for the device. It is the latency constraint to apply when selecting an
      idle state from among all the present ones.

required:
  - '#cooling-cells'

additionalProperties: false

Big CPU idle·cpufreq cooling 예제

49-100

예제는 Cortex-A72 big CPU 두 개에 cpufreq cooling과 `thermal-idle` cooling을 함께 구성합니다. 각 CPU는 capacity 1024 DMIPS/MHz, dynamic power coefficient 436, 두 idle state를 가지며 idle cooling node는 `duration-us = 10000`, `exit-latency-us = 500`, `#cooling-cells = 2`를 사용합니다.

- |
  /{
      #include <dt-bindings/thermal/thermal.h>

      compatible = "foo";
      model = "foo";
      #address-cells = <1>;
      #size-cells = <1>;

      // Example: Combining idle cooling device on big CPUs with cpufreq cooling device
      cpus {
          #address-cells = <2>;
          #size-cells = <0>;

          /* ... */

          cpu_b0: cpu@100 {
              device_type = "cpu";
              compatible = "arm,cortex-a72";
              reg = <0x0 0x100>;
              enable-method = "psci";
              capacity-dmips-mhz = <1024>;
              dynamic-power-coefficient = <436>;
              #cooling-cells = <2>; /* min followed by max */
              cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>;
              cpu_b0_therm: thermal-idle {
                  #cooling-cells = <2>;
                  duration-us = <10000>;
                  exit-latency-us = <500>;
              };
          };

          cpu_b1: cpu@101 {
              device_type = "cpu";
              compatible = "arm,cortex-a72";
              reg = <0x0 0x101>;
              enable-method = "psci";
              capacity-dmips-mhz = <1024>;
              dynamic-power-coefficient = <436>;
              #cooling-cells = <2>; /* min followed by max */
              cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>;
              cpu_b1_therm: thermal-idle {
                  #cooling-cells = <2>;
                  duration-us = <10000>;
                  exit-latency-us = <500>;
              };
          };

          /* ... */

      };

Thermal zone과 네 trip

101-136

CPU thermal zone은 passive polling 100ms, 일반 polling 1000ms입니다. Passive trip은 65000, 70000, 75000 millidegree이고 critical trip은 95000 millidegree이며 모든 hysteresis는 2000입니다.


/* ... */

thermal_zones {
    cpu_thermal: cpu {
        polling-delay-passive = <100>;
        polling-delay = <1000>;

        /* ... */

        trips {
            cpu_alert0: cpu_alert0 {
                temperature = <65000>;
                hysteresis = <2000>;
                type = "passive";
            };

            cpu_alert1: cpu_alert1 {
                temperature = <70000>;
                hysteresis = <2000>;
                type = "passive";
            };

            cpu_alert2: cpu_alert2 {
                temperature = <75000>;
                hysteresis = <2000>;
                type = "passive";
            };

            cpu_crit: cpu_crit {
                temperature = <95000>;
                hysteresis = <2000>;
                type = "critical";
            };
        };

Idle cooling과 cpufreq cooling map

137-152

`map0`은 70000 millidegree trip에 두 CPU의 thermal-idle cooling state 범위 `<0 15>`를 연결합니다. `map1`은 75000 millidegree trip에 CPU cpufreq cooling device를 연결하며 최소·최대 상태 모두 `THERMAL_NO_LIMIT`을 사용합니다.

            cooling-maps {
                map0 {
                    trip = <&cpu_alert1>;
                    cooling-device = <&cpu_b0_therm 0 15 >,
                                     <&cpu_b1_therm 0 15>;
                };

                map1 {
                    trip = <&cpu_alert2>;
                    cooling-device = <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
                                     <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                };
            };
        };
    };
};