요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0)
# Copyright 2020 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal-cooling-devices.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Thermal cooling device
maintainers:
- Amit Kucheria <[email protected]>
description: |
Thermal management is achieved in devicetree by describing the sensor hardware
and the software abstraction of cooling devices and thermal zones required to
take appropriate action to mitigate thermal overload.
The following node types are used to completely describe a thermal management
system in devicetree:
- thermal-sensor: device that measures temperature, has SoC-specific bindings
- cooling-device: device used to dissipate heat either passively or actively
- thermal-zones: a container of the following node types used to describe all
thermal data for the platform
This binding describes the cooling devices.
There are essentially two ways to provide control on power dissipation:
- Passive cooling: by means of regulating device performance. A typical
passive cooling mechanism is a CPU that has dynamic voltage and frequency
scaling (DVFS), and uses lower frequencies as cooling states.
- Active cooling: by means of activating devices in order to remove the
dissipated heat, e.g. regulating fan speeds.
Any cooling device has a range of cooling states (i.e. different levels of
heat dissipation). They also have a way to determine the state of cooling in
which the device is. For example, a fan's cooling states correspond to the
different fan speeds possible. Cooling states are referred to by single
unsigned integers, where larger numbers mean greater heat dissipation. The
precise set of cooling states associated with a device should be defined in
a particular device's binding.
select: true
properties:
"#cooling-cells":
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.
const: 2
additionalProperties: true
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/thermal/thermal.h>
// Example 1: Cpufreq cooling device on CPU0
cpus {
#address-cells = <2>;
#size-cells = <0>;
CPU0: cpu@0 {
device_type = "cpu";
compatible = "qcom,kryo385";
reg = <0x0 0x0>;
enable-method = "psci";
cpu-idle-states = <&LITTLE_CPU_SLEEP_0>,
<&LITTLE_CPU_SLEEP_1>,
<&CLUSTER_SLEEP_0>;
capacity-dmips-mhz = <607>;
dynamic-power-coefficient = <100>;
qcom,freq-domain = <&cpufreq_hw 0>;
#cooling-cells = <2>;
next-level-cache = <&L2_0>;
L2_0: l2-cache {
compatible = "cache";
cache-unified;
cache-level = <2>;
next-level-cache = <&L3_0>;
L3_0: l3-cache {
compatible = "cache";
cache-unified;
cache-level = <3>;
};
};
};
/* ... */
};
/* ... */
thermal-zones {
cpu0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsens0 1>;
trips {
cpu0_alert0: trip-point0 {
temperature = <90000>;
hysteresis = <2000>;
type = "passive";
};
};
cooling-maps {
map0 {
trip = <&cpu0_alert0>;
/* Corresponds to 1000MHz in OPP table */
cooling-device = <&CPU0 5 5>;
};
};
};
/* ... */
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Thermal cooling device
1-12이 GPL-2.0 YAML 스키마는 thermal cooling device를 정의합니다. 저작권은 Linaro Ltd.에 있고 maintainer는 Amit Kucheria입니다.
Devicetree thermal management 구성
13-25Devicetree thermal management는 sensor hardware와 cooling device·thermal zone의 software abstraction을 함께 기술해 thermal overload를 완화합니다. 전체 시스템은 온도를 측정하는 SoC별 `thermal-sensor`, 열을 수동 또는 능동으로 방출하는 `cooling-device`, 플랫폼의 thermal data를 담는 `thermal-zones` container로 구성됩니다. 이 binding은 그중 cooling device를 설명합니다.
Passive·active cooling과 상태 번호
26-40전력 소모를 제어하는 방식은 두 가지입니다. Passive cooling은 CPU DVFS처럼 성능을 낮춰 더 낮은 frequency를 cooling state로 사용합니다. Active cooling은 fan speed를 조절하는 것처럼 장치를 켜서 발생한 열을 제거합니다. 모든 cooling device는 여러 heat dissipation level을 나타내는 cooling state 범위를 가지며 단일 unsigned integer로 참조합니다. 숫자가 클수록 더 큰 열 방출을 뜻하고 정확한 상태 집합은 해당 장치 binding이 정의합니다.
#cooling-cells의 min·max 상태
41-53이 스키마는 모든 대상에 선택됩니다. `#cooling-cells`는 반드시 2이며 `cooling-maps` reference에서 사용할 최소·최대 cooling state를 지정합니다. 첫 cell이 minimum, 둘째 cell이 요청한 maximum state입니다. Cooling device 고유 속성을 허용하기 위해 `additionalProperties: true`입니다.
properties:
"#cooling-cells":
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.
const: 2
additionalProperties: true
CPUFreq cooling device 예제
54-93첫 예제 부분은 CPU0을 cpufreq cooling device로 선언합니다. Kryo385 CPU의 idle state, 607 DMIPS/MHz capacity, dynamic power coefficient 100, frequency domain과 cache hierarchy를 유지하며 `#cooling-cells = 2`로 cooling state 범위를 받을 수 있게 합니다.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/thermal/thermal.h>
// Example 1: Cpufreq cooling device on CPU0
cpus {
#address-cells = <2>;
#size-cells = <0>;
CPU0: cpu@0 {
device_type = "cpu";
compatible = "qcom,kryo385";
reg = <0x0 0x0>;
enable-method = "psci";
cpu-idle-states = <&LITTLE_CPU_SLEEP_0>,
<&LITTLE_CPU_SLEEP_1>,
<&CLUSTER_SLEEP_0>;
capacity-dmips-mhz = <607>;
dynamic-power-coefficient = <100>;
qcom,freq-domain = <&cpufreq_hw 0>;
#cooling-cells = <2>;
next-level-cache = <&L2_0>;
L2_0: l2-cache {
compatible = "cache";
cache-unified;
cache-level = <2>;
next-level-cache = <&L3_0>;
L3_0: l3-cache {
compatible = "cache";
cache-unified;
cache-level = <3>;
};
};
};
/* ... */
};
Thermal zone cooling-map 예제
94-122CPU0 thermal zone은 passive polling 250ms, 일반 polling 1000ms이며 TSENS0 sensor 1을 사용합니다. 90000 millidegree passive trip과 hysteresis 2000을 정의하고 `map0`에서 그 trip을 CPU0 cooling device state `<5 5>`에 연결합니다. 이 state는 OPP table의 1000MHz에 해당합니다.
/* ... */
thermal-zones {
cpu0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsens0 1>;
trips {
cpu0_alert0: trip-point0 {
temperature = <90000>;
hysteresis = <2000>;
type = "passive";
};
};
cooling-maps {
map0 {
trip = <&cpu0_alert0>;
/* Corresponds to 1000MHz in OPP table */
cooling-device = <&CPU0 5 5>;
};
};
};
/* ... */
};
...
요약과 해설
thermal-cooling-devices.yaml:1-122Passive·active cooling state와 2-cell cooling-map reference를 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·clock·NVMEM·수치·예제 코드를 원형대로 유지합니다.