Comments (9)
NCT6683 and NCT6687
//0-7bit=pwm0-pwm7, 0 - normal 1 - bypass_mode
#define NCT6687_REG_FAN_CTRL_MODE 0xA00
#define NCT6687_REG_FAN_PWM_COMMAND 0xA01
#define NCT6687_FAN_CFG_REQ 0x80
#define NCT6687_FAN_CFG_DONE 0x40
nct6687_write(data, NCT6687_REG_FAN_PWM_COMMAND, NCT6687_FAN_CFG_REQ);
msleep(50);
nct6687_write(data, NCT6687_REG_PWM_WRITE(index), val);
nct6687_write(data, NCT6687_REG_FAN_PWM_COMMAND, NCT6687_FAN_CFG_DONE);
NCT6687 -Ok
NCT6683 -Fail
nct6687_write(data, NCT6687_REG_FAN_PWM_COMMAND, NCT6687_FAN_CFG_REQ);
msleep(50);
nct6687_write(data, NCT6687_REG_PWM_WRITE(index), val);
// nct6687_write(data, NCT6687_REG_FAN_PWM_COMMAND, NCT6687_FAN_CFG_DONE); //return to auto-mode (clear 0xA00, clear 0xA28-0xA2F)
nct6687_write(data, NCT6687_REG_FAN_PWM_COMMAND, 0x00); //manual mode
NCT6683D-OK! (NCT6683D EC firmware version 1.0 build 08/21/17)
NCT6687D-OK! (NCT6687D EC firmware version 1.0 build 05/07/20)
NCT6686D who would check.
from nct6687d.
based on above...functions
save_fan_control
restore_fan_control
not only do not make sense (
REG_FAN_CTRL_MODE
REG_FAN_PWM_COMMAND
REG_PWM_WRITE
can be changed both by NCT66* itself and externally using the same ACPI mechanism)
but can also be harmful (dangerous)
ps
disabled these
save_fan_control
restore_fan_control
functions and removed the control functionality from
store_pwm
and added
SENSOR_TEMPLATE(pwm_bypass, "pwm%d_bypass", S_IRUGO, show_pwm_bypass, store_pwm_bypass, 0);
I think it turned out great
from nct6687d.
//tested on nct6687
0xb00-0xc00 PLF (piecewise linear function)
#define NCT6683_REG_PLF(x) (0xb00 + (x) * 24)
NCT6683_REG_PLF(x)+Y = pwm(x+1)_auto_point(Y+1)_temp
NCT6683_REG_PLF(x)+8+Y*2 = pwm(x+1)_auto_point(Y+1)_pwm
example:
My BIOS only controls 5 PWM...
22-24 bytes mean something, but I'm not sure what I know yet :)
RW area but protected
#define NCT6683_REG_FAN_CFG_CTRL 0xa01
#define NCT6683_FAN_CFG_REQ 0x80
#define NCT6683_FAN_CFG_DONE 0x00 //! tested on 6683 6687
...
mutex_lock(&data->update_lock);
nct6683_write(data, NCT6683_REG_FAN_CFG_CTRL, NCT6683_FAN_CFG_REQ);
usleep_range(2000, 5000);
nct6683_write(data, 0xb00, 0x27); //<<----protected recording
nct6683_write(data, NCT6683_REG_FAN_CFG_CTRL, NCT6683_FAN_CFG_DONE);
mutex_unlock(&data->update_lock);
from nct6687d.
@Fred78290
Should I continue or have you closed your eyes to this project?
from nct6687d.
I don't closed my eyes on this project :)
A little busy and submerged by email to be notified :)
from nct6687d.
//tested on nct6687 nct6683
linear function, overlaps all others
RW area but protected (NCT6683_FAN_CFG_REQ -> NCT6683_FAN_CFG_DONE)
VALUE CRITICAL
1 2 3 4 5 ....
0x9a0: 60 65 65 65 65 00 00 00 00 00 00 00 00 00 00 00 MAX 101C (0x65) = alarm(C) for pwm max
0x9d0: 03 03 03 03 03 00 00 00 00 00 00 00 00 00 00 00 3C =hysteresis
#define NCT6683_REG_CRITICAL_TEMP(x) (0x9a0 + (x)) /* 8 bit celsium*/
...
sprintf(buf + len,"Crit:%3dC ", nct6683_read(data, NCT6683_REG_CRITICAL_TEMP(numplf-1)) );
from nct6687d.
//tested on nct6687, nct6683 was not confirmed
//RO? I was unable to change this block, where there should be an unlock ctrl :(
PWM DC/PWM (pwm[]_mode)
1=DC 0=PWM
0x2f4.0 PWM1
0x2f4.1 PWM2
0x2f4.2 PWM3
...
0x2f4.7 PWM8
from nct6687d.
//tested on nct6687 nct6683
pwm source select (pwm[1-*]_auto_channels_temp)
20 - (temp6) PCIE
01 - (temp1) CPUcore (CPU)
02 - (temp2) System (CPU_sock)
...
0x917 PWM2
0x91B PWM3
...
from nct6687d.
//tested on nct6687 nct6683
source PV (PrimaryValue for PLF) (celsium) //result source selec ((pwm[1-*]_auto_channels_temp)
0xca0 PLF1
0xca1 PLF2
...
from nct6687d.
Related Issues (20)
- Partially works with ASRock B650E PG-ITX HOT 10
- Works with MSI PRO Z790-P DDR4
- Missing sensor MSI X670e Carbon Wifi HOT 1
- z790 DDR5
- Compatible with MAG B650 Carbon WiFi HOT 6
- Compatible with MSI MAG X670E TOMAHAWK WIFI HOT 2
- Address verification fails after AsRock B550 Taichi BIOS update HOT 1
- [SOLVED] Install error with new kernel 5.15-79 HOT 1
- Loading with /etc/modules-load.d/nct6687.conf doesn't work HOT 4
- Can't give fan control back to the firmware HOT 10
- NCT6686D-L HOT 1
- Works with MSI MPG B550 Gaming Plus HOT 1
- Access to PWM control without sudo HOT 24
- modprobe error on MSI MAG B660M MORTAR HOT 6
- Partially works with Asrock X670E Steel Legend HOT 2
- Partially works with MSI B650M MORTAR WIFI
- Weird results on MSI B550 gaming gen3 HOT 3
- Possibly incorrect PCIe x1 sensor readings HOT 1
- Disabled on Fedora 40 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nct6687d.