← Documents Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Thermal

Allwinner SUN8I Thermal Controller

Allwinner SoC별 clock·sensor cell·NVMEM calibration 조건을 설명합니다.

Source pathDocumentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

allwinner,sun8i-a83t-ths.yaml:1-179

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

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Allwinner SUN8I Thermal Controller
8
9 maintainers:
10 - Vasily Khoruzhick <anarsoul@gmail.com>
11 - Yangtao Li <tiny.windzz@gmail.com>
12
13 $ref: thermal-sensor.yaml#
14
15 properties:
16 compatible:
17 enum:
18 - allwinner,sun8i-a83t-ths
19 - allwinner,sun8i-h3-ths
20 - allwinner,sun8i-r40-ths
21 - allwinner,sun20i-d1-ths
22 - allwinner,sun50i-a64-ths
23 - allwinner,sun50i-a100-ths
24 - allwinner,sun50i-h5-ths
25 - allwinner,sun50i-h6-ths
26 - allwinner,sun50i-h616-ths
27
28 clocks:
29 minItems: 1
30 items:
31 - description: Bus Clock
32 - description: Module Clock
33
34 clock-names:
35 minItems: 1
36 items:
37 - const: bus
38 - const: mod
39
40 reg:
41 maxItems: 1
42
43 interrupts:
44 maxItems: 1
45
46 resets:
47 maxItems: 1
48
49 nvmem-cells:
50 maxItems: 1
51 description: Calibration data for thermal sensors
52
53 nvmem-cell-names:
54 const: calibration
55
56 allwinner,sram:
57 maxItems: 1
58 description: phandle to device controlling temperate offset SYS_CFG register
59
60 "#thermal-sensor-cells":
61 enum:
62 - 0
63 - 1
64
65 allOf:
66 - if:
67 properties:
68 compatible:
69 contains:
70 enum:
71 - allwinner,sun20i-d1-ths
72 - allwinner,sun50i-a100-ths
73 - allwinner,sun50i-h6-ths
74 - allwinner,sun50i-h616-ths
75
76 then:
77 properties:
78 clocks:
79 maxItems: 1
80
81 clock-names:
82 maxItems: 1
83
84 else:
85 properties:
86 clocks:
87 minItems: 2
88
89 clock-names:
90 minItems: 2
91
92 - if:
93 not:
94 properties:
95 compatible:
96 contains:
97 const: allwinner,sun50i-h616-ths
98
99 then:
100 properties:
101 allwinner,sram: false
102
103 - if:
104 properties:
105 compatible:
106 contains:
107 enum:
108 - allwinner,sun8i-h3-ths
109 - allwinner,sun20i-d1-ths
110
111 then:
112 properties:
113 "#thermal-sensor-cells":
114 const: 0
115
116 else:
117 properties:
118 "#thermal-sensor-cells":
119 const: 1
120
121 - if:
122 not:
123 properties:
124 compatible:
125 contains:
126 enum:
127 - allwinner,sun8i-a83t-ths
128
129 then:
130 required:
131 - clocks
132 - clock-names
133 - resets
134
135 required:
136 - compatible
137 - reg
138 - interrupts
139
140 unevaluatedProperties: false
141
142 examples:
143 - |
144 thermal-sensor@1f04000 {
145 compatible = "allwinner,sun8i-a83t-ths";
146 reg = <0x01f04000 0x100>;
147 interrupts = <0 31 0>;
148 nvmem-cells = <&ths_calibration>;
149 nvmem-cell-names = "calibration";
150 #thermal-sensor-cells = <1>;
151 };
152
153 - |
154 thermal-sensor@1c25000 {
155 compatible = "allwinner,sun8i-h3-ths";
156 reg = <0x01c25000 0x400>;
157 clocks = <&ccu 0>, <&ccu 1>;
158 clock-names = "bus", "mod";
159 resets = <&ccu 2>;
160 interrupts = <0 31 0>;
161 nvmem-cells = <&ths_calibration>;
162 nvmem-cell-names = "calibration";
163 #thermal-sensor-cells = <0>;
164 };
165
166 - |
167 thermal-sensor@5070400 {
168 compatible = "allwinner,sun50i-h6-ths";
169 reg = <0x05070400 0x100>;
170 clocks = <&ccu 0>;
171 clock-names = "bus";
172 resets = <&ccu 2>;
173 interrupts = <0 15 0>;
174 nvmem-cells = <&ths_calibration>;
175 nvmem-cell-names = "calibration";
176 #thermal-sensor-cells = <1>;
177 };
178
179 ...
180

