← Documents Documentation/hwmon/lm93.rst GitHub 원문 ↗

Linux 6.18.37 · Hardware Monitoring

Kernel driver lm93

듀얼 Xeon 보드용 LM93의 PROCHOT·VRD_HOT, Smart Tach와 복합 자동 PWM입니다.

Source pathDocumentation/hwmon/lm93.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

lm93.rst:1-312

온도·전압·팬을 감시하고 여덟 제어 소스와 12단계 온도표로 PWM을 계산하며 스핀업·램핑·부스트를 적용합니다.

문서 개요
항목
SourceDocumentation/hwmon/lm93.rst
분량312 source lines
PWM2개
제어 소스8개

원문 분량과 핵심 인터페이스입니다.

동작 흐름
모듈·하드웨어 구성PROCHOT·VRD_HOT 감시자동 PWM 계산비상 팬 응답

장치 감지부터 측정·제어까지의 핵심 순서입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Kernel driver lm93
2 ==================
3
4 Supported chips:
5
6 * National Semiconductor LM93
7
8 Prefix 'lm93'
9
10 Addresses scanned: I2C 0x2c-0x2e
11
12 Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf
13
14 * National Semiconductor LM94
15
16 Prefix 'lm94'
17
18 Addresses scanned: I2C 0x2c-0x2e
19
20 Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf
21
22
23 Authors:
24 - Mark M. Hoffman <[email protected]>
25 - Ported to 2.6 by Eric J. Bowersox <[email protected]>
26 - Adapted to 2.6.20 by Carsten Emde <[email protected]>
27 - Modified for mainline integration by Hans J. Koch <[email protected]>
28
29 Module Parameters
30 -----------------
31
32 * init: integer
33 Set to non-zero to force some initializations (default is 0).
34 * disable_block: integer
35 A "0" allows SMBus block data transactions if the host supports them. A "1"
36 disables SMBus block data transactions. The default is 0.
37 * vccp_limit_type: integer array (2)
38 Configures in7 and in8 limit type, where 0 means absolute and non-zero
39 means relative. "Relative" here refers to "Dynamic Vccp Monitoring using
40 VID" from the datasheet. It greatly simplifies the interface to allow
41 only one set of limits (absolute or relative) to be in operation at a
42 time (even though the hardware is capable of enabling both). There's
43 not a compelling use case for enabling both at once, anyway. The default
44 is "0,0".
45 * vid_agtl: integer
46 A "0" configures the VID pins for V(ih) = 2.1V min, V(il) = 0.8V max.
47 A "1" configures the VID pins for V(ih) = 0.8V min, V(il) = 0.4V max.
48 (The latter setting is referred to as AGTL+ Compatible in the datasheet.)
49 I.e. this parameter controls the VID pin input thresholds; if your VID
50 inputs are not working, try changing this. The default value is "0".
51
52
53 Hardware Description
54 --------------------
55
56 (from the datasheet)
57
58 The LM93 hardware monitor has a two wire digital interface compatible with
59 SMBus 2.0. Using an 8-bit ADC, the LM93 measures the temperature of two remote
60 diode connected transistors as well as its own die and 16 power supply
61 voltages. To set fan speed, the LM93 has two PWM outputs that are each
62 controlled by up to four temperature zones. The fancontrol algorithm is lookup
63 table based. The LM93 includes a digital filter that can be invoked to smooth
64 temperature readings for better control of fan speed. The LM93 has four
65 tachometer inputs to measure fan speed. Limit and status registers for all
66 measured values are included. The LM93 builds upon the functionality of
67 previous motherboard management ASICs and uses some of the LM85's features
68 (i.e. smart tachometer mode). It also adds measurement and control support
69 for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual
70 processor Xeon class motherboard with a minimum of external components.
71
72 LM94 is also supported in LM93 compatible mode. Extra sensors and features of
73 LM94 are not supported.
74
75
76 User Interface
77 --------------
78
79 #PROCHOT
80 ^^^^^^^^
81
82 The LM93 can monitor two #PROCHOT signals. The results are found in the
83 sysfs files prochot1, prochot2, prochot1_avg, prochot2_avg, prochot1_max,
84 and prochot2_max. prochot1_max and prochot2_max contain the user limits
85 for #PROCHOT1 and #PROCHOT2, respectively. prochot1 and prochot2 contain
86 the current readings for the most recent complete time interval. The
87 value of prochot1_avg and prochot2_avg is something like a 2 period
88 exponential moving average (but not quite - check the datasheet). Note
89 that this third value is calculated by the chip itself. All values range
90 from 0-255 where 0 indicates no throttling, and 255 indicates > 99.6%.
91
92 The monitoring intervals for the two #PROCHOT signals is also configurable.
93 These intervals can be found in the sysfs files prochot1_interval and
94 prochot2_interval. The values in these files specify the intervals for
95 #P1_PROCHOT and #P2_PROCHOT, respectively. Selecting a value not in this
96 list will cause the driver to use the next largest interval. The available
97 intervals are (in seconds):
98
99 #PROCHOT intervals:
100 0.73, 1.46, 2.9, 5.8, 11.7, 23.3, 46.6, 93.2, 186, 372
101
102 It is possible to configure the LM93 to logically short the two #PROCHOT
103 signals. I.e. when #P1_PROCHOT is asserted, the LM93 will automatically
104 assert #P2_PROCHOT, and vice-versa. This mode is enabled by writing a
105 non-zero integer to the sysfs file prochot_short.
106
107 The LM93 can also override the #PROCHOT pins by driving a PWM signal onto
108 one or both of them. When overridden, the signal has a period of 3.56 ms,
109 a minimum pulse width of 5 clocks (at 22.5kHz => 6.25% duty cycle), and
110 a maximum pulse width of 80 clocks (at 22.5kHz => 99.88% duty cycle).
111
112 The sysfs files prochot1_override and prochot2_override contain boolean
113 integers which enable or disable the override function for #P1_PROCHOT and
114 #P2_PROCHOT, respectively. The sysfs file prochot_override_duty_cycle
115 contains a value controlling the duty cycle for the PWM signal used when
116 the override function is enabled. This value ranges from 0 to 15, with 0
117 indicating minimum duty cycle and 15 indicating maximum.
118
119 #VRD_HOT
120 ^^^^^^^^
121
122 The LM93 can monitor two #VRD_HOT signals. The results are found in the
123 sysfs files vrdhot1 and vrdhot2. There is one value per file: a boolean for
124 which 1 indicates #VRD_HOT is asserted and 0 indicates it is negated. These
125 files are read-only.
126
127 Smart Tach Mode (from the datasheet)::
128
129 If a fan is driven using a low-side drive PWM, the tachometer
130 output of the fan is corrupted. The LM93 includes smart tachometer
131 circuitry that allows an accurate tachometer reading to be
132 achieved despite the signal corruption. In smart tach mode all
133 four signals are measured within 4 seconds.
134
135 Smart tach mode is enabled by the driver by writing 1 or 2 (associating the
136 fan tachometer with a pwm) to the sysfs file fan<n>_smart_tach. A zero
137 will disable the function for that fan. Note that Smart tach mode cannot be
138 enabled if the PWM output frequency is 22500 Hz (see below).
139
140 Manual PWM
141 ^^^^^^^^^^
142
143 The LM93 has a fixed or override mode for the two PWM outputs (although, there
144 are still some conditions that will override even this mode - see section
145 15.10.6 of the datasheet for details.) The sysfs files pwm1_override
146 and pwm2_override are used to enable this mode; each is a boolean integer
147 where 0 disables and 1 enables the manual control mode. The sysfs files pwm1
148 and pwm2 are used to set the manual duty cycle; each is an integer (0-255)
149 where 0 is 0% duty cycle, and 255 is 100%. Note that the duty cycle values
150 are constrained by the hardware. Selecting a value which is not available
151 will cause the driver to use the next largest value. Also note: when manual
152 PWM mode is disabled, the value of pwm1 and pwm2 indicates the current duty
153 cycle chosen by the h/w.
154
155 PWM Output Frequency
156 ^^^^^^^^^^^^^^^^^^^^
157
158 The LM93 supports several different frequencies for the PWM output channels.
159 The sysfs files pwm1_freq and pwm2_freq are used to select the frequency. The
160 frequency values are constrained by the hardware. Selecting a value which is
161 not available will cause the driver to use the next largest value. Also note
162 that this parameter has implications for the Smart Tach Mode (see above).
163
164 PWM Output Frequencies (in Hz):
165 12, 36, 48, 60, 72, 84, 96, 22500 (default)
166
167 Automatic PWM
168 ^^^^^^^^^^^^^
169
170 The LM93 is capable of complex automatic fan control, with many different
171 points of configuration. To start, each PWM output can be bound to any
172 combination of eight control sources. The final PWM is the largest of all
173 individual control sources to which the PWM output is bound.
174
175 The eight control sources are: temp1-temp4 (aka "zones" in the datasheet),
176 #PROCHOT 1 & 2, and #VRDHOT 1 & 2. The bindings are expressed as a bitmask
177 in the sysfs files pwm<n>_auto_channels, where a "1" enables the binding, and
178 a "0" disables it. The h/w default is 0x0f (all temperatures bound).
179
180 ====== ===========
181 0x01 Temp 1
182 0x02 Temp 2
183 0x04 Temp 3
184 0x08 Temp 4
185 0x10 #PROCHOT 1
186 0x20 #PROCHOT 2
187 0x40 #VRDHOT 1
188 0x80 #VRDHOT 2
189 ====== ===========
190
191 The function y = f(x) takes a source temperature x to a PWM output y. This
192 function of the LM93 is derived from a base temperature and a table of 12
193 temperature offsets. The base temperature is expressed in degrees C in the
194 sysfs files temp<n>_auto_base. The offsets are expressed in cumulative
195 degrees C, with the value of offset <i> for temperature value <n> being
196 contained in the file temp<n>_auto_offset<i>. E.g. if the base temperature
197 is 40C:
198
199 ========== ======================= =============== =======
200 offset # temp<n>_auto_offset<i> range pwm
201 ========== ======================= =============== =======
202 1 0 - 25.00%
203 2 0 - 28.57%
204 3 1 40C - 41C 32.14%
205 4 1 41C - 42C 35.71%
206 5 2 42C - 44C 39.29%
207 6 2 44C - 46C 42.86%
208 7 2 48C - 50C 46.43%
209 8 2 50C - 52C 50.00%
210 9 2 52C - 54C 53.57%
211 10 2 54C - 56C 57.14%
212 11 2 56C - 58C 71.43%
213 12 2 58C - 60C 85.71%
214 - - > 60C 100.00%
215 ========== ======================= =============== =======
216
217 Valid offsets are in the range 0C <= x <= 7.5C in 0.5C increments.
218
219 There is an independent base temperature for each temperature channel. Note,
220 however, there are only two tables of offsets: one each for temp[12] and
221 temp[34]. Therefore, any change to e.g. temp1_auto_offset<i> will also
222 affect temp2_auto_offset<i>.
223
224 The LM93 can also apply hysteresis to the offset table, to prevent unwanted
225 oscillation between two steps in the offsets table. These values are found in
226 the sysfs files temp<n>_auto_offset_hyst. The value in this file has the
227 same representation as in temp<n>_auto_offset<i>.
228
229 If a temperature reading falls below the base value for that channel, the LM93
230 will use the minimum PWM value. These values are found in the sysfs files
231 temp<n>_auto_pwm_min. Note, there are only two minimums: one each for temp[12]
232 and temp[34]. Therefore, any change to e.g. temp1_auto_pwm_min will also
233 affect temp2_auto_pwm_min.
234
235 PWM Spin-Up Cycle
236 ^^^^^^^^^^^^^^^^^
237
238 A spin-up cycle occurs when a PWM output is commanded from 0% duty cycle to
239 some value > 0%. The LM93 supports a minimum duty cycle during spin-up. These
240 values are found in the sysfs files pwm<n>_auto_spinup_min. The value in this
241 file has the same representation as other PWM duty cycle values. The
242 duration of the spin-up cycle is also configurable. These values are found in
243 the sysfs files pwm<n>_auto_spinup_time. The value in this file is
244 the spin-up time in seconds. The available spin-up times are constrained by
245 the hardware. Selecting a value which is not available will cause the driver
246 to use the next largest value.
247
248 Spin-up Durations:
249 0 (disabled, h/w default), 0.1, 0.25, 0.4, 0.7, 1.0, 2.0, 4.0
250
251 #PROCHOT and #VRDHOT PWM Ramping
252 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
253
254 If the #PROCHOT or #VRDHOT signals are asserted while bound to a PWM output
255 channel, the LM93 will ramp the PWM output up to 100% duty cycle in discrete
256 steps. The duration of each step is configurable. There are two files, with
257 one value each in seconds: pwm_auto_prochot_ramp and pwm_auto_vrdhot_ramp.
258 The available ramp times are constrained by the hardware. Selecting a value
259 which is not available will cause the driver to use the next largest value.
260
261 Ramp Times:
262 0 (disabled, h/w default) to 0.75 in 0.05 second intervals
263
264 Fan Boost
265 ^^^^^^^^^
266
267 For each temperature channel, there is a boost temperature: if the channel
268 exceeds this limit, the LM93 will immediately drive both PWM outputs to 100%.
269 This limit is expressed in degrees C in the sysfs files temp<n>_auto_boost.
270 There is also a hysteresis temperature for this function: after the boost
271 limit is reached, the temperature channel must drop below this value before
272 the boost function is disabled. This temperature is also expressed in degrees
273 C in the sysfs files temp<n>_auto_boost_hyst.
274
275 GPIO Pins
276 ^^^^^^^^^
277
278 The LM93 can monitor the logic level of four dedicated GPIO pins as well as the
279 four tach input pins. GPIO0-GPIO3 correspond to (fan) tach 1-4, respectively.
280 All eight GPIOs are read by reading the bitmask in the sysfs file gpio. The
281 LSB is GPIO0, and the MSB is GPIO7.
282
283
284 LM93 Unique sysfs Files
285 -----------------------
286
287 =========================== ===============================================
288 file description
289 =========================== ===============================================
290 prochot<n> current #PROCHOT %
291 prochot<n>_avg moving average #PROCHOT %
292 prochot<n>_max limit #PROCHOT %
293 prochot_short enable or disable logical #PROCHOT pin short
294 prochot<n>_override force #PROCHOT assertion as PWM
295 prochot_override_duty_cycle duty cycle for the PWM signal used when
296 #PROCHOT is overridden
297 prochot<n>_interval #PROCHOT PWM sampling interval
298 vrdhot<n> 0 means negated, 1 means asserted
299 fan<n>_smart_tach enable or disable smart tach mode
300 pwm<n>_auto_channels select control sources for PWM outputs
301 pwm<n>_auto_spinup_min minimum duty cycle during spin-up
302 pwm<n>_auto_spinup_time duration of spin-up
303 pwm_auto_prochot_ramp ramp time per step when #PROCHOT asserted
304 pwm_auto_vrdhot_ramp ramp time per step when #VRDHOT asserted
305 temp<n>_auto_base temperature channel base
306 temp<n>_auto_offset[1-12] temperature channel offsets
307 temp<n>_auto_offset_hyst temperature channel offset hysteresis
308 temp<n>_auto_boost temperature channel boost (PWMs to 100%)
309 limit
310 temp<n>_auto_boost_hyst temperature channel boost hysteresis
311 gpio input state of 8 GPIO pins; read-only
312 =========================== ===============================================
313

