smsc47b397.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. November 23, 2004
  2. The following specification describes the SMSC LPC47B397-NC sensor chip
  3. (for which there is no public datasheet available). This document was
  4. provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
  5. by Mark M. Hoffman <mhoffman@lightlink.com>.
  6. * * * * *
  7. Methods for detecting the HP SIO and reading the thermal data on a dc7100.
  8. The thermal information on the dc7100 is contained in the SIO Hardware Monitor
  9. (HWM). The information is accessed through an index/data pair. The index/data
  10. pair is located at the HWM Base Address + 0 and the HWM Base Address + 1. The
  11. HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
  12. and 0x61 (LSB). Currently we are using 0x480 for the HWM Base Address and
  13. 0x480 and 0x481 for the index/data pair.
  14. Reading temperature information.
  15. The temperature information is located in the following registers:
  16. Temp1 0x25 (Currently, this reflects the CPU temp on all systems).
  17. Temp2 0x26
  18. Temp3 0x27
  19. Temp4 0x80
  20. Programming Example
  21. The following is an example of how to read the HWM temperature registers:
  22. MOV DX,480H
  23. MOV AX,25H
  24. OUT DX,AL
  25. MOV DX,481H
  26. IN AL,DX
  27. AL contains the data in hex, the temperature in Celsius is the decimal
  28. equivalent.
  29. Ex: If AL contains 0x2A, the temperature is 42 degrees C.
  30. Reading tach information.
  31. The fan speed information is located in the following registers:
  32. LSB MSB
  33. Tach1 0x28 0x29 (Currently, this reflects the CPU
  34. fan speed on all systems).
  35. Tach2 0x2A 0x2B
  36. Tach3 0x2C 0x2D
  37. Tach4 0x2E 0x2F
  38. Important!!!
  39. Reading the tach LSB locks the tach MSB.
  40. The LSB Must be read first.
  41. How to convert the tach reading to RPM.
  42. The tach reading (TCount) is given by: (Tach MSB * 256) + (Tach LSB)
  43. The SIO counts the number of 90kHz (11.111us) pulses per revolution.
  44. RPM = 60/(TCount * 11.111us)
  45. Example:
  46. Reg 0x28 = 0x9B
  47. Reg 0x29 = 0x08
  48. TCount = 0x89B = 2203
  49. RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM
  50. Obtaining the SIO version.
  51. CONFIGURATION SEQUENCE
  52. To program the configuration registers, the following sequence must be followed:
  53. 1. Enter Configuration Mode
  54. 2. Configure the Configuration Registers
  55. 3. Exit Configuration Mode.
  56. Enter Configuration Mode
  57. To place the chip into the Configuration State The config key (0x55) is written
  58. to the CONFIG PORT (0x2E).
  59. Configuration Mode
  60. In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
  61. the DATA PORT is at INDEX PORT address + 1.
  62. The desired configuration registers are accessed in two steps:
  63. a. Write the index of the Logical Device Number Configuration Register
  64. (i.e., 0x07) to the INDEX PORT and then write the number of the
  65. desired logical device to the DATA PORT.
  66. b. Write the address of the desired configuration register within the
  67. logical device to the INDEX PORT and then write or read the config-
  68. uration register through the DATA PORT.
  69. Note: If accessing the Global Configuration Registers, step (a) is not required.
  70. Exit Configuration Mode
  71. To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
  72. The chip returns to the RUN State. (This is important).
  73. Programming Example
  74. The following is an example of how to read the SIO Device ID located at 0x20
  75. ; ENTER CONFIGURATION MODE
  76. MOV DX,02EH
  77. MOV AX,055H
  78. OUT DX,AL
  79. ; GLOBAL CONFIGURATION REGISTER
  80. MOV DX,02EH
  81. MOV AL,20H
  82. OUT DX,AL
  83. ; READ THE DATA
  84. MOV DX,02FH
  85. IN AL,DX
  86. ; EXIT CONFIGURATION MODE
  87. MOV DX,02EH
  88. MOV AX,0AAH
  89. OUT DX,AL
  90. The registers of interest for identifying the SIO on the dc7100 are Device ID
  91. (0x20) and Device Rev (0x21).
  92. The Device ID will read 0X6F
  93. The Device Rev currently reads 0x01
  94. Obtaining the HWM Base Address.
  95. The following is an example of how to read the HWM Base Address located in
  96. Logical Device 8.
  97. ; ENTER CONFIGURATION MODE
  98. MOV DX,02EH
  99. MOV AX,055H
  100. OUT DX,AL
  101. ; CONFIGURE REGISTER CRE0,
  102. ; LOGICAL DEVICE 8
  103. MOV DX,02EH
  104. MOV AL,07H
  105. OUT DX,AL ;Point to LD# Config Reg
  106. MOV DX,02FH
  107. MOV AL, 08H
  108. OUT DX,AL;Point to Logical Device 8
  109. ;
  110. MOV DX,02EH
  111. MOV AL,60H
  112. OUT DX,AL ; Point to HWM Base Addr MSB
  113. MOV DX,02FH
  114. IN AL,DX ; Get MSB of HWM Base Addr
  115. ; EXIT CONFIGURATION MODE
  116. MOV DX,02EH
  117. MOV AX,0AAH
  118. OUT DX,AL