diff options
-rw-r--r-- | zephyr/Kconfig.usbc | 15 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 94476cf536..172fd5b697 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -1051,6 +1051,21 @@ config PLATFORM_EC_BC12_DETECT_PI3USB9201 starts BC1.2 detection to detect the attached host type. It provides an I2C interface to report detection results. +config PLATFORM_EC_BC12_SINGLE_DRIVER + bool "Only support a single BC12 driver" + default y + help + Enable this if the board only needs one BC12 driver. This includes + the case that has multiple chips that use the same driver. + + If undefined, the board should define a bc12_ports[] array which + associates each port to its bc12 driver: + + struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = { + { .drv = &xxx_drv }, + { .drv = &yyy_drv }, + }; + endif # PLATFORM_EC_USB_CHARGER endif # PLATFORM_EC_USBC diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 88c44ac61f..13116516d6 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -91,9 +91,10 @@ #undef CONFIG_CHIP_PRE_INIT #define CONFIG_CHIP_PRE_INIT -/* This is currently always enabled by ECOS */ #undef CONFIG_BC12_SINGLE_DRIVER +#ifdef CONFIG_PLATFORM_EC_BC12_SINGLE_DRIVER #define CONFIG_BC12_SINGLE_DRIVER +#endif #undef CONFIG_CHARGER_SINGLE_CHIP #define CONFIG_CHARGER_SINGLE_CHIP |