Documentation/driver-api/thermal/exynos_thermal_emulation.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

Exynos Thermal Emulation Mode

Exynos TMU의 sysfs temperature emulation, 938µs update timing과 synchronous enable·value 규칙을 설명하는 한국어 전문 번역입니다.

Source pathDocumentation/driver-api/thermal/exynos_thermal_emulation.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

exynos_thermal_emulation.rst:1-61

Exynos TMU emulation은 `emul_temp`에 non-zero temperature를 써서 sensor 대신 test 값을 사용하고, 0으로 hardware sensor에 복귀합니다. 값 변경은 mode enable과 동기적으로 이뤄져야 하며 실제 sensing과 같은 938µs 간격으로 반영됩니다.

문서 구성
원문 줄핵심 내용
1-8문서 정보
9-30TMU emulation과 sysfs node
31-40Value update·enable 동시성 규칙
41-6150·70·20 temperature timing graph

2. 영어 원문 전체

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

원문 전체 펼치기
1 =====================
2 Exynos Emulation Mode
3 =====================
4
5 Copyright (C) 2012 Samsung Electronics
6
7 Written by Jonghwa Lee <[email protected]>
8
9 Description
10 -----------
11
12 Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal
13 management unit. Thermal emulation mode supports software debug for
14 TMU's operation. User can set temperature manually with software code
15 and TMU will read current temperature from user value not from sensor's
16 value.
17
18 Enabling CONFIG_THERMAL_EMULATION option will make this support
19 available. When it's enabled, sysfs node will be created as
20 /sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp.
21
22 The sysfs node, 'emul_node', will contain value 0 for the initial state.
23 When you input any temperature you want to update to sysfs node, it
24 automatically enable emulation mode and current temperature will be
25 changed into it.
26
27 (Exynos also supports user changeable delay time which would be used to
28 delay of changing temperature. However, this node only uses same delay
29 of real sensing time, 938us.)
30
31 Exynos emulation mode requires that value changes and enabling are performed
32 synchronously. This means that when you want to update any value, such as the
33 delay or the next temperature, you must enable emulation mode at the same
34 time (or keep the mode enabled). If you do not, the value will fail to update
35 and the last successful value will continue to be used. For this reason,
36 this node only allows users to change the temperature. Providing a single
37 interface makes it simpler to use.
38
39 Disabling emulation mode only requires writing value 0 to sysfs node.
40
41 ::
42
43
44 TEMP 120 |
45 |
46 100 |
47 |
48 80 |
49 | +-----------
50 60 | | |
51 | +-------------| |
52 40 | | | |
53 | | | |
54 20 | | | +----------
55 | | | | |
56 0 |______________|_____________|__________|__________|_________
57 A A A A TIME
58 |<----->| |<----->| |<----->| |
59 | 938us | | | | | |
60 emulation : 0 50 | 70 | 20 | 0
61 current temp: sensor 50 70 20 sensor
62

3. 한국어 전문 번역

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

Exynos Emulation Mode

1-8

이 문서는 Samsung Electronics의 2012년 copyright를 표시하며 Jonghwa Lee가 작성한 Exynos thermal emulation mode guide입니다.

문서 정보
항목내용
TitleExynos Emulation Mode
CopyrightSamsung Electronics, 2012
AuthorJonghwa Lee

=====================
Exynos Emulation Mode
=====================

Copyright (C) 2012 Samsung Electronics

Written by Jonghwa Lee <[email protected]>

TMU emulation과 sysfs interface

9-30

Exynos 4x12 계열 4212·4412와 Exynos 5 series는 thermal management unit(TMU)을 위한 emulation mode를 제공합니다.

Thermal emulation mode는 TMU 동작의 software debugging을 지원합니다. User가 software로 temperature를 직접 설정하면 TMU는 sensor 값 대신 user 값을 current temperature로 읽습니다.

Kernel option `CONFIG_THERMAL_EMULATION`을 enable하면 이 기능을 사용할 수 있고 `/sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp` sysfs node가 생성됩니다.

