← Documents Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm-hc.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Thermal

Qualcomm SPMI ADC TM HC

PMIC5 ADC thermal monitor의 channel calibration·sampling·pre-scaling을 설명합니다.

Source pathDocumentation/devicetree/bindings/thermal/qcom-spmi-adc-tm-hc.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

qcom-spmi-adc-tm-hc.yaml:1-149

PMIC5 ADC thermal monitor의 channel calibration·sampling·pre-scaling을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·수치·예제 코드를 원형대로 유지합니다.

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/qcom-spmi-adc-tm-hc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm's SPMI PMIC ADC HC Thermal Monitoring
8 maintainers:
9 - Dmitry Baryshkov <[email protected]>
10
11 $ref: thermal-sensor.yaml#
12
13 properties:
14 compatible:
15 const: qcom,spmi-adc-tm-hc
16
17 reg:
18 maxItems: 1
19
20 interrupts:
21 maxItems: 1
22
23 "#thermal-sensor-cells":
24 const: 1
25
26 "#address-cells":
27 const: 1
28
29 "#size-cells":
30 const: 0
31
32 qcom,avg-samples:
33 $ref: /schemas/types.yaml#/definitions/uint32
34 description: Number of samples to be used for measurement.
35 enum:
36 - 1
37 - 2
38 - 4
39 - 8
40 - 16
41 default: 1
42
43 qcom,decimation:
44 $ref: /schemas/types.yaml#/definitions/uint32
45 description: This parameter is used to decrease ADC sampling rate.
46 Quicker measurements can be made by reducing decimation ratio.
47 enum:
48 - 256
49 - 512
50 - 1024
51 default: 1024
52
53 patternProperties:
54 "^([-a-z0-9]*)@[0-7]$":
55 type: object
56 description:
57 Represent one thermal sensor.
58
59 properties:
60 reg:
61 description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM
62 minimum: 0
63 maximum: 7
64
65 io-channels:
66 description:
67 From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor
68
69 qcom,ratiometric:
70 $ref: /schemas/types.yaml#/definitions/flag
71 description:
72 Channel calibration type.
73 If this property is specified VADC will use the VDD reference
74 (1.875V) and GND for channel calibration. If property is not found,
75 channel will be calibrated with 0V and 1.25V reference channels,
76 also known as absolute calibration.
77
78 qcom,hw-settle-time-us:
79 description: Time between AMUX getting configured and the ADC starting conversion.
80 enum: [0, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 6000, 8000, 10000]
81
82 qcom,pre-scaling:
83 $ref: /schemas/types.yaml#/definitions/uint32-array
84 description: Used for scaling the channel input signal before the
85 signal is fed to VADC. The configuration for this node is to know the
86 pre-determined ratio and use it for post scaling. It is a pair of
87 integers, denoting the numerator and denominator of the fraction by
88 which input signal is multiplied. For example, <1 3> indicates the
89 signal is scaled down to 1/3 of its value before ADC measurement. If
90 property is not found default value depending on chip will be used.
91 items:
92 - const: 1
93 - enum: [ 1, 3, 4, 6, 20, 8, 10 ]
94
95 required:
96 - reg
97 - io-channels
98
99 additionalProperties:
100 false
101
102 required:
103 - compatible
104 - reg
105 - interrupts
106 - "#address-cells"
107 - "#size-cells"
108
109 unevaluatedProperties: false
110
111 examples:
112 - |
113 #include <dt-bindings/iio/qcom,spmi-vadc.h>
114 #include <dt-bindings/interrupt-controller/irq.h>
115
116 pmic {
117 #address-cells = <1>;
118 #size-cells = <0>;
119
120 pm8998_adc: adc@3100 {
121 compatible = "qcom,spmi-adc-rev2";
122 reg = <0x3100>;
123 #address-cells = <1>;
124 #size-cells = <0>;
125 #io-channel-cells = <1>;
126
127 /* Other properties are omitted */
128 channel@4c {
129 reg = <ADC5_XO_THERM_100K_PU>;
130 };
131 };
132
133 adc-tm@3400 {
134 compatible = "qcom,spmi-adc-tm-hc";
135 reg = <0x3400>;
136 interrupts = <0x2 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
137 #thermal-sensor-cells = <1>;
138 #address-cells = <1>;
139 #size-cells = <0>;
140
141 thermistor@1 {
142 reg = <1>;
143 io-channels = <&pm8998_adc ADC5_XO_THERM_100K_PU>;
144 qcom,ratiometric;
145 qcom,hw-settle-time-us = <200>;
146 };
147 };
148 };
149 ...
150

