68 lines
1.3 KiB
Makefile
68 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
EC=it5570e
|
|
|
|
# Enable eSPI
|
|
CFLAGS+=-DEC_ESPI=1
|
|
|
|
# Add keymap to src
|
|
KEYMAP?=default
|
|
SRC+=$(BOARD_DIR)/keymap/$(KEYMAP).c
|
|
|
|
# Set keyboard LED mechanism
|
|
KBLED=white_dac
|
|
CFLAGS+=-DKBLED_DAC=2
|
|
|
|
# Set discrete GPU I2C bus
|
|
CFLAGS+=-DI2C_DGPU=I2C_1
|
|
|
|
# Set battery I2C bus
|
|
CFLAGS+=-DI2C_SMBUS=I2C_4
|
|
|
|
# Set touchpad PS2 bus
|
|
CFLAGS+=-DPS2_TOUCHPAD=PS2_3
|
|
|
|
# Set smart charger parameters
|
|
#TODO: Find out why input current must by divided by two
|
|
CHARGER=oz26786
|
|
CFLAGS+=\
|
|
-DCHARGER_CHARGE_CURRENT=1536 \
|
|
-DCHARGER_CHARGE_VOLTAGE=17400 \
|
|
-DCHARGER_INPUT_CURRENT=1600
|
|
|
|
# Set battery charging thresholds
|
|
CFLAGS+=\
|
|
-DBATTERY_START_THRESHOLD=0 \
|
|
-DBATTERY_END_THRESHOLD=100
|
|
|
|
# Set CPU power limits in watts
|
|
CFLAGS+=\
|
|
-DPOWER_LIMIT_AC=65 \
|
|
-DPOWER_LIMIT_DC=28
|
|
|
|
# Custom fan curve
|
|
CFLAGS+=-DBOARD_HEATUP=5
|
|
CFLAGS+=-DBOARD_COOLDOWN=20
|
|
CFLAGS+=-DBOARD_FAN_POINTS="\
|
|
FAN_POINT(70, 40), \
|
|
FAN_POINT(75, 60), \
|
|
FAN_POINT(80, 75), \
|
|
FAN_POINT(85, 90), \
|
|
FAN_POINT(90, 100) \
|
|
"
|
|
|
|
# DGPU support
|
|
CFLAGS+=-DHAVE_DGPU=1
|
|
CFLAGS+=-DBOARD_DGPU_HEATUP=5
|
|
CFLAGS+=-DBOARD_DGPU_COOLDOWN=20
|
|
CFLAGS+=-DBOARD_DGPU_FAN_POINTS="\
|
|
FAN_POINT(70, 40), \
|
|
FAN_POINT(75, 60), \
|
|
FAN_POINT(80, 75), \
|
|
FAN_POINT(85, 90), \
|
|
FAN_POINT(90, 100) \
|
|
"
|
|
|
|
# Add system76 common code
|
|
include src/board/system76/common/common.mk
|