← Documents Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Thermal

MediaTek Thermal Controller

MediaTek thermal controller의 AUXADC·APMIXEDSYS 연결과 calibration을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

mediatek,thermal.yaml:1-106

MediaTek thermal controller의 AUXADC·APMIXEDSYS 연결과 calibration을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/thermal/mediatek,thermal.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Mediatek thermal controller for on-SoC temperatures
8
9 maintainers:
10 - Sascha Hauer <[email protected]>
11
12 description:
13 This device does not have its own ADC, instead it directly controls the AUXADC
14 via AHB bus accesses. For this reason it needs phandles to the AUXADC. Also it
15 controls a mux in the apmixedsys register space via AHB bus accesses, so a
16 phandle to the APMIXEDSYS is also needed.
17
18 allOf:
19 - $ref: thermal-sensor.yaml#
20
21 properties:
22 compatible:
23 oneOf:
24 - enum:
25 - mediatek,mt2701-thermal
26 - mediatek,mt2712-thermal
27 - mediatek,mt7622-thermal
28 - mediatek,mt7986-thermal
29 - mediatek,mt8173-thermal
30 - mediatek,mt8183-thermal
31 - mediatek,mt8365-thermal
32 - items:
33 - enum:
34 - mediatek,mt8516-thermal
35 - const: mediatek,mt2701-thermal
36 - items:
37 - enum:
38 - mediatek,mt7981-thermal
39 - const: mediatek,mt7986-thermal
40
41 reg:
42 maxItems: 1
43
44 interrupts:
45 maxItems: 1
46
47 clocks:
48 items:
49 - description: Main clock needed for register access
50 - description: The AUXADC clock
51
52 clock-names:
53 items:
54 - const: therm
55 - const: auxadc
56
57 mediatek,auxadc:
58 $ref: /schemas/types.yaml#/definitions/phandle
59 description: A phandle to the AUXADC which the thermal controller uses
60
61 mediatek,apmixedsys:
62 $ref: /schemas/types.yaml#/definitions/phandle
63 description: A phandle to the APMIXEDSYS controller
64
65 resets:
66 description: Reset controller controlling the thermal controller
67
68 nvmem-cells:
69 items:
70 - description:
71 NVMEM cell with EEPROMA phandle to the calibration data provided by an
72 NVMEM device. If unspecified default values shall be used.
73
74 nvmem-cell-names:
75 items:
76 - const: calibration-data
77
78 required:
79 - reg
80 - interrupts
81 - clocks
82 - clock-names
83 - mediatek,auxadc
84 - mediatek,apmixedsys
85
86 unevaluatedProperties: false
87
88 examples:
89 - |
90 #include <dt-bindings/interrupt-controller/irq.h>
91 #include <dt-bindings/clock/mt8173-clk.h>
92 #include <dt-bindings/reset/mt8173-resets.h>
93
94 thermal@1100b000 {
95 compatible = "mediatek,mt8173-thermal";
96 reg = <0x1100b000 0x1000>;
97 interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
98 clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
99 clock-names = "therm", "auxadc";
100 resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
101 mediatek,auxadc = <&auxadc>;
102 mediatek,apmixedsys = <&apmixedsys>;
103 nvmem-cells = <&thermal_calibration_data>;
104 nvmem-cell-names = "calibration-data";
105 #thermal-sensor-cells = <1>;
106 };
107

3. 한국어 전문 번역

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

MediaTek on-SoC thermal controller

1-20

이 GPL-2.0-only 또는 BSD-2-Clause YAML 스키마는 MediaTek SoC 내부 온도용 thermal controller를 정의하고 공통 `thermal-sensor.yaml#`을 포함합니다. 이 device에는 자체 ADC가 없어 AHB bus access로 AUXADC를 직접 제어하므로 AUXADC phandle이 필요합니다. 또한 AHB로 `apmixedsys` register 공간의 mux를 제어하므로 APMIXEDSYS phandle도 필요합니다. Maintainer는 Sascha Hauer입니다.

SoC compatible과 fallback

21-40

단독 compatible은 MT2701, MT2712, MT7622, MT7986, MT8173, MT8183, MT8365 thermal controller 중 하나입니다. MT8516은 `mediatek,mt8516-thermal` 뒤에 `mediatek,mt2701-thermal` fallback을 두고, MT7981은 `mediatek,mt7981-thermal` 뒤에 `mediatek,mt7986-thermal` fallback을 둡니다.

Register, interrupt, 두 clock

41-56

`reg`와 `interrupts`는 각각 최대 한 항목입니다. `clocks`는 register access용 main clock과 AUXADC clock을 순서대로 담고, `clock-names`는 각각 `therm`, `auxadc`입니다.

필수 속성과 제한

78-87

필수 속성은 `reg`, `interrupts`, `clocks`, `clock-names`, `mediatek,auxadc`, `mediatek,apmixedsys`입니다. `unevaluatedProperties: false`로 추가 속성을 제한합니다.

MT8173 thermal controller 예제

88-106

예제는 0x1100b000의 0x1000-byte register, interrupt 70 level-low, `therm`과 `auxadc` clock, thermal reset, AUXADC·APMIXEDSYS phandle, NVMEM calibration cell을 지정하고 1-cell thermal sensor provider로 노출합니다.

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/mt8173-clk.h>
#include <dt-bindings/reset/mt8173-resets.h>

thermal@1100b000 {
    compatible = "mediatek,mt8173-thermal";
    reg = <0x1100b000 0x1000>;
    interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
    clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
    clock-names = "therm", "auxadc";
    resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
    mediatek,auxadc = <&auxadc>;
    mediatek,apmixedsys = <&apmixedsys>;
    nvmem-cells = <&thermal_calibration_data>;
    nvmem-cell-names = "calibration-data";
    #thermal-sensor-cells = <1>;
};