3. 한국어 전문 번역

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

LM93·LM94와 모듈 매개변수

1-52

드라이버는 National Semiconductor LM93과 LM94를 지원하며 접두사는 `lm93`, `lm94`, 검색 주소는 I2C `0x2c`~`0x2e`입니다. 작성·포팅·메인라인 통합에는 Mark M. Hoffman, Eric J. Bowersox, Carsten Emde, Hans J. Koch가 참여했습니다.

`init`을 0이 아닌 값으로 두면 일부 초기화를 강제합니다. `disable_block=0`은 호스트가 지원할 때 SMBus 블록 데이터 거래를 허용하고 1은 금지하며 기본값은 0입니다.

두 원소 배열 `vccp_limit_type`은 `in7`과 `in8` 제한을 0이면 절대, 0이 아니면 VID를 사용하는 동적 Vccp 상대 제한으로 설정합니다. 하드웨어는 두 방식 동시 활성도 가능하지만 인터페이스 단순화를 위해 한 세트만 사용하며 기본값은 `0,0`입니다.

`vid_agtl=0`은 VID 입력 문턱을 V(ih) 최소 2.1 V, V(il) 최대 0.8 V로, 1은 AGTL+ 호환인 V(ih) 최소 0.8 V, V(il) 최대 0.4 V로 설정합니다. VID 입력이 동작하지 않으면 이 값을 바꿔볼 수 있으며 기본값은 0입니다.

