summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.usb_charger
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-02-09 13:18:31 -0800
committerCommit Bot <commit-bot@chromium.org>2022-03-06 07:31:29 +0000
commitd17d231dbd01eb7c0a7a36f6a0c01534cb655dbb (patch)
tree46ea79cc5386dcc5c4961ff30155f1609e000a53 /zephyr/Kconfig.usb_charger
parent3ac9cb752b1ade696ebfb5b441c218e178c4acfd (diff)
downloadchrome-ec-d17d231dbd01eb7c0a7a36f6a0c01534cb655dbb.tar.gz
zephyr: Create Kconfig.usb_charger
Split USB Charger Kconfig options from Kconfig.usbc and place in a separate file named Kconfig.usb_charger. BUG=b:194432779 TEST=Verified Kconfig options with menuconfig BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I46ee08d4fd338fc3885cfb31644222fdaae5ea09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3451005 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.usb_charger')
-rw-r--r--zephyr/Kconfig.usb_charger63
1 files changed, 63 insertions, 0 deletions
diff --git a/zephyr/Kconfig.usb_charger b/zephyr/Kconfig.usb_charger
new file mode 100644
index 0000000000..2b6d8041dc
--- /dev/null
+++ b/zephyr/Kconfig.usb_charger
@@ -0,0 +1,63 @@
+# Copyright 2020 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
+
+config PLATFORM_EC_USB_CHARGER
+ bool "Support charging from a USB-C port"
+ default y
+ select HAS_TASK_USB_CHG_P0
+ help
+ This enables common BC1.2 (Battery-Charging Specification Rev1.2)
+ charger-detection routines. With this is possible to negotiate a
+ power contract with an attached battery charger and use this to
+ charge the device's battery.
+
+if PLATFORM_EC_USB_CHARGER
+
+config PLATFORM_EC_BC12_DETECT_PI3USB9201
+ bool "Enable support for Pericom PI3USB9201"
+ help
+ This is a Dual-Role USB Charging-Type Detector. It can operate in
+ host or client mode. It supports Battery Charging Specification, rev
+ 1.2 (BC1.2) with Standard/Charging/Dedicated downstream port
+ (SDP/CDP/DCP) advertisement when in host mode. In client mode it
+ starts BC1.2 detection to detect the attached host type. It provides
+ an I2C interface to report detection results.
+
+config PLATFORM_EC_BC12_DETECT_MT6360
+ bool "MediaTek MT6360P PMIC"
+ help
+ This PMIC includes a battery charger with an On-The-Go (OTG) output
+ range of 4.85 to 5.825V. It provides integrated ADCs for system
+ monitoring. The MT6360 also supports USB Power Delivery 3.0 with
+ Dual-Role, with host or client mode. It supports alternate mode as
+ well as VCONN with programmable over-current protection (OCP).
+
+config PLATFORM_EC_MT6360_BC12_GPIO
+ bool "USB-PHY connection is controlled by a GPIO"
+ depends on PLATFORM_EC_BC12_DETECT_MT6360
+ help
+ If enabled, the MT6360 USB-PHY connection is controlled by
+ a GPIO: GPIO_BC12_DET_EN. Assert GPIO_BC12_DET_EN to detect a BC1.2
+ device, and deassert GPIO_BC12_DET_EN to mux the USB-PHY back.
+
+config PLATFORM_EC_BC12_SINGLE_DRIVER
+ bool "Only support a single BC12 driver"
+ default y
+ help
+ Enable this if the board only needs one BC12 driver. This includes
+ the case that has multiple chips that use the same driver.
+
+ If undefined, the board should define a bc12_ports[] array which
+ associates each port to its bc12 driver:
+
+ struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = {
+ { .drv = &xxx_drv },
+ { .drv = &yyy_drv },
+ };
+
+endif # PLATFORM_EC_USB_CHARGER
+
+endif # PLATFORM_EC_USBC