← Documents Documentation/devicetree/bindings/thermal/st,stm32-thermal.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Thermal

STM32 Digital Thermal Sensor

STM32 DTS의 pclk·interrupt와 passive·critical trip 예제를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

st,stm32-thermal.yaml:1-80

STM32 DTS의 pclk·interrupt와 passive·critical trip 예제를 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·clock·NVMEM·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/thermal/st,stm32-thermal.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: STMicroelectronics STM32 digital thermal sensor (DTS)
8
9 maintainers:
10 - Pascal Paillet <[email protected]>
11
12 $ref: thermal-sensor.yaml#
13
14 properties:
15 compatible:
16 const: st,stm32-thermal
17
18 reg:
19 maxItems: 1
20
21 interrupts:
22 maxItems: 1
23
24 clocks:
25 maxItems: 1
26
27 clock-names:
28 items:
29 - const: pclk
30
31 "#thermal-sensor-cells":
32 const: 0
33
34 required:
35 - compatible
36 - reg
37 - interrupts
38 - clocks
39 - clock-names
40
41 unevaluatedProperties: false
42
43 examples:
44 - |
45 #include <dt-bindings/interrupt-controller/arm-gic.h>
46 #include <dt-bindings/clock/stm32mp1-clks.h>
47 dts: thermal@50028000 {
48 compatible = "st,stm32-thermal";
49 reg = <0x50028000 0x100>;
50 clocks = <&rcc TMPSENS>;
51 clock-names = "pclk";
52 #thermal-sensor-cells = <0>;
53 interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
54 };
55
56 thermal-zones {
57 cpu_thermal: cpu-thermal {
58 polling-delay-passive = <0>;
59 polling-delay = <0>;
60
61 thermal-sensors = <&dts>;
62 trips {
63 cpu_alert1: cpu-alert1 {
64 temperature = <85000>;
65 hysteresis = <0>;
66 type = "passive";
67 };
68
69 cpu_crit: cpu-crit {
70 temperature = <120000>;
71 hysteresis = <0>;
72 type = "critical";
73 };
74 };
75
76 cooling-maps {
77 };
78 };
79 };
80 ...
81

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

STM32 digital thermal sensor

1-13

이 GPL-2.0-only 또는 BSD-2-Clause YAML 스키마는 STMicroelectronics STM32 digital thermal sensor(DTS)를 정의합니다. Maintainer는 Pascal Paillet이며 공통 `thermal-sensor.yaml#` 스키마를 사용합니다.

Register, interrupt와 pclk

14-33

`compatible`은 `st,stm32-thermal`입니다. `reg`, `interrupts`, `clocks`는 각각 최대 한 항목이고 clock 이름은 `pclk`입니다. `#thermal-sensor-cells = 0`이므로 consumer는 sensor ID를 전달하지 않습니다.

properties:
  compatible:
    const: st,stm32-thermal

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: pclk

  "#thermal-sensor-cells":
    const: 0

필수 속성과 제한

34-42

`compatible`, `reg`, `interrupts`, `clocks`, `clock-names`가 모두 필수입니다. `unevaluatedProperties: false`로 추가 속성을 제한합니다.

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

unevaluatedProperties: false

STM32 DTS 노드 예제

43-55

예제는 `0x50028000`의 0x100-byte DTS, RCC `TMPSENS` clock, `pclk` 이름, GIC SPI 147 level-high interrupt를 연결하고 0-cell provider로 선언합니다.

- |
  #include <dt-bindings/interrupt-controller/arm-gic.h>
  #include <dt-bindings/clock/stm32mp1-clks.h>
  dts: thermal@50028000 {
      compatible = "st,stm32-thermal";
      reg = <0x50028000 0x100>;
      clocks = <&rcc TMPSENS>;
      clock-names = "pclk";
      #thermal-sensor-cells = <0>;
      interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
  };

STM32 thermal zone과 trip

56-80

CPU thermal zone은 두 polling delay를 모두 0으로 두고 DTS를 감시합니다. Passive alert trip은 85000 millidegree, critical trip은 120000 millidegree이며 두 trip 모두 hysteresis 0입니다. 빈 `cooling-maps` container도 제시합니다.

    thermal-zones {
        cpu_thermal: cpu-thermal {
            polling-delay-passive = <0>;
            polling-delay = <0>;

            thermal-sensors = <&dts>;
            trips {
                cpu_alert1: cpu-alert1 {
                    temperature = <85000>;
                    hysteresis = <0>;
                    type = "passive";
                };

                cpu_crit: cpu-crit {
                    temperature = <120000>;
                    hysteresis = <0>;
                    type = "critical";
                };
            };

            cooling-maps {
            };
        };
    };
...