LM93 모듈 매개변수
매개변수의미
init0 / 비0기본 / 일부 초기화 강제
disable_block0 / 1SMBus 블록 거래 허용 / 금지
vccp_limit_type[2]0 / 비0in7·in8 절대 / VID 상대 제한
vid_agtl0 / 1일반 / AGTL+ VID 문턱

초기화·거래·Vccp·VID 입력 설정입니다.

LM93 초기 구성
LM93·LM94와 주소 확인호스트 블록 거래 지원 확인Vccp 제한 방식 선택VID 전압 문턱 선택필요한 경우 초기화 강제

보드 신호 규격과 호스트 능력에 맞춰 매개변수를 정합니다.

Kernel driver lm93
==================

Supported chips:

  * National Semiconductor LM93

    Prefix 'lm93'

    Addresses scanned: I2C 0x2c-0x2e

    Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf

  * National Semiconductor LM94

    Prefix 'lm94'

    Addresses scanned: I2C 0x2c-0x2e

    Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf


Authors:
        - Mark M. Hoffman <[email protected]>
        - Ported to 2.6 by Eric J. Bowersox <[email protected]>
        - Adapted to 2.6.20 by Carsten Emde <[email protected]>
        - Modified for mainline integration by Hans J. Koch <[email protected]>

Module Parameters
-----------------

