summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.pd_meas_vbus
blob: 1484ad69794f2f2dfe98585ecd65134de0e8dc69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2022 The ChromiumOS Authors
# 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 PLATFORM_EC_USB_PD_VBUS_MEASURE_MODE
	prompt "Select how VBUS voltage is measured"
	optional

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 # PLATFORM_EC_USB_PD_VBUS_MEASURE_MODE

config PLATFORM_EC_CMD_VBUS
	bool "Console command to print VBUS"
	help
	  Support console command vbus to print the VBUS on each port
	  respectively.

endif # PLATFORM_EC_USB_POWER_DELIVERY
endif # PLATFORM_EC_USBC