diff options
-rw-r--r-- | driver/tcpm/raa489000.h | 5 | ||||
-rw-r--r-- | zephyr/Kconfig.tcpm | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/driver/tcpm/raa489000.h b/driver/tcpm/raa489000.h index 41a37f94e7..b0bb202f98 100644 --- a/driver/tcpm/raa489000.h +++ b/driver/tcpm/raa489000.h @@ -39,7 +39,12 @@ /* VBUS_OCP_UV_THRESHOLD */ /* Detect voltage level of overcurrent protection during Sourcing VBUS */ +#ifdef CONFIG_PLATFORM_EC_RAA489000_OCP_UV_THRESHOLD_MV +#define RAA489000_OCP_THRESHOLD_VALUE \ + (CONFIG_PLATFORM_EC_RAA489000_OCP_UV_THRESHOLD_MV / 25) +#else #define RAA489000_OCP_THRESHOLD_VALUE 0x00BE /* 4.75V */ +#endif /* TYPEC_SETTING1 - only older silicon */ /* Enables for reverse current protection */ diff --git a/zephyr/Kconfig.tcpm b/zephyr/Kconfig.tcpm index d2783e9f0a..6651336954 100644 --- a/zephyr/Kconfig.tcpm +++ b/zephyr/Kconfig.tcpm @@ -236,6 +236,20 @@ config PLATFORM_EC_USB_PD_TCPM_RAA489000 Build drivers for the RAA489000, a combined battery charger and USB-C TCPCI. +if PLATFORM_EC_USB_PD_TCPM_RAA489000 + +config PLATFORM_EC_RAA489000_OCP_UV_THRESHOLD_MV + int "Undervoltage threshold while sourcing VBUS (mV)" + default 4750 + help + Sets the RAA489000 undervoltage theshold when sourcing VBUS, in mV. + + If VBUS drops below this level while sourcing, the chip disables sourcing + under the assumption that too much current was being drawn. Rated accuracy + of this measurement is 5%, with 25 mV resolution. + +endif + config PLATFORM_EC_USB_PD_TCPM_RT1715 bool "Richtek RT1715 Type-C Port Controller" help |