3. 한국어 전문 번역

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

Allwinner SUN8I thermal controller

1-14

이 GPL-2.0 YAML schema는 Allwinner SUN8I Thermal Controller를 정의하며 공통 `thermal-sensor.yaml#`을 따릅니다. Maintainer는 Vasily Khoruzhick과 Yangtao Li입니다.

SoC·clock·calibration 속성

15-64

Compatible은 `allwinner,sun8i-a83t-ths`, `allwinner,sun8i-h3-ths`, `allwinner,sun8i-r40-ths`, `allwinner,sun20i-d1-ths`, `allwinner,sun50i-a64-ths`, `allwinner,sun50i-a100-ths`, `allwinner,sun50i-h5-ths`, `allwinner,sun50i-h6-ths`, `allwinner,sun50i-h616-ths` 중 하나입니다.

`clocks`는 bus clock과 module clock 순서로 최소 한 항목이며 `clock-names`는 `bus`, `mod` 순서입니다. `reg`, `interrupts`, `resets`, calibration data용 `nvmem-cells`는 각각 최대 한 항목이고 `nvmem-cell-names`는 `calibration`입니다.

`allwinner,sram`은 temperature offset `SYS_CFG` register를 제어하는 device의 phandle이며 최대 한 항목입니다. `#thermal-sensor-cells`는 0 또는 1입니다.

SoC별 clock 개수

65-91

D1, A100, H6, H616 compatible에서는 `clocks`와 `clock-names`가 각각 최대 한 항목입니다. 그 밖의 SoC에서는 bus와 module용으로 각각 최소 두 항목이어야 합니다.

SRAM과 sensor cell 조건

92-120

H616이 아닌 compatible에서는 `allwinner,sram` 속성을 사용할 수 없습니다. H3와 D1은 `#thermal-sensor-cells = 0`을 사용하고 나머지 SoC는 sensor ID를 받는 `#thermal-sensor-cells = 1`을 사용합니다.

조건부 필수 속성

121-141

A83T가 아닌 compatible에는 `clocks`, `clock-names`, `resets`가 필수입니다. 모든 경우에 `compatible`, `reg`, `interrupts`가 필수이며 `unevaluatedProperties: false`로 추가 속성을 제한합니다.

A83T·H3·H6 예제

142-179

첫 예제는 A83T sensor와 NVMEM calibration을 1-cell sensor로 구성합니다. 두 번째는 H3의 bus·module clock과 reset, 0-cell sensor를 구성하며, 세 번째는 H6의 단일 bus clock과 reset, 1-cell sensor를 구성합니다.

    thermal-sensor@1f04000 {
        compatible = "allwinner,sun8i-a83t-ths";
        reg = <0x01f04000 0x100>;
        interrupts = <0 31 0>;
        nvmem-cells = <&ths_calibration>;
        nvmem-cell-names = "calibration";
        #thermal-sensor-cells = <1>;
    };

  - |
    thermal-sensor@1c25000 {
        compatible = "allwinner,sun8i-h3-ths";
        reg = <0x01c25000 0x400>;
        clocks = <&ccu 0>, <&ccu 1>;
        clock-names = "bus", "mod";
        resets = <&ccu 2>;
        interrupts = <0 31 0>;
        nvmem-cells = <&ths_calibration>;
        nvmem-cell-names = "calibration";
        #thermal-sensor-cells = <0>;
    };

  - |
    thermal-sensor@5070400 {
        compatible = "allwinner,sun50i-h6-ths";
        reg = <0x05070400 0x100>;
        clocks = <&ccu 0>;
        clock-names = "bus";
        resets = <&ccu 2>;
        interrupts = <0 15 0>;
        nvmem-cells = <&ths_calibration>;
        nvmem-cell-names = "calibration";
        #thermal-sensor-cells = <1>;
    };

...