요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/sprd-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Spreadtrum thermal sensor controller
maintainers:
- Orson Zhai <orsonzhai@gmail.com>
- Baolin Wang <baolin.wang7@gmail.com>
- Chunyan Zhang <zhang.lyra@gmail.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: sprd,ums512-thermal
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: enable
nvmem-cells:
maxItems: 2
description:
Reference to nvmem nodes for the calibration data.
nvmem-cell-names:
items:
- const: thm_sign_cal
- const: thm_ratio_cal
"#thermal-sensor-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^([a-z]*-)?sensor(-section)?@[0-9]+$":
type: object
description:
Represent one thermal sensor.
properties:
reg:
description: Specify the sensor id.
maxItems: 1
nvmem-cells:
maxItems: 1
description:
Reference to an nvmem node for the calibration data.
nvmem-cell-names:
const: sen_delta_cal
required:
- reg
- nvmem-cells
- nvmem-cell-names
additionalProperties: false
required:
- compatible
- reg
- clocks
- clock-names
- nvmem-cells
- nvmem-cell-names
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
thermal@32200000 {
compatible = "sprd,ums512-thermal";
reg = <0x32200000 0x10000>;
clock-names = "enable";
clocks = <&aonapb_gate 32>;
#thermal-sensor-cells = <1>;
nvmem-cells = <&thm0_sign>, <&thm0_ratio>;
nvmem-cell-names = "thm_sign_cal", "thm_ratio_cal";
#address-cells = <1>;
#size-cells = <0>;
prometheus-sensor@0 {
reg = <0>;
nvmem-cells = <&thm0_sen0>;
nvmem-cell-names = "sen_delta_cal";
};
ank-sensor@1 {
reg = <1>;
nvmem-cells = <&thm0_sen1>;
nvmem-cell-names = "sen_delta_cal";
};
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Spreadtrum thermal sensor controller
1-15이 GPL-2.0 또는 BSD-2-Clause YAML 스키마는 Spreadtrum thermal sensor controller를 정의합니다. Maintainer는 Orson Zhai, Baolin Wang, Chunyan Zhang이며 공통 `thermal-sensor.yaml#` 스키마를 사용합니다.
Controller clock·NVMEM과 cell 구성
16-48`compatible`은 `sprd,ums512-thermal`입니다. `reg`와 `clocks`는 각각 최대 한 항목이고 clock 이름은 `enable`입니다. Controller calibration data는 최대 두 NVMEM 셀에서 읽으며 이름은 sign 보정용 `thm_sign_cal`, ratio 보정용 `thm_ratio_cal`입니다. Consumer sensor ID는 `#thermal-sensor-cells = 1`로 받고 child 주소에는 `#address-cells = 1`, `#size-cells = 0`을 사용합니다.
properties:
compatible:
const: sprd,ums512-thermal
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: enable
nvmem-cells:
maxItems: 2
description:
Reference to nvmem nodes for the calibration data.
nvmem-cell-names:
items:
- const: thm_sign_cal
- const: thm_ratio_cal
"#thermal-sensor-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
개별 sensor와 delta 보정
49-74`^([a-z]*-)?sensor(-section)?@[0-9]+$` 패턴의 child node 하나가 thermal sensor 하나를 나타냅니다. `reg`는 sensor ID이며, sensor별 calibration data를 담은 NVMEM 셀 하나의 이름은 `sen_delta_cal`입니다. `reg`, `nvmem-cells`, `nvmem-cell-names`가 모두 필수이고 child의 추가 속성은 금지합니다.
patternProperties:
"^([a-z]*-)?sensor(-section)?@[0-9]+$":
type: object
description:
Represent one thermal sensor.
properties:
reg:
description: Specify the sensor id.
maxItems: 1
nvmem-cells:
maxItems: 1
description:
Reference to an nvmem node for the calibration data.
nvmem-cell-names:
const: sen_delta_cal
required:
- reg
- nvmem-cells
- nvmem-cell-names
additionalProperties: false
Controller 필수 속성
75-86Controller에는 `compatible`, `reg`, `clocks`, `clock-names`, `nvmem-cells`, `nvmem-cell-names`, `#address-cells`, `#size-cells`가 필수입니다. `unevaluatedProperties: false`로 평가되지 않은 속성을 금지합니다.
required:
- compatible
- reg
- clocks
- clock-names
- nvmem-cells
- nvmem-cell-names
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
UMS512 thermal sensor 예제
87-112예제는 `0x32200000`의 0x10000-byte UMS512 controller, AON APB gate clock 32, controller sign·ratio NVMEM 셀을 선언합니다. Child 0 `prometheus-sensor`와 child 1 `ank-sensor`는 각각 sensor ID와 별도의 `sen_delta_cal` 셀을 사용합니다.
- |
thermal@32200000 {
compatible = "sprd,ums512-thermal";
reg = <0x32200000 0x10000>;
clock-names = "enable";
clocks = <&aonapb_gate 32>;
#thermal-sensor-cells = <1>;
nvmem-cells = <&thm0_sign>, <&thm0_ratio>;
nvmem-cell-names = "thm_sign_cal", "thm_ratio_cal";
#address-cells = <1>;
#size-cells = <0>;
prometheus-sensor@0 {
reg = <0>;
nvmem-cells = <&thm0_sen0>;
nvmem-cell-names = "sen_delta_cal";
};
ank-sensor@1 {
reg = <1>;
nvmem-cells = <&thm0_sen1>;
nvmem-cell-names = "sen_delta_cal";
};
};
...
요약과 해설
sprd-thermal.yaml:1-112UMS512 controller와 sensor별 NVMEM 보정 구조를 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·clock·NVMEM·수치·예제 코드를 원형대로 유지합니다.