요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Kernel driver smsc47b397
========================
Supported chips:
* SMSC LPC47B397-NC
* SMSC SCH5307-NS
* SMSC SCH5317
Prefix: 'smsc47b397'
Addresses scanned: none, address read from Super I/O config space
Datasheet: In this file
Authors:
- Mark M. Hoffman <[email protected]>
- Utilitek Systems, Inc.
November 23, 2004
The following specification describes the SMSC LPC47B397-NC [1]_ sensor chip
(for which there is no public datasheet available). This document was
provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
by Mark M. Hoffman <[email protected]>.
.. [1] And SMSC SCH5307-NS and SCH5317, which have different device IDs but are
otherwise compatible.
-------------------------------------------------------------------------
Methods for detecting the HP SIO and reading the thermal data on a dc7100
-------------------------------------------------------------------------
The thermal information on the dc7100 is contained in the SIO Hardware Monitor
(HWM). The information is accessed through an index/data pair. The index/data
pair is located at the HWM Base Address + 0 and the HWM Base Address + 1. The
HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
and 0x61 (LSB). Currently we are using 0x480 for the HWM Base Address and
0x480 and 0x481 for the index/data pair.
Reading temperature information.
The temperature information is located in the following registers:
=============== ======= =======================================================
Temp1 0x25 (Currently, this reflects the CPU temp on all systems).
Temp2 0x26
Temp3 0x27
Temp4 0x80
=============== ======= =======================================================
Programming Example
The following is an example of how to read the HWM temperature registers::
MOV DX,480H
MOV AX,25H
OUT DX,AL
MOV DX,481H
IN AL,DX
AL contains the data in hex, the temperature in Celsius is the decimal
equivalent.
Ex: If AL contains 0x2A, the temperature is 42 degrees C.
Reading tach information.
The fan speed information is located in the following registers:
=============== ======= ======= =================================
LSB MSB
Tach1 0x28 0x29 (Currently, this reflects the CPU
fan speed on all systems).
Tach2 0x2A 0x2B
Tach3 0x2C 0x2D
Tach4 0x2E 0x2F
=============== ======= ======= =================================
.. Important::
Reading the tach LSB locks the tach MSB.
The LSB Must be read first.
How to convert the tach reading to RPM
--------------------------------------
The tach reading (TCount) is given by: (Tach MSB * 256) + (Tach LSB)
The SIO counts the number of 90kHz (11.111us) pulses per revolution.
RPM = 60/(TCount * 11.111us)
Example::
Reg 0x28 = 0x9B
Reg 0x29 = 0x08
TCount = 0x89B = 2203
RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM
Obtaining the SIO version.
Configuration Sequence
----------------------
To program the configuration registers, the following sequence must be followed:
1. Enter Configuration Mode
2. Configure the Configuration Registers
3. Exit Configuration Mode.
Enter Configuration Mode
^^^^^^^^^^^^^^^^^^^^^^^^
To place the chip into the Configuration State The config key (0x55) is written
to the CONFIG PORT (0x2E).
Configuration Mode
^^^^^^^^^^^^^^^^^^
In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
the DATA PORT is at INDEX PORT address + 1.
The desired configuration registers are accessed in two steps:
a. Write the index of the Logical Device Number Configuration Register
(i.e., 0x07) to the INDEX PORT and then write the number of the
desired logical device to the DATA PORT.
b. Write the address of the desired configuration register within the
logical device to the INDEX PORT and then write or read the config-
uration register through the DATA PORT.
Note:
If accessing the Global Configuration Registers, step (a) is not required.
Exit Configuration Mode
^^^^^^^^^^^^^^^^^^^^^^^
To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
The chip returns to the RUN State. (This is important).
Programming Example
^^^^^^^^^^^^^^^^^^^
The following is an example of how to read the SIO Device ID located at 0x20:
; ENTER CONFIGURATION MODE
MOV DX,02EH
MOV AX,055H
OUT DX,AL
; GLOBAL CONFIGURATION REGISTER
MOV DX,02EH
MOV AL,20H
OUT DX,AL
; READ THE DATA
MOV DX,02FH
IN AL,DX
; EXIT CONFIGURATION MODE
MOV DX,02EH
MOV AX,0AAH
OUT DX,AL
The registers of interest for identifying the SIO on the dc7100 are Device ID
(0x20) and Device Rev (0x21).
The Device ID will read 0x6F (0x81 for SCH5307-NS, and 0x85 for SCH5317)
The Device Rev currently reads 0x01
Obtaining the HWM Base Address
------------------------------
The following is an example of how to read the HWM Base Address located in
Logical Device 8::
; ENTER CONFIGURATION MODE
MOV DX,02EH
MOV AX,055H
OUT DX,AL
; CONFIGURE REGISTER CRE0,
; LOGICAL DEVICE 8
MOV DX,02EH
MOV AL,07H
OUT DX,AL ;Point to LD# Config Reg
MOV DX,02FH
MOV AL, 08H
OUT DX,AL;Point to Logical Device 8
;
MOV DX,02EH
MOV AL,60H
OUT DX,AL ; Point to HWM Base Addr MSB
MOV DX,02FH
IN AL,DX ; Get MSB of HWM Base Addr
; EXIT CONFIGURATION MODE
MOV DX,02EH
MOV AX,0AAH
OUT DX,AL
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
LPC47B397·SCH5307·SCH5317 호환 사양
1-32`smsc47b397` 드라이버는 SMSC LPC47B397-NC, SCH5307-NS, SCH5317을 지원합니다. 접두사는 `smsc47b397`이고 주소는 자동 검색하지 않으며 Super I/O 구성 공간에서 읽습니다.
공개 데이터시트가 없어 이 문서 자체가 LPC47B397-NC 센서 칩의 사양을 제공합니다. Craig Kelly가 제공한 자료를 Mark M. Hoffman이 편집·수정했으며 Utilitek Systems가 함께 작성했습니다. 문서 날짜는 2004년 11월 23일입니다.
SCH5307-NS와 SCH5317은 장치 ID는 다르지만 나머지 동작은 호환됩니다.
같은 센서 사양을 사용하는 세 Super I/O 장치입니다.
구성 공간의 장치 ID와 HWM 기준 주소를 이용합니다.
Kernel driver smsc47b397
========================
Supported chips:
* SMSC LPC47B397-NC
* SMSC SCH5307-NS
* SMSC SCH5317
Prefix: 'smsc47b397'
Addresses scanned: none, address read from Super I/O config space
Datasheet: In this file
Authors:
- Mark M. Hoffman <[email protected]>
- Utilitek Systems, Inc.
November 23, 2004
The following specification describes the SMSC LPC47B397-NC [1]_ sensor chip
(for which there is no public datasheet available). This document was
provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
by Mark M. Hoffman <[email protected]>.
.. [1] And SMSC SCH5307-NS and SCH5317, which have different device IDs but are
otherwise compatible.
dc7100 HWM 기준 주소와 온도 레지스터
33-68HP dc7100의 열 정보는 Super I/O 하드웨어 모니터(HWM)에 있으며 인덱스·데이터 포트 쌍으로 접근합니다. 인덱스는 HWM 기준 주소+0, 데이터는 기준 주소+1입니다.
HWM 기준 주소는 Logical Device 8의 `0x60`(MSB)과 `0x61`(LSB)에서 얻습니다. 예시 시스템은 기준 주소 `0x480`, 인덱스 포트 `0x480`, 데이터 포트 `0x481`을 사용합니다.
온도 레지스터는 Temp1 `0x25`, Temp2 `0x26`, Temp3 `0x27`, Temp4 `0x80`입니다. 현재 모든 시스템에서 Temp1은 CPU 온도를 반영합니다.
예제는 `0x480`에 인덱스 `0x25`를 쓰고 `0x481`에서 데이터를 읽습니다. AL의 16진수 값을 십진수로 해석한 것이 섭씨 온도이며 `0x2A`는 42°C입니다.
HWM 포트와 온도 레지스터를 대응시킵니다.
인덱스 포트로 레지스터를 고른 뒤 데이터 포트에서 섭씨 값을 읽습니다.
-------------------------------------------------------------------------
Methods for detecting the HP SIO and reading the thermal data on a dc7100
-------------------------------------------------------------------------
The thermal information on the dc7100 is contained in the SIO Hardware Monitor
(HWM). The information is accessed through an index/data pair. The index/data
pair is located at the HWM Base Address + 0 and the HWM Base Address + 1. The
HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
and 0x61 (LSB). Currently we are using 0x480 for the HWM Base Address and
0x480 and 0x481 for the index/data pair.
Reading temperature information.
The temperature information is located in the following registers:
=============== ======= =======================================================
Temp1 0x25 (Currently, this reflects the CPU temp on all systems).
Temp2 0x26
Temp3 0x27
Temp4 0x80
=============== ======= =======================================================
Programming Example
The following is an example of how to read the HWM temperature registers::
MOV DX,480H
MOV AX,25H
OUT DX,AL
MOV DX,481H
IN AL,DX
AL contains the data in hex, the temperature in Celsius is the decimal
equivalent.
Ex: If AL contains 0x2A, the temperature is 42 degrees C.
팬 카운터 원자 판독과 RPM 계산
69-101팬 속도 카운터는 Tach1 LSB/MSB `0x28/0x29`, Tach2 `0x2A/0x2B`, Tach3 `0x2C/0x2D`, Tach4 `0x2E/0x2F`에 있습니다. 현재 모든 시스템에서 Tach1은 CPU 팬 속도입니다.
Tach LSB를 읽으면 대응하는 MSB가 잠기므로 반드시 LSB를 먼저 읽어야 일관된 16비트 카운터를 얻습니다.
카운터 `TCount`는 `(Tach MSB × 256) + Tach LSB`입니다. SIO는 회전당 90 kHz, 즉 11.111 µs 펄스 수를 세므로 `RPM = 60 / (TCount × 11.111 µs)`입니다.
예제에서 `0x28=0x9B`, `0x29=0x08`이므로 `TCount=0x089B=2203`이고 계산된 속도는 2451 RPM입니다.
각 팬 카운터의 LSB·MSB와 판독 순서입니다.
하위 바이트 판독으로 상위 바이트를 잠근 뒤 90 kHz 주기를 적용합니다.
Reading tach information.
The fan speed information is located in the following registers:
=============== ======= ======= =================================
LSB MSB
Tach1 0x28 0x29 (Currently, this reflects the CPU
fan speed on all systems).
Tach2 0x2A 0x2B
Tach3 0x2C 0x2D
Tach4 0x2E 0x2F
=============== ======= ======= =================================
.. Important::
Reading the tach LSB locks the tach MSB.
The LSB Must be read first.
How to convert the tach reading to RPM
--------------------------------------
The tach reading (TCount) is given by: (Tach MSB * 256) + (Tach LSB)
The SIO counts the number of 90kHz (11.111us) pulses per revolution.
RPM = 60/(TCount * 11.111us)
Example::
Reg 0x28 = 0x9B
Reg 0x29 = 0x08
TCount = 0x89B = 2203
RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM
Super I/O 구성 모드 진입·접근·종료
102-142구성 레지스터를 프로그래밍하려면 1) 구성 모드 진입, 2) 구성 레지스터 설정, 3) 구성 모드 종료 순서를 따라야 합니다.
구성 모드에 들어가려면 구성 키 `0x55`를 CONFIG PORT `0x2E`에 씁니다. 구성 모드에서는 INDEX PORT가 CONFIG PORT와 같은 `0x2E`, DATA PORT는 그다음 주소 `0x2F`입니다.
논리 장치 레지스터 접근은 두 단계입니다. 먼저 논리 장치 번호 구성 레지스터의 인덱스 `0x07`을 INDEX PORT에 쓰고 원하는 논리 장치 번호를 DATA PORT에 씁니다. 이어서 대상 구성 레지스터 주소를 INDEX PORT에 쓰고 DATA PORT를 통해 값을 읽거나 씁니다.
전역 구성 레지스터에 접근할 때는 논리 장치 선택 단계가 필요 없습니다. 구성 상태를 끝내려면 `0xAA`를 CONFIG PORT `0x2E`에 써서 칩을 RUN 상태로 되돌려야 하며, 이 종료 단계는 중요합니다.
구성 모드의 키·포트·논리 장치 선택 절차입니다.
진입 키부터 RUN 상태 복귀까지 순서를 보장합니다.
Obtaining the SIO version.
Configuration Sequence
----------------------
To program the configuration registers, the following sequence must be followed:
1. Enter Configuration Mode
2. Configure the Configuration Registers
3. Exit Configuration Mode.
Enter Configuration Mode
^^^^^^^^^^^^^^^^^^^^^^^^
To place the chip into the Configuration State The config key (0x55) is written
to the CONFIG PORT (0x2E).
Configuration Mode
^^^^^^^^^^^^^^^^^^
In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
the DATA PORT is at INDEX PORT address + 1.
The desired configuration registers are accessed in two steps:
a. Write the index of the Logical Device Number Configuration Register
(i.e., 0x07) to the INDEX PORT and then write the number of the
desired logical device to the DATA PORT.
b. Write the address of the desired configuration register within the
logical device to the INDEX PORT and then write or read the config-
uration register through the DATA PORT.
Note:
If accessing the Global Configuration Registers, step (a) is not required.
Exit Configuration Mode
^^^^^^^^^^^^^^^^^^^^^^^
To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
The chip returns to the RUN State. (This is important).
Device ID와 Revision 판독 예
143-169SIO Device ID는 전역 구성 레지스터 `0x20`에 있습니다. 예제는 `0x2E`에 `0x55`를 써 진입하고, `0x20`을 인덱스로 선택한 뒤 `0x2F`에서 데이터를 읽고, 마지막으로 `0x2E`에 `0xAA`를 써 종료합니다.
dc7100에서 식별에 필요한 레지스터는 Device ID `0x20`과 Device Revision `0x21`입니다.
Device ID는 LPC47B397-NC에서 `0x6F`, SCH5307-NS에서 `0x81`, SCH5317에서 `0x85`입니다. 현재 Device Revision 값은 `0x01`입니다.
전역 구성 레지스터와 지원 칩별 Device ID입니다.
전역 레지스터는 논리 장치 선택 없이 읽습니다.
Programming Example
^^^^^^^^^^^^^^^^^^^
The following is an example of how to read the SIO Device ID located at 0x20:
; ENTER CONFIGURATION MODE
MOV DX,02EH
MOV AX,055H
OUT DX,AL
; GLOBAL CONFIGURATION REGISTER
MOV DX,02EH
MOV AL,20H
OUT DX,AL
; READ THE DATA
MOV DX,02FH
IN AL,DX
; EXIT CONFIGURATION MODE
MOV DX,02EH
MOV AX,0AAH
OUT DX,AL
The registers of interest for identifying the SIO on the dc7100 are Device ID
(0x20) and Device Rev (0x21).
The Device ID will read 0x6F (0x81 for SCH5307-NS, and 0x85 for SCH5317)
The Device Rev currently reads 0x01
Logical Device 8의 HWM 기준 주소
170-197HWM 기준 주소는 Logical Device 8에 있습니다. 예제는 구성 모드에 들어간 뒤 인덱스 `0x07`을 선택하고 데이터 포트에 `0x08`을 써 Logical Device 8을 지정합니다.
그다음 인덱스 포트에 `0x60`을 써 HWM 기준 주소의 MSB 레지스터를 선택하고 데이터 포트에서 상위 바이트를 읽습니다. 전체 기준 주소를 얻으려면 이어서 `0x61`의 LSB도 같은 방식으로 읽어 결합합니다.
작업을 마치면 `0x2E`에 `0xAA`를 써 구성 모드를 종료해야 합니다.
논리 장치 선택과 주소 바이트 위치입니다.
Logical Device 8을 선택해 상·하위 주소 바이트를 결합합니다.
Obtaining the HWM Base Address
------------------------------
The following is an example of how to read the HWM Base Address located in
Logical Device 8::
; ENTER CONFIGURATION MODE
MOV DX,02EH
MOV AX,055H
OUT DX,AL
; CONFIGURE REGISTER CRE0,
; LOGICAL DEVICE 8
MOV DX,02EH
MOV AL,07H
OUT DX,AL ;Point to LD# Config Reg
MOV DX,02FH
MOV AL, 08H
OUT DX,AL;Point to Logical Device 8
;
MOV DX,02EH
MOV AL,60H
OUT DX,AL ; Point to HWM Base Addr MSB
MOV DX,02FH
IN AL,DX ; Get MSB of HWM Base Addr
; EXIT CONFIGURATION MODE
MOV DX,02EH
MOV AX,0AAH
OUT DX,AL
요약·해설
smsc47b397.rst:1-197공개 데이터시트가 없는 칩의 인덱스·데이터 포트, 온도·Tach 레지스터, RPM 식, Device ID와 HWM 기준 주소 판독 절차를 설명합니다.
원문 분량과 핵심 장치 구성을 정리합니다.
장치 식별부터 센서 확인까지의 핵심 순서입니다.