1# Copyright (c) 2022 Google LLC
2# SPDX-License-Identifier: Apache-2.0
3
4config USB_BC12_PI3USB9201
5	bool "Diodes PI3USB9201"
6	default y
7	depends on DT_HAS_DIODES_PI3USB9201_ENABLED
8	help
9	  This is a Dual-Role USB Charging-Type Detector. It can operate in
10	  host or client mode. It supports Battery Charging Specification, rev
11	  1.2 (BC1.2) with Standard/Charging/Dedicated downstream port
12	  (SDP/CDP/DCP) advertisement when in host mode. In portable device or
13	  client mode it starts BC1.2 detection to detect the attached host
14	  type. It provides an I2C interface to report detection results.
15
16config EMUL_BC12_PI3USB9201
17	bool "Emulate a Pericom PI3USB9201 USB charging detector"
18	default y
19	depends on ZTEST && DT_HAS_DIODES_PI3USB9201_ENABLED
20	help
21	  This is an emulator for the Pericom PI3USB9201 USB charging detector.
22
23	  The backend API allows test code to force the type of the partner
24	  charginging device.
25
26if USB_BC12_PI3USB9201
27
28config USB_BC12_PI3USB9201_CDP_ERRATA
29	bool "PI3USB9201 CDP Errata"
30	default y
31	help
32	  When this option is enabled and the charging mode is configured for
33	  CDP (Charging Downstream Port), after successful CDP detection the
34	  driver automatically sets the charging mode to SDP (Standard
35	  Downstream Port).
36
37	  This is a workaround for a glitch seen on the USB data lines when
38	  operating in CDP mode. Note that the BC1.2 negotiation compeletes
39	  before switching to SDP mode, so the attached portable device can
40	  continue to draw up to 1.5 A.
41
42endif # USB_BC12_PI3USB9201
43