* init: integer
  Set to non-zero to force some initializations (default is 0).
* disable_block: integer
  A "0" allows SMBus block data transactions if the host supports them.  A "1"
  disables SMBus block data transactions.  The default is 0.
* vccp_limit_type: integer array (2)
  Configures in7 and in8 limit type, where 0 means absolute and non-zero
  means relative.  "Relative" here refers to "Dynamic Vccp Monitoring using
  VID" from the datasheet.  It greatly simplifies the interface to allow
  only one set of limits (absolute or relative) to be in operation at a
  time (even though the hardware is capable of enabling both).  There's
  not a compelling use case for enabling both at once, anyway.  The default
  is "0,0".
* vid_agtl: integer
  A "0" configures the VID pins for V(ih) = 2.1V min, V(il) = 0.8V max.
  A "1" configures the VID pins for V(ih) = 0.8V min, V(il) = 0.4V max.
  (The latter setting is referred to as AGTL+ Compatible in the datasheet.)
  I.e. this parameter controls the VID pin input thresholds; if your VID
  inputs are not working, try changing this.  The default value is "0".

8비트 ADC와 듀얼 Xeon 보드 감시

53-75

LM93은 SMBus 2.0 호환 2선 인터페이스를 사용합니다. 8비트 ADC로 원격 다이오드 트랜지스터 2개와 자체 다이 온도, 전원 전압 16개를 측정합니다.

팬 속도 제어에는 각각 최대 네 온도 구역이 제어하는 PWM 출력 2개와 조회표 기반 알고리즘을 사용합니다. 온도 값을 부드럽게 해 팬 제어를 안정시키는 디지털 필터도 있습니다.

팬 속도 측정용 타코미터 입력은 4개이며 모든 측정값의 제한·상태 레지스터를 제공합니다. LM85의 Smart Tach 기능을 계승하고 동적 Vccp와 PROCHOT 측정·제어를 추가해 최소 외부 부품으로 듀얼 프로세서 Xeon급 메인보드를 감시하도록 설계되었습니다.

LM94도 LM93 호환 모드로 지원하지만 LM94의 추가 센서와 기능은 지원하지 않습니다.

LM93 하드웨어 자원
자원수량·특성
온도자체 1 + 원격 다이오드 2
전압16개, 8비트 ADC
PWM2개, 각각 최대 4개 온도 구역
타코미터4개, Smart Tach
추가 신호동적 Vccp, PROCHOT
LM94호환 기능만 지원

측정 채널과 제어 출력을 요약합니다.

듀얼 프로세서 감시
온도·전압 ADC 샘플링팬 타코미터 측정온도 디지털 필터 적용조회표 기반 PWM 계산제한과 상태 레지스터 갱신

다수 입력을 필터링해 팬 제어와 상태 레지스터에 연결합니다.

Hardware Description
--------------------

(from the datasheet)

The LM93 hardware monitor has a two wire digital interface compatible with
SMBus 2.0. Using an 8-bit ADC, the LM93 measures the temperature of two remote
diode connected transistors as well as its own die and 16 power supply
voltages. To set fan speed, the LM93 has two PWM outputs that are each
controlled by up to four temperature zones. The fancontrol algorithm is lookup
table based. The LM93 includes a digital filter that can be invoked to smooth
temperature readings for better control of fan speed. The LM93 has four
tachometer inputs to measure fan speed. Limit and status registers for all
measured values are included. The LM93 builds upon the functionality of
previous motherboard management ASICs and uses some of the LM85's features
(i.e. smart tachometer mode). It also adds measurement and control support
for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual
processor Xeon class motherboard with a minimum of external components.

LM94 is also supported in LM93 compatible mode. Extra sensors and features of
LM94 are not supported.

PROCHOT·VRD_HOT·Smart Tach

76-139

LM93은 두 `#PROCHOT` 신호를 감시합니다. `prochot1/2`는 최근 완료 구간의 현재 비율, `prochot1_avg/2_avg`는 칩이 계산한 약 2주기 지수 이동 평균, `prochot1_max/2_max`는 사용자 제한입니다. 값은 0~255이며 0은 스로틀링 없음, 255는 99.6% 초과입니다.

`prochot1_interval`과 `prochot2_interval`은 각각 샘플 구간을 설정합니다. 가능한 초 단위 값은 0.73, 1.46, 2.9, 5.8, 11.7, 23.3, 46.6, 93.2, 186, 372이며 목록 밖의 값을 쓰면 다음으로 큰 구간을 선택합니다.

`prochot_short`에 0이 아닌 값을 쓰면 두 PROCHOT을 논리적으로 단락해 어느 한쪽이 주장될 때 다른 쪽도 자동 주장합니다. `prochot1_override/2_override`는 3.56 ms 주기의 PWM으로 각 핀을 강제하며, 22.5 kHz 기준 최소 5클록 6.25%, 최대 80클록 99.88%입니다. `prochot_override_duty_cycle`의 0~15가 최소~최대 듀티를 정합니다.

`vrdhot1/2`는 두 `#VRD_HOT` 입력의 읽기 전용 불리언으로 1은 주장, 0은 해제입니다.

저측 PWM 구동 팬에서는 타코미터 신호가 손상될 수 있습니다. Smart Tach 회로는 이를 보정하고 네 신호를 4초 안에 측정합니다. `fan<n>_smart_tach`에 1 또는 2를 써 해당 PWM과 연결하고 0으로 끕니다. PWM 주파수가 22500 Hz이면 Smart Tach를 켤 수 없습니다.

LM93 열 제한 신호
기능속성범위·제약
PROCHOT 현재·평균·제한prochot<n>[_avg/_max]0~255
샘플 구간prochot<n>_interval0.73~372초 단계
논리 단락prochot_short비0이면 양방향 연동
강제 PWMprochot<n>_override듀티 0~15
VRD_HOTvrdhot1/2읽기 전용 0/1
Smart Tachfan<n>_smart_tach0 끔, 1·2 PWM 연결, 22.5kHz 불가

PROCHOT·VRD_HOT·Smart Tach 인터페이스입니다.

스로틀 신호 처리
PROCHOT 비율과 평균 측정사용자 제한 및 샘플 구간 적용필요 시 두 핀 논리 연동강제 PWM 또는 VRD_HOT 상태 확인지원 주파수에서 Smart Tach 보정

샘플링·연동·강제 출력과 팬 타코 보정을 함께 운용합니다.

User Interface
--------------

#PROCHOT
^^^^^^^^

The LM93 can monitor two #PROCHOT signals.  The results are found in the
sysfs files prochot1, prochot2, prochot1_avg, prochot2_avg, prochot1_max,
and prochot2_max.  prochot1_max and prochot2_max contain the user limits
for #PROCHOT1 and #PROCHOT2, respectively.  prochot1 and prochot2 contain
the current readings for the most recent complete time interval.  The
value of prochot1_avg and prochot2_avg is something like a 2 period
exponential moving average (but not quite - check the datasheet). Note
that this third value is calculated by the chip itself.  All values range
from 0-255 where 0 indicates no throttling, and 255 indicates > 99.6%.

The monitoring intervals for the two #PROCHOT signals is also configurable.
These intervals can be found in the sysfs files prochot1_interval and
prochot2_interval.  The values in these files specify the intervals for
#P1_PROCHOT and #P2_PROCHOT, respectively.  Selecting a value not in this
list will cause the driver to use the next largest interval.  The available
intervals are (in seconds):

#PROCHOT intervals:
        0.73, 1.46, 2.9, 5.8, 11.7, 23.3, 46.6, 93.2, 186, 372

It is possible to configure the LM93 to logically short the two #PROCHOT
signals.  I.e. when #P1_PROCHOT is asserted, the LM93 will automatically
assert #P2_PROCHOT, and vice-versa.  This mode is enabled by writing a
non-zero integer to the sysfs file prochot_short.

The LM93 can also override the #PROCHOT pins by driving a PWM signal onto
one or both of them.  When overridden, the signal has a period of 3.56 ms,
a minimum pulse width of 5 clocks (at 22.5kHz => 6.25% duty cycle), and
a maximum pulse width of 80 clocks (at 22.5kHz => 99.88% duty cycle).

The sysfs files prochot1_override and prochot2_override contain boolean
integers which enable or disable the override function for #P1_PROCHOT and
#P2_PROCHOT, respectively.  The sysfs file prochot_override_duty_cycle
contains a value controlling the duty cycle for the PWM signal used when
the override function is enabled.  This value ranges from 0 to 15, with 0
indicating minimum duty cycle and 15 indicating maximum.

