diff --git a/board/strago/board.c b/board/strago/board.c index 1aa9762515..bfd574d5cf 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -6,6 +6,7 @@ #include "extpower.h" #include "gpio.h" +#include "i2c.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -26,3 +27,11 @@ const struct power_signal_info power_signal_list[] = { {GPIO_PCH_SLP_S4_L, 1, "SLP_S4#_DEASSERTED"}, }; BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); + +const struct i2c_port_t i2c_ports[] = { + {"batt_chg", 0, 100}, + {"sensors", 1, 100}, + {"pd_mcu", 2, 100}, + {"thermal", 3, 100} +}; +const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); diff --git a/board/strago/board.h b/board/strago/board.h index aa34254306..e33bcb6c6b 100644 --- a/board/strago/board.h +++ b/board/strago/board.h @@ -26,17 +26,26 @@ #define CONFIG_SPI_PORT 1 #define CONFIG_SPI_CS_GPIO GPIO_PVT_CS0 #define CONFIG_SPI_FLASH -#define CONFIG_SPI_FLASH_SIZE 4194304 -/* TODO: Add flash protect support for the SPI part strago actually has */ +#define CONFIG_SPI_FLASH_SIZE 524288 #define CONFIG_SPI_FLASH_W25Q64 +#define CONFIG_I2C + +/* I2C ports */ +#define I2C_PORT_BATTERY 0 +#define I2C_PORT_CHARGER 0 +#define I2C_PORT_ACCEL 1 +#define I2C_PORT_GYRO 1 +#define I2C_PORT_ALS 1 +#define I2C_PORT_PD_MCU 2 +#define I2C_PORT_THERMAL 3 + /* Modules we want to exclude */ #undef CONFIG_EEPROM #undef CONFIG_EOPTION #undef CONFIG_PSTORE #undef CONFIG_PECI #undef CONFIG_SWITCH -#undef CONFIG_I2C #undef CONFIG_PWM #undef CONFIG_FANS #undef CONFIG_ADC diff --git a/board/strago/build.mk b/board/strago/build.mk index 23c88a95a9..89c42061bc 100644 --- a/board/strago/build.mk +++ b/board/strago/build.mk @@ -8,7 +8,7 @@ # the IC is SMSC MEC1322 / external SPI is 4MB / external clock is crystal CHIP:=mec1322 -CHIP_SPI_SIZE_KB:=4096 +CHIP_SPI_SIZE_KB:=512 board-y=board.o board-$(CONFIG_BATTERY_SMART)+=battery.o