1*4882a593SmuzhiyunKernel driver NCT6775 2*4882a593Smuzhiyun===================== 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun.. note:: 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun This driver supersedes the NCT6775F and NCT6776F support in the W83627EHF 7*4882a593Smuzhiyun driver. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunSupported chips: 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun * Nuvoton NCT6102D/NCT6104D/NCT6106D 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun Prefix: 'nct6106' 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun Datasheet: Available from the Nuvoton web site 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun Prefix: 'nct6775' 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun * Nuvoton NCT5573D/NCT5577D/NCT6776D/NCT6776F 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun Prefix: 'nct6776' 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun * Nuvoton NCT5532D/NCT6779D 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun Prefix: 'nct6779' 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun * Nuvoton NCT6791D 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun Prefix: 'nct6791' 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun * Nuvoton NCT6792D 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun Prefix: 'nct6792' 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun * Nuvoton NCT6793D 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun Prefix: 'nct6793' 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun * Nuvoton NCT6795D 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun Prefix: 'nct6795' 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun * Nuvoton NCT6796D 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun Prefix: 'nct6796' 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun Addresses scanned: ISA address retrieved from Super I/O registers 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun Datasheet: Available from Nuvoton upon request 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunAuthors: 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun Guenter Roeck <linux@roeck-us.net> 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunDescription 90*4882a593Smuzhiyun----------- 91*4882a593Smuzhiyun 92*4882a593SmuzhiyunThis driver implements support for the Nuvoton NCT6775F, NCT6776F, and NCT6779D 93*4882a593Smuzhiyunand compatible super I/O chips. 94*4882a593Smuzhiyun 95*4882a593SmuzhiyunThe chips support up to 25 temperature monitoring sources. Up to 6 of those are 96*4882a593Smuzhiyundirect temperature sensor inputs, the others are special sources such as PECI, 97*4882a593SmuzhiyunPCH, and SMBUS. Depending on the chip type, 2 to 6 of the temperature sources 98*4882a593Smuzhiyuncan be monitored and compared against minimum, maximum, and critical 99*4882a593Smuzhiyuntemperatures. The driver reports up to 10 of the temperatures to the user. 100*4882a593SmuzhiyunThere are 4 to 5 fan rotation speed sensors, 8 to 15 analog voltage sensors, 101*4882a593Smuzhiyunone VID, alarms with beep warnings (control unimplemented), and some automatic 102*4882a593Smuzhiyunfan regulation strategies (plus manual fan control mode). 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunThe temperature sensor sources on all chips are configurable. The configured 105*4882a593Smuzhiyunsource for each of the temperature sensors is provided in tempX_label. 106*4882a593Smuzhiyun 107*4882a593SmuzhiyunTemperatures are measured in degrees Celsius and measurement resolution is 108*4882a593Smuzhiyuneither 1 degC or 0.5 degC, depending on the temperature source and 109*4882a593Smuzhiyunconfiguration. An alarm is triggered when the temperature gets higher than 110*4882a593Smuzhiyunthe high limit; it stays on until the temperature falls below the hysteresis 111*4882a593Smuzhiyunvalue. Alarms are only supported for temp1 to temp6, depending on the chip type. 112*4882a593Smuzhiyun 113*4882a593SmuzhiyunFan rotation speeds are reported in RPM (rotations per minute). An alarm is 114*4882a593Smuzhiyuntriggered if the rotation speed has dropped below a programmable limit. On 115*4882a593SmuzhiyunNCT6775F, fan readings can be divided by a programmable divider (1, 2, 4, 8, 116*4882a593Smuzhiyun16, 32, 64 or 128) to give the readings more range or accuracy; the other chips 117*4882a593Smuzhiyundo not have a fan speed divider. The driver sets the most suitable fan divisor 118*4882a593Smuzhiyunitself; specifically, it increases the divider value each time a fan speed 119*4882a593Smuzhiyunreading returns an invalid value, and it reduces it if the fan speed reading 120*4882a593Smuzhiyunis lower than optimal. Some fans might not be present because they share pins 121*4882a593Smuzhiyunwith other functions. 122*4882a593Smuzhiyun 123*4882a593SmuzhiyunVoltage sensors (also known as IN sensors) report their values in millivolts. 124*4882a593SmuzhiyunAn alarm is triggered if the voltage has crossed a programmable minimum 125*4882a593Smuzhiyunor maximum limit. 126*4882a593Smuzhiyun 127*4882a593SmuzhiyunThe driver supports automatic fan control mode known as Thermal Cruise. 128*4882a593SmuzhiyunIn this mode, the chip attempts to keep the measured temperature in a 129*4882a593Smuzhiyunpredefined temperature range. If the temperature goes out of range, fan 130*4882a593Smuzhiyunis driven slower/faster to reach the predefined range again. 131*4882a593Smuzhiyun 132*4882a593SmuzhiyunThe mode works for fan1-fan5. 133*4882a593Smuzhiyun 134*4882a593Smuzhiyunsysfs attributes 135*4882a593Smuzhiyun---------------- 136*4882a593Smuzhiyun 137*4882a593Smuzhiyunpwm[1-7] 138*4882a593Smuzhiyun - this file stores PWM duty cycle or DC value (fan speed) in range: 139*4882a593Smuzhiyun 140*4882a593Smuzhiyun 0 (lowest speed) to 255 (full) 141*4882a593Smuzhiyun 142*4882a593Smuzhiyunpwm[1-7]_enable 143*4882a593Smuzhiyun - this file controls mode of fan/temperature control: 144*4882a593Smuzhiyun 145*4882a593Smuzhiyun * 0 Fan control disabled (fans set to maximum speed) 146*4882a593Smuzhiyun * 1 Manual mode, write to pwm[0-5] any value 0-255 147*4882a593Smuzhiyun * 2 "Thermal Cruise" mode 148*4882a593Smuzhiyun * 3 "Fan Speed Cruise" mode 149*4882a593Smuzhiyun * 4 "Smart Fan III" mode (NCT6775F only) 150*4882a593Smuzhiyun * 5 "Smart Fan IV" mode 151*4882a593Smuzhiyun 152*4882a593Smuzhiyunpwm[1-7]_mode 153*4882a593Smuzhiyun - controls if output is PWM or DC level 154*4882a593Smuzhiyun 155*4882a593Smuzhiyun * 0 DC output 156*4882a593Smuzhiyun * 1 PWM output 157*4882a593Smuzhiyun 158*4882a593SmuzhiyunCommon fan control attributes 159*4882a593Smuzhiyun----------------------------- 160*4882a593Smuzhiyun 161*4882a593Smuzhiyunpwm[1-7]_temp_sel 162*4882a593Smuzhiyun Temperature source. Value is temperature sensor index. 163*4882a593Smuzhiyun For example, select '1' for temp1_input. 164*4882a593Smuzhiyun 165*4882a593Smuzhiyunpwm[1-7]_weight_temp_sel 166*4882a593Smuzhiyun Secondary temperature source. Value is temperature 167*4882a593Smuzhiyun sensor index. For example, select '1' for temp1_input. 168*4882a593Smuzhiyun Set to 0 to disable secondary temperature control. 169*4882a593Smuzhiyun 170*4882a593SmuzhiyunIf secondary temperature functionality is enabled, it is controlled with the 171*4882a593Smuzhiyunfollowing attributes. 172*4882a593Smuzhiyun 173*4882a593Smuzhiyunpwm[1-7]_weight_duty_step 174*4882a593Smuzhiyun Duty step size. 175*4882a593Smuzhiyun 176*4882a593Smuzhiyunpwm[1-7]_weight_temp_step 177*4882a593Smuzhiyun Temperature step size. With each step over 178*4882a593Smuzhiyun temp_step_base, the value of weight_duty_step is added 179*4882a593Smuzhiyun to the current pwm value. 180*4882a593Smuzhiyun 181*4882a593Smuzhiyunpwm[1-7]_weight_temp_step_base 182*4882a593Smuzhiyun Temperature at which secondary temperature control kicks 183*4882a593Smuzhiyun in. 184*4882a593Smuzhiyun 185*4882a593Smuzhiyunpwm[1-7]_weight_temp_step_tol 186*4882a593Smuzhiyun Temperature step tolerance. 187*4882a593Smuzhiyun 188*4882a593SmuzhiyunThermal Cruise mode (2) 189*4882a593Smuzhiyun----------------------- 190*4882a593Smuzhiyun 191*4882a593SmuzhiyunIf the temperature is in the range defined by: 192*4882a593Smuzhiyun 193*4882a593Smuzhiyunpwm[1-7]_target_temp 194*4882a593Smuzhiyun Target temperature, unit millidegree Celsius 195*4882a593Smuzhiyun (range 0 - 127000) 196*4882a593Smuzhiyun 197*4882a593Smuzhiyunpwm[1-7]_temp_tolerance 198*4882a593Smuzhiyun Target temperature tolerance, unit millidegree Celsius 199*4882a593Smuzhiyun 200*4882a593SmuzhiyunThere are no changes to fan speed. Once the temperature leaves the interval, fan 201*4882a593Smuzhiyunspeed increases (if temperature is higher that desired) or decreases (if 202*4882a593Smuzhiyuntemperature is lower than desired), using the following limits and time 203*4882a593Smuzhiyunintervals. 204*4882a593Smuzhiyun 205*4882a593Smuzhiyunpwm[1-7]_start 206*4882a593Smuzhiyun fan pwm start value (range 1 - 255), to start fan 207*4882a593Smuzhiyun when the temperature is above defined range. 208*4882a593Smuzhiyun 209*4882a593Smuzhiyunpwm[1-7]_floor 210*4882a593Smuzhiyun lowest fan pwm (range 0 - 255) if temperature is below 211*4882a593Smuzhiyun the defined range. If set to 0, the fan is expected to 212*4882a593Smuzhiyun stop if the temperature is below the defined range. 213*4882a593Smuzhiyun 214*4882a593Smuzhiyunpwm[1-7]_step_up_time 215*4882a593Smuzhiyun milliseconds before fan speed is increased 216*4882a593Smuzhiyun 217*4882a593Smuzhiyunpwm[1-7]_step_down_time 218*4882a593Smuzhiyun milliseconds before fan speed is decreased 219*4882a593Smuzhiyun 220*4882a593Smuzhiyunpwm[1-7]_stop_time 221*4882a593Smuzhiyun how many milliseconds must elapse to switch 222*4882a593Smuzhiyun corresponding fan off (when the temperature was below 223*4882a593Smuzhiyun defined range). 224*4882a593Smuzhiyun 225*4882a593SmuzhiyunSpeed Cruise mode (3) 226*4882a593Smuzhiyun--------------------- 227*4882a593Smuzhiyun 228*4882a593SmuzhiyunThis modes tries to keep the fan speed constant. 229*4882a593Smuzhiyun 230*4882a593Smuzhiyunfan[1-7]_target 231*4882a593Smuzhiyun Target fan speed 232*4882a593Smuzhiyun 233*4882a593Smuzhiyunfan[1-7]_tolerance 234*4882a593Smuzhiyun Target speed tolerance 235*4882a593Smuzhiyun 236*4882a593Smuzhiyun 237*4882a593SmuzhiyunUntested; use at your own risk. 238*4882a593Smuzhiyun 239*4882a593SmuzhiyunSmart Fan IV mode (5) 240*4882a593Smuzhiyun--------------------- 241*4882a593Smuzhiyun 242*4882a593SmuzhiyunThis mode offers multiple slopes to control the fan speed. The slopes can be 243*4882a593Smuzhiyuncontrolled by setting the pwm and temperature attributes. When the temperature 244*4882a593Smuzhiyunrises, the chip will calculate the DC/PWM output based on the current slope. 245*4882a593SmuzhiyunThere are up to seven data points depending on the chip type. Subsequent data 246*4882a593Smuzhiyunpoints should be set to higher temperatures and higher pwm values to achieve 247*4882a593Smuzhiyunhigher fan speeds with increasing temperature. The last data point reflects 248*4882a593Smuzhiyuncritical temperature mode, in which the fans should run at full speed. 249*4882a593Smuzhiyun 250*4882a593Smuzhiyunpwm[1-7]_auto_point[1-7]_pwm 251*4882a593Smuzhiyun pwm value to be set if temperature reaches matching 252*4882a593Smuzhiyun temperature range. 253*4882a593Smuzhiyun 254*4882a593Smuzhiyunpwm[1-7]_auto_point[1-7]_temp 255*4882a593Smuzhiyun Temperature over which the matching pwm is enabled. 256*4882a593Smuzhiyun 257*4882a593Smuzhiyunpwm[1-7]_temp_tolerance 258*4882a593Smuzhiyun Temperature tolerance, unit millidegree Celsius 259*4882a593Smuzhiyun 260*4882a593Smuzhiyunpwm[1-7]_crit_temp_tolerance 261*4882a593Smuzhiyun Temperature tolerance for critical temperature, 262*4882a593Smuzhiyun unit millidegree Celsius 263*4882a593Smuzhiyun 264*4882a593Smuzhiyunpwm[1-7]_step_up_time 265*4882a593Smuzhiyun milliseconds before fan speed is increased 266*4882a593Smuzhiyun 267*4882a593Smuzhiyunpwm[1-7]_step_down_time 268*4882a593Smuzhiyun milliseconds before fan speed is decreased 269*4882a593Smuzhiyun 270*4882a593SmuzhiyunUsage Notes 271*4882a593Smuzhiyun----------- 272*4882a593Smuzhiyun 273*4882a593SmuzhiyunOn various ASUS boards with NCT6776F, it appears that CPUTIN is not really 274*4882a593Smuzhiyunconnected to anything and floats, or that it is connected to some non-standard 275*4882a593Smuzhiyuntemperature measurement device. As a result, the temperature reported on CPUTIN 276*4882a593Smuzhiyunwill not reflect a usable value. It often reports unreasonably high 277*4882a593Smuzhiyuntemperatures, and in some cases the reported temperature declines if the actual 278*4882a593Smuzhiyuntemperature increases (similar to the raw PECI temperature value - see PECI 279*4882a593Smuzhiyunspecification for details). CPUTIN should therefore be ignored on ASUS 280*4882a593Smuzhiyunboards. The CPU temperature on ASUS boards is reported from PECI 0. 281