요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
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 <mhoffman@lightlink.com>
- Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com>
- Adapted to 2.6.20 by Carsten Emde <ce@osadl.org>
- Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
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".
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.
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).
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)
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.
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
=========================== ===============================================
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입니다.
초기화·거래·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 <mhoffman@lightlink.com>
- Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com>
- Adapted to 2.6.20 by Carsten Emde <ce@osadl.org>
- Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
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-75LM93은 SMBus 2.0 호환 2선 인터페이스를 사용합니다. 8비트 ADC로 원격 다이오드 트랜지스터 2개와 자체 다이 온도, 전원 전압 16개를 측정합니다.
팬 속도 제어에는 각각 최대 네 온도 구역이 제어하는 PWM 출력 2개와 조회표 기반 알고리즘을 사용합니다. 온도 값을 부드럽게 해 팬 제어를 안정시키는 디지털 필터도 있습니다.
팬 속도 측정용 타코미터 입력은 4개이며 모든 측정값의 제한·상태 레지스터를 제공합니다. LM85의 Smart Tach 기능을 계승하고 동적 Vccp와 PROCHOT 측정·제어를 추가해 최소 외부 부품으로 듀얼 프로세서 Xeon급 메인보드를 감시하도록 설계되었습니다.
LM94도 LM93 호환 모드로 지원하지만 LM94의 추가 센서와 기능은 지원하지 않습니다.
측정 채널과 제어 출력을 요약합니다.
다수 입력을 필터링해 팬 제어와 상태 레지스터에 연결합니다.
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-139LM93은 두 `#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를 켤 수 없습니다.
PROCHOT·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-166LM93의 두 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 사용 가능 여부에도 영향을 줍니다.
오버라이드와 하드웨어 단계화 규칙입니다.
주파수와 듀티가 모두 하드웨어 지원 단계로 정규화됩니다.
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가 각각 공유합니다.
여덟 제어 소스의 비트 배치입니다.
연결 소스별 요구값 중 최댓값을 출력합니다.
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-312PWM이 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`가 포함됩니다.
팬 기동과 열 제한 대응 속성입니다.
정지 팬 기동부터 과온 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
=========================== ===============================================
요약·해설
lm93.rst:1-312온도·전압·팬을 감시하고 여덟 제어 소스와 12단계 온도표로 PWM을 계산하며 스핀업·램핑·부스트를 적용합니다.
원문 분량과 핵심 인터페이스입니다.
장치 감지부터 측정·제어까지의 핵심 순서입니다.