diff options
-rw-r--r-- | zephyr/Kconfig.pd_meas_vbus | 44 | ||||
-rw-r--r-- | zephyr/Kconfig.usbc | 36 |
2 files changed, 45 insertions, 35 deletions
diff --git a/zephyr/Kconfig.pd_meas_vbus b/zephyr/Kconfig.pd_meas_vbus new file mode 100644 index 0000000000..ad40ea239f --- /dev/null +++ b/zephyr/Kconfig.pd_meas_vbus @@ -0,0 +1,44 @@ +# Copyright 2022 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if PLATFORM_EC_USBC +if PLATFORM_EC_USB_POWER_DELIVERY + +choice "Measuring VBUS voltage" + prompt "Select how VBUS voltage is measured" + +config PLATFORM_EC_USB_PD_VBUS_MEASURE_NOT_PRESENT + bool "VBUS voltage cannot be read" + help + Enable this if the board does not provide any mechanism for the EC to + read the analog VBUS voltage. + +config PLATFORM_EC_USB_PD_VBUS_MEASURE_CHARGER + bool "On-board charger supports VBUS measurement" + help + Enable this if the VBUS voltage can be read using a charger on the + board. + +config PLATFORM_EC_USB_PD_VBUS_MEASURE_TCPC + bool "Type-C Port Controller supports VBUS measurement" + help + Enable this if the VBUS voltage can be read using the on-board + TCPC. + +config PLATFORM_EC_USB_PD_VBUS_MEASURE_ADC_EACH_PORT + bool "VBUS on each port is measured using an ADC channel" + help + Enable this if there is a separate ADC channel for each USB-C VBUS + voltage. + +config PLATFORM_EC_USB_PD_VBUS_MEASURE_BY_BOARD + bool "VBUS on each port is measured per board specific" + help + Enable this if there are different VBUS measurement approaches on + the board, and also `board_get_vbus_voltage()` has to be implemented. + +endchoice # Measuring VBUS voltage + +endif # PLATFORM_EC_USB_POWER_DELIVERY +endif # PLATFORM_EC_USBC diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 570d82ac9b..21ffbdbf82 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -16,6 +16,7 @@ menuconfig PLATFORM_EC_USBC rsource "Kconfig.retimer" rsource "Kconfig.pd_int_shared" +rsource "Kconfig.pd_meas_vbus" if PLATFORM_EC_USBC @@ -183,41 +184,6 @@ config PLATFORM_EC_USB_PD_5V_CHARGER_CTRL The function charger_is_sourcing_otg_power is called to determine if VBUS is enabled on the source port. -choice "Measuring VBUS voltage" - prompt "Select how VBUS voltage is measured" - -config PLATFORM_EC_USB_PD_VBUS_MEASURE_NOT_PRESENT - bool "VBUS voltage cannot be read" - help - Enable this if the board does not provide any mechanism for the EC to - read the analog VBUS voltage. - -config PLATFORM_EC_USB_PD_VBUS_MEASURE_CHARGER - bool "On-board charger supports VBUS measurement" - help - Enable this if the VBUS voltage can be read using a charger on the - board. - -config PLATFORM_EC_USB_PD_VBUS_MEASURE_TCPC - bool "Type-C Port Controller supports VBUS measurement" - help - Enable this if the VBUS voltage can be read using the on-board - TCPC. - -config PLATFORM_EC_USB_PD_VBUS_MEASURE_ADC_EACH_PORT - bool "VBUS on each port is measured using an ADC channel" - help - Enable this if there is a separate ADC channel for each USB-C VBUS - voltage. - -config PLATFORM_EC_USB_PD_VBUS_MEASURE_BY_BOARD - bool "VBUS on each port is measured per board specific" - help - Enable this if there are different VBUS measurement approaches on - the board, and also `board_get_vbus_voltage()` has to be implemented. - -endchoice # Measuring VBUS voltage - config PLATFORM_EC_USBC_VCONN bool "Support USB Type-C VCONN" default y |