# 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 choice PLATFORM_EC_USB_PD_TCPM_TYPE prompt "Choose a Type-C Port Manager (TCPM) to manage TCPC" config PLATFORM_EC_USB_PD_TCPM_TCPCI bool "Use TCPCI" select PLATFORM_EC_USBC_OCP help Enable a TCPC compatible with the Type-C Port Controller Interface (TCPCI) Specification. This driver supports both Rev1 v1.2 and Rev2 v1.0 of the TCPCI specification. Select this driver directly only if your specific TCPC chip is not listed as a separate config option. Note: most of the TCPC will depend on PLATFORM_EC_USB_PD_TCPM_TCPCI. # TODO: Add other choices: # CONFIG_USB_PD_TCPM_STUB # CONFIG_USB_PD_TCPM_ANX3429 # CONFIG_USB_PD_TCPM_ANX740X # CONFIG_USB_PD_TCPM_ANX741X # CONFIG_USB_PD_TCPM_ANX7688 # CONFIG_USB_PD_TCPM_MT6370 # CONFIG_USB_PD_TCPM_FUSB307 # CONFIG_USB_PD_TCPM_STM32GX endchoice # PLATFORM_EC_USB_PD_TCPM_TYPE if PLATFORM_EC_USB_PD_TCPM_TCPCI config PLATFORM_EC_USB_PD_TCPM_CCGXXF bool "Cypress CCGXXF Single/Dual USB-C Port Controller with Source PPC" default y depends on DT_HAS_CYPRESS_CCGXXF_ENABLED help CCGXXF are Single/Dual port USB Type-C controllers that comply with the USB Type-C and PD specifications. These devices include an integrated Port Protection, VBUS Source path load switch and contain a True Random Type-C Transceiver including the Type-C termination resistors Rp, Rd, and dead battery Rd termination. config PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP bool "Use on-chip ITE" help Use the ITE-series TCPM driver built into the EC chip. This is selected by the ITE USB Type-C drivers. It cannot be set otherwise, even in prj.conf config PLATFORM_EC_USB_PD_PPC bool "Enable Power Path Control from PD" default n help Some PD chips have integrated SRC FET and control the SRC/SINK FET from internal GPIOs. Enable this if the Power Path Control is controlled by the PD chip without EC GPIOs. config PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG bool "Type-C Port Controller runtime config" default y help Allows the configuration of the TCPC to be set up at runtime. This makes the tcpc_config[] array writable, i.e. not const. It should be declared as such in the board config. This is useful when the board has runtime information that sets the configuration, such as Chromium OS Board Info (CBI set in the factory. Without this, multiple EC images would need to be installed depending on the board. config PLATFORM_EC_USB_PD_TCPM_ANX7406 bool "Analogix ANX7406 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_MUX help The Analogix ANX7406 is a USB Type-C Port Controller (TCPC) for USB Type-C v1.2 Host, USB3.1 Gen2 and DisplayPort applications. It has an on-chip microcontroller (OCM) to manage the signal switching. It supports Power Delivery Rev. 3.0 and the DisplayPort Alt Mode version 1.4a HBR3. Supported chips are: ANX7406 config PLATFORM_EC_USB_PD_TCPM_ANX7447 bool "Analogix ANX7447 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_MUX default y if DT_HAS_ANALOGIX_ANX7447_TCPC_ENABLED help The Analogix ANX7447 is a USB Type-C Port Controller (TCPC) for USB Type-C v1.2 Host, USB3.1 Gen2 and DisplayPort applications. It has an on-chip microcontroller (OCM) to manage the signal switching. It supports Power Delivery Rev. 3.0 and the DisplayPort Alt Mode version 1.4a HBR3. Supported chips are: ANX3447 ANX7447 if PLATFORM_EC_USB_PD_TCPM_ANX7447 config PLATFORM_EC_USB_PD_TCPM_ANX7447_AUX_PU_PD bool "Enable ANX77447 AUX_N internal PU, and AUX_P internal PD." depends on PLATFORM_EC_USB_PD_TCPM_ANX7447 help Use this config option to enable and internal pullup resistor on the AUX_N and internal pulldown resistor on the AUX_P line. Only use this config option if there are no external pu/pd resistors on these signals. This configuration should be used to avoid noise issues on the DDI1_AUX_N & DDI1_AUX_P signals (b/122873171) config PLATFORM_EC_USB_PD_TCPM_ANX7447_OCM_ERASE_COMMAND bool "Enable console command to erase ANX7447 OCM flash" depends on PLATFORM_EC_USB_PD_TCPM_ANX7447 help Adds an EC console command to erase the ANX7447 OCM flash. Note: this is intended to be a temporary option and won't be needed when ANX7447 are put on boards with OCM already erased endif # PLATFORM_EC_USB_PD_TCPM_ANX7447 config PLATFORM_EC_USB_PD_TCPM_FUSB302 bool "Fairchild's FUSB302 Type-C port controller with USB PD" default y depends on DT_HAS_FAIRCHILD_FUSB302_ENABLED help This is a USB Type-C port controller which enables the USB Type-C detection including attach, and orientation. It integrates the physical layer of the USB power delivery protocol to allow up to 100 W of power and role swap. The PD block enables full support for alternative interfaces of the Type-C specification. config PLATFORM_EC_USB_PD_TCPM_NCT38XX bool "Nuvoton 3807/8 Single/Dual Port Controller with Power Delivery" default y depends on DT_HAS_NUVOTON_NCT38XX_ENABLED help The NCT38n7/8 is a single/dual-port, USB Type-C Port Controller (TCPC). It incorporates a Power Delivery (PD) PHY with BMC encoding, Protocol logic and USB Type-C Configuration Channel (CC) logic. config PLATFORM_EC_USB_PD_TCPM_PS8XXX bool select PLATFORM_EC_USB_PD_TCPM_MUX imply PLATFORM_EC_HOSTCMD_I2C_CONTROL help Enable the driver for PS8xxx active retimer/redrivers with integrated USB Type-C Port Controller (TCPC) for USB Type-C Host and DisplayPort applications. They support Power Delivery and the DisplayPort Alt Mode. Support for specific devices in the driver (below) must also be enabled. if PLATFORM_EC_USB_PD_TCPM_PS8XXX config PLATFORM_EC_USB_PD_TCPM_MULTI_PS8XXX bool "Support multiple PS8xxx devices" help PS8XXX-series chips are all supported by a single driver. Enable this if a board with the same EC firmware is expected to support multiple products here. In this case the board must provide a function to return the correct product ID actually used by a particular board: uint16_t board_get_ps8xxx_product_id(int port) Supported return values are: PS8705_PRODUCT_ID PS8745_PRODUCT_ID PS8751_PRODUCT_ID PS8755_PRODUCT_ID PS8805_PRODUCT_ID PS8815_PRODUCT_ID endif # PLATFORM_EC_USB_PD_TCPM_PS8XXX config PLATFORM_EC_USB_PD_TCPM_PS8745 bool "Parade PS8745 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_PS8XXX help The Parade Technologies PS8815 is an active retiming/redriving (respectively for USB 3.1 Gen 2 / DisplayPort 1.4a HBR3) integrated with a USB Type-C Port Controller (TCPC) for USB Type-C Host and DisplayPort applications. It supports Power Delivery and the DisplayPort Alt Mode. if PLATFORM_EC_USB_PD_TCPM_PS8745 config PLATFORM_EC_USB_PD_TCPM_PS8745_FORCE_ID bool "Disambiguate PS8745 and PS8815" default y help Some firmware versions of the PS8745 report incorrect product and device IDs. Enable this option to check vendor-specific registers and force the correct device and product IDs. endif # PLATFORM_EC_USB_PD_TCPM_PS8745 config PLATFORM_EC_USB_PD_TCPM_PS8751 bool "Parade PS8751 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_PS8XXX help The Parade Technologies PS8751 is a USB Type-C Port Controller (TCPC) for USB Type-C Host and DisplayPort applications. It supports Power Delivery Rev. 2.0 and the DisplayPort Alt Mode version 1.0a. config PLATFORM_EC_USB_PD_TCPM_PS8805 bool "Parade PS8805 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_PS8XXX help The Parade Technologies PS8805 is an active retiming/redriving (respectively for USB 3.1 Gen 2 / DisplayPort 1.4a HBR3) integrated with a USB Type-C Port Controller (TCPC) for USB Type-C Host and DisplayPort applications. It supports Power Delivery and the DisplayPort Alt Mode. if PLATFORM_EC_USB_PD_TCPM_PS8805 config PLATFORM_EC_USB_PD_TCPM_PS8805_FORCE_DID bool "Parade PS8805 Force Device ID" default y help Early firmware versions of the PS8805 report an incorrect device ID value for A3 silicon. Enable this option to check the vendor specific chip version register and force the correct device ID. endif # PLATFORM_EC_USB_PD_TCPM_PS8805 config PLATFORM_EC_USB_PD_TCPM_PS8815 bool "Parade PS8815 USB-C Gen 2 Type-C Port Controller" select PLATFORM_EC_USB_PD_TCPM_PS8XXX help The Parade Technologies PS8815 is an active retiming/redriving (respectively for USB 3.1 Gen 2 / DisplayPort 1.4a HBR3) integrated with a USB Type-C Port Controller (TCPC) for USB Type-C Host and DisplayPort applications. It supports Power Delivery and the DisplayPort Alt Mode. if PLATFORM_EC_USB_PD_TCPM_PS8815 config PLATFORM_EC_USB_PD_TCPM_PS8815_FORCE_DID bool "Parade PS8815 Force Device ID" default y help Early firmware versions of the PS8815 report an incorrect device ID value for A1 silicon. Enable this option to check the vendor specific chip version register and force the correct device ID. endif # PLATFORM_EC_USB_PD_TCPM_PS8815 config PLATFORM_EC_USB_PD_TCPM_RAA489000 bool "Renesas RAA489000 Type-C port controller and battery charger" select PLATFORM_EC_USB_PD_PPC help Build drivers for the RAA489000, a combined battery charger and USB-C TCPCI. if PLATFORM_EC_USB_PD_TCPM_RAA489000 config PLATFORM_EC_RAA489000_OCP_UV_THRESHOLD_MV int "Undervoltage threshold while sourcing VBUS (mV)" default 4750 help Sets the RAA489000 undervoltage theshold when sourcing VBUS, in mV. If VBUS drops below this level while sourcing, the chip disables sourcing under the assumption that too much current was being drawn. Rated accuracy of this measurement is 5%, with 25 mV resolution. endif config PLATFORM_EC_USB_PD_TCPM_RT1715 bool "Richtek RT1715 Type-C Port Controller" default y depends on DT_HAS_RICHTEK_RT1715_TCPC_ENABLED help The RT1715 is a USB Type-C controller, integrating a complete Type-C Transceiver including the Rp and Rd resistors. It does the USB Type-C detection including attach and orientation. The RT1715 integrates the physical layer of the USB BMC power delivery protocol to allow up to 100W of power and role swap. The BMC PD block enables full support for alternative interfaces of the Type-C specification. This driver is also used for RT1716 TCPC. config PLATFORM_EC_USB_PD_TCPM_RT1718S bool "Richtek RT1718S Type-C Port Controller" default y depends on DT_HAS_RICHTEK_RT1718S_TCPC_ENABLED help The RT1718S is an integrated USB Type-C TCPC controller which includes IEC-61000-4-2 ESD protection cell for CC/SBU/DP/DM. High voltage USB 2.0 switches also support HV DCP & fast charging protocols. RT1718S supports TCPC Version 1.2, and Battery Charging version 1.2 (BC1.2). config PLATFORM_EC_USB_PD_TCPM_TUSB422 bool "TI TUSB422 Port Control with USB PD" help This is a a USB PD PHY that enables a USB Type-C port with the Configuration Channel (CC) logic needed for USB Type-C ecosystems. It integrates the physical layer of the USB BMC power delivery (PD) protocol to allow up to 100-W of power and support for alternate mode interfaces. An external microprocessor, containing USB Type-C Port Manager (TCPM), communicates with the TUSB422 through an I2C interface. config PLATFORM_EC_USB_PD_TCPM_MUX bool "Support optional register 18h steer the high-speed muxes" help Enable this option if the TCPC port controller supports the optional register 18h CONFIG_STANDARD_OUTPUT to steer the high-speed muxes. See section 4.4.4 (CONFIGURE STANDARD OUTPUT) of the USB Type-C Port Controller Interface Specification, Revision 2.0, Version 1.2 for more information. config PLATFORM_EC_USB_PD_TCPM_SBU bool "PD chip has integrated port protection for SBU lines" help Some PD chips have integrated port protection for SBU lines. If the switches to enable those SBU lines are controlled by the PD chip, enable this config. config PLATFORM_EC_CONSOLE_CMD_TCPC_DUMP bool "Console command: tcpc_dump" # anx7447 also supports this command, but is not yet enabled default y help Allows dumping of the Type-C Port Controller (TCPC) state, which is basically a list of registers and their values. By reference to the Universal Serial Bus Type-C Port Controller Interface Specification this can help you figure out what is going on. endif # PLATFORM_EC_USB_PD_TCPM_TCPCI endif # PLATFORM_EC_USBC