From 5fa7b302689f9a87efecb57d1ebbca7954db098e Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Fri, 12 Jul 2024 13:06:24 -0600 Subject: [PATCH] bonw15-b: Add new Bonobo The new Bonobo has the same pin layout as the original bonw15, but uses the larger IT5570E-256 instead of keeping the IT5570E-128. Signed-off-by: Tim Crawford --- src/board/system76/bonw15-b/board.mk | 62 ++++++++++++++++++++++++++++ src/board/system76/bonw15/gpio.c | 4 +- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 src/board/system76/bonw15-b/board.mk diff --git a/src/board/system76/bonw15-b/board.mk b/src/board/system76/bonw15-b/board.mk new file mode 100644 index 000000000..271f5a07d --- /dev/null +++ b/src/board/system76/bonw15-b/board.mk @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-3.0-only + +board-y += ../bonw15/board.c +board-y += ../bonw15/gpio.c + +# FIXME: Handle this better +CFLAGS += -I$(BOARD_ID)/../bonw15/include + +EC = ite +CONFIG_EC_ITE_IT5570E = y +CONFIG_EC_FLASH_SIZE_256K = y + +# Enable eSPI +CONFIG_BUS_ESPI = y + +# Enable firmware security +CONFIG_SECURITY = y + +# Include keyboard +KEYBOARD = 15in_102 + +# Set keyboard LED mechanism +CONFIG_HAVE_KBLED = y +KBLED = bonw14 + +# Set battery I2C bus +CFLAGS += -DI2C_SMBUS=I2C_4 + +# Set touchpad PS2 bus +CFLAGS += -DPS2_TOUCHPAD=PS2_3 + +# Set CPU power limits in watts +CFLAGS += \ + -DPOWER_LIMIT_AC=330 \ + -DPOWER_LIMIT_DC=55 + +# Custom fan curve +CFLAGS += -DBOARD_HEATUP=5 +CFLAGS += -DBOARD_COOLDOWN=20 +CFLAGS += -DBOARD_FAN_POINTS="\ + FAN_POINT(60, 40), \ + FAN_POINT(65, 60), \ + FAN_POINT(70, 75), \ + FAN_POINT(75, 90), \ + FAN_POINT(80, 100) \ +" + +# Enable dGPU support +CONFIG_HAVE_DGPU = y +CFLAGS += -DI2C_DGPU=I2C_1 +CFLAGS += -DBOARD_DGPU_HEATUP=5 +CFLAGS += -DBOARD_DGPU_COOLDOWN=20 +CFLAGS += -DBOARD_DGPU_FAN_POINTS="\ + FAN_POINT(60, 40), \ + FAN_POINT(65, 60), \ + FAN_POINT(70, 75), \ + FAN_POINT(75, 90), \ + FAN_POINT(80, 100) \ +" + +# Add system76 common code +include src/board/system76/common/common.mk diff --git a/src/board/system76/bonw15/gpio.c b/src/board/system76/bonw15/gpio.c index a04450466..225d92b86 100644 --- a/src/board/system76/bonw15/gpio.c +++ b/src/board/system76/bonw15/gpio.c @@ -238,8 +238,8 @@ void gpio_init(void) { GPCRI5 = GPIO_OUT; // THERM_VOLT_CPU GPCRI6 = GPIO_ALT; - // BOARD_ID1 - GPCRI7 = GPIO_IN; + // BOARD_ID1 (NC) + GPCRI7 = GPIO_IN | GPIO_UP; // LED_BAT_FULL GPCRJ0 = GPIO_OUT | GPIO_UP;