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

Linux 6.18.37 · Devicetree Bindings / Thermal

Spreadtrum Thermal Sensor Controller

UMS512 controller와 sensor별 NVMEM 보정 구조를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

sprd-thermal.yaml:1-112

UMS512 controller와 sensor별 NVMEM 보정 구조를 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·clock·NVMEM·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/thermal/sprd-thermal.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Spreadtrum thermal sensor controller
8
9 maintainers:
10 - Orson Zhai <orsonzhai@gmail.com>
11 - Baolin Wang <baolin.wang7@gmail.com>
12 - Chunyan Zhang <zhang.lyra@gmail.com>
13
14 $ref: thermal-sensor.yaml#
15
16 properties:
17 compatible:
18 const: sprd,ums512-thermal
19
20 reg:
21 maxItems: 1
22
23 clocks:
24 maxItems: 1
25
26 clock-names:
27 items:
28 - const: enable
29
30 nvmem-cells:
31 maxItems: 2
32 description:
33 Reference to nvmem nodes for the calibration data.
34
35 nvmem-cell-names:
36 items:
37 - const: thm_sign_cal
38 - const: thm_ratio_cal
39
40 "#thermal-sensor-cells":
41 const: 1
42
43 "#address-cells":
44 const: 1
45
46 "#size-cells":
47 const: 0
48
49 patternProperties:
50 "^([a-z]*-)?sensor(-section)?@[0-9]+$":
51 type: object
52 description:
53 Represent one thermal sensor.
54
55 properties:
56 reg:
57 description: Specify the sensor id.
58 maxItems: 1
59
60 nvmem-cells:
61 maxItems: 1
62 description:
63 Reference to an nvmem node for the calibration data.
64
65 nvmem-cell-names:
66 const: sen_delta_cal
67
68 required:
69 - reg
70 - nvmem-cells
71 - nvmem-cell-names
72
73 additionalProperties: false
74
75 required:
76 - compatible
77 - reg
78 - clocks
79 - clock-names
80 - nvmem-cells
81 - nvmem-cell-names
82 - "#address-cells"
83 - "#size-cells"
84
85 unevaluatedProperties: false
86
87 examples:
88 - |
89 thermal@32200000 {
90 compatible = "sprd,ums512-thermal";
91 reg = <0x32200000 0x10000>;
92 clock-names = "enable";
93 clocks = <&aonapb_gate 32>;
94 #thermal-sensor-cells = <1>;
95 nvmem-cells = <&thm0_sign>, <&thm0_ratio>;
96 nvmem-cell-names = "thm_sign_cal", "thm_ratio_cal";
97 #address-cells = <1>;
98 #size-cells = <0>;
99
100 prometheus-sensor@0 {
101 reg = <0>;
102 nvmem-cells = <&thm0_sen0>;
103 nvmem-cell-names = "sen_delta_cal";
104 };
105
106 ank-sensor@1 {
107 reg = <1>;
108 nvmem-cells = <&thm0_sen1>;
109 nvmem-cell-names = "sen_delta_cal";
110 };
111 };
112 ...
113

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-86

Controller에는 `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";
        };
    };
...