요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2020 Renesas Electronics Corp.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car Gen3 Thermal Sensor
description:
On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC)
control the thermal sensors (THS) which are the analog circuits for
measuring temperature (Tj) inside the LSI.
maintainers:
- Niklas Söderlund <[email protected]>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- renesas,r8a774a1-thermal # RZ/G2M
- renesas,r8a774b1-thermal # RZ/G2N
- renesas,r8a774e1-thermal # RZ/G2H
- renesas,r8a7795-thermal # R-Car H3
- renesas,r8a7796-thermal # R-Car M3-W
- renesas,r8a77961-thermal # R-Car M3-W+
- renesas,r8a77965-thermal # R-Car M3-N
- renesas,r8a77980-thermal # R-Car V3H
- renesas,r8a779a0-thermal # R-Car V3U
- renesas,r8a779f0-thermal # R-Car S4-8
- renesas,r8a779g0-thermal # R-Car V4H
- renesas,r8a779h0-thermal # R-Car V4M
reg: true
interrupts:
items:
- description: TEMP1 interrupt
- description: TEMP2 interrupt
- description: TEMP3 interrupt
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 1
required:
- compatible
- reg
- clocks
- power-domains
- resets
if:
properties:
compatible:
contains:
enum:
- renesas,r8a779a0-thermal
then:
properties:
reg:
items:
- description: TSC0 registers
- description: TSC1 registers
- description: TSC2 registers
- description: TSC3 registers
- description: TSC4 registers
else:
properties:
reg:
minItems: 2
items:
- description: TSC1 registers
- description: TSC2 registers
- description: TSC3 registers
- description: TSC4 registers
if:
not:
properties:
compatible:
contains:
enum:
- renesas,r8a779f0-thermal
- renesas,r8a779g0-thermal
- renesas,r8a779h0-thermal
then:
required:
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r8a7795-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7795-sysc.h>
tsc: thermal@e6198000 {
compatible = "renesas,r8a7795-thermal";
reg = <0xe6198000 0x100>,
<0xe61a0000 0x100>,
<0xe61a8000 0x100>;
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 522>;
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
resets = <&cpg 522>;
#thermal-sensor-cells = <1>;
};
thermal-zones {
sensor_thermal: sensor-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsc 0>;
trips {
sensor1_crit: sensor1-crit {
temperature = <90000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
- |
#include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a779a0-sysc.h>
tsc_r8a779a0: thermal@e6190000 {
compatible = "renesas,r8a779a0-thermal";
reg = <0xe6190000 0x200>,
<0xe6198000 0x200>,
<0xe61a0000 0x200>,
<0xe61a8000 0x200>,
<0xe61b0000 0x200>;
clocks = <&cpg CPG_MOD 919>;
power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
resets = <&cpg 919>;
#thermal-sensor-cells = <1>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Renesas R-Car Gen3 Thermal Sensor
1-19이 GPL-2.0-only YAML 스키마는 Renesas R-Car Gen3 thermal sensor를 정의합니다. 대부분의 R-Car Gen3 이후 SoC에서 thermal sensor controller(TSC)는 LSI 내부 junction temperature(Tj)를 측정하는 analog 회로인 thermal sensor(THS)를 제어합니다. 공통 `thermal-sensor.yaml#`을 사용합니다.
지원 RZ/G2와 R-Car SoC
20-35지원 대상은 RZ/G2M·G2N·G2H와 R-Car H3·M3-W·M3-W+·M3-N·V3H·V3U·S4-8·V4H·V4M입니다. 각 플랫폼은 `renesas,r8a774a1-thermal`부터 `renesas,r8a779h0-thermal`까지 대응하는 SoC별 compatible 하나를 사용합니다.
properties:
compatible:
enum:
- renesas,r8a774a1-thermal # RZ/G2M
- renesas,r8a774b1-thermal # RZ/G2N
- renesas,r8a774e1-thermal # RZ/G2H
- renesas,r8a7795-thermal # R-Car H3
- renesas,r8a7796-thermal # R-Car M3-W
- renesas,r8a77961-thermal # R-Car M3-W+
- renesas,r8a77965-thermal # R-Car M3-N
- renesas,r8a77980-thermal # R-Car V3H
- renesas,r8a779a0-thermal # R-Car V3U
- renesas,r8a779f0-thermal # R-Car S4-8
- renesas,r8a779g0-thermal # R-Car V4H
- renesas,r8a779h0-thermal # R-Car V4M
Register, TEMP interrupt와 전원 자원
36-55`reg`는 뒤의 SoC 조건에 따라 register 범위를 받습니다. `interrupts`는 TEMP1, TEMP2, TEMP3 순서의 세 항목입니다. `clocks`, `power-domains`, `resets`는 각각 최대 한 항목이며 `#thermal-sensor-cells = 1`로 TSC의 sensor index를 받습니다.
reg: true
interrupts:
items:
- description: TEMP1 interrupt
- description: TEMP2 interrupt
- description: TEMP3 interrupt
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 1
공통 필수 속성
56-62모든 노드에는 `compatible`, `reg`, `clocks`, `power-domains`, `resets`가 필수입니다. Interrupt 요구 여부와 register 항목 수는 다음 조건에서 SoC별로 제한합니다.
required:
- compatible
- reg
- clocks
- power-domains
- resets
V3U register와 신형 SoC interrupt 조건
63-101R-Car V3U인 `renesas,r8a779a0-thermal`은 TSC0부터 TSC4까지 register 다섯 개를 정확한 순서로 사용합니다. 그 밖의 SoC는 최소 두 개이며 TSC1, TSC2, TSC3, TSC4 순서입니다. R-Car S4-8, V4H, V4M을 제외한 나머지는 `interrupts`도 필수입니다. `unevaluatedProperties: false`로 추가 속성을 제한합니다.
if:
properties:
compatible:
contains:
enum:
- renesas,r8a779a0-thermal
then:
properties:
reg:
items:
- description: TSC0 registers
- description: TSC1 registers
- description: TSC2 registers
- description: TSC3 registers
- description: TSC4 registers
else:
properties:
reg:
minItems: 2
items:
- description: TSC1 registers
- description: TSC2 registers
- description: TSC3 registers
- description: TSC4 registers
if:
not:
properties:
compatible:
contains:
enum:
- renesas,r8a779f0-thermal
- renesas,r8a779g0-thermal
- renesas,r8a779h0-thermal
then:
required:
- interrupts
unevaluatedProperties: false
R-Car H3 TSC와 thermal zone 예제
102-136첫 예제는 R-Car H3 TSC의 register 세 개, TEMP1~3에 대응하는 GIC SPI 67~69, module clock·always-on power domain·reset을 선언합니다. Sensor index 0을 `sensor-thermal` zone에 연결하고 passive polling 250ms, 일반 polling 1000ms, 90000 millidegree critical trip과 2000 millidegree hysteresis를 설정합니다.
- |
#include <dt-bindings/clock/r8a7795-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7795-sysc.h>
tsc: thermal@e6198000 {
compatible = "renesas,r8a7795-thermal";
reg = <0xe6198000 0x100>,
<0xe61a0000 0x100>,
<0xe61a8000 0x100>;
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 522>;
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
resets = <&cpg 522>;
#thermal-sensor-cells = <1>;
};
thermal-zones {
sensor_thermal: sensor-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsc 0>;
trips {
sensor1_crit: sensor1-crit {
temperature = <90000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
R-Car V3U TSC 예제
137-153둘째 예제는 R-Car V3U용 TSC0~TSC4 register 영역 다섯 개를 각각 0x200-byte로 지정합니다. CPG module clock 919, always-on power domain, reset 919를 연결하고 1-cell thermal sensor provider로 선언합니다. 이 compatible은 조건에 따라 interrupts가 필수가 아닙니다.
- |
#include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a779a0-sysc.h>
tsc_r8a779a0: thermal@e6190000 {
compatible = "renesas,r8a779a0-thermal";
reg = <0xe6190000 0x200>,
<0xe6198000 0x200>,
<0xe61a0000 0x200>,
<0xe61a8000 0x200>,
<0xe61b0000 0x200>;
clocks = <&cpg CPG_MOD 919>;
power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
resets = <&cpg 919>;
#thermal-sensor-cells = <1>;
};
요약과 해설
rcar-gen3-thermal.yaml:1-153R-Car Gen3 이후 TSC의 SoC별 register와 interrupt 조건을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·register·interrupt·clock·power domain·reset·수치·예제 코드를 원형대로 유지합니다.