diff options
Diffstat (limited to 'zephyr/Kconfig.usbc')
-rw-r--r-- | zephyr/Kconfig.usbc | 1231 |
1 files changed, 0 insertions, 1231 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc deleted file mode 100644 index ee79eb1d04..0000000000 --- a/zephyr/Kconfig.usbc +++ /dev/null @@ -1,1231 +0,0 @@ -# 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. - -# TODO(sjg): Not USB-C: perhaps we should have a 'power' thing at the top level? -config PLATFORM_EC_USB_A_PORT_COUNT - int "Number of USB-A ports" - default 0 - help - This sets the number of USB-A ports on the device. These ports do - not support USB Power Delivery features but can be used to power - external devices (according to the USB 3 spec, not the Battery Charger - standard) and to charge devices slowly if power is enabled to them. - -config PLATFORM_EC_USB_PORT_POWER_DUMB - bool "Simple control of power to USB-A ports" - depends on PLATFORM_EC_USB_A_PORT_COUNT > 0 - default y - help - Enable this to provide simple control of the power to USB ports - using GPIOs. To use this your board code must provide a - usb_port_enable[] array with the GPIOs to use for each port. This - implements the EC_CMD_USB_CHARGE_SET_MODE host command and provides - a 'usbchargemode' console command. - -config PLATFORM_EC_USB_PORT_POWER_DUMB_CUSTOM_HOOK - bool "Simple control of power to USB-A ports" - depends on PLATFORM_EC_USB_PORT_POWER_DUMB - help - Enable this if your board does not want to use the default S3 hooks - from USB_PORT_POWER_DUMB. - -menuconfig PLATFORM_EC_USBC - bool "USB Type-C" - default y if PLATFORM_EC_BATTERY - help - Enable this to support various USB Type-C features chosen by the - options below. USB-C is widely used on modern Chromebooks and the EC's - role is to negotiate power contracts (for sourcing or sinking power - over USB). The EC is also responsible for discovering the capabilities - of attached USB-C partners and enabling alternate operational modes, - including Display Port, Thunderbolt, and USB4. - -if PLATFORM_EC_USBC - -config PLATFORM_EC_CHARGE_MANAGER - bool "Charge manager" - default y - help - The EC charge manager manages charging the battery from all supported - power sources. This includes dedicated charge ports (such as a - barrel jack connector), BC1.2 (Battery Charging 1.2) sources, and - USB-C sources. When multiple charge sources are connected to a - Chromebook simultaneously, the charge manager is responsible for - picking the best source. - - Note that the charge manager assumes that at least one USB-C power - source is available on the hardware, so cannot be built without - PLATFORM_EC_USBC. - -config PLATFORM_EC_CHARGER_INPUT_CURRENT - int "Charger input current in mA" - depends on PLATFORM_EC_CHARGE_MANAGER - default 512 - help - This is the default input current for the board in mA. Many boards - also use this as the least maximum input current during transients. - - This value should depend on external power adapter, designed charging - voltage, and the maximum power of the running system. For type-C - chargers, this should be set to 512 mA in order to not brown-out - low-current USB charge ports in accordance with USB-PD r3.0 Sec. 7.3 - -menuconfig PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS - bool "Power requirements to boot AP" - default y - help - Power thresholds for AP boot. - If one of the following conditions is met, EC boots AP: - 1. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON. - 2. AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON. - 3. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC - and - AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT. - -if PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS - -config PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON - int "Minimal battery level to boot AP without AC" - depends on PLATFORM_EC_BATTERY - default 3 - help - Sets the minimum battery capacity, as a percentage, needed to boot - the AP when AC power is not supplied. - -config PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC - int "Minimal battery level to boot AP with AC" - depends on PLATFORM_EC_BATTERY && PLATFORM_EC_CHARGE_MANAGER - default 1 - help - Sets the minimum battery capacity, as a percentage, needed to boot - the AP when AC power is supplied. The AC power supplied must also - be greater than CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT. - -config PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT - int "Minimal AC power to boot AP with battery" - depends on PLATFORM_EC_BATTERY && PLATFORM_EC_CHARGE_MANAGER - default 15000 - help - Sets the minimum power, in milliwatts, supplied by an external - charger required to boot the AP when the battery capacity is also - above CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC. - -config PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON - int "Minimal AC power to boot AP without battery" - depends on PLATFORM_EC_CHARGE_MANAGER - default 15000 - help - Sets the minimum power, in milliwatts, supplied by an external - charger requires to boot the AP when no battery is present or - under dead battery conditions. If the AP requires greater than - 15W to boot, check the - CONFIG_PLATFORM_EC_CHARGER_LIMIT_POWER_THRESH_CHG_MW setting. - -endif # PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS - -config PLATFORM_EC_USBC_OCP - bool - help - USB-C overcurrent protection: Enable this to detect when a connected - USB-C partner draws too much power from the Chromebook and - automatically shut off power to the USB-C partner. - - This should be enabled by drivers which can detect over-current. It - cannot be set otherwise, even in prj.conf - -config PLATFORM_EC_USB_PID - hex "USB Product ID" - help - Each platform (e.g. baseboard set) should have a single VID/PID - combination. If there is a big enough change within a platform, - then we can differentiate USB topologies by varying the hardware - version field in the Sink and Source Capabilities Extended messages. - - To reserve a new PID within Google, use go/usb and see - http://google3/hardware/standards/usb - -config PLATFORM_EC_USB_BCD_DEV - hex "USB Device ID" - default 0 - help - This specifies the USB device version, reported by board when acting - as the upstream facing port (UFP). This is a 16-bit unsigned integer - and should be set to a version number relevant to the release version - of the product. - -config PLATFORM_EC_USB_VID - hex "USB Vendor ID" - default 0x18d1 - help - This specifies the USB vendor ID used for boards which expose a - USB endpont when the port is in UFP mode. The default value is - set to Google's assigned VID and typically would not need to be - changed. But, in certain cases this may need to be changed to - match an OEM's vendor ID. - -config PLATFORM_EC_USBC_RETIMER_INTEL_BB - bool "Support Intel Burnside Bridge retimer" - help - Enable this to support the Intel Burnside Bridge Thunderbolt / USB / - DisplayPort retimer. - - Intel Burnside Bridge is a Type-C multi-protocol retimer to be used - in on-board applications. Burnside Bridge offers the ability to latch - protocol signals into on-chip memory before retransmitting them - onwards. It can be used to extend the physical length of the system - without increasing high-frequency jitter. - - Burnside Bridge supports spec compliant retimer of following - protocols: - - - Display Port: four unidirectional DP lanes - - USB3.1 Gen1/2: one bi-directional USB lane - - Thunderbolt: two bi-directional CIO lanes - - Multifunction Display (MFD): two unidirectional lanes of DP and - one bidirectional lane of USB3.1 Gen1/2 - -config PLATFORM_EC_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG - bool "Use runtime configuration of Intel Burnside Bridge" - depends on PLATFORM_EC_USBC_RETIMER_INTEL_BB - default y - help - Enable this to allow run-time configuration of the Burnside Bridge - driver structure. This makes the bb_controls[] 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 changes - 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_USBC_RETIMER_ANX7451 - bool "Support Analogix ANX7451 10G Active Mux and Retimer" - help - ANX7451 is a 4x4 re-timing mux capable of switching DisplayPort (DP) - and USB3.2 Gen 2 10Gbps signals to support a single USB Type-C port. - ANX7451 has built-in re-timers to recover both the USB and DP signals - with loss compensation of 23dB for USB and up to 27dB for DP. - -config PLATFORM_EC_USBC_RETIMER_PS8811 - bool "Support Parade PS8811 Single Port USB 3.1 Gen 2 10G Retimer" - help - The PS8811 is a one-port bidirectional USB 3.1 Gen 2 retimer that - integrates the UniEye equalizer and a retimer to re-condition USB 3.1 - signals for long media link applications. It supports USB 3.1 Gen 2 - with operation speed up to 10Gbps as well as Gen 1 operation at 5Gbps. - -config PLATFORM_EC_USBC_RETIMER_KB800X - bool "Enable KB800X retimer" - help - The KB8001 is a Universal Serial Bus (USB) Type-C 40 Gb/s multiprotocol - switch and bidirectional Bit-Level Retimer (BLR) which supports: - - Display Port: four unidirectional DP lanes - - USB3.1 Gen1/2: one bi-directional USB lane - - USB4/Thunderbolt: two bi-directional CIO lanes - - Multifunction Display (MFD): two unidirectional lanes of DP and - one bidirectional lane of USB3.1 Gen1/2 - -config PLATFORM_EC_KB800X_CUSTOM_XBAR - bool "Use custom remapping of HSIO XBAR" - depends on PLATFORM_EC_USBC_RETIMER_KB800X - default n - help - Enable this to allow using a custom crossbar configuration for the HSIO - lanes. - -menuconfig PLATFORM_EC_USB_POWER_DELIVERY - bool "USB Type-C Power Delivery (PD)" - default y - select HAS_TASK_PD_C0 - help - USB has always provided basic power to an attached peripheral. USB-C - PD is part of the USB 3.0 standard and allows a lot more functionality - than the basic 500mA @ 5V. It allows negotiating power delivery over - the USB cable to select voltages up to 20V with current up to 5A. - - This option also enables the Type-C Port Manager (TCPM) on the EC. The - TCPM deals with the various state changes in the system as devices are - plugged and unplugged, as well as changes in power requirements from - those devices. - -if PLATFORM_EC_USB_POWER_DELIVERY - -config PLATFORM_EC_USB_PD_HOST_CMD - bool "Host commands related to USB Power Delivery" - default y - help - This enables host commands which allow finding out the capabilities - of USB PD, checking is status and controlling how it operates. For - devices which support firmware update, this is provided as well, - with the firmware being sent from the AP. - -config PLATFORM_EC_USB_PD_PORT_MAX_COUNT - int "Maximum number of USB PD ports supported" - default 2 - help - This sets the limit on the number of PD ports supported on the - device. This is used to set the size for tables used by devices. - - TODO(b/176237074): Can we calculate this from the devicetree at some - point? Or update the sn5S330 driver to use an 8-bit flag byte for - source_enabled[] so that plenty of ports are supported without this - configuration option? - -config PLATFORM_EC_CONSOLE_CMD_MFALLOW - bool "Console command: mfallow" - default y - help - Controls whether multi-function support is allowed for DP (Display - Port) connections. Default setting allows multi-function support when - the attached device also supports multi-function mode. - - mfallow <port> [true | false] - -config PLATFORM_EC_CONSOLE_CMD_PD - bool "Console command: pd" - default y - help - Provides information about the current USB Power Delivery state and - also allows various changes to be made for testing purposes. - - It has a number of subcommands: - - pd dump <n> - sets the debug level (0-3). This affects all layers - of the stack - pd trysrc [0/1/2] - prints or sets the Try.SRC override. Use 0 to - force Try.SRC off, 1 to force Try.SRC on, and 2 to - let USB PD stack control the Try.SRC behavior. - pd version - show PD version in use - pd <port> state - show start for a PD port - - Ssee usb_pd_console.c for full details including various commands - for role swap, reset, enable/disable, requesting SNK or SRC, etc. - -config PLATFORM_EC_USB_PD_DEBUG_FIXED_LEVEL - bool "USB Power Delivery debug level is fixed at build time" - help - Enable this to set the debug level to a fixed value in the build. - This saves space but means that the level cannot be changed using - commands like 'pd dump'. Typically this should be set when a platform - is shipped. - -config PLATFORM_EC_USB_PD_DEBUG_LEVEL - int "Debug level to use" - depends on PLATFORM_EC_USB_PD_DEBUG_FIXED_LEVEL - help - Sets the value of the debug level to use. If this is 0 then no - debugging output is available from the USB Power Delivery stack. - The meaning of each level depends on the module in question, but - the maximum available level is 3. - -config PLATFORM_EC_USB_PD_5V_EN_CUSTOM - bool "Custom method of detecting VBUS" - help - Enable this if your board needs a custom method to determine if VBUS - is enabled on a source port. You must provide an implementation of: - - int board_is_sourcing_vbus(int port) - - It should return 0 if not sourcing VBUS on that port and non-zero - if sourcing. - -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 is there is a separate ADC channel for each USB-C VBUS - voltage. - -endchoice # Measuring VBUS voltage - -config PLATFORM_EC_USBC_VCONN - bool "Support USB Type-C VCONN" - default y - help - This enables support for USB Type-C connector voltage (VCONN). This - option must be enabled to communicate with electronically marked - (E-Mark) cables. This option is required for operation with USB4 and - Thunderbolt devices. - - This is not needed for captive cables. - -config PLATFORM_EC_USB_PD_DUAL_ROLE - bool "Board can act as a dual-role Power Delivery port" - default y - help - This enables support for switching between source and sink during - operation. This means that the port can accept power (e.g. to charge - up its battery), or send out power to an attached device on the same - port. - -config PLATFORM_EC_USB_PD_FRS - bool "Support Fast Role Swap protocol" - help - Enables the protocol side of Fast Role Swap (FRS). This allows the - device to switch from a SNK to a SRC (or vice versa) based on - communication with the partner device. - - For this to work the trigger must be implemented in either the - Type-C Port Controller (TCPC) or Power Path Controller (PPC). - - FRS differs from the traditional power-role swap in that FRS - guarantees there is no interruption of power nor disruption of data - communication to any downstream devices (such as devices connected - to a USB-C hub or dock). - -if PLATFORM_EC_USB_PD_FRS - -choice "Trigger implementation" - prompt "Select where the trigger is implemented" - help - The Fast Role Swap (protocol requires that a trigger be implemented to - initiate the swap. Use this option to select which of the available - options should be used. - -config PLATFORM_EC_USB_PD_FRS_PPC - bool "PPC" - depends on PLATFORM_EC_USBC_PPC - help - Enable this if the Fast Role Swap trigger is implemented in the - Power Path Controller (PPC). - -config PLATFORM_EC_USB_PD_FRS_TCPC - bool "TCPC" - depends on PLATFORM_EC_USBC_TCPC - help - Enable this if the Fast Role Swap trigger is implemented in the - Type-C Port Controller (TCPC). - -endchoice # Trigger implementation - -endif # PLATFORM_EC_USB_PD_FRS - -config PLATFORM_EC_USB_PD_DPS - bool "Board can support Dynamic PDO Selection" - depends on PLATFORM_EC_BATTERY - default n - help - Enable this if the board needs dynamic PDO selection. - DPS picks a power efficient PDO regarding to the underlying battery - configuration and the system loading. - Default configuration can be overrided by `dps_config` to adapt - to each board's need. - -config PLATFORM_EC_USB_PD_DUAL_ROLE_AUTO_TOGGLE - bool "Board can use TCPC-controlled DRP toggle" - depends on PLATFORM_EC_USB_PD_DUAL_ROLE - default y - help - Enable this if the USB Type-C Port Controllers (TCPC) used on the - board supports toggling of the power role autonomously. When this is - disabled, the USB power delivery task is responsible for manually - toggling the power role. - -config PLATFORM_EC_USB_PD_DISCHARGE - bool "Board can discharge VBUS" - default y - help - Enable this if the board can enable VBUS discharge (eg. through a - GPIO-controlled discharge circuit, or through port controller - registers) to discharge VBUS rapidly on disconnect - -choice "Discharge method" - prompt "Select the discharge method" - depends on PLATFORM_EC_USB_PD_DISCHARGE - -config PLATFORM_EC_USB_PD_DISCHARGE_GPIO - bool "GPIO control" - help - Enable this if the discharge circuit is controlled by a GPIO - - TODO: How to specify the GPIO? - -config PLATFORM_EC_USB_PD_DISCHARGE_TCPC - bool "Discharge circuit is provided by the TCPC" - help - Enable this if the discharge circuit is provided by Power-Delivery - resistors on the USB Type-C Port Controller (TCPC). - -config PLATFORM_EC_USB_PD_DISCHARGE_PPC - bool "Discharge circuit is provided by the PPC" - help - Enable this if the discharge circuit is using Power Delivery - resistors on the Power Path Controller. - -endchoice # Discharge method - -config PLATFORM_EC_USB_PD_REV30 - bool "USB PD Rev3.0 functionality" - default y - help - Enable this to allow Rev3.0 functionality, including features such as - Fast Role Swap, advertising the available power across all ports of a - multi-port charger, and USB4. If disabled, only USB Power Delivery - Rev2.0 functionality is supported. - - This defaults to y because PD Rev3.0 is required for USB4 - functionality. - -config PLATFORM_EC_USB_PD_ALT_MODE - bool "USB Power Delivery alternate mode" - default y - help - Enable this to support USB PD alternate mode. This allows negotiation - of a different mode of operation to allow non-USB traffic to pass over - a USB Type-C link. This makes use of some or all of the USB 3.0 bus - differential pairs. If all are used for the alternate mode, then USB - transmission is not available at all while in this mode. - -config PLATFORM_EC_USB_PD_ALT_MODE_DFP - bool "Downward Facing Port support" - default y - help - Enable support for USB Power Delivery alternate mode of Downward - Facing Port. - - TODO: Add more help here - -config PLATFORM_EC_USB_PD_ALT_MODE_UFP - bool "Upward Facing Port support" - help - Enable support for USB Power Delivery alternate mode of Upward - Facing Port (UFP). - - By default, Chromium OS only enables alternate modes (Display Port, - USB4, Thuderbolt, etc) when the USB data role resolves to the - Downstream Facing Port (DFP) role. Enable this option to support - USB4 and ThunderBolt operation when the Chromium OS data role - resolves to the UFP role. - -config PLATFORM_EC_USB_PD_USB32_DRD - bool "Port is cable of operating as an USB3.2 device" - default y - help - Enable this if the board's USB Power Delivery Downward Facing Port is - able to support the USB3.2 standard. This is advertised to the - other end so that it can potentially take advantage of the additional - features available. - -config PLATFORM_EC_USB_PD_DP_HPD_GPIO - bool "Hotplug Detect (HPD) is controlled by an EC GPIO" - help - Enable this if the EC must send the Hotplug Detect (HPD) signal to - the DisplayPort Graphics Processing Unit (GPU) via a GPIO. Otherwise - this is sent by the display device. - -config PLATFORM_EC_USB_PD_DP_HPD_GPIO_CUSTOM - bool "Custom handling of HPD GPIO" - depends on PLATFORM_EC_USB_PD_DP_HPD_GPIO - help - Enable this if the Hotplug Detect (HPD) GPIO level has to be handled - by custom functions. In this case your board must implement a - function to enable the feature for a port and another function to - check the current state: - - void svdm_set_hpd_gpio(int port, int enable); - - int svdm_get_hpd_gpio(int port); - -choice "VBUS detection method" - prompt "Select the method to detect VBUS" - -config PLATFORM_EC_USB_PD_VBUS_DETECT_TCPC - bool "TCPC detects VBUS" - help - Choose this option if the TCPC can detect the presence of VBUS - -config PLATFORM_EC_USB_PD_VBUS_DETECT_CHARGER - bool "Charger detects VBUS" - help - Choose this option if the battery charger can detect the presence - of VBUS - -config PLATFORM_EC_USB_PD_VBUS_DETECT_PPC - bool "PPC detects VBUS" - help - Choose this option if the Power-Path Controller (PPC) can detect the - presence of VBUS - -config PLATFORM_EC_USB_PD_VBUS_DETECT_NONE - bool "No way to detect VBUS" - help - Choose this option if it is not possible to detect VBUS. - -endchoice # VBUS detection method - -config PLATFORM_EC_USB_TYPEC_SM - bool "Type-C (TC) physical-layer state machine" - default y - help - This enables the bottom layer of the TCPMv2 state machine which - handles using CC lines to set the voltage-level of the power supplied. - You should normally define this unless you want to override it in your - board code, which is not recommended. - -config PLATFORM_EC_USB_PRL_SM - bool "Protocol layer (PRL) state machine" - default y - help - This enables the middle layer of the power-delivery (PD) protocol, - which deals with the flow of power messages across the USB Type-C - interface. You should normally define this unless you want to override - it in your board code, which is not recommended. - -config PLATFORM_EC_USB_PE_SM - bool "Policy engine (PE) state machine" - default y - help - This enables the top layer of the power-delivery (PD) protocol, which - deals with the actually PD messages that are exchanged with attached - USB devices. You should normally define this unless you want to - override it in your board code, which is not recommended. - -config PLATFORM_EC_USB_PD_DECODE_SOP - def_bool y # Required for TCPMV2 - help - This enables support for encoding of the message's Start Of Packet - (SOP, SOP' and SOP'', collectively called SOP*) in bits 31-28 of the - 32-bit msg header type. - -config PLATFORM_EC_HOSTCMD_PD_CONTROL - bool "Host command: EC_CMD_PD_CONTROL" - default y - help - Enable the EC_CMD_PD_CONTROL host command. This allows control - of the USB-PD chip from the AP, including reset, suspend/resume - and enabling power. - - This host command can be manually executed using the - "ectool pdcontrol" command from the Chromium OS shell. - -config PLATFORM_EC_USB_PD_LOGGING - bool "Host command: EC_CMD_PD_GET_LOG_ENTRY" - help - Enable logging of USB Power Delivery events. The AP can request the - log to see what has happened recently. - - The log events are stored in a circular buffer, each one being a - struct event_log_entry. - -menuconfig PLATFORM_EC_USB_PD_CONSOLE_CMD - bool "Enable USB PD console commands" - default y if PLATFORM_EC_USB_PD_ALT_MODE_DFP - help - Enables various USB-C PD related console commands. - -if PLATFORM_EC_USB_PD_CONSOLE_CMD - -config PLATFORM_EC_CONSOLE_CMD_USB_PD_PE - bool "Console command: pe" - default y - help - This command dumps information about the USB PD alternate mode options - discovered from the partner device. It can be useful for debugging. - - Example: pe 1 dump - IDENT SOP: - - [ID Header] 2c000bda :: AMA, VID:0bda - [Cert Stat] 00000000 - [2] 00000209 [3] 11000f09 - IDENT SOP': - [ID Header] 1c000489 :: PCable, VID:0489 - [Cert Stat] 000001c6 - [2] f6810000 [3] 11082051 - SVID[0]: ff01 MODES: [1] 000c0045 - MODE[1]: svid:ff01 caps:000c0045 - -config PLATFORM_EC_CONSOLE_CMD_USB_PD_CABLE - bool "Console command: pdcable" - default y - help - This commands shows the USB cable charactistics as detected from the - device. It can be useful for debugging problems with cables and the - device's response to them. - - Example: pdcable 1 - Cable Type: Passive - Cable Rev: 1.0 - Connector Type: 2 - Cable Current: 5A - USB Superspeed Signaling support: 1 - Rounded support: No - Optical cable: No - Retimer support: No - Link training: Bi-directional - Thunderbolt cable type: Passive - -endif # PLATFORM_EC_USB_PD_CONSOLE_CMD - -choice "USB-C device type" - prompt "Select the USB-C device type" - default PLATFORM_EC_USB_DRP_ACC_TRYSRC - -config PLATFORM_EC_USB_VPD - bool "VCONN-Powered Device" - help - This enables support for supplying power to devices that accept power - over the USB VCONN line. - - See here for details: - - https://www.usb.org/sites/default/files/D1T2-3a%20-%20CTVPDs%20and%20Making%20Your%20Own%20USB-C%20Thingamajig.pdf - -config PLATFORM_EC_USB_CTVPD - bool "Charge-Through VCONN-Powered Device" - help - This enables support for supplying power to devices, with a circuit - that deals with this without needing the involvement of the main - device. - -config PLATFORM_EC_USB_DRP_ACC_TRYSRC - bool "Dual-Role Port, Audio Accessory, and Try.SRC Device" - help - This is the most flexible option, allowing the port to operate in - a dual-role capacity, so that power can be accepted or supplied on - a port. - -endchoice # USB-C device type - -config PLATFORM_EC_USB_PD_TRY_SRC - bool "Enable Try.SRC mode" - depends on PLATFORM_EC_USB_DRP_ACC_TRYSRC - default y - help - This enables Try.SRC mode so that the board will try to be a source - for power if the other end offers both options. This can be useful - for laptops, for example, since when attaching to a cellphone we want - the laptop to charge the phone, not vice versa. - -config PLATFORM_EC_USB_PD_USB4 - bool "USB4 support" - depends on PLATFORM_EC_USB_PD_REV30 - default y - help - This enables support for entering into USB4 mode between two port - partners. The provides new features such as higher speeds and more - flexible multiplexing of data on the cable for different purposes, - e.g. attaching multiple displays and storage devices on the same bus. - -config PLATFORM_EC_USB_PD_TBT_COMPAT_MODE - bool "Thunderbolt-compatible mode support" - depends on PLATFORM_EC_USB_PD_REV30 - default y - help - Enable this to allow entering into Thunderbolt-compatible mode between - two port partners. This does not require that USB4 mode be enabled. - -endif # PLATFORM_EC_USB_POWER_DELIVERY - -menuconfig PLATFORM_EC_USBC_PPC - bool "USB Type-C Power Path Controller" - default y - help - Enable this to support the USB Type-C PPC on your board. This enables - common routines for things like figuring out whether power is being - supplied to the Chromebook over USB-C, whether the Chromebook is - supplying power to another device, etc. - -if PLATFORM_EC_USBC_PPC - -config PLATFORM_EC_USBC_PPC_POLARITY - bool - help - Enable this if a Power Path Controller needs to be informed of - the polarity of the Configuration Channel (CC) pins. This can change - depending on which way up the USB-C cable is inserted into the - device. - - This should be enabled by drivers which can detect this. It cannot be - set otherwise, even in prj.conf - -config PLATFORM_EC_USBC_PPC_SBU - bool - help - Enable this if a Power Path Controller is capable of gating the - Sideband Use (SBU) lines. If so, the USB mux will use this feature - to isolate the lines before entering into alternate mode. - - This should be enabled by drivers which can detect this. It cannot be - set otherwise, even in prj.conf - -config PLATFORM_EC_USBC_PPC_VCONN - bool - depends on PLATFORM_EC_USBC_VCONN - help - Enable this if a Power Path Controller is capable of providing - VCONN. If so, the USB stack will enable / disable VCONN as needed. - - This should be enabled by drivers which can detect this. It cannot be - set otherwise, even in prj.conf - - Note: This may not be true, as there may be scenarios where the board - might need to disable this feature (for instance when both the PPC and - TCPC can supply VCONN). We can cross that bridge when we come to it. - -config PLATFORM_EC_USBC_PPC_SN5S330 - bool "TI SN5S330 PD 3.0 power mux" - select PLATFORM_EC_USBC_OCP - select PLATFORM_EC_USBC_PPC_POLARITY - select PLATFORM_EC_USBC_PPC_SBU - select PLATFORM_EC_USBC_PPC_VCONN if PLATFORM_EC_USBC_VCONN - help - This is a USB Type-C Power Delivery 3.0 Bidirectional Power Mux with - CC and SBU short-to-VBUS Protection and Integrated Dead Battery - LDO. This chips provides protection against pins shorting to Vbus as - well as ESD (Electostatic discharge) protection. It provides a simple - I2C interface for for Mode Selection, Fast Role Swap, and Fault - Reporting. - -config PLATFORM_EC_USBC_PPC_SYV682X - bool "SYV682X which is a Power Mux for USB PD" - select PLATFORM_EC_USBC_OCP - select PLATFORM_EC_USBC_PPC_POLARITY - select PLATFORM_EC_USBC_PPC_VCONN if PLATFORM_EC_USBC_VCONN - help - The SYV682A is a 2 to 1 power mux switch for USB PD applications. The - SYV682A supports dead battery wake up function and Fast Role Swap - features. It provides protection against overcurrent, overvoltage, - thermal shutdown, and undervoltage conditions. - -config PLATFORM_EC_USBC_PPC_SYV682C - bool "SYV682C Power Mux for USB PD (subset of SYV682X)" - depends on PLATFORM_EC_USBC_PPC_SYV682X - help - The C version of this chip won't block I2C accessing to the CONTROL4 - rer (to on/off Vconn) when smart discahrge is enabled. This allows us - to re-enable the smart discharge on boards using SYV682C. - -config PLATFORM_EC_USBC_PPC_SYV682X_NO_CC - bool "SYV682X does not pass through CC" - help - Enable this if a SYV682X does not pass through CC. - There is a 3.6V limit on the HOST_CC signals, so the TCPC - should not source 5V VCONN. This config determines if - sourcing VCONN should be enabled by default. - -config PLATFORM_EC_USBC_PPC_SYV682X_SMART_DISCHARGE - bool "Enable smart discharge on the SYV682X PPC" - help - Enable the smart discharge feature on VBUS provided by the SYV682x - PPC. This should be enabled for revision C and above of the SYV682X. - Earlier revisions of the chip block I2C transactions during smart - discharge, causing USB PD compliance issues. - -config PLATFORM_EC_USBC_PPC_DEDICATED_INT - bool "Power Power Controller has a dedicated interrupt pin" - help - Enable this if the Power Power Controller (PPC) has level interrupts - (as opposed to edge) and a dedicated interrupt pin to check the - current state. - - If this is enabled the USB Power Delivery (PD) stack will call - ppc_get_alert_status() to find out he interrupt status for a port. - This function should be provided by the board code. - -config PLATFORM_EC_USB_PD_TCPC_LOW_POWER - bool "Allow Type-C Port Controller to enter low-power mode" - default y - help - Allows entry to a low power mode when the USB port is idle. - When enabled, an enter_low_power_mode member is present in tcpm_drv - and should be set to a function that selects that mode, such as - tcpci_enter_low_power_mode() for TCPCI-compatible TCPCs. - -config PLATFORM_EC_USB_PD_TCPC_LPM_EXIT_DEBOUNCE_US - int "Debounce delay when exiting low-power mode (uS)" - depends on PLATFORM_EC_USB_PD_TCPC_LOW_POWER - default 25000 - help - Some TCPCs need additional time following a VBUS change to internally - debounce the CC line status and update the CC_STATUS register. This - is the delay in microseconds to allow before checking the CC line - status in the EC. - -config PLATFORM_EC_USB_PD_TCPC_VCONN - bool "If VCONN is enabled, the TCPC will provide VCONN" - default y if !PLATFORM_EC_USBC_PPC_SYV682X - default y if PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP - default y if PLATFORM_EC_USBC_PPC_SYV682X_NO_CC - help - Source USB Type-C connector voltage (VCONN) from the Type-C Port - Controller (TCPC), and also the Power Path Controller (PPC) if - present. Some TCPC/PPC can't handle 5V on its host-side CC pins, so - disable this config in those cases. - -choice "Type-C Port Manager (TCPM)" - prompt "Choose a Type-C Port Manager (TCPM) to manage TCPC" - -config PLATFORM_EC_USB_PD_TCPM_TCPCI - bool "Use TCPCI" - 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_FUSB302 -# CONFIG_USB_PD_TCPM_ANX3429 -# CONFIG_USB_PD_TCPM_ANX740X -# CONFIG_USB_PD_TCPM_ANX741X -# CONFIG_USB_PD_TCPM_ANX7447 -# CONFIG_USB_PD_TCPM_ANX7688 -# CONFIG_USB_PD_TCPM_NCT38XX -# CONFIG_USB_PD_TCPM_MT6370 -# CONFIG_USB_PD_TCPM_RAA489000 -# CONFIG_USB_PD_TCPM_FUSB307 -# CONFIG_USB_PD_TCPM_STM32GX -# CONFIG_USB_PD_TCPM_CCGXXF - -endchoice # Type-C Port Manager (TCPM) - -menuconfig PLATFORM_EC_USB_MUX - bool "USB muxes" - default y - help - Enables support for USB muxes. These allow multiplexing - -if PLATFORM_EC_USB_MUX - -config PLATFORM_EC_USB_MUX_IT5205 - bool "ITE IT5205 USB Type-C 3:2 Alternative mode passive mux" - help - This is a USB Type-C 3:2 Alternative mode mux, supporting USB 3.1 - Gen 2 10Gbps as well as DisplayPort (DP1.4) at 8Gbps. It provides a - cross-point mux for low-speed Side-Band-Use (SBU) pins. The mux can - be controlled via I2C. - -config PLATFORM_EC_USB_MUX_PS8743 - bool "Parade PS8743 USB-C Host Switch with redriver" - help - This is a Parade USB 3.1 Gen 1 / DisplayPort (DP) Alt Mode - High-Bit-Rate 2 (HBR2) redriver. It provides control of switching - modes through either GPIO or I2C. - -endif - -config PLATFORM_EC_USBC_SS_MUX - bool "SuperSpeed mux" - default y - help - Enable this to support the USB Type-C SuperSpeed Mux. If enabled, - the USB stack will call usb_mux_set() to change the mux settings. - The board must provide a driver in usb_muxes[] for each port so - that this can work. - -if PLATFORM_EC_USBC_SS_MUX - -config PLATFORM_EC_USB_MUX_RUNTIME_CONFIG - bool "USB mux runtime config" - default y - help - Allows the configuration of the USB mux to be set up at runtime. This - makes the usb_muxes[] 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 changes - 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_USBC_SS_MUX_DFP_ONLY - bool "Use SuperSpeed mux only when DFP" - help - Only configure the USB Type-C SuperSpeed Mux when a port is a - Downstream Facing Port (DFP). This is needed for chipsets which - don't support being an Upstream Facing Port UFP). - -config PLATFORM_EC_USB_MUX_VIRTUAL - bool "USB Mux is virtual" - depends on PLATFORM_EC_USBC_SS_MUX - help - Enable this if a virtual USB mux is supported on the EC, which is - actually handled by the AP. In this case the AP gets an interrupt - and is is informed when status changes, via the - EC_CMD_USB_PD_MUX_INFO host command. - -config PLATFORM_EC_USBC_RETIMER_FW_UPDATE - bool "Support firmware update of USB Type-C retimers" - default y - depends on PLATFORM_EC_USBC_SS_MUX - help - Enable this to support USB Type-C retimer firmware update. Each - Type-C retimer indicates its capability of supporting firmware update - independently in its usb_mux_driver. - - During AP boot-up, the AP scans each PD port for retimers but only - if there are no Type-C devices attached to the port. The firmware - update can only be performed on retimers which show up in the AP - thunderbolt device entries. - -endif # PLATFORM_EC_USBC_SS_MUX - -config PLATFORM_EC_CONSOLE_CMD_PPC_DUMP - bool "Console command: ppc_dump" - depends on PLATFORM_EC_USBC_PPC - default y - help - Allows dumping of the Power Path Controller (PPC) state, which is - basically a list of registers and their values. The actual dump - function is driver-specific (the reg_dump member of ppc_drv). By - reference to the datasheet for the part this can help you figure out - what is going on. - -if PLATFORM_EC_USB_PD_TCPM_TCPCI - -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_ITE_ACTIVE_PORT_COUNT - int "Number of ITE USB PD active ports" - depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP - default 1 - help - This sets the number of active USB Power Delivery (USB PD) ports - in use on the ITE microcontroller. The active port usage should - follow the order of ITE TCPC port index. - -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_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. Then enable the required PS8xxx options - below. - - 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 - PS8751_PRODUCT_ID - PS8755_PRODUCT_ID - PS8805_PRODUCT_ID - PS8815_PRODUCT_ID - -config PLATFORM_EC_USB_PD_TCPM_PS8751 - bool "Parade PS8751 USB-C Gen 2 Type-C Port Controller" - select PLATFORM_EC_USB_PD_TCPM_MUX - 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_MUX - 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_MUX - 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_RT1715 - bool "Ricktek RT1715 Type-C Port Controller" - 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. - -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_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 - -config PLATFORM_EC_USB_PD_TCPM_DRIVER_IT83XX - bool "Enable IT83XX driver" - depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP - help - Enable a driver for the ITE IT83XX on-chip UBB Type-C Port Manager. - This supports up to two USB Type-C ports with Dual Role function - (provider and consumer) and Fast Role Swap detection. - -config PLATFORM_EC_USB_PD_TCPM_DRIVER_IT8XXX2 - bool "Enable IT8XXX2 driver" - depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP - help - Enable a driver for the ITE IT8XXX2 on-chip UBB Type-C Port Manager. - This supports up to two USB Type-C ports with Dual Role function - (provider and consumer) and Fast Role Swap detection. - -endif # PLATFORM_EC_USBC_PPC - -config PLATFORM_EC_USB_PD_ONLY_FIXED_PDOS - bool "Only support FIXED type PDOs" - help - Ignore all non-fixed PDOs received from a src_caps message. Enable - this for boards (like servo_v4) which only support FIXED PDO types. - -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 |