diff options
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/Kconfig.usba | 24 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 9 |
2 files changed, 33 insertions, 0 deletions
diff --git a/zephyr/Kconfig.usba b/zephyr/Kconfig.usba index 380d277d2c..eba0eb1e37 100644 --- a/zephyr/Kconfig.usba +++ b/zephyr/Kconfig.usba @@ -81,6 +81,30 @@ config PLATFORM_EC_USB_PORT_POWER_SMART_INVERTED is inverted, meaning a low value indicates a high current limit and a high value requests a low current limit. +choice PLATFORM_EC_USBA_PORT_POWER_SMART_DEFAULT_MODE + prompt "Port power smart charging default mode" + default PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_SDP + +config PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_DISABLED + bool "Disabled" + help + USB-A ports charging mode default set to disabled. + If set, the USB-A charging mode is disabled. + +config PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_SDP + bool "SDP" + help + USB-A ports charging mode default set to Standard Downstream + Port, USB 2.0 mode. + +config PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_CDP + bool "CDP" + help + USB-A ports charging mode default set to Charging Downstream + Port, BC 1.2. + +endchoice + endif # PLATFORM_EC_USB_PORT_POWER_SMART endif # PLATFORM_EC_USBA diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index f2864dddb3..3a6f7de6f8 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -1142,6 +1142,15 @@ extern struct jump_data mock_jump_data; #define CONFIG_USB_PORT_POWER_SMART_SIMPLE #endif +#undef CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE +#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_DISABLED +#define CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE USB_CHARGE_MODE_DISABLED +#elif defined(CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_SDP) +#define CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE USB_CHARGE_MODE_SDP2 +#elif defined(CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_DEFAULT_CDP) +#define CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE USB_CHARGE_MODE_CDP +#endif + #undef CONFIG_USB_PORT_POWER_SMART_INVERTED #ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_INVERTED #define CONFIG_USB_PORT_POWER_SMART_INVERTED |