⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pc87360

📁 linux 内核源代码
💻
字号:
Kernel driver pc87360=====================Supported chips:  * National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC87366    Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366'    Addresses scanned: none, address read from Super I/O config space    Datasheets:        http://www.national.com/pf/PC/PC87360.html        http://www.national.com/pf/PC/PC87363.html        http://www.national.com/pf/PC/PC87364.html        http://www.national.com/pf/PC/PC87365.html        http://www.national.com/pf/PC/PC87366.htmlAuthors: Jean Delvare <khali@linux-fr.org>Thanks to Sandeep Mehta, Tonko de Rooy and Daniel Ceregatti for testing.Thanks to Rudolf Marek for helping me investigate conversion issues.Module Parameters-----------------* init int  Chip initialization level:   0: None  *1: Forcibly enable internal voltage and temperature channels, except in9   2: Forcibly enable all voltage and temperature channels, except in9   3: Forcibly enable all voltage and temperature channels, including in9Note that this parameter has no effect for the PC87360, PC87363 and PC87364chips.Also note that for the PC87366, initialization levels 2 and 3 don't enableall temperature channels, because some of them share pins with each other,so they can't be used at the same time.Description-----------The National Semiconductor PC87360 Super I/O chip contains monitoring andPWM control circuitry for two fans. The PC87363 chip is similar, and thePC87364 chip has monitoring and PWM control for a third fan.The National Semiconductor PC87365 and PC87366 Super I/O chips are completehardware monitoring chipsets, not only controlling and monitoring three fans,but also monitoring eleven voltage inputs and two (PC87365) or up to four(PC87366) temperatures.  Chip        #vin    #fan    #pwm    #temp   devid  PC87360     -       2       2       -       0xE1  PC87363     -       2       2       -       0xE8  PC87364     -       3       3       -       0xE4  PC87365     11      3       3       2       0xE5  PC87366     11      3       3       3-4     0xE9The driver assumes that no more than one chip is present, and one of thestandard Super I/O addresses is used (0x2E/0x2F or 0x4E/0x4F)Fan Monitoring--------------Fan rotation speeds are reported in RPM (revolutions per minute). An alarmis triggered if the rotation speed has dropped below a programmable limit.A different alarm is triggered if the fan speed is too low to be measured.Fan readings are affected by a programmable clock divider, giving thereadings more range or accuracy. Usually, users have to learn how it works,but this driver implements dynamic clock divider selection, so you don'thave to care no more.For reference, here are a few values about clock dividers:                slowest         accuracy        highest                measurable      around 3000     accurate    divider     speed (RPM)     RPM (RPM)       speed (RPM)         1        1882              18           6928         2         941              37           4898         4         470              74           3464         8         235             150           2449For the curious, here is how the values above were computed: * slowest measurable speed: clock/(255*divider) * accuracy around 3000 RPM: 3000^2/clock * highest accurate speed: sqrt(clock*100)The clock speed for the PC87360 family is 480 kHz. I arbitrarily chose 100RPM as the lowest acceptable accuracy.As mentioned above, you don't have to care about this no more.Note that not all RPM values can be represented, even when the best clockdivider is selected. This is not only true for the measured speeds, butalso for the programmable low limits, so don't be surprised if you try toset, say, fan1_min to 2900 and it finally reads 2909.Fan Control-----------PWM (pulse width modulation) values range from 0 to 255, with 0 meaningthat the fan is stopped, and 255 meaning that the fan goes at full speed.Be extremely careful when changing PWM values. Low PWM values, evennon-zero, can stop the fan, which may cause irreversible damage to yourhardware if temperature increases too much. When changing PWM values, gostep by step and keep an eye on temperatures.One user reported problems with PWM. Changing PWM values would break fanspeed readings. No explanation nor fix could be found.Temperature Monitoring----------------------Temperatures are reported in degrees Celsius. Each temperature measured hasassociated low, high and overtemperature limits, each of which triggers analarm when crossed.The first two temperature channels are external. The third one (PC87366only) is internal.The PC87366 has three additional temperature channels, based onthermistors (as opposed to thermal diodes for the first three temperaturechannels). For technical reasons, these channels are held by the VLM(voltage level monitor) logical device, not the TMS (temperaturemeasurement) one. As a consequence, these temperatures are exported asvoltages, and converted into temperatures in user-space.Note that these three additional channels share their pins with theexternal thermal diode channels, so you (physically) can't use them all atthe same time. Although it should be possible to mix the two sensor types,the documents from National Semiconductor suggest that motherboardmanufacturers should choose one type and stick to it. So you will morelikely have either channels 1 to 3 (thermal diodes) or 3 to 6 (internalthermal diode, and thermistors).Voltage Monitoring------------------Voltages are reported relatively to a reference voltage, either internal orexternal. Some of them (in7:Vsb, in8:Vdd and in10:AVdd) are divided by twointernally, you will have to compensate in sensors.conf. Others (in0 to in6)are likely to be divided externally. The meaning of each of these inputs aswell as the values of the resistors used for division is left to themotherboard manufacturers, so you will have to document yourself and editsensors.conf accordingly. National Semiconductor has a document withrecommended resistor values for some voltages, but this still leaves muchroom for per motherboard specificities, unfortunately. Even worse,motherboard manufacturers don't seem to care about National Semiconductor'srecommendations.Each voltage measured has associated low and high limits, each of whichtriggers an alarm when crossed.When available, VID inputs are used to provide the nominal CPU Core voltage.The driver will default to VRM 9.0, but this can be changed from user-space.The chipsets can handle two sets of VID inputs (on dual-CPU systems), butthe driver will only export one for now. This may change later if there isa need.General Remarks---------------If an alarm triggers, it will remain triggered until the hardware registeris read at least once. This means that the cause for the alarm may alreadyhave disappeared! Note that all hardware registers are read whenever anydata is read (unless it is less than 2 seconds since the last update, inwhich case cached values are returned instead). As a consequence, whena once-only alarm triggers, it may take 2 seconds for it to show, and 2more seconds for it to disappear.Monitoring of in9 isn't enabled at lower init levels (<3) because thatchannel measures the battery voltage (Vbat). It is a known fact thatrepeatedly sampling the battery voltage reduces its lifetime. NationalSemiconductor smartly designed their chipset so that in9 is sampled onlyonce every 1024 sampling cycles (that is every 34 minutes at the defaultsampling rate), so the effect is attenuated, but still present.Limitations-----------The datasheets suggests that some values (fan mins, fan dividers)shouldn't be changed once the monitoring has started, but we ignore thatrecommendation. We'll reconsider if it actually causes trouble.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -