brintos

brintos / linux-shallow public Read only

0
0
Text · 7.8 KiB · 4bad07b Raw
199 lines · plain
1Kernel driver pc873602=====================3 4Supported chips:5 6  * National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC873667 8    Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366'9 10    Addresses scanned: none, address read from Super I/O config space11 12    Datasheets: No longer available13 14Authors: Jean Delvare <jdelvare@suse.de>15 16Thanks to Sandeep Mehta, Tonko de Rooy and Daniel Ceregatti for testing.17 18Thanks to Rudolf Marek for helping me investigate conversion issues.19 20 21Module Parameters22-----------------23 24* init int25    Chip initialization level:26 27    - 0: None28    - **1**: Forcibly enable internal voltage and temperature channels,29      except in930    - 2: Forcibly enable all voltage and temperature channels, except in931    - 3: Forcibly enable all voltage and temperature channels, including in932 33Note that this parameter has no effect for the PC87360, PC87363 and PC8736434chips.35 36Also note that for the PC87366, initialization levels 2 and 3 don't enable37all temperature channels, because some of them share pins with each other,38so they can't be used at the same time.39 40 41Description42-----------43 44The National Semiconductor PC87360 Super I/O chip contains monitoring and45PWM control circuitry for two fans. The PC87363 chip is similar, and the46PC87364 chip has monitoring and PWM control for a third fan.47 48The National Semiconductor PC87365 and PC87366 Super I/O chips are complete49hardware monitoring chipsets, not only controlling and monitoring three fans,50but also monitoring eleven voltage inputs and two (PC87365) or up to four51(PC87366) temperatures.52 53  =========== ======= ======= ======= ======= =====54  Chip        #vin    #fan    #pwm    #temp   devid55  =========== ======= ======= ======= ======= =====56  PC87360     -       2       2       -       0xE157  PC87363     -       2       2       -       0xE858  PC87364     -       3       3       -       0xE459  PC87365     11      3       3       2       0xE560  PC87366     11      3       3       3-4     0xE961  =========== ======= ======= ======= ======= =====62 63The driver assumes that no more than one chip is present, and one of the64standard Super I/O addresses is used (0x2E/0x2F or 0x4E/0x4F)65 66Fan Monitoring67--------------68 69Fan rotation speeds are reported in RPM (revolutions per minute). An alarm70is triggered if the rotation speed has dropped below a programmable limit.71A different alarm is triggered if the fan speed is too low to be measured.72 73Fan readings are affected by a programmable clock divider, giving the74readings more range or accuracy. Usually, users have to learn how it works,75but this driver implements dynamic clock divider selection, so you don't76have to care no more.77 78For reference, here are a few values about clock dividers:79 80    =========== =============== =============== ===========81		slowest         accuracy        highest82		measurable      around 3000     accurate83    divider     speed (RPM)     RPM (RPM)       speed (RPM)84    =========== =============== =============== ===========85	 1        1882              18           692886	 2         941              37           489887	 4         470              74           346488	 8         235             150           244989    =========== =============== =============== ===========90 91For the curious, here is how the values above were computed:92 93 * slowest measurable speed: clock/(255*divider)94 * accuracy around 3000 RPM: 3000^2/clock95 * highest accurate speed: sqrt(clock*100)96 97The clock speed for the PC87360 family is 480 kHz. I arbitrarily chose 10098RPM as the lowest acceptable accuracy.99 100As mentioned above, you don't have to care about this no more.101 102Note that not all RPM values can be represented, even when the best clock103divider is selected. This is not only true for the measured speeds, but104also for the programmable low limits, so don't be surprised if you try to105set, say, fan1_min to 2900 and it finally reads 2909.106 107 108Fan Control109-----------110 111PWM (pulse width modulation) values range from 0 to 255, with 0 meaning112that the fan is stopped, and 255 meaning that the fan goes at full speed.113 114Be extremely careful when changing PWM values. Low PWM values, even115non-zero, can stop the fan, which may cause irreversible damage to your116hardware if temperature increases too much. When changing PWM values, go117step by step and keep an eye on temperatures.118 119One user reported problems with PWM. Changing PWM values would break fan120speed readings. No explanation nor fix could be found.121 122 123Temperature Monitoring124----------------------125 126Temperatures are reported in degrees Celsius. Each temperature measured has127associated low, high and overtemperature limits, each of which triggers an128alarm when crossed.129 130The first two temperature channels are external. The third one (PC87366131only) is internal.132 133The PC87366 has three additional temperature channels, based on134thermistors (as opposed to thermal diodes for the first three temperature135channels). For technical reasons, these channels are held by the VLM136(voltage level monitor) logical device, not the TMS (temperature137measurement) one. As a consequence, these temperatures are exported as138voltages, and converted into temperatures in user-space.139 140Note that these three additional channels share their pins with the141external thermal diode channels, so you (physically) can't use them all at142the same time. Although it should be possible to mix the two sensor types,143the documents from National Semiconductor suggest that motherboard144manufacturers should choose one type and stick to it. So you will more145likely have either channels 1 to 3 (thermal diodes) or 3 to 6 (internal146thermal diode, and thermistors).147 148 149Voltage Monitoring150------------------151 152Voltages are reported relatively to a reference voltage, either internal or153external. Some of them (in7:Vsb, in8:Vdd and in10:AVdd) are divided by two154internally, you will have to compensate in sensors.conf. Others (in0 to in6)155are likely to be divided externally. The meaning of each of these inputs as156well as the values of the resistors used for division is left to the157motherboard manufacturers, so you will have to document yourself and edit158sensors.conf accordingly. National Semiconductor has a document with159recommended resistor values for some voltages, but this still leaves much160room for per motherboard specificities, unfortunately. Even worse,161motherboard manufacturers don't seem to care about National Semiconductor's162recommendations.163 164Each voltage measured has associated low and high limits, each of which165triggers an alarm when crossed.166 167When available, VID inputs are used to provide the nominal CPU Core voltage.168The driver will default to VRM 9.0, but this can be changed from user-space.169The chipsets can handle two sets of VID inputs (on dual-CPU systems), but170the driver will only export one for now. This may change later if there is171a need.172 173 174General Remarks175---------------176 177If an alarm triggers, it will remain triggered until the hardware register178is read at least once. This means that the cause for the alarm may already179have disappeared! Note that all hardware registers are read whenever any180data is read (unless it is less than 2 seconds since the last update, in181which case cached values are returned instead). As a consequence, when182a once-only alarm triggers, it may take 2 seconds for it to show, and 2183more seconds for it to disappear.184 185Monitoring of in9 isn't enabled at lower init levels (<3) because that186channel measures the battery voltage (Vbat). It is a known fact that187repeatedly sampling the battery voltage reduces its lifetime. National188Semiconductor smartly designed their chipset so that in9 is sampled only189once every 1024 sampling cycles (that is every 34 minutes at the default190sampling rate), so the effect is attenuated, but still present.191 192 193Limitations194-----------195 196The datasheets suggests that some values (fan mins, fan dividers)197shouldn't be changed once the monitoring has started, but we ignore that198recommendation. We'll reconsider if it actually causes trouble.199