diff options
author | Keith Short <keithshort@chromium.org> | 2021-09-02 12:43:50 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-02 20:19:20 +0000 |
commit | f947750bbc0c968656ca8c484619b58b088a8e77 (patch) | |
tree | 2e7c59fa06c855e16db9d546336af1e834d0fbc8 | |
parent | 380c8f9f027f228db6996f409c994c23910e2fbf (diff) | |
download | chrome-ec-f947750bbc0c968656ca8c484619b58b088a8e77.tar.gz |
zephyr: Add Kconfig options for PS8xxx TCPC
Add Kconfig options CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805 and
CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815 to enable/disable the workaround
for PS8805/PS8815 firmware reporting the incorrect device ID.
BUG=none
BRANCH=none
TEST=zmake testall
TEST=On herobrine, verify that "ectool pdchipinfo 0" reports a device ID
0x02.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I16367ae5276e974671b034294275104d5831df21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3140325
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r-- | util/config_allowed.txt | 1 | ||||
-rw-r--r-- | zephyr/Kconfig.usbc | 20 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 9 |
3 files changed, 29 insertions, 1 deletions
diff --git a/util/config_allowed.txt b/util/config_allowed.txt index 2542d2389c..8a0c1dac92 100644 --- a/util/config_allowed.txt +++ b/util/config_allowed.txt @@ -1072,7 +1072,6 @@ CONFIG_USB_PD_TCPM_PS8705 CONFIG_USB_PD_TCPM_PS875 CONFIG_USB_PD_TCPM_PS8751_CUSTOM_MUX_DRIVER CONFIG_USB_PD_TCPM_PS8755 -CONFIG_USB_PD_TCPM_PS8815_FORCE_DID CONFIG_USB_PD_TCPM_RAA489000 CONFIG_USB_PD_TCPM_STM32GX CONFIG_USB_PD_TCPM_STUB diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index b687c4a5cc..ee79eb1d04 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -1075,6 +1075,16 @@ config PLATFORM_EC_USB_PD_TCPM_PS8805 DisplayPort applications. It supports Power Delivery and the DisplayPort Alt Mode. +if PLATFORM_EC_USB_PD_TCPM_PS8805 +config PLATFORM_EC_USB_PD_TCPM_PS8805_FORCE_DID + bool "Parade PS8805 Force Device ID" + default y + help + Early firmware versions of the PS8805 report an incorrect device ID + value for A3 silicon. Enable this option to check the vendor specific + chip version register and force the correct device ID. +endif # PLATFORM_EC_USB_PD_TCPM_PS8805 + config PLATFORM_EC_USB_PD_TCPM_PS8815 bool "Parade PS8815 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_MUX @@ -1085,6 +1095,16 @@ config PLATFORM_EC_USB_PD_TCPM_PS8815 DisplayPort applications. It supports Power Delivery and the DisplayPort Alt Mode. +if PLATFORM_EC_USB_PD_TCPM_PS8815 +config PLATFORM_EC_USB_PD_TCPM_PS8815_FORCE_DID + bool "Parade PS8815 Force Device ID" + default y + help + Early firmware versions of the PS8815 report an incorrect device ID + value for A1 silicon. Enable this option to check the vendor specific + chip version register and force the correct device ID. +endif # PLATFORM_EC_USB_PD_TCPM_PS8815 + config PLATFORM_EC_USB_PD_TCPM_RT1715 bool "Ricktek RT1715 Type-C Port Controller" help diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 2c7ac5dfe3..e7f793c6b3 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -913,9 +913,18 @@ #define CONFIG_USB_PD_TCPM_PS8805 #endif +#undef CONFIG_USB_PD_TCPM_PS8805_FORCE_DID +#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805_FORCE_DID +#define CONFIG_USB_PD_TCPM_PS8805_FORCE_DID +#endif + #undef CONFIG_USB_PD_TCPM_PS8815 #ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815 #define CONFIG_USB_PD_TCPM_PS8815 +#endif + +#undef CONFIG_USB_PD_TCPM_PS8815_FORCE_DID +#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815_FORCE_DID #define CONFIG_USB_PD_TCPM_PS8815_FORCE_DID #endif |