3. 한국어 전문 번역

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

Qualcomm SPMI PMIC ADC HC monitor

1-12

이 GPL-2.0 또는 BSD-2-Clause YAML 스키마는 Qualcomm SPMI PMIC ADC HC thermal monitoring block을 정의하고 공통 `thermal-sensor.yaml#`을 사용합니다. Maintainer는 Dmitry Baryshkov입니다.

Provider와 child 주소 형식

13-31

`compatible`은 `qcom,spmi-adc-tm-hc`입니다. `reg`와 `interrupts`는 각각 최대 한 항목입니다. `#thermal-sensor-cells = 1`로 monitor channel ID를 받고, child sensor 주소를 위해 `#address-cells = 1`, `#size-cells = 0`을 사용합니다.

평균 sample 수와 decimation

32-52

`qcom,avg-samples`는 measurement에 사용할 sample 수이며 1, 2, 4, 8, 16 중 하나이고 기본값은 1입니다. `qcom,decimation`은 ADC sampling rate를 낮추는 ratio로 256, 512, 1024 중 하나이며 기본값은 1024입니다. Decimation ratio를 줄이면 더 빠르게 측정할 수 있습니다.

여덟 thermal monitor channel

53-64

Child node 이름은 pattern `^([-a-z0-9]*)@[0-7]$`을 따라야 하며 각 node가 thermal sensor 하나를 나타냅니다. `reg`는 PMIC5 ADC TM의 0~7 channel 중 하나를 지정합니다.

IIO 연결과 calibration·settle time

65-81

`io-channels`는 공통 IIO binding을 통해 PMIC ADC channel을 thermal monitor로 전달합니다. `qcom,ratiometric` flag가 있으면 VADC는 VDD reference 1.875V와 GND로 channel을 calibration합니다. 없으면 0V와 1.25V reference channel을 사용하는 absolute calibration을 적용합니다.

`qcom,hw-settle-time-us`는 AMUX 설정 후 ADC conversion 시작까지의 시간이며 0, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 6000, 8000, 10000 µs 중 하나입니다.

Channel input pre-scaling

82-94

`qcom,pre-scaling`은 VADC에 넣기 전 channel input signal을 scaling하는 `uint32-array`입니다. 두 정수는 input에 곱하는 fraction의 numerator와 denominator이며 numerator는 1, denominator는 1, 3, 4, 6, 20, 8, 10 중 하나입니다. 예를 들어 `<1 3>`은 ADC 측정 전에 signal을 원래 값의 1/3로 줄입니다. 속성이 없으면 chip별 기본값을 사용합니다.

Child와 controller 필수 속성

95-110

각 child sensor에는 `reg`, `io-channels`가 필수이고 추가 속성은 허용되지 않습니다. Controller에는 `compatible`, `reg`, `interrupts`, `#address-cells`, `#size-cells`가 필수이며 `unevaluatedProperties: false`로 스키마 밖 속성을 제한합니다.

PM8998 XO thermistor 예제

111-149

예제는 PM8998 ADC revision 2의 `ADC5_XO_THERM_100K_PU` channel을 만들고, 0x3400의 ADC-TM HC가 edge-rising interrupt를 사용하도록 구성합니다. `thermistor@1`은 monitor channel 1을 해당 IIO channel에 연결하고 ratiometric calibration과 200 µs hardware settle time을 지정합니다.

    #include <dt-bindings/iio/qcom,spmi-vadc.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    pmic {
        #address-cells = <1>;
        #size-cells = <0>;

        pm8998_adc: adc@3100 {
            compatible = "qcom,spmi-adc-rev2";
            reg = <0x3100>;
            #address-cells = <1>;
            #size-cells = <0>;
            #io-channel-cells = <1>;

            /* Other properties are omitted */
            channel@4c {
                reg = <ADC5_XO_THERM_100K_PU>;
            };
        };

        adc-tm@3400 {
            compatible = "qcom,spmi-adc-tm-hc";
            reg = <0x3400>;
            interrupts = <0x2 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
            #thermal-sensor-cells = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            thermistor@1 {
                reg = <1>;
                io-channels = <&pm8998_adc ADC5_XO_THERM_100K_PU>;
                qcom,ratiometric;
                qcom,hw-settle-time-us = <200>;
            };
        };
    };
...