diff options
-rw-r--r-- | zephyr/Kconfig | 8 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 0953a9b1b2..60f44fa8d1 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -669,4 +669,12 @@ config PLATFORM_EC_CCD_USBC_PORT_NUMBER help USB port number of the CCD enabled USBC port. +config PLATFORM_EC_I2C_PASSTHRU_RESTRICTED + bool "Restrict I2C PASSTHRU command" + depends on PLATFORM_EC_I2C + help + Enables board-specific restrictions for the I2C PASSTHRU host command. + Once enabled, board_allow_i2c_passthru function has to be implemented, + which defines the allowed usage of the command. + endif # PLATFORM_EC diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index cc500cd748..544627da5d 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -161,6 +161,11 @@ #define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY #endif +#undef CONFIG_I2C_PASSTHRU_RESTRICTED +#ifdef CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED +#define CONFIG_I2C_PASSTHRU_RESTRICTED +#endif + #undef CONFIG_BATTERY_PRESENT_CUSTOM #ifdef CONFIG_PLATFORM_EC_BATTERY_PRESENT_CUSTOM #define CONFIG_BATTERY_PRESENT_CUSTOM |