diff options
author | Simon Glass <sjg@chromium.org> | 2021-06-04 15:59:02 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-11 21:27:54 +0000 |
commit | d659ef75281526c7da5570d135de1a45856f0611 (patch) | |
tree | 48e4eafd10aa43ed305d70056933d62cb50852d5 /zephyr | |
parent | b59d0afd5f1a5b0a0d50bb537177dbb6addb5cf8 (diff) | |
download | chrome-ec-d659ef75281526c7da5570d135de1a45856f0611.tar.gz |
zephyr: Allow use of the custom bc12_ports[] array
At present we don't support this feature on Zephyr. It is needed for
Asurada so add a proper Kconfig for it.
BUG=b:189855648
BRANCH=none
TEST=with other CLs, build asurada for Zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ifb4c79f3feeb7541339632bbccc575fa106ffb78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941882
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr')
-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 |