요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner SUN8I Thermal Controller
maintainers:
- Vasily Khoruzhick <[email protected]>
- Yangtao Li <[email protected]>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- 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:
minItems: 1
items:
- description: Bus Clock
- description: Module Clock
clock-names:
minItems: 1
items:
- const: bus
- const: mod
reg:
maxItems: 1
interrupts:
maxItems: 1
resets:
maxItems: 1
nvmem-cells:
maxItems: 1
description: Calibration data for thermal sensors
nvmem-cell-names:
const: calibration
allwinner,sram:
maxItems: 1
description: phandle to device controlling temperate offset SYS_CFG register
"#thermal-sensor-cells":
enum:
- 0
- 1
allOf:
- if:
properties:
compatible:
contains:
enum:
- allwinner,sun20i-d1-ths
- allwinner,sun50i-a100-ths
- allwinner,sun50i-h6-ths
- allwinner,sun50i-h616-ths
then:
properties:
clocks:
maxItems: 1
clock-names:
maxItems: 1
else:
properties:
clocks:
minItems: 2
clock-names:
minItems: 2
- if:
not:
properties:
compatible:
contains:
const: allwinner,sun50i-h616-ths
then:
properties:
allwinner,sram: false
- if:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-h3-ths
- allwinner,sun20i-d1-ths
then:
properties:
"#thermal-sensor-cells":
const: 0
else:
properties:
"#thermal-sensor-cells":
const: 1
- if:
not:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-a83t-ths
then:
required:
- clocks
- clock-names
- resets
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
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>;
};
...
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-64Compatible은 `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-91D1, A100, H6, H616 compatible에서는 `clocks`와 `clock-names`가 각각 최대 한 항목입니다. 그 밖의 SoC에서는 bus와 module용으로 각각 최소 두 항목이어야 합니다.
SRAM과 sensor cell 조건
92-120H616이 아닌 compatible에서는 `allwinner,sram` 속성을 사용할 수 없습니다. H3와 D1은 `#thermal-sensor-cells = 0`을 사용하고 나머지 SoC는 sensor ID를 받는 `#thermal-sensor-cells = 1`을 사용합니다.
조건부 필수 속성
121-141A83T가 아닌 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>;
};
...
요약과 해설
allwinner,sun8i-a83t-ths.yaml:1-179Allwinner SoC별 clock·sensor cell·NVMEM calibration 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·clock·interrupt·수치·예제 코드를 원형대로 유지합니다.