System76 common board directory (#53)

* Move configuration for battery into board.mk

* lemp9: remove tcpm code

* Move touchpad to its own module

* Add kbled_reset to all platforms, move items to run on CPU reset to a function

* Add defines for battery and charger address

* Add I2C_0 export to it5570e

* Move common system76 board functions into src/board/system76/common
This commit is contained in:
Jeremy Soller
2020-04-14 17:23:29 -06:00
committed by GitHub
parent ba98a7073a
commit 357fae86fc
129 changed files with 289 additions and 5048 deletions

View File

@@ -0,0 +1,24 @@
# Include system76 common source
SYSTEM76_COMMON_DIR=src/board/system76/common
SRC+=$(wildcard $(SYSTEM76_COMMON_DIR)/*.c)
INCLUDE+=$(wildcard $(SYSTEM76_COMMON_DIR)/include/common/*.h) $(SYSTEM76_COMMON_DIR)/common.mk
CFLAGS+=-I$(SYSTEM76_COMMON_DIR)/include
# Add scratch ROM
include $(SYSTEM76_COMMON_DIR)/scratch/scratch.mk
console_internal:
cargo build --manifest-path tool/Cargo.toml --release
sudo tool/target/release/system76_ectool console
console_external:
sleep 1 && echo C | sudo tee /dev/ttyACM* &
sudo tio -b 1000000 -m INLCRNL /dev/ttyACM*
flash_internal: $(BUILD)/ec.rom
cargo build --manifest-path tool/Cargo.toml --release
sudo tool/target/release/system76_ectool flash $<
flash_external: $(BUILD)/ec.rom
cargo build --manifest-path ecflash/Cargo.toml --example isp --release
sudo ecflash/target/release/examples/isp $<