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:
Jeremy Soller
2020-06-04 13:22:59 -06:00
committed by GitHub
parent 83102f77ba
commit 39cd014f7b
30 changed files with 1100 additions and 37 deletions

View File

@ -24,6 +24,7 @@
#include <common/debug.h>
#include <common/macro.h>
#include <common/version.h>
#include <ec/ec.h>
#ifdef PARPORT_DEBUG
#include <ec/parallel.h>
@ -42,7 +43,7 @@ uint8_t main_cycle = 0;
void init(void) {
// Must happen first
arch_init();
board_init();
ec_init();
gctrl_init();
gpio_init();
@ -62,6 +63,9 @@ void init(void) {
smfi_init();
//TODO: INTC
// Must happen last
board_init();
}
void main(void) {
@ -73,23 +77,6 @@ void main(void) {
gpio_debug();
#endif
// Allow CPU to boot
gpio_set(&SB_KBCRST_N, true);
// Allow backlight to be turned on
gpio_set(&BKL_EN, true);
// Enable camera
gpio_set(&CCD_EN, true);
// Enable wireless
gpio_set(&BT_EN, true);
gpio_set(&WLAN_EN, true);
gpio_set(&WLAN_PWR_EN, true);
// Enable right USB port
gpio_set(&USB_PWR_EN_N, false);
// Assert SMI#, SCI#, and SWI#
gpio_set(&SCI_N, true);
gpio_set(&SMI_N, true);
gpio_set(&SWI_N, true);
INFO("System76 EC board '%s', version '%s'\n", board(), version());
uint32_t last_time = 0;