요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0 OR MIT)
# Copyright 2019 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: QCOM SoC Temperature Sensor (TSENS)
maintainers:
- Amit Kucheria <amitk@kernel.org>
description: |
QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
three distinct major versions of the IP that is supported by a single driver.
The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
everything before v1 when there was no versioning information.
properties:
compatible:
oneOf:
- description: msm8960 TSENS based
items:
- enum:
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- description: v0.1 of TSENS
items:
- enum:
- qcom,mdm9607-tsens
- qcom,msm8226-tsens
- qcom,msm8909-tsens
- qcom,msm8916-tsens
- qcom,msm8939-tsens
- qcom,msm8974-tsens
- const: qcom,tsens-v0_1
- description: v1 of TSENS
items:
- enum:
- qcom,ipq5018-tsens
- qcom,msm8937-tsens
- qcom,msm8956-tsens
- qcom,msm8976-tsens
- qcom,qcs404-tsens
- const: qcom,tsens-v1
- description: v2 of TSENS
items:
- enum:
- qcom,glymur-tsens
- qcom,milos-tsens
- qcom,msm8953-tsens
- qcom,msm8996-tsens
- qcom,msm8998-tsens
- qcom,qcm2290-tsens
- qcom,qcs615-tsens
- qcom,sa8255p-tsens
- qcom,sa8775p-tsens
- qcom,sar2130p-tsens
- qcom,sc7180-tsens
- qcom,sc7280-tsens
- qcom,sc8180x-tsens
- qcom,sc8280xp-tsens
- qcom,sdm630-tsens
- qcom,sdm845-tsens
- qcom,sm6115-tsens
- qcom,sm6350-tsens
- qcom,sm6375-tsens
- qcom,sm8150-tsens
- qcom,sm8250-tsens
- qcom,sm8350-tsens
- qcom,sm8450-tsens
- qcom,sm8550-tsens
- qcom,sm8650-tsens
- qcom,x1e80100-tsens
- const: qcom,tsens-v2
- description: v2 of TSENS with combined interrupt
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
- description: v2 of TSENS with combined interrupt
items:
- enum:
- qcom,ipq6018-tsens
- qcom,ipq9574-tsens
- const: qcom,ipq8074-tsens
reg:
items:
- description: TM registers
- description: SROT registers
interrupts:
minItems: 1
maxItems: 2
interrupt-names:
minItems: 1
maxItems: 2
nvmem-cells:
oneOf:
- minItems: 1
maxItems: 2
description:
Reference to an nvmem node for the calibration data
- minItems: 5
maxItems: 35
description: |
Reference to nvmem cells for the calibration mode, two calibration
bases and two cells per each sensor
# special case for msm8974 / apq8084
- maxItems: 51
description: |
Reference to nvmem cells for the calibration mode, two calibration
bases and two cells per each sensor, main and backup copies, plus use_backup cell
nvmem-cell-names:
oneOf:
- minItems: 1
items:
- const: calib
- enum:
- calib_backup
- calib_sel
- minItems: 5
items:
- const: mode
- const: base1
- const: base2
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
# special case for msm8974 / apq8084
- items:
- const: mode
- const: base1
- const: base2
- const: use_backup
- const: mode_backup
- const: base1_backup
- const: base2_backup
- const: s0_p1
- const: s0_p2
- const: s1_p1
- const: s1_p2
- const: s2_p1
- const: s2_p2
- const: s3_p1
- const: s3_p2
- const: s4_p1
- const: s4_p2
- const: s5_p1
- const: s5_p2
- const: s6_p1
- const: s6_p2
- const: s7_p1
- const: s7_p2
- const: s8_p1
- const: s8_p2
- const: s9_p1
- const: s9_p2
- const: s10_p1
- const: s10_p2
- const: s0_p1_backup
- const: s0_p2_backup
- const: s1_p1_backup
- const: s1_p2_backup
- const: s2_p1_backup
- const: s2_p2_backup
- const: s3_p1_backup
- const: s3_p2_backup
- const: s4_p1_backup
- const: s4_p2_backup
- const: s5_p1_backup
- const: s5_p2_backup
- const: s6_p1_backup
- const: s6_p2_backup
- const: s7_p1_backup
- const: s7_p2_backup
- const: s8_p1_backup
- const: s8_p2_backup
- const: s9_p1_backup
- const: s9_p2_backup
- const: s10_p1_backup
- const: s10_p2_backup
- minItems: 8
items:
- const: mode
- const: base0
- const: base1
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
"#qcom,sensors":
description:
Number of sensors enabled on this platform
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 16
"#thermal-sensor-cells":
const: 1
required:
- compatible
- interrupts
- interrupt-names
- "#qcom,sensors"
allOf:
- $ref: thermal-sensor.yaml#
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5018-tsens
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper or lower threshold crossed
interrupt-names:
items:
- const: uplow
- if:
properties:
compatible:
contains:
const: qcom,tsens-v2
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper or lower threshold crossed
- description: Interrupt if critical threshold crossed
interrupt-names:
items:
- const: uplow
- const: critical
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper, lower or critical thresholds crossed
interrupt-names:
items:
- const: combined
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
- qcom,tsens-v2
then:
required:
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
thermal-sensor {
compatible = "qcom,ipq8064-tsens";
nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
nvmem-cell-names = "calib", "calib_backup";
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <11>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1 (new calibration data: for pre v1 IP):
thermal-sensor@4a9000 {
compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_mode>,
<&tsens_base1>, <&tsens_base2>,
<&tsens_s0_p1>, <&tsens_s0_p2>,
<&tsens_s1_p1>, <&tsens_s1_p2>,
<&tsens_s2_p1>, <&tsens_s2_p2>,
<&tsens_s4_p1>, <&tsens_s4_p2>,
<&tsens_s5_p1>, <&tsens_s5_p2>;
nvmem-cell-names = "mode",
"base1", "base2",
"s0_p1", "s0_p2",
"s1_p1", "s1_p2",
"s2_p1", "s2_p2",
"s4_p1", "s4_p2",
"s5_p1", "s5_p2";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <5>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1 (legacy: for pre v1 IP):
tsens1: thermal-sensor@4a9000 {
compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
nvmem-cell-names = "calib", "calib_sel";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <5>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 2 (for any platform containing v1 of the TSENS IP):
tsens2: thermal-sensor@4a9000 {
compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
reg = <0x004a9000 0x1000>, /* TM */
<0x004a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_caldata>;
nvmem-cell-names = "calib";
interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <10>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 3 (for any platform containing v2 of the TSENS IP):
tsens3: thermal-sensor@c263000 {
compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
reg = <0xc263000 0x1ff>,
<0xc222000 0x1ff>;
interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow", "critical";
#qcom,sensors = <13>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 4 (for any IPQ8074 based SoC-s):
tsens4: thermal-sensor@4a9000 {
compatible = "qcom,ipq8074-tsens";
reg = <0x4a9000 0x1000>,
<0x4a8000 0x1000>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "combined";
#qcom,sensors = <16>;
#thermal-sensor-cells = <1>;
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
QCOM SoC Temperature Sensor
1-12이 GPL-2.0 또는 MIT YAML 스키마는 Qualcomm SoC Temperature Sensor(TSENS)를 정의합니다. 스키마 식별자는 `thermal/qcom-tsens.yaml#`이며 core 메타 스키마를 사용합니다. 저작권은 Linaro Ltd.에 있고 maintainer는 Amit Kucheria입니다.
TSENS IP 세대
13-18Qualcomm SoC에는 온도를 측정하는 TSENS IP가 있습니다. 하나의 드라이버가 서로 구별되는 세 가지 주요 세대를 지원합니다. 드라이버에서는 이를 `v0.1`, `v1`, `v2`라고 부르며, 버전 정보가 존재하지 않았던 v1 이전의 모든 구현은 `v0.1`로 묶습니다.
MSM8960 계열과 TSENS v0.1
19-38`compatible`은 `oneOf`로 세대와 SoC 조합을 제한합니다. MSM8960 기반 구현은 `qcom,ipq8064-tsens` 또는 `qcom,msm8960-tsens`를 직접 사용합니다. TSENS v0.1 구현은 `qcom,mdm9607-tsens`, `qcom,msm8226-tsens`, `qcom,msm8909-tsens`, `qcom,msm8916-tsens`, `qcom,msm8939-tsens`, `qcom,msm8974-tsens` 가운데 하나를 먼저 쓰고 `qcom,tsens-v0_1`을 fallback으로 둡니다.
properties:
compatible:
oneOf:
- description: msm8960 TSENS based
items:
- enum:
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- description: v0.1 of TSENS
items:
- enum:
- qcom,mdm9607-tsens
- qcom,msm8226-tsens
- qcom,msm8909-tsens
- qcom,msm8916-tsens
- qcom,msm8939-tsens
- qcom,msm8974-tsens
- const: qcom,tsens-v0_1
TSENS v1, v2와 결합 인터럽트 변형
39-92TSENS v1은 IPQ5018, MSM8937, MSM8956, MSM8976, QCS404용 SoC compatible 뒤에 `qcom,tsens-v1`을 둡니다. TSENS v2는 Glymur, Milos, MSM8953·8996·8998, QCM2290, QCS615, SA8255P·SA8775P·SAR2130P, SC7180·7280·8180X·8280XP, SDM630·845, SM6115·6350·6375·8150·8250·8350·8450·8550·8650, X1E80100용 compatible 뒤에 `qcom,tsens-v2`를 둡니다.
상한·하한·critical 조건을 하나의 인터럽트로 합친 v2 구현은 `qcom,ipq5332-tsens`, `qcom,ipq5424-tsens`, `qcom,ipq8074-tsens`를 직접 사용할 수 있습니다. IPQ6018과 IPQ9574는 각 SoC compatible 뒤에 `qcom,ipq8074-tsens`를 fallback으로 둡니다.
- description: v1 of TSENS
items:
- enum:
- qcom,ipq5018-tsens
- qcom,msm8937-tsens
- qcom,msm8956-tsens
- qcom,msm8976-tsens
- qcom,qcs404-tsens
- const: qcom,tsens-v1
- description: v2 of TSENS
items:
- enum:
- qcom,glymur-tsens
- qcom,milos-tsens
- qcom,msm8953-tsens
- qcom,msm8996-tsens
- qcom,msm8998-tsens
- qcom,qcm2290-tsens
- qcom,qcs615-tsens
- qcom,sa8255p-tsens
- qcom,sa8775p-tsens
- qcom,sar2130p-tsens
- qcom,sc7180-tsens
- qcom,sc7280-tsens
- qcom,sc8180x-tsens
- qcom,sc8280xp-tsens
- qcom,sdm630-tsens
- qcom,sdm845-tsens
- qcom,sm6115-tsens
- qcom,sm6350-tsens
- qcom,sm6375-tsens
- qcom,sm8150-tsens
- qcom,sm8250-tsens
- qcom,sm8350-tsens
- qcom,sm8450-tsens
- qcom,sm8550-tsens
- qcom,sm8650-tsens
- qcom,x1e80100-tsens
- const: qcom,tsens-v2
- description: v2 of TSENS with combined interrupt
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
- description: v2 of TSENS with combined interrupt
items:
- enum:
- qcom,ipq6018-tsens
- qcom,ipq9574-tsens
- const: qcom,ipq8074-tsens
TM·SROT 레지스터와 인터럽트
93-105`reg`는 두 항목을 순서대로 받으며 첫 번째가 TM 레지스터, 두 번째가 SROT 레지스터입니다. `interrupts`와 `interrupt-names`는 각각 최소 1개, 최대 2개를 허용합니다. 실제 개수와 이름은 뒤의 세대별 조건에서 결정됩니다.
reg:
items:
- description: TM registers
- description: SROT registers
interrupts:
minItems: 1
maxItems: 2
interrupt-names:
minItems: 1
maxItems: 2
NVMEM 보정 데이터 참조
106-122`nvmem-cells`에는 세 형태가 있습니다. 첫째, 보정 데이터를 담은 NVMEM 노드 참조 1~2개를 사용합니다. 둘째, 보정 모드, 두 개의 보정 base, 센서마다 두 셀을 두어 5~35개를 사용합니다. 셋째, MSM8974/APQ8084의 특수 형식은 main·backup 사본과 `use_backup` 셀까지 포함해 최대 51개를 사용합니다.
nvmem-cells:
oneOf:
- minItems: 1
maxItems: 2
description:
Reference to an nvmem node for the calibration data
- minItems: 5
maxItems: 35
description: |
Reference to nvmem cells for the calibration mode, two calibration
bases and two cells per each sensor
# special case for msm8974 / apq8084
- maxItems: 51
description: |
Reference to nvmem cells for the calibration mode, two calibration
bases and two cells per each sensor, main and backup copies, plus use_backup cell
일반 NVMEM 셀 이름
123-168`nvmem-cell-names`의 첫 형식은 반드시 `calib`로 시작하고 선택적으로 `calib_backup` 또는 `calib_sel`을 둡니다. 두 번째 형식은 최소 5개이며 `mode`, `base1`, `base2` 뒤에 각 센서의 point 1과 point 2 보정값을 뜻하는 `s[번호]_p1`, `s[번호]_p2` 쌍을 배치합니다. 스키마는 최대 16개 센서에 대응하도록 이 패턴 쌍을 반복합니다.
nvmem-cell-names:
oneOf:
- minItems: 1
items:
- const: calib
- enum:
- calib_backup
- calib_sel
- minItems: 5
items:
- const: mode
- const: base1
- const: base2
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
# special case for msm8974 / apq8084
MSM8974/APQ8084와 offset 형식
169-233MSM8974/APQ8084 특수 형식은 `mode`, `base1`, `base2`, `use_backup`, backup용 mode·base 두 개를 먼저 둡니다. 이어 센서 0~10의 `p1`·`p2` main 셀과 같은 센서 범위의 backup 셀을 정확한 순서로 나열합니다. 다른 offset 형식은 최소 8개이며 `mode`, `base0`, `base1` 뒤에 `tsens_sens[번호]_off` 패턴의 센서 offset 셀을 이어 붙입니다.
- items:
- const: mode
- const: base1
- const: base2
- const: use_backup
- const: mode_backup
- const: base1_backup
- const: base2_backup
- const: s0_p1
- const: s0_p2
- const: s1_p1
- const: s1_p2
- const: s2_p1
- const: s2_p2
- const: s3_p1
- const: s3_p2
- const: s4_p1
- const: s4_p2
- const: s5_p1
- const: s5_p2
- const: s6_p1
- const: s6_p2
- const: s7_p1
- const: s7_p2
- const: s8_p1
- const: s8_p2
- const: s9_p1
- const: s9_p2
- const: s10_p1
- const: s10_p2
- const: s0_p1_backup
- const: s0_p2_backup
- const: s1_p1_backup
- const: s1_p2_backup
- const: s2_p1_backup
- const: s2_p2_backup
- const: s3_p1_backup
- const: s3_p2_backup
- const: s4_p1_backup
- const: s4_p2_backup
- const: s5_p1_backup
- const: s5_p2_backup
- const: s6_p1_backup
- const: s6_p2_backup
- const: s7_p1_backup
- const: s7_p2_backup
- const: s8_p1_backup
- const: s8_p2_backup
- const: s9_p1_backup
- const: s9_p2_backup
- const: s10_p1_backup
- const: s10_p2_backup
- minItems: 8
items:
- const: mode
- const: base0
- const: base1
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
센서 수와 provider cell
234-252`#qcom,sensors`는 플랫폼에서 활성화한 센서 수를 나타내는 `uint32`이며 1~16 범위입니다. `#thermal-sensor-cells`는 센서 ID 한 셀을 받도록 1입니다. `compatible`, `interrupts`, `interrupt-names`, `#qcom,sensors`는 필수이며 공통 `thermal-sensor.yaml#` 스키마를 함께 적용합니다.
"#qcom,sensors":
description:
Number of sensors enabled on this platform
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 16
"#thermal-sensor-cells":
const: 1
required:
- compatible
- interrupts
- interrupt-names
- "#qcom,sensors"
allOf:
- $ref: thermal-sensor.yaml#
구형 세대의 uplow 인터럽트
253-271IPQ5018, IPQ8064, MSM8960 또는 `qcom,tsens-v0_1`·`qcom,tsens-v1`을 포함하는 구현은 인터럽트 하나를 사용합니다. 이 인터럽트는 상한 또는 하한 임계값을 넘었을 때 발생하는 결합 인터럽트이며 `interrupt-names` 값은 `uplow`입니다.
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5018-tsens
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper or lower threshold crossed
interrupt-names:
items:
- const: uplow
v2와 IPQ 결합 인터럽트
272-303`qcom,tsens-v2`를 포함하는 일반 v2 구현은 인터럽트 두 개를 순서대로 사용합니다. 첫 번째 `uplow`는 상한 또는 하한 임계값을 넘을 때, 두 번째 `critical`은 critical 임계값을 넘을 때 발생합니다. IPQ5332, IPQ5424, IPQ8074 변형은 세 임계 조건을 모두 하나로 합친 인터럽트 한 개를 사용하며 이름은 `combined`입니다.
- if:
properties:
compatible:
contains:
const: qcom,tsens-v2
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper or lower threshold crossed
- description: Interrupt if critical threshold crossed
interrupt-names:
items:
- const: uplow
- const: critical
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper, lower or critical thresholds crossed
interrupt-names:
items:
- const: combined
세대 식별 구현의 reg 요구 조건
304-322IPQ5332·IPQ5424·IPQ8074와 `qcom,tsens-v0_1`·`qcom,tsens-v1`·`qcom,tsens-v2` 가운데 하나를 포함하면 `reg`가 필수입니다. `unevaluatedProperties: false`이므로 공통 thermal sensor 스키마와 이 binding에서 평가하지 않은 속성은 허용하지 않습니다.
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
- qcom,tsens-v2
then:
required:
- reg
unevaluatedProperties: false
IPQ8064 기존 보정 예제
323-337첫 예제는 `qcom,ipq8064-tsens`를 사용하고 `tsens_calib`와 `tsens_calib_backup` NVMEM 참조를 `calib`, `calib_backup`으로 연결합니다. GIC SPI 178 level-high 인터럽트의 이름은 `uplow`이며 센서 11개와 1-cell thermal sensor provider를 선언합니다.
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
thermal-sensor {
compatible = "qcom,ipq8064-tsens";
nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
nvmem-cell-names = "calib", "calib_backup";
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <11>;
#thermal-sensor-cells = <1>;
};
v0.1 새 보정 데이터 예제
338-367두 번째 예제는 v1 이전 IP의 새 보정 데이터 형식입니다. MSM8916 v0.1의 TM과 SROT 레지스터를 지정하고 `mode`, `base1`, `base2`, 센서 0·1·2·4·5의 `p1`·`p2` 셀을 같은 순서의 이름과 연결합니다. GIC SPI 184 `uplow` 인터럽트, 센서 5개, 1-cell provider를 선언합니다.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1 (new calibration data: for pre v1 IP):
thermal-sensor@4a9000 {
compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_mode>,
<&tsens_base1>, <&tsens_base2>,
<&tsens_s0_p1>, <&tsens_s0_p2>,
<&tsens_s1_p1>, <&tsens_s1_p2>,
<&tsens_s2_p1>, <&tsens_s2_p2>,
<&tsens_s4_p1>, <&tsens_s4_p2>,
<&tsens_s5_p1>, <&tsens_s5_p2>;
nvmem-cell-names = "mode",
"base1", "base2",
"s0_p1", "s0_p2",
"s1_p1", "s1_p2",
"s2_p1", "s2_p2",
"s4_p1", "s4_p2",
"s5_p1", "s5_p2";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <5>;
#thermal-sensor-cells = <1>;
};
v0.1 legacy 보정 예제
368-385세 번째 예제도 MSM8916 v0.1이지만 legacy 보정 형식을 사용합니다. `tsens_caldata`와 `tsens_calsel`을 각각 `calib`, `calib_sel`에 연결하고 같은 TM·SROT 주소, GIC SPI 184 `uplow` 인터럽트, 센서 5개를 선언합니다.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1 (legacy: for pre v1 IP):
tsens1: thermal-sensor@4a9000 {
compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
nvmem-cell-names = "calib", "calib_sel";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <5>;
#thermal-sensor-cells = <1>;
};
TSENS v1 예제
386-403네 번째 예제는 QCS404와 `qcom,tsens-v1` 조합입니다. TM·SROT 레지스터와 단일 `calib` NVMEM 참조를 사용하고 GIC SPI 506 `uplow` 인터럽트, 센서 10개, 1-cell provider를 선언합니다.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 2 (for any platform containing v1 of the TSENS IP):
tsens2: thermal-sensor@4a9000 {
compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
reg = <0x004a9000 0x1000>, /* TM */
<0x004a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_caldata>;
nvmem-cell-names = "calib";
interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <10>;
#thermal-sensor-cells = <1>;
};
TSENS v2 예제
404-419다섯 번째 예제는 SDM845와 `qcom,tsens-v2` 조합입니다. 두 레지스터 영역과 GIC SPI 506·508 인터럽트를 지정하며 이름은 각각 `uplow`, `critical`입니다. 플랫폼은 센서 13개를 활성화합니다.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 3 (for any platform containing v2 of the TSENS IP):
tsens3: thermal-sensor@c263000 {
compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
reg = <0xc263000 0x1ff>,
<0xc222000 0x1ff>;
interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow", "critical";
#qcom,sensors = <13>;
#thermal-sensor-cells = <1>;
};
IPQ8074 결합 인터럽트 예제
420-434마지막 예제는 `qcom,ipq8074-tsens`를 사용합니다. TM·SROT 레지스터와 GIC SPI 184 인터럽트 하나를 지정하고 이름을 `combined`로 둡니다. 상한·하한·critical 조건이 이 하나의 인터럽트로 합쳐지며 센서 16개와 1-cell provider를 선언합니다.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 4 (for any IPQ8074 based SoC-s):
tsens4: thermal-sensor@4a9000 {
compatible = "qcom,ipq8074-tsens";
reg = <0x4a9000 0x1000>,
<0x4a8000 0x1000>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "combined";
#qcom,sensors = <16>;
#thermal-sensor-cells = <1>;
};
...
요약과 해설
qcom-tsens.yaml:1-434Qualcomm TSENS의 세대 식별 방식과 플랫폼별 compatible, 세 종류의 NVMEM 보정 데이터 형식, `uplow`·`critical`·`combined` 인터럽트 구성을 정리합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 property·compatible·cell 이름·레지스터·인터럽트·예제 코드를 원형대로 유지합니다.