#VRD_HOT
^^^^^^^^

The LM93 can monitor two #VRD_HOT signals. The results are found in the
sysfs files vrdhot1 and vrdhot2. There is one value per file: a boolean for
which 1 indicates #VRD_HOT is asserted and 0 indicates it is negated. These
files are read-only.

Smart Tach Mode (from the datasheet)::

        If a fan is driven using a low-side drive PWM, the tachometer
        output of the fan is corrupted. The LM93 includes smart tachometer
        circuitry that allows an accurate tachometer reading to be
        achieved despite the signal corruption.  In smart tach mode all
        four signals are measured within 4 seconds.

Smart tach mode is enabled by the driver by writing 1 or 2 (associating the
fan tachometer with a pwm) to the sysfs file fan<n>_smart_tach.  A zero
will disable the function for that fan.  Note that Smart tach mode cannot be
enabled if the PWM output frequency is 22500 Hz (see below).

수동 PWM과 출력 주파수

140-166

LM93의 두 PWM 출력에는 고정 또는 오버라이드 모드가 있습니다. 일부 하드웨어 조건은 이 모드도 덮어쓸 수 있으며 자세한 내용은 데이터시트 15.10.6절을 참조합니다.

`pwm1_override`와 `pwm2_override`는 0이면 수동 모드를 끄고 1이면 켭니다. `pwm1`, `pwm2`에는 0~255 듀티를 쓰며 0은 0%, 255는 100%입니다. 하드웨어가 표현하지 못하는 값은 다음으로 큰 값으로 올립니다. 수동 모드가 꺼진 때 `pwm1/2`를 읽으면 하드웨어가 선택한 현재 듀티가 나옵니다.

`pwm1_freq`, `pwm2_freq`는 출력 주파수를 선택합니다. 가능한 값은 12, 36, 48, 60, 72, 84, 96, 22500 Hz이며 기본값은 22500 Hz입니다. 지원하지 않는 값은 다음으로 큰 주파수로 올리고, 주파수는 Smart Tach 사용 가능 여부에도 영향을 줍니다.

LM93 수동 PWM
속성동작
pwm<n>_override0 / 1자동 / 수동
pwm<n>0~2550~100% 듀티, 다음 지원값으로 올림
pwm<n>_freq12~22500 Hz 단계다음 지원 주파수로 올림
기본 주파수22500 HzSmart Tach 사용 불가

오버라이드와 하드웨어 단계화 규칙입니다.

수동 PWM 설정
PWM 주파수 요청다음 지원 주파수 선택override=1 설정0~255 듀티 요청실제 적용 듀티 재읽기

주파수와 듀티가 모두 하드웨어 지원 단계로 정규화됩니다.

Manual PWM
^^^^^^^^^^

The LM93 has a fixed or override mode for the two PWM outputs (although, there
are still some conditions that will override even this mode - see section
15.10.6 of the datasheet for details.)  The sysfs files pwm1_override
and pwm2_override are used to enable this mode; each is a boolean integer
where 0 disables and 1 enables the manual control mode.  The sysfs files pwm1
and pwm2 are used to set the manual duty cycle; each is an integer (0-255)
where 0 is 0% duty cycle, and 255 is 100%.  Note that the duty cycle values
are constrained by the hardware. Selecting a value which is not available
will cause the driver to use the next largest value.  Also note: when manual
PWM mode is disabled, the value of pwm1 and pwm2 indicates the current duty
cycle chosen by the h/w.

PWM Output Frequency
^^^^^^^^^^^^^^^^^^^^

The LM93 supports several different frequencies for the PWM output channels.
The sysfs files pwm1_freq and pwm2_freq are used to select the frequency. The
frequency values are constrained by the hardware.  Selecting a value which is
not available will cause the driver to use the next largest value.  Also note
that this parameter has implications for the Smart Tach Mode (see above).

PWM Output Frequencies (in Hz):
        12, 36, 48, 60, 72, 84, 96, 22500 (default)

8개 제어 소스와 온도 오프셋 조회표

167-234

각 PWM 출력은 온도 1~4, PROCHOT 1·2, VRDHOT 1·2의 여덟 제어 소스를 임의 조합으로 연결할 수 있습니다. 최종 PWM은 연결된 개별 소스가 요구하는 값 중 가장 큽니다. `pwm<n>_auto_channels` 비트마스크에서 1은 연결, 0은 해제이며 기본값 `0x0f`는 네 온도를 모두 연결합니다.

비트는 `0x01` Temp1, `0x02` Temp2, `0x04` Temp3, `0x08` Temp4, `0x10` PROCHOT1, `0x20` PROCHOT2, `0x40` VRDHOT1, `0x80` VRDHOT2입니다.

온도 x를 PWM y로 바꾸는 함수는 기본 온도와 누적 온도 오프셋 12개로 구성됩니다. `temp<n>_auto_base`는 섭씨 기본값, `temp<n>_auto_offset<i>`는 각 누적 구간입니다. 예시 기본 40 C에서는 오프셋 구간을 따라 PWM이 25%, 28.57%, 32.14%, 35.71%, 39.29%, 42.86%, 46.43%, 50%, 53.57%, 57.14%, 71.43%, 85.71%로 상승하고 60 C를 넘으면 100%입니다.

