← Documents Documentation/devicetree/bindings/thermal/rcar-thermal.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Thermal

Renesas R-Car Thermal

구형 R-Car thermal controller의 compatible 계층과 플랫폼별 필수 자원을 설명합니다.

Source pathDocumentation/devicetree/bindings/thermal/rcar-thermal.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

rcar-thermal.yaml:1-155

구형 R-Car thermal controller의 compatible 계층과 플랫폼별 필수 자원을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·register·interrupt·clock·power domain·reset·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0-only
2 # Copyright (C) 2020 Renesas Electronics Corp.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/thermal/rcar-thermal.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Renesas R-Car Thermal
9
10 maintainers:
11 - Niklas Söderlund <[email protected]>
12
13 properties:
14 compatible:
15 oneOf:
16 - items:
17 - enum:
18 - renesas,thermal-r8a73a4 # R-Mobile APE6
19 - renesas,thermal-r8a7779 # R-Car H1
20 - const: renesas,rcar-thermal # Generic without thermal-zone
21 - items:
22 - enum:
23 - renesas,thermal-r8a7742 # RZ/G1H
24 - renesas,thermal-r8a7743 # RZ/G1M
25 - renesas,thermal-r8a7744 # RZ/G1N
26 - const: renesas,rcar-gen2-thermal # Generic thermal-zone
27 - items:
28 - enum:
29 - renesas,thermal-r8a7790 # R-Car H2
30 - renesas,thermal-r8a7791 # R-Car M2-W
31 - renesas,thermal-r8a7792 # R-Car V2H
32 - renesas,thermal-r8a7793 # R-Car M2-N
33 - const: renesas,rcar-gen2-thermal # Generic thermal-zone
34 - const: renesas,rcar-thermal # Generic without thermal-zone
35 - items:
36 - enum:
37 - renesas,thermal-r8a774c0 # RZ/G2E
38 - renesas,thermal-r8a77970 # R-Car V3M
39 - renesas,thermal-r8a77990 # R-Car E3
40 - renesas,thermal-r8a77995 # R-Car D3
41 reg:
42 description:
43 Address ranges of the thermal registers. If more then one range is given
44 the first one must be the common registers followed by each sensor
45 according to the datasheet.
46 minItems: 1
47 maxItems: 4
48
49 interrupts:
50 minItems: 1
51 maxItems: 3
52
53 clocks:
54 maxItems: 1
55
56 power-domains:
57 maxItems: 1
58
59 resets:
60 maxItems: 1
61
62 "#thermal-sensor-cells":
63 const: 0
64
65 required:
66 - compatible
67 - reg
68
69 allOf:
70 - if:
71 not:
72 properties:
73 compatible:
74 contains:
75 enum:
76 - renesas,thermal-r8a73a4 # R-Mobile APE6
77 - renesas,thermal-r8a7779 # R-Car H1
78 then:
79 required:
80 - resets
81 - '#thermal-sensor-cells'
82
83 - if:
84 not:
85 properties:
86 compatible:
87 contains:
88 const: renesas,thermal-r8a7779 # R-Car H1
89 then:
90 required:
91 - interrupts
92 - clocks
93 - power-domains
94
95 additionalProperties: false
96
97 examples:
98 # Example (non interrupt support)
99 - |
100 thermal@ffc48000 {
101 compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
102 reg = <0xffc48000 0x38>;
103 };
104
105 # Example (interrupt support)
106 - |
107 #include <dt-bindings/clock/r8a73a4-clock.h>
108 #include <dt-bindings/interrupt-controller/arm-gic.h>
109 #include <dt-bindings/interrupt-controller/irq.h>
110
111 thermal@e61f0000 {
112 compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
113 reg = <0xe61f0000 0x14>, <0xe61f0100 0x38>,
114 <0xe61f0200 0x38>, <0xe61f0300 0x38>;
115 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
116 clocks = <&mstp5_clks R8A73A4_CLK_THERMAL>;
117 power-domains = <&pd_c5>;
118 };
119
120 # Example (with thermal-zone)
121 - |
122 #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
123 #include <dt-bindings/interrupt-controller/arm-gic.h>
124 #include <dt-bindings/power/r8a7790-sysc.h>
125
126 thermal: thermal@e61f0000 {
127 compatible = "renesas,thermal-r8a7790",
128 "renesas,rcar-gen2-thermal",
129 "renesas,rcar-thermal";
130 reg = <0xe61f0000 0x10>, <0xe61f0100 0x38>;
131 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
132 clocks = <&cpg CPG_MOD 522>;
133 power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
134 resets = <&cpg 522>;
135 #thermal-sensor-cells = <0>;
136 };
137
138 thermal-zones {
139 cpu_thermal: cpu-thermal {
140 polling-delay-passive = <1000>;
141 polling-delay = <5000>;
142
143 thermal-sensors = <&thermal>;
144
145 trips {
146 cpu-crit {
147 temperature = <115000>;
148 hysteresis = <0>;
149 type = "critical";
150 };
151 };
152 cooling-maps {
153 };
154 };
155 };
156

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-40

R-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 {
          };
      };
  };