요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/imx-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX Thermal
maintainers:
- Shawn Guo <[email protected]>
properties:
compatible:
oneOf:
- enum:
- fsl,imx6q-tempmon
- fsl,imx6sx-tempmon
- fsl,imx7d-tempmon
- items:
- enum:
- fsl,imx6sll-tempmon
- fsl,imx6ul-tempmon
- const: fsl,imx6sx-tempmon
interrupts:
description: |
The interrupt output of the controller, i.MX6Q has IRQ_HIGH which
will be triggered when temperature is higher than high threshold,
i.MX6SX and i.MX7S/D have two more IRQs than i.MX6Q, one is IRQ_LOW
and the other is IRQ_PANIC, when temperature is lower than low
threshold, IRQ_LOW will be triggered, when temperature is higher
than panic threshold, IRQ_PANIC will be triggered, and system can
be configured to auto reboot by SRC module for IRQ_PANIC. IRQ_HIGH,
IRQ_LOW and IRQ_PANIC share same interrupt output of controller.
maxItems: 1
nvmem-cells:
items:
- description: Phandle to the calibration data provided by ocotp
- description: Phandle to the temperature grade provided by ocotp
nvmem-cell-names:
items:
- const: calib
- const: temp_grade
fsl,tempmon:
$ref: /schemas/types.yaml#/definitions/phandle
description: Phandle to anatop system controller node.
fsl,tempmon-data:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Deprecated property, phandle pointer to fuse controller that contains
TEMPMON calibration data, e.g. OCOTP on imx6q. The details about
calibration data can be found in SoC Reference Manual.
deprecated: true
clocks:
maxItems: 1
"#thermal-sensor-cells":
const: 0
required:
- compatible
- interrupts
- fsl,tempmon
- nvmem-cells
- nvmem-cell-names
allOf:
- $ref: thermal-sensor.yaml#
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/imx6sx-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
efuse@21bc000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,imx6sx-ocotp", "syscon";
reg = <0x021bc000 0x4000>;
clocks = <&clks IMX6SX_CLK_OCOTP>;
tempmon_calib: calib@38 {
reg = <0x38 4>;
};
tempmon_temp_grade: temp-grade@20 {
reg = <0x20 4>;
};
};
anatop@20c8000 {
compatible = "fsl,imx6q-anatop", "syscon", "simple-mfd";
reg = <0x020c8000 0x1000>;
interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>,
<0 54 IRQ_TYPE_LEVEL_HIGH>,
<0 127 IRQ_TYPE_LEVEL_HIGH>;
tempmon {
compatible = "fsl,imx6sx-tempmon";
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
fsl,tempmon = <&anatop>;
nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
nvmem-cell-names = "calib", "temp_grade";
clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
#thermal-sensor-cells = <0>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
NXP i.MX Thermal
1-11이 GPL-2.0-only 또는 BSD-2-Clause YAML 스키마는 NXP i.MX thermal monitor를 정의합니다. Maintainer는 Shawn Guo입니다.
i.MX6·i.MX7 compatible
12-24단일 compatible은 `fsl,imx6q-tempmon`, `fsl,imx6sx-tempmon`, `fsl,imx7d-tempmon` 중 하나입니다. i.MX6SLL 또는 i.MX6UL은 각각 `fsl,imx6sll-tempmon` 또는 `fsl,imx6ul-tempmon`을 먼저 두고 `fsl,imx6sx-tempmon`을 fallback으로 함께 사용합니다.
IRQ_HIGH, IRQ_LOW, IRQ_PANIC
25-36Controller interrupt output은 최대 한 항목입니다. i.MX6Q의 `IRQ_HIGH`은 온도가 high threshold보다 높을 때 발생합니다. i.MX6SX와 i.MX7S/D에는 `IRQ_LOW`와 `IRQ_PANIC`이 더 있으며, 각각 온도가 low threshold보다 낮을 때와 panic threshold보다 높을 때 발생합니다. `IRQ_PANIC`에서는 SRC module로 system 자동 reboot를 구성할 수 있습니다. 세 IRQ는 controller의 동일한 interrupt output을 공유합니다.
OCOTP calibration과 anatop phandle
37-64`nvmem-cells`는 OCOTP가 제공하는 calibration data와 temperature grade의 phandle 두 개를 순서대로 담고, `nvmem-cell-names`는 `calib`, `temp_grade` 순서입니다. `fsl,tempmon`은 anatop system controller node를 가리키는 phandle입니다.
`fsl,tempmon-data`는 TEMPMON calibration data를 포함한 fuse controller를 가리키던 deprecated phandle입니다. i.MX6Q의 OCOTP가 그 예이며 calibration data 형식은 SoC Reference Manual에 있습니다. `clocks`는 최대 한 항목이고 `#thermal-sensor-cells`는 0입니다.
필수 속성과 공통 thermal 스키마
65-76필수 속성은 `compatible`, `interrupts`, `fsl,tempmon`, `nvmem-cells`, `nvmem-cell-names`입니다. 공통 `thermal-sensor.yaml#`을 포함하며 `additionalProperties: false`로 명시되지 않은 속성을 금지합니다.
i.MX6SX OCOTP와 TEMPMON 예제
77-114예제는 OCOTP node에서 0x38의 calibration cell과 0x20의 temperature-grade cell을 만들고, anatop node에 세 hardware interrupt를 선언합니다. 그 아래 `tempmon`은 GIC SPI 49, anatop phandle, 두 NVMEM cell과 `IMX6SX_CLK_PLL3_USB_OTG` clock을 사용하며 0-cell thermal sensor로 노출됩니다.
#include <dt-bindings/clock/imx6sx-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
efuse@21bc000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,imx6sx-ocotp", "syscon";
reg = <0x021bc000 0x4000>;
clocks = <&clks IMX6SX_CLK_OCOTP>;
tempmon_calib: calib@38 {
reg = <0x38 4>;
};
tempmon_temp_grade: temp-grade@20 {
reg = <0x20 4>;
};
};
anatop@20c8000 {
compatible = "fsl,imx6q-anatop", "syscon", "simple-mfd";
reg = <0x020c8000 0x1000>;
interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>,
<0 54 IRQ_TYPE_LEVEL_HIGH>,
<0 127 IRQ_TYPE_LEVEL_HIGH>;
tempmon {
compatible = "fsl,imx6sx-tempmon";
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
fsl,tempmon = <&anatop>;
nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
nvmem-cell-names = "calib", "temp_grade";
clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
#thermal-sensor-cells = <0>;
};
};
요약과 해설
imx-thermal.yaml:1-114i.MX6·i.MX7 TEMPMON의 interrupt와 OCOTP calibration 연결을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·수치·예제 코드를 원형대로 유지합니다.