diff options
Diffstat (limited to 'zephyr/shim/include/config_chip.h')
-rw-r--r-- | zephyr/shim/include/config_chip.h | 72 |
1 files changed, 29 insertions, 43 deletions
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 2c1a588fc6..5fbefc7125 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -26,6 +26,35 @@ #define CONFIG_CHIPSET_TIGERLAKE #endif +/* eSPI signals */ +#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S3 +#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3 +#endif + +#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4 +#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4 +#endif + +#ifdef CONFIG_PLATFORM_EC_I2C +/* Also see shim/include/i2c/i2c.h which defines the ports enum */ +#define CONFIG_I2C +#endif + +#undef CONFIG_KEYBOARD_PROTOCOL_8042 +#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 +#define CONFIG_KEYBOARD_PROTOCOL_8042 +#endif /* CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 */ + +#undef CONFIG_CMD_KEYBOARD +#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042 +#define CONFIG_CMD_KEYBOARD +#endif + +#undef CONFIG_KEYBOARD_COL2_INVERTED +#ifdef CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED +#define CONFIG_KEYBOARD_COL2_INVERTED +#endif /* CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED */ + #ifdef CONFIG_PLATFORM_EC_POWERSEQ_CPU_PROCHOT_ACTIVE_LOW #define CONFIG_CHIPSET_CPU_PROCHOT_ACTIVE_LOW #endif @@ -60,16 +89,6 @@ #define CONFIG_CMD_GETTIME #endif /* CONFIG_PLATFORM_EC_TIMER_CMD_GETTIME */ -#undef CONFIG_CMD_KEYBOARD -#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042 -#define CONFIG_CMD_KEYBOARD -#endif - -#undef CONFIG_KEYBOARD_PROTOCOL_8042 -#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 -#define CONFIG_KEYBOARD_PROTOCOL_8042 -#endif /* CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 */ - #undef CONFIG_CMD_TIMERINFO #ifdef CONFIG_PLATFORM_EC_TIMER_CMD_TIMERINFO #define CONFIG_CMD_TIMERINFO @@ -82,20 +101,6 @@ #endif /* CONFIG_PLATFORM_EC_TIMER */ -/* eSPI signals */ -#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S3 -#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3 -#endif - -#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4 -#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4 -#endif - -#undef CONFIG_KEYBOARD_COL2_INVERTED -#ifdef CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED -#define CONFIG_KEYBOARD_COL2_INVERTED -#endif /* CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED */ - /* * Load the chip family specific header. Normally for npcx, this would be done * by chip/npcx/config_chip.h but since this file is replacing that header @@ -107,23 +112,4 @@ #include "config_chip-npcx7.h" #endif /* CHIP_FAMILY_NPCX7 */ -#ifdef CONFIG_PLATFORM_EC_I2C -#define CONFIG_I2C - -/* - * Define the i2c_ports enum for Ztests only right now. In full builds this - * will clash with the definitions in config_chip-npcx7.h. Once we've migrated - * away from platform/ec/chip/... files we can remove this guard. - */ -#if defined(CONFIG_ZTEST) && DT_NODE_EXISTS(DT_PATH(named_i2c_ports)) -#define I2C_PORT(id) DT_CAT(I2C_, id) -#define I2C_PORT_WITH_COMMA(id) I2C_PORT(id), -enum i2c_ports { -DT_FOREACH_CHILD(DT_PATH(named_i2c_ports), I2C_PORT_WITH_COMMA) -I2C_PORT_COUNT -}; -#define NAMED_I2C(name) I2C_PORT(DT_PATH(named_i2c_ports, name)) -#endif /* CONFIG_ZTEST && named_i2c_ports */ -#endif /* CONFIG_PLATFORM_EC_I2C */ - #endif /* __CROS_EC_CONFIG_CHIP_H */ |