0001 Kernel driver pc87360
0002 =====================
0003
0004 Supported chips:
0005
0006 * National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC87366
0007
0008 Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366'
0009
0010 Addresses scanned: none, address read from Super I/O config space
0011
0012 Datasheets: No longer available
0013
0014 Authors: Jean Delvare <jdelvare@suse.de>
0015
0016 Thanks to Sandeep Mehta, Tonko de Rooy and Daniel Ceregatti for testing.
0017
0018 Thanks to Rudolf Marek for helping me investigate conversion issues.
0019
0020
0021 Module Parameters
0022 -----------------
0023
0024 * init int
0025 Chip initialization level:
0026
0027 - 0: None
0028 - **1**: Forcibly enable internal voltage and temperature channels,
0029 except in9
0030 - 2: Forcibly enable all voltage and temperature channels, except in9
0031 - 3: Forcibly enable all voltage and temperature channels, including in9
0032
0033 Note that this parameter has no effect for the PC87360, PC87363 and PC87364
0034 chips.
0035
0036 Also note that for the PC87366, initialization levels 2 and 3 don't enable
0037 all temperature channels, because some of them share pins with each other,
0038 so they can't be used at the same time.
0039
0040
0041 Description
0042 -----------
0043
0044 The National Semiconductor PC87360 Super I/O chip contains monitoring and
0045 PWM control circuitry for two fans. The PC87363 chip is similar, and the
0046 PC87364 chip has monitoring and PWM control for a third fan.
0047
0048 The National Semiconductor PC87365 and PC87366 Super I/O chips are complete
0049 hardware monitoring chipsets, not only controlling and monitoring three fans,
0050 but also monitoring eleven voltage inputs and two (PC87365) or up to four
0051 (PC87366) temperatures.
0052
0053 =========== ======= ======= ======= ======= =====
0054 Chip #vin #fan #pwm #temp devid
0055 =========== ======= ======= ======= ======= =====
0056 PC87360 - 2 2 - 0xE1
0057 PC87363 - 2 2 - 0xE8
0058 PC87364 - 3 3 - 0xE4
0059 PC87365 11 3 3 2 0xE5
0060 PC87366 11 3 3 3-4 0xE9
0061 =========== ======= ======= ======= ======= =====
0062
0063 The driver assumes that no more than one chip is present, and one of the
0064 standard Super I/O addresses is used (0x2E/0x2F or 0x4E/0x4F)
0065
0066 Fan Monitoring
0067 --------------
0068
0069 Fan rotation speeds are reported in RPM (revolutions per minute). An alarm
0070 is triggered if the rotation speed has dropped below a programmable limit.
0071 A different alarm is triggered if the fan speed is too low to be measured.
0072
0073 Fan readings are affected by a programmable clock divider, giving the
0074 readings more range or accuracy. Usually, users have to learn how it works,
0075 but this driver implements dynamic clock divider selection, so you don't
0076 have to care no more.
0077
0078 For reference, here are a few values about clock dividers:
0079
0080 =========== =============== =============== ===========
0081 slowest accuracy highest
0082 measurable around 3000 accurate
0083 divider speed (RPM) RPM (RPM) speed (RPM)
0084 =========== =============== =============== ===========
0085 1 1882 18 6928
0086 2 941 37 4898
0087 4 470 74 3464
0088 8 235 150 2449
0089 =========== =============== =============== ===========
0090
0091 For the curious, here is how the values above were computed:
0092
0093 * slowest measurable speed: clock/(255*divider)
0094 * accuracy around 3000 RPM: 3000^2/clock
0095 * highest accurate speed: sqrt(clock*100)
0096
0097 The clock speed for the PC87360 family is 480 kHz. I arbitrarily chose 100
0098 RPM as the lowest acceptable accuracy.
0099
0100 As mentioned above, you don't have to care about this no more.
0101
0102 Note that not all RPM values can be represented, even when the best clock
0103 divider is selected. This is not only true for the measured speeds, but
0104 also for the programmable low limits, so don't be surprised if you try to
0105 set, say, fan1_min to 2900 and it finally reads 2909.
0106
0107
0108 Fan Control
0109 -----------
0110
0111 PWM (pulse width modulation) values range from 0 to 255, with 0 meaning
0112 that the fan is stopped, and 255 meaning that the fan goes at full speed.
0113
0114 Be extremely careful when changing PWM values. Low PWM values, even
0115 non-zero, can stop the fan, which may cause irreversible damage to your
0116 hardware if temperature increases too much. When changing PWM values, go
0117 step by step and keep an eye on temperatures.
0118
0119 One user reported problems with PWM. Changing PWM values would break fan
0120 speed readings. No explanation nor fix could be found.
0121
0122
0123 Temperature Monitoring
0124 ----------------------
0125
0126 Temperatures are reported in degrees Celsius. Each temperature measured has
0127 associated low, high and overtemperature limits, each of which triggers an
0128 alarm when crossed.
0129
0130 The first two temperature channels are external. The third one (PC87366
0131 only) is internal.
0132
0133 The PC87366 has three additional temperature channels, based on
0134 thermistors (as opposed to thermal diodes for the first three temperature
0135 channels). For technical reasons, these channels are held by the VLM
0136 (voltage level monitor) logical device, not the TMS (temperature
0137 measurement) one. As a consequence, these temperatures are exported as
0138 voltages, and converted into temperatures in user-space.
0139
0140 Note that these three additional channels share their pins with the
0141 external thermal diode channels, so you (physically) can't use them all at
0142 the same time. Although it should be possible to mix the two sensor types,
0143 the documents from National Semiconductor suggest that motherboard
0144 manufacturers should choose one type and stick to it. So you will more
0145 likely have either channels 1 to 3 (thermal diodes) or 3 to 6 (internal
0146 thermal diode, and thermistors).
0147
0148
0149 Voltage Monitoring
0150 ------------------
0151
0152 Voltages are reported relatively to a reference voltage, either internal or
0153 external. Some of them (in7:Vsb, in8:Vdd and in10:AVdd) are divided by two
0154 internally, you will have to compensate in sensors.conf. Others (in0 to in6)
0155 are likely to be divided externally. The meaning of each of these inputs as
0156 well as the values of the resistors used for division is left to the
0157 motherboard manufacturers, so you will have to document yourself and edit
0158 sensors.conf accordingly. National Semiconductor has a document with
0159 recommended resistor values for some voltages, but this still leaves much
0160 room for per motherboard specificities, unfortunately. Even worse,
0161 motherboard manufacturers don't seem to care about National Semiconductor's
0162 recommendations.
0163
0164 Each voltage measured has associated low and high limits, each of which
0165 triggers an alarm when crossed.
0166
0167 When available, VID inputs are used to provide the nominal CPU Core voltage.
0168 The driver will default to VRM 9.0, but this can be changed from user-space.
0169 The chipsets can handle two sets of VID inputs (on dual-CPU systems), but
0170 the driver will only export one for now. This may change later if there is
0171 a need.
0172
0173
0174 General Remarks
0175 ---------------
0176
0177 If an alarm triggers, it will remain triggered until the hardware register
0178 is read at least once. This means that the cause for the alarm may already
0179 have disappeared! Note that all hardware registers are read whenever any
0180 data is read (unless it is less than 2 seconds since the last update, in
0181 which case cached values are returned instead). As a consequence, when
0182 a once-only alarm triggers, it may take 2 seconds for it to show, and 2
0183 more seconds for it to disappear.
0184
0185 Monitoring of in9 isn't enabled at lower init levels (<3) because that
0186 channel measures the battery voltage (Vbat). It is a known fact that
0187 repeatedly sampling the battery voltage reduces its lifetime. National
0188 Semiconductor smartly designed their chipset so that in9 is sampled only
0189 once every 1024 sampling cycles (that is every 34 minutes at the default
0190 sampling rate), so the effect is attenuated, but still present.
0191
0192
0193 Limitations
0194 -----------
0195
0196 The datasheets suggests that some values (fan mins, fan dividers)
0197 shouldn't be changed once the monitoring has started, but we ignore that
0198 recommendation. We'll reconsider if it actually causes trouble.