요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm5.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm's SPMI PMIC ADC Thermal Monitoring
maintainers:
- Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- qcom,spmi-adc-tm5
- qcom,spmi-adc-tm5-gen2
- qcom,adc-tm7 # Incomplete / subject to change
reg:
maxItems: 1
interrupts:
maxItems: 1
"#thermal-sensor-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
qcom,avg-samples:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of samples to be used for measurement.
Not applicable for Gen2 ADC_TM peripheral.
enum:
- 1
- 2
- 4
- 8
- 16
default: 1
qcom,decimation:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter is used to decrease ADC sampling rate.
Quicker measurements can be made by reducing decimation ratio.
Not applicable for Gen2 ADC_TM peripheral.
enum:
- 250
- 420
- 840
default: 840
patternProperties:
"^([-a-z0-9]*)@[0-7]$":
type: object
description:
Represent one thermal sensor.
properties:
reg:
description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM
minimum: 0
maximum: 7
io-channels:
description:
From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor
qcom,ratiometric:
$ref: /schemas/types.yaml#/definitions/flag
description:
Channel calibration type.
If this property is specified VADC will use the VDD reference
(1.875V) and GND for channel calibration. If property is not found,
channel will be calibrated with 0V and 1.25V reference channels,
also known as absolute calibration.
qcom,hw-settle-time-us:
description: Time between AMUX getting configured and the ADC starting conversion.
enum: [15, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000]
qcom,pre-scaling:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Used for scaling the channel input signal before the
signal is fed to VADC. The configuration for this node is to know the
pre-determined ratio and use it for post scaling. It is a pair of
integers, denoting the numerator and denominator of the fraction by
which input signal is multiplied. For example, <1 3> indicates the
signal is scaled down to 1/3 of its value before ADC measurement. If
property is not found default value depending on chip will be used.
items:
- const: 1
- enum: [ 1, 3, 4, 6, 20, 8, 10 ]
qcom,avg-samples:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of samples to be used for measurement.
This property in child node is applicable only for Gen2 ADC_TM peripheral.
enum:
- 1
- 2
- 4
- 8
- 16
default: 1
qcom,decimation:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter is used to decrease ADC sampling rate.
Quicker measurements can be made by reducing decimation ratio.
This property in child node is applicable only for Gen2 ADC_TM peripheral.
enum:
- 85
- 340
- 1360
default: 1360
required:
- reg
- io-channels
additionalProperties:
false
allOf:
- if:
properties:
compatible:
contains:
const: qcom,spmi-adc-tm5
then:
patternProperties:
"^([-a-z0-9]*)@[0-7]$":
properties:
qcom,decimation: false
qcom,avg-samples: false
- if:
properties:
compatible:
contains:
const: qcom,spmi-adc-tm5-gen2
then:
properties:
qcom,avg-samples: false
qcom,decimation: false
required:
- compatible
- reg
- interrupts
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pm8150b_adc: adc@3100 {
compatible = "qcom,spmi-adc5";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "conn_therm";
};
};
adc-tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
conn-therm@0 {
reg = <0>;
io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
- |
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pmk8350_vadc: adc@3100 {
compatible = "qcom,spmi-adc7";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@44 {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "xo_therm";
};
channel@147 {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "conn_therm";
};
};
adc-tm@3400 {
compatible = "qcom,spmi-adc-tm5-gen2";
reg = <0x3400>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
pmk8350-xo-therm@0 {
reg = <0>;
io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,decimation = <340>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
conn-therm@1 {
reg = <1>;
io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,avg-samples = <2>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Qualcomm SPMI PMIC ADC Thermal Monitoring
1-12이 GPL-2.0 또는 BSD-2-Clause YAML 스키마는 Qualcomm SPMI PMIC ADC thermal monitoring controller를 정의하고 공통 `thermal-sensor.yaml#`을 사용합니다. Maintainer는 Dmitry Baryshkov입니다.
세대 compatible과 provider cell
13-34`compatible`은 `qcom,spmi-adc-tm5`, `qcom,spmi-adc-tm5-gen2`, `qcom,adc-tm7` 중 하나입니다. `qcom,adc-tm7` binding은 아직 불완전하며 변경될 수 있습니다. `reg`와 `interrupts`는 각각 최대 한 항목입니다. `#thermal-sensor-cells = 1`로 monitor channel ID를 받고 child 주소에는 `#address-cells = 1`, `#size-cells = 0`을 사용합니다.
Gen1 controller sampling 설정
35-57Controller의 `qcom,avg-samples`는 measurement에 사용할 sample 수로 1, 2, 4, 8, 16 중 하나이며 기본값은 1입니다. `qcom,decimation`은 ADC sampling rate를 낮추는 ratio로 250, 420, 840 중 하나이고 기본값은 840입니다. Ratio를 줄이면 더 빠르게 측정할 수 있습니다. 이 두 controller-level 속성은 Gen2 ADC_TM peripheral에는 적용되지 않습니다.
여덟 thermal sensor channel
58-73Child node 이름은 `^([-a-z0-9]*)@[0-7]$` pattern을 따르며 각 node가 thermal sensor 하나를 나타냅니다. `reg`는 PMIC5 ADC TM의 0~7 channel 중 하나입니다. `io-channels`는 공통 IIO binding을 통해 PMIC ADC channel을 thermal monitor로 전달합니다.
Calibration과 hardware settle time
74-86`qcom,ratiometric` flag가 있으면 VADC는 VDD reference 1.875V와 GND를 사용합니다. 없으면 0V와 1.25V reference channel을 쓰는 absolute calibration을 적용합니다. `qcom,hw-settle-time-us`는 AMUX 설정 후 ADC conversion 시작까지의 시간이며 15, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000 µs 중 하나입니다.
Input signal pre-scaling
87-99`qcom,pre-scaling`은 VADC 입력 전에 channel signal을 scaling하는 `uint32-array`입니다. 두 정수는 input에 곱할 fraction의 numerator와 denominator이며 numerator는 1, denominator는 1, 3, 4, 6, 20, 8, 10 중 하나입니다. `<1 3>`은 ADC measurement 전에 signal을 1/3로 낮춥니다. 속성이 없으면 chip별 기본값을 사용합니다.
Gen2 child sampling 설정
100-122Child의 `qcom,avg-samples`는 Gen2 ADC_TM에서만 적용되며 1, 2, 4, 8, 16 중 하나이고 기본값은 1입니다. Child의 `qcom,decimation`도 Gen2 전용이며 85, 340, 1360 중 하나이고 기본값은 1360입니다. Decimation ratio가 작을수록 measurement가 빨라집니다.
Child 필수 속성
123-129각 child thermal sensor에는 `reg`, `io-channels`가 필수이며 `additionalProperties: false`로 나머지 속성을 제한합니다.
Gen1·Gen2 속성 위치 제한
130-154`qcom,spmi-adc-tm5` Gen1에서는 child sensor의 `qcom,decimation`과 `qcom,avg-samples`를 금지하므로 이 설정을 controller level에 둡니다. `qcom,spmi-adc-tm5-gen2`에서는 반대로 controller level의 두 속성을 금지하고 각 child sensor에 둡니다.
allOf:
- if:
properties:
compatible:
contains:
const: qcom,spmi-adc-tm5
then:
patternProperties:
"^([-a-z0-9]*)@[0-7]$":
properties:
qcom,decimation: false
qcom,avg-samples: false
- if:
properties:
compatible:
contains:
const: qcom,spmi-adc-tm5-gen2
then:
properties:
qcom,avg-samples: false
qcom,decimation: false
Controller 필수 속성과 제한
155-163Controller에는 `compatible`, `reg`, `interrupts`, `#address-cells`, `#size-cells`가 필수입니다. `unevaluatedProperties: false`로 스키마 밖 속성을 제한합니다.
PM8150B ADC TM5 예제
164-205첫 예제는 PM8150B ADC5의 `ADC5_AMUX_THM3_100K_PU` channel을 만들고 0x3500의 Gen1 ADC TM5에 연결합니다. `conn-therm@0`은 monitor channel 0, ratiometric calibration, 200 µs settle time을 사용합니다. Gen1이므로 avg-samples와 decimation을 child에 두지 않습니다.
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pm8150b_adc: adc@3100 {
compatible = "qcom,spmi-adc5";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "conn_therm";
};
};
adc-tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
conn-therm@0 {
reg = <0>;
io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
PMK8350 ADC TM5 Gen2 예제
206-263두 번째 예제는 PMK8350 ADC7에 XO thermistor와 PM8350의 connector thermistor channel을 만들고 0x3400의 `qcom,spmi-adc-tm5-gen2` controller에 연결합니다. `pmk8350-xo-therm@0`은 decimation 340, ratiometric calibration, 200 µs settle time을 사용합니다. `conn-therm@1`은 avg-samples 2와 같은 calibration·settle time을 사용합니다. Gen2 sampling 속성은 각 child에 위치합니다.
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pmk8350_vadc: adc@3100 {
compatible = "qcom,spmi-adc7";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@44 {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "xo_therm";
};
channel@147 {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "conn_therm";
};
};
adc-tm@3400 {
compatible = "qcom,spmi-adc-tm5-gen2";
reg = <0x3400>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
pmk8350-xo-therm@0 {
reg = <0>;
io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,decimation = <340>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
conn-therm@1 {
reg = <1>;
io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,avg-samples = <2>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
...
요약과 해설
qcom-spmi-adc-tm5.yaml:1-263Qualcomm ADC TM5의 Gen1·Gen2별 sampling 속성 위치와 channel calibration을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·수치·예제 코드를 원형대로 유지합니다.