유효 오프셋은 0~7.5 C이고 0.5 C 단계입니다. 온도 채널마다 기본값은 독립이지만 오프셋 표는 temp1·2가 하나, temp3·4가 하나뿐입니다. 따라서 `temp1_auto_offset<i>` 변경은 temp2에도 영향을 줍니다.

`temp<n>_auto_offset_hyst`는 표의 두 단계 사이에서 불필요한 진동을 막는 히스테리시스이고 오프셋과 같은 표현을 사용합니다. 온도가 기본값 아래이면 `temp<n>_auto_pwm_min` 최소 PWM을 사용합니다. 최소값도 temp1·2, temp3·4가 각각 공유합니다.

pwm<n>_auto_channels
비트소스
0x01 / 0x02 / 0x04 / 0x08Temp 1 / 2 / 3 / 4
0x10 / 0x20PROCHOT 1 / 2
0x40 / 0x80VRDHOT 1 / 2
기본 0x0f모든 온도 채널

여덟 제어 소스의 비트 배치입니다.

자동 PWM 계산
auto_channels 비트마스크 해석온도별 기본값과 12개 오프셋 누적히스테리시스로 단계 진동 억제PROCHOT·VRDHOT 요구값 결합모든 소스 중 최대 PWM 선택

연결 소스별 요구값 중 최댓값을 출력합니다.

Automatic PWM
^^^^^^^^^^^^^

The LM93 is capable of complex automatic fan control, with many different
points of configuration.  To start, each PWM output can be bound to any
combination of eight control sources.  The final PWM is the largest of all
individual control sources to which the PWM output is bound.

The eight control sources are: temp1-temp4 (aka "zones" in the datasheet),
#PROCHOT 1 & 2, and #VRDHOT 1 & 2.  The bindings are expressed as a bitmask
in the sysfs files pwm<n>_auto_channels, where a "1" enables the binding, and
a "0" disables it. The h/w default is 0x0f (all temperatures bound).

        ====== ===========
        0x01   Temp 1
        0x02   Temp 2
        0x04   Temp 3
        0x08   Temp 4
        0x10   #PROCHOT 1
        0x20   #PROCHOT 2
        0x40   #VRDHOT 1
        0x80   #VRDHOT 2
        ====== ===========

The function y = f(x) takes a source temperature x to a PWM output y.  This
function of the LM93 is derived from a base temperature and a table of 12
temperature offsets.  The base temperature is expressed in degrees C in the
sysfs files temp<n>_auto_base.  The offsets are expressed in cumulative
degrees C, with the value of offset <i> for temperature value <n> being
contained in the file temp<n>_auto_offset<i>.  E.g. if the base temperature
is 40C:

     ========== ======================= =============== =======
     offset #        temp<n>_auto_offset<i>        range                pwm
     ========== ======================= =============== =======
         1                0                -                 25.00%
         2                0                -                 28.57%
         3                1                40C - 41C         32.14%
         4                1                41C - 42C         35.71%
         5                2                42C - 44C         39.29%
         6                2                44C - 46C         42.86%
         7                2                48C - 50C         46.43%
         8                2                50C - 52C         50.00%
         9                2                52C - 54C         53.57%
        10                2                54C - 56C         57.14%
        11                2                56C - 58C         71.43%
        12                2                58C - 60C         85.71%
        -                -                > 60C                100.00%
     ========== ======================= =============== =======

Valid offsets are in the range 0C <= x <= 7.5C in 0.5C increments.

There is an independent base temperature for each temperature channel. Note,
however, there are only two tables of offsets: one each for temp[12] and
temp[34].  Therefore, any change to e.g. temp1_auto_offset<i> will also
affect temp2_auto_offset<i>.

The LM93 can also apply hysteresis to the offset table, to prevent unwanted
oscillation between two steps in the offsets table.  These values are found in
the sysfs files temp<n>_auto_offset_hyst.  The value in this file has the
same representation as in temp<n>_auto_offset<i>.

If a temperature reading falls below the base value for that channel, the LM93
will use the minimum PWM value.  These values are found in the sysfs files
temp<n>_auto_pwm_min.  Note, there are only two minimums: one each for temp[12]
and temp[34].  Therefore, any change to e.g. temp1_auto_pwm_min will also
affect temp2_auto_pwm_min.

스핀업·램핑·팬 부스트·GPIO·고유 sysfs

235-312

PWM이 0%에서 양수로 바뀔 때 스핀업 주기가 시작됩니다. `pwm<n>_auto_spinup_min`은 스핀업 최소 듀티, `pwm<n>_auto_spinup_time`은 지속 시간입니다. 지원 시간은 0(비활성, 기본), 0.1, 0.25, 0.4, 0.7, 1.0, 2.0, 4.0초이며 목록 밖 값은 다음으로 큰 값이 됩니다.

PWM에 연결된 PROCHOT 또는 VRDHOT이 주장되면 출력은 단계적으로 100%까지 상승합니다. `pwm_auto_prochot_ramp`, `pwm_auto_vrdhot_ramp`는 단계당 시간을 초로 설정하며 0부터 0.75초까지 0.05초 간격입니다. 0은 비활성 기본값이고 지원하지 않는 값은 다음 단계로 올립니다.

각 온도 채널의 `temp<n>_auto_boost`를 넘으면 두 PWM을 즉시 100%로 만듭니다. 부스트 후에는 온도가 `temp<n>_auto_boost_hyst` 아래로 내려가야 기능이 해제됩니다.

