요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Kernel driver adm9240
=====================
Supported chips:
* Analog Devices ADM9240
Prefix: 'adm9240'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: Publicly available at the Analog Devices website
http://www.analog.com/UploadedFiles/Data_Sheets/79857778ADM9240_0.pdf
* Dallas Semiconductor DS1780
Prefix: 'ds1780'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: Publicly available at the Dallas Semiconductor (Maxim) website
http://pdfserv.maxim-ic.com/en/ds/DS1780.pdf
* National Semiconductor LM81
Prefix: 'lm81'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/ds.cgi/LM/LM81.pdf
Authors:
- Frodo Looijaard <[email protected]>,
- Philip Edelbrock <[email protected]>,
- Michiel Rook <[email protected]>,
- Grant Coady <[email protected]> with guidance
from Jean Delvare <[email protected]>
Interface
---------
The I2C addresses listed above assume BIOS has not changed the
chip MSB 5-bit address. Each chip reports a unique manufacturer
identification code as well as the chip revision/stepping level.
Description
-----------
[From ADM9240] The ADM9240 is a complete system hardware monitor for
microprocessor-based systems, providing measurement and limit comparison
of up to four power supplies and two processor core voltages, plus
temperature, two fan speeds and chassis intrusion. Measured values can
be read out via an I2C-compatible serial System Management Bus, and values
for limit comparisons can be programmed in over the same serial bus. The
high speed successive approximation ADC allows frequent sampling of all
analog channels to ensure a fast interrupt response to any out-of-limit
measurement.
The ADM9240, DS1780 and LM81 are register compatible, the following
details are common to the three chips. Chip differences are described
after this section.
Measurements
------------
The measurement cycle
The adm9240 driver will take a measurement reading no faster than once
each two seconds. User-space may read sysfs interface faster than the
measurement update rate and will receive cached data from the most
recent measurement.
ADM9240 has a very fast 320us temperature and voltage measurement cycle
with independent fan speed measurement cycles counting alternating rising
edges of the fan tacho inputs.
DS1780 measurement cycle is about once per second including fan speed.
LM81 measurement cycle is about once per 400ms including fan speed.
The LM81 12-bit extended temperature measurement mode is not supported.
Temperature
-----------
On chip temperature is reported as degrees Celsius as 9-bit signed data
with resolution of 0.5 degrees Celsius. High and low temperature limits
are 8-bit signed data with resolution of one degree Celsius.
Temperature alarm is asserted once the temperature exceeds the high limit,
and is cleared when the temperature falls below the temp1_max_hyst value.
Fan Speed
---------
Two fan tacho inputs are provided, the ADM9240 gates an internal 22.5kHz
clock via a divider to an 8-bit counter. Fan speed (rpm) is calculated by:
rpm = (22500 * 60) / (count * divider)
Automatic fan clock divider
* User sets 0 to fan_min limit
- low speed alarm is disabled
- fan clock divider not changed
- auto fan clock adjuster enabled for valid fan speed reading
* User sets fan_min limit too low
- low speed alarm is enabled
- fan clock divider set to max
- fan_min set to register value 254 which corresponds
to 664 rpm on adm9240
- low speed alarm will be asserted if fan speed is
less than minimum measurable speed
- auto fan clock adjuster disabled
* User sets reasonable fan speed
- low speed alarm is enabled
- fan clock divider set to suit fan_min
- auto fan clock adjuster enabled: adjusts fan_min
* User sets unreasonably high low fan speed limit
- resolution of the low speed limit may be reduced
- alarm will be asserted
- auto fan clock adjuster enabled: adjusts fan_min
* fan speed may be displayed as zero until the auto fan clock divider
adjuster brings fan speed clock divider back into chip measurement
range, this will occur within a few measurement cycles.
Analog Output
-------------
An analog output provides a 0 to 1.25 volt signal intended for an external
fan speed amplifier circuit. The analog output is set to maximum value on
power up or reset. This doesn't do much on the test Intel SE440BX-2.
Voltage Monitor
^^^^^^^^^^^^^^^
Voltage (IN) measurement is internally scaled:
=== =========== =========== ========= ==========
nr label nominal maximum resolution
mV mV mV
=== =========== =========== ========= ==========
0 +2.5V 2500 3320 13.0
1 Vccp1 2700 3600 14.1
2 +3.3V 3300 4380 17.2
3 +5V 5000 6640 26.0
4 +12V 12000 15940 62.5
5 Vccp2 2700 3600 14.1
=== =========== =========== ========= ==========
The reading is an unsigned 8-bit value, nominal voltage measurement is
represented by a reading of 192, being 3/4 of the measurement range.
An alarm is asserted for any voltage going below or above the set limits.
The driver reports and accepts voltage limits scaled to the above table.
VID Monitor
-----------
The chip has five inputs to read the 5-bit VID and reports the mV value
based on detected CPU type.
Chassis Intrusion
-----------------
An alarm is asserted when the CI pin goes active high. The ADM9240
Datasheet has an example of an external temperature sensor driving
this pin. On an Intel SE440BX-2 the Chassis Intrusion header is
connected to a normally open switch.
The ADM9240 provides an internal open drain on this line, and may output
a 20 ms active low pulse to reset an external Chassis Intrusion latch.
Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file.
Alarm flags reported as 16-bit word
=== ============= ==========================
bit label comment
=== ============= ==========================
0 +2.5 V_Error high or low limit exceeded
1 VCCP_Error high or low limit exceeded
2 +3.3 V_Error high or low limit exceeded
3 +5 V_Error high or low limit exceeded
4 Temp_Error temperature error
6 FAN1_Error fan low limit exceeded
7 FAN2_Error fan low limit exceeded
8 +12 V_Error high or low limit exceeded
9 VCCP2_Error high or low limit exceeded
12 Chassis_Error CI pin went high
=== ============= ==========================
Remaining bits are reserved and thus undefined. It is important to note
that alarm bits may be cleared on read, user-space may latch alarms and
provide the end-user with a method to clear alarm memory.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 칩과 I2C interface
1-48드라이버는 Analog Devices `ADM9240` prefix `adm9240`, Dallas Semiconductor `DS1780` prefix `ds1780`, National Semiconductor `LM81` prefix `lm81`을 지원합니다. 세 칩 모두 I2C `0x2c`부터 `0x2f`까지 검색하며 각 제조사 웹사이트의 데이터시트 URL이 문서에 기재되어 있습니다.
저자는 Frodo Looijaard, Philip Edelbrock, Michiel Rook, Grant Coady이며 Jean Delvare가 지침을 제공했습니다.
나열된 I2C 주소는 BIOS가 chip의 MSB 5-bit address를 변경하지 않았다는 전제입니다. 각 칩은 고유한 manufacturer identification code와 chip revision 또는 stepping level을 보고합니다.
세 register-compatible 칩의 prefix와 검색 범위입니다.
주소와 manufacturer code를 함께 사용합니다.
Kernel driver adm9240
=====================
Supported chips:
* Analog Devices ADM9240
Prefix: 'adm9240'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: Publicly available at the Analog Devices website
http://www.analog.com/UploadedFiles/Data_Sheets/79857778ADM9240_0.pdf
* Dallas Semiconductor DS1780
Prefix: 'ds1780'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: Publicly available at the Dallas Semiconductor (Maxim) website
http://pdfserv.maxim-ic.com/en/ds/DS1780.pdf
* National Semiconductor LM81
Prefix: 'lm81'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/ds.cgi/LM/LM81.pdf
Authors:
- Frodo Looijaard <[email protected]>,
- Philip Edelbrock <[email protected]>,
- Michiel Rook <[email protected]>,
- Grant Coady <[email protected]> with guidance
from Jean Delvare <[email protected]>
Interface
---------
The I2C addresses listed above assume BIOS has not changed the
chip MSB 5-bit address. Each chip reports a unique manufacturer
identification code as well as the chip revision/stepping level.
감시 기능과 측정 주기
49-83ADM9240은 microprocessor 기반 시스템용 종합 hardware monitor입니다. 최대 4개 전원, processor core voltage 2개, 온도, fan speed 2개와 chassis intrusion을 측정하고 한계값과 비교합니다. 측정값은 I2C-compatible serial System Management Bus로 읽고 비교 한계값도 같은 bus를 통해 programming합니다.
고속 successive approximation ADC는 모든 analog channel을 자주 sample하여 범위를 벗어난 측정에 빠르게 interrupt로 응답합니다. ADM9240, DS1780, LM81은 register-compatible하며 이 절의 동작은 세 칩에 공통입니다. 칩 차이는 뒤에서 설명합니다.
`adm9240` 드라이버는 2초보다 빠르게 새 측정값을 읽지 않습니다. 사용자 공간이 sysfs를 더 자주 읽으면 가장 최근 측정에서 cache한 data를 받습니다.
ADM9240의 온도 및 전압 측정 cycle은 320us로 매우 빠릅니다. Fan tach input의 번갈아 발생하는 rising edge를 세는 fan speed cycle은 독립적으로 동작합니다. DS1780은 fan speed를 포함해 약 1초마다, LM81은 fan speed를 포함해 약 400ms마다 측정합니다. LM81의 12-bit extended temperature measurement mode는 지원하지 않습니다.
하드웨어 cycle과 드라이버 cache 주기를 구분합니다.
하드웨어 sample과 2초 driver cache의 관계입니다.
Description
-----------
[From ADM9240] The ADM9240 is a complete system hardware monitor for
microprocessor-based systems, providing measurement and limit comparison
of up to four power supplies and two processor core voltages, plus
temperature, two fan speeds and chassis intrusion. Measured values can
be read out via an I2C-compatible serial System Management Bus, and values
for limit comparisons can be programmed in over the same serial bus. The
high speed successive approximation ADC allows frequent sampling of all
analog channels to ensure a fast interrupt response to any out-of-limit
measurement.
The ADM9240, DS1780 and LM81 are register compatible, the following
details are common to the three chips. Chip differences are described
after this section.
Measurements
------------
The measurement cycle
The adm9240 driver will take a measurement reading no faster than once
each two seconds. User-space may read sysfs interface faster than the
measurement update rate and will receive cached data from the most
recent measurement.
ADM9240 has a very fast 320us temperature and voltage measurement cycle
with independent fan speed measurement cycles counting alternating rising
edges of the fan tacho inputs.
DS1780 measurement cycle is about once per second including fan speed.
LM81 measurement cycle is about once per 400ms including fan speed.
The LM81 12-bit extended temperature measurement mode is not supported.
온도와 fan divider
84-132On-chip temperature는 9-bit signed data로 섭씨를 보고하며 해상도는 0.5도씨입니다. High 및 low temperature limit는 8-bit signed data이고 해상도는 1도씨입니다. 온도가 high limit를 넘으면 alarm이 assert되고 `temp1_max_hyst` 아래로 내려가면 clear됩니다.
Fan tach input은 두 개입니다. ADM9240은 divider를 거친 내부 22.5kHz clock을 8-bit counter로 gate합니다. RPM 계산식은 `rpm = (22500 * 60) / (count * divider)`입니다.
사용자가 `fan_min`에 0을 설정하면 low speed alarm을 disable하고 fan clock divider는 바꾸지 않습니다. 유효한 fan speed 읽기를 위한 automatic fan clock adjuster는 enable합니다.
사용자가 너무 낮은 `fan_min` limit를 설정하면 low speed alarm을 enable하고 divider를 최대값으로 설정합니다. `fan_min`은 register value 254로 설정되며 ADM9240에서는 664 RPM에 해당합니다. 실제 fan speed가 최소 측정 가능 속도보다 낮으면 alarm이 assert되고 automatic adjuster는 disable됩니다.
합리적인 fan speed를 설정하면 low speed alarm을 enable하고 `fan_min`에 맞는 divider를 선택하며 automatic adjuster가 `fan_min`을 조정합니다.
비합리적으로 높은 low fan speed limit를 설정하면 low speed limit 해상도가 낮아질 수 있고 alarm이 assert됩니다. Automatic adjuster는 enable되어 `fan_min`을 조정합니다.
Automatic adjuster가 fan speed clock divider를 칩의 측정 범위로 되돌릴 때까지 fan speed가 0으로 표시될 수 있습니다. 이 조정은 몇 번의 measurement cycle 안에 완료됩니다.
네 가지 입력 범위와 divider·alarm 동작입니다.
Tach edge count를 유효 범위로 맞춘 뒤 RPM으로 변환합니다.
Temperature
-----------
On chip temperature is reported as degrees Celsius as 9-bit signed data
with resolution of 0.5 degrees Celsius. High and low temperature limits
are 8-bit signed data with resolution of one degree Celsius.
Temperature alarm is asserted once the temperature exceeds the high limit,
and is cleared when the temperature falls below the temp1_max_hyst value.
Fan Speed
---------
Two fan tacho inputs are provided, the ADM9240 gates an internal 22.5kHz
clock via a divider to an 8-bit counter. Fan speed (rpm) is calculated by:
rpm = (22500 * 60) / (count * divider)
Automatic fan clock divider
* User sets 0 to fan_min limit
- low speed alarm is disabled
- fan clock divider not changed
- auto fan clock adjuster enabled for valid fan speed reading
* User sets fan_min limit too low
- low speed alarm is enabled
- fan clock divider set to max
- fan_min set to register value 254 which corresponds
to 664 rpm on adm9240
- low speed alarm will be asserted if fan speed is
less than minimum measurable speed
- auto fan clock adjuster disabled
* User sets reasonable fan speed
- low speed alarm is enabled
- fan clock divider set to suit fan_min
- auto fan clock adjuster enabled: adjusts fan_min
* User sets unreasonably high low fan speed limit
- resolution of the low speed limit may be reduced
- alarm will be asserted
- auto fan clock adjuster enabled: adjusts fan_min
* fan speed may be displayed as zero until the auto fan clock divider
adjuster brings fan speed clock divider back into chip measurement
range, this will occur within a few measurement cycles.
Analog output과 voltage scale
133-164Analog output은 외부 fan speed amplifier circuit용 0V~1.25V signal을 제공합니다. Power-up 또는 reset 시 최대값으로 설정됩니다. 문서의 Intel SE440BX-2 시험 장치에서는 이 출력이 별다른 효과를 내지 않았습니다.
Voltage IN 측정은 내부적으로 scale됩니다. Channel 0 `+2.5V`는 nominal 2500mV, maximum 3320mV, resolution 13.0mV입니다. Channel 1 `Vccp1`은 2700mV, 3600mV, 14.1mV이고 channel 2 `+3.3V`는 3300mV, 4380mV, 17.2mV입니다.
Channel 3 `+5V`는 nominal 5000mV, maximum 6640mV, resolution 26.0mV입니다. Channel 4 `+12V`는 12000mV, 15940mV, 62.5mV이고 channel 5 `Vccp2`는 2700mV, 3600mV, 14.1mV입니다.
읽기 값은 unsigned 8-bit이며 nominal voltage는 측정 범위의 3/4인 register value 192로 표현합니다. 전압이 설정한 low 또는 high limit를 벗어나면 alarm이 assert됩니다. 드라이버는 이 표의 scale을 적용한 voltage limit를 보고하고 입력받습니다.
원문의 RST 표를 채널별 구조화 표로 옮겼습니다.
8-bit register와 채널 scale을 실제 mV로 변환합니다.
Analog Output
-------------
An analog output provides a 0 to 1.25 volt signal intended for an external
fan speed amplifier circuit. The analog output is set to maximum value on
power up or reset. This doesn't do much on the test Intel SE440BX-2.
Voltage Monitor
^^^^^^^^^^^^^^^
Voltage (IN) measurement is internally scaled:
=== =========== =========== ========= ==========
nr label nominal maximum resolution
mV mV mV
=== =========== =========== ========= ==========
0 +2.5V 2500 3320 13.0
1 Vccp1 2700 3600 14.1
2 +3.3V 3300 4380 17.2
3 +5V 5000 6640 26.0
4 +12V 12000 15940 62.5
5 Vccp2 2700 3600 14.1
=== =========== =========== ========= ==========
The reading is an unsigned 8-bit value, nominal voltage measurement is
represented by a reading of 192, being 3/4 of the measurement range.
An alarm is asserted for any voltage going below or above the set limits.
The driver reports and accepts voltage limits scaled to the above table.
VID monitor와 chassis intrusion
165-181칩에는 5-bit VID를 읽는 input 다섯 개가 있으며 감지한 CPU type을 기준으로 mV 값을 보고합니다.
Chassis Intrusion, 즉 CI pin이 active high가 되면 alarm이 assert됩니다. ADM9240 데이터시트에는 외부 온도 센서가 이 pin을 구동하는 예제가 있습니다. Intel SE440BX-2에서는 Chassis Intrusion header가 normally open switch에 연결되어 있습니다.
ADM9240은 이 line에 내부 open drain을 제공하며 외부 Chassis Intrusion latch를 reset하기 위해 20ms active-low pulse를 출력할 수 있습니다. Sysfs `intrusion0_alarm` 파일에 값 0을 쓰면 CI latch를 clear합니다.
CPU VID 읽기와 chassis latch reset 경로입니다.
외부 latch부터 사용자 clear까지의 흐름입니다.
VID Monitor
-----------
The chip has five inputs to read the 5-bit VID and reports the mV value
based on detected CPU type.
Chassis Intrusion
-----------------
An alarm is asserted when the CI pin goes active high. The ADM9240
Datasheet has an example of an external temperature sensor driving
this pin. On an Intel SE440BX-2 the Chassis Intrusion header is
connected to a normally open switch.
The ADM9240 provides an internal open drain on this line, and may output
a 20 ms active low pulse to reset an external Chassis Intrusion latch.
Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file.
16-bit alarm flag map
182-201Alarm flag는 16-bit word로 보고됩니다. Bit 0은 `+2.5 V_Error`, bit 1은 `VCCP_Error`, bit 2는 `+3.3 V_Error`, bit 3은 `+5 V_Error`이며 모두 high 또는 low limit 초과를 뜻합니다.
Bit 4는 `Temp_Error`, bit 6은 `FAN1_Error`, bit 7은 `FAN2_Error`입니다. 두 fan bit는 fan low limit 초과를 뜻합니다. Bit 8은 `+12 V_Error`, bit 9는 `VCCP2_Error`이고 둘 다 high 또는 low limit 초과입니다. Bit 12 `Chassis_Error`는 CI pin이 high가 되었음을 뜻합니다.
나머지 bit는 reserved이므로 정의되지 않습니다. Alarm bit는 읽을 때 clear될 수 있다는 점이 중요합니다. 사용자 공간은 alarm을 별도로 latch하고 최종 사용자에게 alarm memory를 clear하는 방법을 제공할 수 있습니다.
원문의 16-bit flag 표를 정의된 bit만 구조화했습니다.
Read-clear 가능성을 사용자 공간 latch로 보완합니다.
Alarm flags reported as 16-bit word
=== ============= ==========================
bit label comment
=== ============= ==========================
0 +2.5 V_Error high or low limit exceeded
1 VCCP_Error high or low limit exceeded
2 +3.3 V_Error high or low limit exceeded
3 +5 V_Error high or low limit exceeded
4 Temp_Error temperature error
6 FAN1_Error fan low limit exceeded
7 FAN2_Error fan low limit exceeded
8 +12 V_Error high or low limit exceeded
9 VCCP2_Error high or low limit exceeded
12 Chassis_Error CI pin went high
=== ============= ==========================
Remaining bits are reserved and thus undefined. It is important to note
that alarm bits may be cleared on read, user-space may latch alarms and
provide the end-user with a method to clear alarm memory.
요약·해설
adm9240.rst:1-201세 register-compatible 칩의 온도·전압·fan·VID·chassis 감시와 16-bit alarm을 설명합니다.
원문 분량과 핵심 기능을 요약합니다.
드라이버를 적용하고 읽는 기본 순서입니다.