초기 상태의 sysfs emulation node 값은 0입니다. 원하는 temperature를 node에 입력하면 emulation mode가 자동으로 enable되고 current temperature가 해당 값으로 바뀝니다.

Exynos hardware는 temperature 변경을 지연하는 user-configurable delay도 지원하지만 이 node는 실제 sensing time과 같은 938µs delay만 사용합니다.

Exynos TMU emulation input
`CONFIG_THERMAL_EMULATION`Create `thermal_zone<id>/emul_temp`
Write non-zero temperatureEnable emulation modeWait 938us sensing intervalTMU current temperature = user value
Initial node value0TMU reads hardware sensor

Sysfs에 non-zero temperature를 쓰면 sensor 대신 emulated value가 선택됩니다.

Description
-----------

Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal
management unit. Thermal emulation mode supports software debug for
TMU's operation. User can set temperature manually with software code
and TMU will read current temperature from user value not from sensor's
value.

Enabling CONFIG_THERMAL_EMULATION option will make this support
available. When it's enabled, sysfs node will be created as
/sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp.

The sysfs node, 'emul_node', will contain value 0 for the initial state.
When you input any temperature you want to update to sysfs node, it
automatically enable emulation mode and current temperature will be
changed into it.

(Exynos also supports user changeable delay time which would be used to
delay of changing temperature. However, this node only uses same delay
of real sensing time, 938us.)

Value update와 enable 동시성

31-40

Exynos emulation mode는 value 변경과 mode enable을 동시에 수행해야 합니다.

Delay나 다음 temperature 같은 값을 갱신하려면 같은 시점에 emulation mode를 enable하거나 이미 enable된 상태를 유지해야 합니다.

그렇지 않으면 value update가 실패하고 마지막으로 성공한 값이 계속 사용됩니다. 이 때문에 sysfs node는 user가 temperature만 바꾸도록 제한하며, 단일 interface로 사용법을 단순화합니다.

Emulation mode를 disable하려면 sysfs node에 0을 쓰기만 하면 됩니다.

Emulation update 규칙
OperationMode 상태결과
Write new temperature동시에 enable 또는 이미 enabled새 값 적용
Write new temperature or delayDisabledUpdate 실패, 마지막 성공 값 유지
Write `0`AnyEmulation disable, sensor 값 복귀

Exynos emulation mode requires that value changes and enabling are performed
synchronously. This means that when you want to update any value, such as the
delay or the next temperature, you must enable emulation mode at the same
time (or keep the mode enabled). If you do not, the value will fail to update
and the last successful value will continue to be used. For this reason,
this node only allows users to change the temperature. Providing a single
interface makes it simpler to use.

Disabling emulation mode only requires writing value 0 to sysfs node.

Temperature emulation timeline

41-61

원문의 ASCII graph는 시간에 따라 emulation input이 0, 50, 70, 20, 0으로 바뀌는 흐름을 보여 줍니다.

Emulation이 0일 때 current temperature는 sensor 값입니다. 50·70·20을 차례로 쓰면 각 938µs sensing interval 뒤 current temperature가 해당 plateau로 바뀝니다.

마지막으로 0을 쓰면 emulation을 disable하고 current temperature source가 다시 hardware sensor로 돌아갑니다.

Exynos emulated temperature 변화
순서`emul_temp`938µs 뒤 current temperatureSource
Initial0Sensor readingHardware sensor
A5050Emulation
B7070Emulation
C2020Emulation
Final0Sensor readingHardware sensor

원문의 TEMP/TIME ASCII graph를 동일한 plateau와 938µs update interval로 구조화했습니다.

::


  TEMP        120 |
            |
        100 |
            |
         80 |
            |                                 +-----------
         60 |                               |            |
            |                   +-------------|          |
         40 |              |                  |          |
            |                   |                 |          |
         20 |                   |                 |          +----------
            |                   |                 |          |          |
          0 |______________|_____________|__________|__________|_________
                   A                 A            A                       A     TIME
                   |<----->|         |<----->|  |<----->|               |
                   | 938us |           |         |  |       |          |
  emulation   : 0  50           |           70      |  20      |          0
  current temp:   sensor   50                 70         20              sensor