LM93은 전용 GPIO 네 개와 타코 입력 핀 네 개의 논리 상태를 감시합니다. GPIO0~3은 fan tach1~4에 대응하고, `gpio` 읽기 전용 비트마스크의 LSB는 GPIO0, MSB는 GPIO7입니다.

고유 sysfs에는 PROCHOT 현재·평균·제한·단락·오버라이드·듀티·구간, VRDHOT 상태, Smart Tach, 자동 채널, 스핀업 최소·시간, PROCHOT·VRDHOT 램프, 온도 기본·오프셋 1~12·히스테리시스·부스트·부스트 히스테리시스와 `gpio`가 포함됩니다.

LM93 자동 보호 기능
기능속성범위
스핀업 최소pwm<n>_auto_spinup_minPWM 듀티 표현
스핀업 시간pwm<n>_auto_spinup_time0~4초 단계
PROCHOT 램프pwm_auto_prochot_ramp0~0.75초, 0.05초 단계
VRDHOT 램프pwm_auto_vrdhot_ramp0~0.75초, 0.05초 단계
팬 부스트temp<n>_auto_boost[_hyst]두 PWM 즉시 100%
GPIOgpio8비트 읽기 전용

팬 기동과 열 제한 대응 속성입니다.

비상 팬 응답
0%에서 양수 PWM 요청 감지최소 듀티로 지정 시간 스핀업PROCHOT·VRDHOT이면 단계 램핑boost 온도 초과 시 즉시 100%히스테리시스 아래에서 부스트 해제

정지 팬 기동부터 과온 100% 출력까지 단계화합니다.

PWM Spin-Up Cycle
^^^^^^^^^^^^^^^^^

A spin-up cycle occurs when a PWM output is commanded from 0% duty cycle to
some value > 0%.  The LM93 supports a minimum duty cycle during spin-up.  These
values are found in the sysfs files pwm<n>_auto_spinup_min. The value in this
file has the same representation as other PWM duty cycle values. The
duration of the spin-up cycle is also configurable.  These values are found in
the sysfs files pwm<n>_auto_spinup_time. The value in this file is
the spin-up time in seconds.  The available spin-up times are constrained by
the hardware.  Selecting a value which is not available will cause the driver
to use the next largest value.

Spin-up Durations:
        0 (disabled, h/w default), 0.1, 0.25, 0.4, 0.7, 1.0, 2.0, 4.0

#PROCHOT and #VRDHOT PWM Ramping
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If the #PROCHOT or #VRDHOT signals are asserted while bound to a PWM output
channel, the LM93 will ramp the PWM output up to 100% duty cycle in discrete
steps. The duration of each step is configurable. There are two files, with
one value each in seconds: pwm_auto_prochot_ramp and pwm_auto_vrdhot_ramp.
The available ramp times are constrained by the hardware.  Selecting a value
which is not available will cause the driver to use the next largest value.

Ramp Times:
        0 (disabled, h/w default) to 0.75 in 0.05 second intervals

Fan Boost
^^^^^^^^^

For each temperature channel, there is a boost temperature: if the channel
exceeds this limit, the LM93 will immediately drive both PWM outputs to 100%.
This limit is expressed in degrees C in the sysfs files temp<n>_auto_boost.
There is also a hysteresis temperature for this function: after the boost
limit is reached, the temperature channel must drop below this value before
the boost function is disabled.  This temperature is also expressed in degrees
C in the sysfs files temp<n>_auto_boost_hyst.

GPIO Pins
^^^^^^^^^

The LM93 can monitor the logic level of four dedicated GPIO pins as well as the
four tach input pins.  GPIO0-GPIO3 correspond to (fan) tach 1-4, respectively.
All eight GPIOs are read by reading the bitmask in the sysfs file gpio.  The
LSB is GPIO0, and the MSB is GPIO7.


LM93 Unique sysfs Files
-----------------------

=========================== ===============================================
file                            description
=========================== ===============================================
prochot<n>                    current #PROCHOT %
prochot<n>_avg                    moving average #PROCHOT %
prochot<n>_max                    limit #PROCHOT %
prochot_short                    enable or disable logical #PROCHOT pin short
prochot<n>_override            force #PROCHOT assertion as PWM
prochot_override_duty_cycle duty cycle for the PWM signal used when
                            #PROCHOT is overridden
prochot<n>_interval            #PROCHOT PWM sampling interval
vrdhot<n>                    0 means negated, 1 means asserted
fan<n>_smart_tach            enable or disable smart tach mode
pwm<n>_auto_channels            select control sources for PWM outputs
pwm<n>_auto_spinup_min            minimum duty cycle during spin-up
pwm<n>_auto_spinup_time            duration of spin-up
pwm_auto_prochot_ramp            ramp time per step when #PROCHOT asserted
pwm_auto_vrdhot_ramp            ramp time per step when #VRDHOT asserted
temp<n>_auto_base            temperature channel base
temp<n>_auto_offset[1-12]   temperature channel offsets
temp<n>_auto_offset_hyst    temperature channel offset hysteresis
temp<n>_auto_boost            temperature channel boost (PWMs to 100%)
                            limit
temp<n>_auto_boost_hyst     temperature channel boost hysteresis
gpio                            input state of 8 GPIO pins; read-only
=========================== ===============================================