요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car Thermal
maintainers:
- Niklas Söderlund <niklas.soderlund@ragnatech.se>
properties:
compatible:
oneOf:
- items:
- enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
- const: renesas,rcar-thermal # Generic without thermal-zone
- items:
- enum:
- renesas,thermal-r8a7742 # RZ/G1H
- renesas,thermal-r8a7743 # RZ/G1M
- renesas,thermal-r8a7744 # RZ/G1N
- const: renesas,rcar-gen2-thermal # Generic thermal-zone
- items:
- enum:
- renesas,thermal-r8a7790 # R-Car H2
- renesas,thermal-r8a7791 # R-Car M2-W
- renesas,thermal-r8a7792 # R-Car V2H
- renesas,thermal-r8a7793 # R-Car M2-N
- const: renesas,rcar-gen2-thermal # Generic thermal-zone
- const: renesas,rcar-thermal # Generic without thermal-zone
- items:
- enum:
- renesas,thermal-r8a774c0 # RZ/G2E
- renesas,thermal-r8a77970 # R-Car V3M
- renesas,thermal-r8a77990 # R-Car E3
- renesas,thermal-r8a77995 # R-Car D3
reg:
description:
Address ranges of the thermal registers. If more then one range is given
the first one must be the common registers followed by each sensor
according to the datasheet.
minItems: 1
maxItems: 4
interrupts:
minItems: 1
maxItems: 3
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 0
required:
- compatible
- reg
allOf:
- if:
not:
properties:
compatible:
contains:
enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
then:
required:
- resets
- '#thermal-sensor-cells'
- if:
not:
properties:
compatible:
contains:
const: renesas,thermal-r8a7779 # R-Car H1
then:
required:
- interrupts
- clocks
- power-domains
additionalProperties: false
examples:
# Example (non interrupt support)
- |
thermal@ffc48000 {
compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
reg = <0xffc48000 0x38>;
};
# Example (interrupt support)
- |
#include <dt-bindings/clock/r8a73a4-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
thermal@e61f0000 {
compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
reg = <0xe61f0000 0x14>, <0xe61f0100 0x38>,
<0xe61f0200 0x38>, <0xe61f0300 0x38>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp5_clks R8A73A4_CLK_THERMAL>;
power-domains = <&pd_c5>;
};
# Example (with thermal-zone)
- |
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7790-sysc.h>
thermal: thermal@e61f0000 {
compatible = "renesas,thermal-r8a7790",
"renesas,rcar-gen2-thermal",
"renesas,rcar-thermal";
reg = <0xe61f0000 0x10>, <0xe61f0100 0x38>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 522>;
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
resets = <&cpg 522>;
#thermal-sensor-cells = <0>;
};
thermal-zones {
cpu_thermal: cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <5000>;
thermal-sensors = <&thermal>;
trips {
cpu-crit {
temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
};
cooling-maps {
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Renesas R-Car Thermal
1-12이 GPL-2.0-only YAML 스키마는 구형 Renesas R-Car thermal controller를 정의합니다. 저작권은 Renesas Electronics Corp.에 있으며 maintainer는 Niklas Söderlund입니다.
R-Mobile, RZ/G1·G2와 R-Car compatible
13-40R-Mobile APE6와 R-Car H1은 SoC compatible 뒤에 thermal zone이 없는 generic `renesas,rcar-thermal`을 둡니다. RZ/G1H·G1M·G1N은 thermal zone을 지원하는 `renesas,rcar-gen2-thermal`을 fallback으로 둡니다. R-Car H2·M2-W·V2H·M2-N은 Gen2 fallback 다음에 구형 generic fallback도 둡니다. RZ/G2E와 R-Car V3M·E3·D3는 SoC compatible만 사용합니다.
properties:
compatible:
oneOf:
- items:
- enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
- const: renesas,rcar-thermal # Generic without thermal-zone
- items:
- enum:
- renesas,thermal-r8a7742 # RZ/G1H
- renesas,thermal-r8a7743 # RZ/G1M
- renesas,thermal-r8a7744 # RZ/G1N
- const: renesas,rcar-gen2-thermal # Generic thermal-zone
- items:
- enum:
- renesas,thermal-r8a7790 # R-Car H2
- renesas,thermal-r8a7791 # R-Car M2-W
- renesas,thermal-r8a7792 # R-Car V2H
- renesas,thermal-r8a7793 # R-Car M2-N
- const: renesas,rcar-gen2-thermal # Generic thermal-zone
- const: renesas,rcar-thermal # Generic without thermal-zone
- items:
- enum:
- renesas,thermal-r8a774c0 # RZ/G2E
- renesas,thermal-r8a77970 # R-Car V3M
- renesas,thermal-r8a77990 # R-Car E3
- renesas,thermal-r8a77995 # R-Car D3
Register 범위와 provider cell
41-64`reg`는 thermal register 주소 범위를 1~4개 받습니다. 여러 범위를 지정하면 첫 번째는 공통 register이고 그 뒤는 datasheet 순서에 따른 각 sensor register여야 합니다. `interrupts`는 1~3개, `clocks`, `power-domains`, `resets`는 각각 최대 한 항목입니다. `#thermal-sensor-cells = 0`이므로 consumer는 별도 sensor ID를 전달하지 않습니다.
reg:
description:
Address ranges of the thermal registers. If more then one range is given
the first one must be the common registers followed by each sensor
according to the datasheet.
minItems: 1
maxItems: 4
interrupts:
minItems: 1
maxItems: 3
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 0
플랫폼별 reset·interrupt 요구 조건
65-96`compatible`과 `reg`는 항상 필수입니다. R-Mobile APE6와 R-Car H1이 아닌 플랫폼에는 `resets`와 `#thermal-sensor-cells`가 추가로 필수입니다. R-Car H1이 아닌 플랫폼에는 `interrupts`, `clocks`, `power-domains`도 필수입니다. `additionalProperties: false`로 정의되지 않은 속성을 금지합니다.
required:
- compatible
- reg
allOf:
- if:
not:
properties:
compatible:
contains:
enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
then:
required:
- resets
- '#thermal-sensor-cells'
- if:
not:
properties:
compatible:
contains:
const: renesas,thermal-r8a7779 # R-Car H1
then:
required:
- interrupts
- clocks
- power-domains
additionalProperties: false
인터럽트 없는 R-Car H1 예제
97-104첫 예제는 interrupt를 지원하지 않는 R-Car H1입니다. `renesas,thermal-r8a7779`와 `renesas,rcar-thermal`을 사용하고 `0xffc48000`의 0x38-byte register만 선언합니다.
- |
thermal@ffc48000 {
compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
reg = <0xffc48000 0x38>;
};
인터럽트를 사용하는 R-Mobile APE6 예제
105-119둘째 예제는 R-Mobile APE6의 공통 register 하나와 sensor register 세 개를 순서대로 지정합니다. GIC SPI 69 level-high interrupt, MSTP5 thermal clock, C5 power domain을 연결하며 이 구형 조합에는 reset과 provider cell이 요구되지 않습니다.
- |
#include <dt-bindings/clock/r8a73a4-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
thermal@e61f0000 {
compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
reg = <0xe61f0000 0x14>, <0xe61f0100 0x38>,
<0xe61f0200 0x38>, <0xe61f0300 0x38>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp5_clks R8A73A4_CLK_THERMAL>;
power-domains = <&pd_c5>;
};
R-Car Gen2 thermal zone 예제
120-155마지막 예제는 R-Car H2 compatible 뒤에 `renesas,rcar-gen2-thermal`과 `renesas,rcar-thermal` fallback을 둡니다. 공통·sensor register, GIC SPI 69, clock, always-on power domain, reset을 연결하고 0-cell provider로 선언합니다. CPU thermal zone은 passive polling 1000ms, 일반 polling 5000ms를 사용하고 115000 millidegree critical trip과 hysteresis 0을 설정합니다.
- |
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7790-sysc.h>
thermal: thermal@e61f0000 {
compatible = "renesas,thermal-r8a7790",
"renesas,rcar-gen2-thermal",
"renesas,rcar-thermal";
reg = <0xe61f0000 0x10>, <0xe61f0100 0x38>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 522>;
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
resets = <&cpg 522>;
#thermal-sensor-cells = <0>;
};
thermal-zones {
cpu_thermal: cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <5000>;
thermal-sensors = <&thermal>;
trips {
cpu-crit {
temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
};
cooling-maps {
};
};
};
요약과 해설
rcar-thermal.yaml:1-155구형 R-Car thermal controller의 compatible 계층과 플랫폼별 필수 자원을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·register·interrupt·clock·power domain·reset·수치·예제 코드를 원형대로 유지합니다.