Addw2 support (#67)
* Add addw2 board * Set charge params and update gpio.h * Set VGA fan to 100% when entering scratch rom * Implement keyboard LEDs * Turn off keyboard LEDs in gpio defaults * Default airplane mode LED to off * Enable GPU power and fan control * Add NVIDIA GPU power and temp to power.csv * Add NVIDIA GPU fan value to power.sh * Move GPU init back to coreboot * Do not turn on GPU fan if GPU is off * Show POST codes * Add timestamps to console_external * Accept port 81 cycles * Move setting RSTS into ec_init * Move post code debugging to system76/common * Move some GPIO init from system76/common to boards * Make some power signals optional * Remove POST code support - it only works on IT5570
This commit is contained in:
@ -144,11 +144,16 @@ static enum Result cmd_reset(void) {
|
||||
|
||||
#ifndef __SCRATCH__
|
||||
static enum Result cmd_fan_get(void) {
|
||||
// If setting fan 0
|
||||
if (smfi_cmd[2] == 0) {
|
||||
// Get duty of fan 0
|
||||
smfi_cmd[3] = DCR2;
|
||||
return RES_OK;
|
||||
switch (smfi_cmd[2]) {
|
||||
case 0:
|
||||
// Get duty of fan 0
|
||||
smfi_cmd[3] = DCR2;
|
||||
return RES_OK;
|
||||
case 1:
|
||||
// Get duty of fan 1
|
||||
//TODO: only allow on platforms like addw2
|
||||
smfi_cmd[3] = DCR4;
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
// Failed if fan not found
|
||||
@ -156,11 +161,16 @@ static enum Result cmd_fan_get(void) {
|
||||
}
|
||||
|
||||
static enum Result cmd_fan_set(void) {
|
||||
// If setting fan 0
|
||||
if (smfi_cmd[2] == 0) {
|
||||
// Set duty cycle of fan 0
|
||||
DCR2 = smfi_cmd[3];
|
||||
return RES_OK;
|
||||
switch (smfi_cmd[2]) {
|
||||
case 0:
|
||||
// Set duty cycle of fan 0
|
||||
DCR2 = smfi_cmd[3];
|
||||
return RES_OK;
|
||||
case 1:
|
||||
// Set duty cycle of fan 1
|
||||
//TODO: only allow on platforms like addw2
|
||||
DCR4 = smfi_cmd[3];
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
// Failed if fan not found
|
||||
|
Reference in New Issue
Block a user