Techniques for enumerating universal serial bus (USB) devices based on mode detection
Patent Information
- Application Number
- PCT/CN2025/084571
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2026-10-01
Smart Images

Figure CN2025084571_01102026_PF_FP_ABST
Abstract
Description
TECHNIQUES FOR ENUMERATING UNIVERSAL SERIAL BUS (USB) DEVICES BASED ON MODE DETECTIONFIELD OF THE DISCLOSURE
[0001] Aspects of the present disclosure relate generally to universal serial bus (USB) devices, and more particularly, to enumeration of USB devices. DESCRIPTION OF RELATED ART
[0002] Universal serial bus (USB) devices can connect to one another using a variety of supported interfaces, such as a USB type-C interface or other interface. When USB devices are connected, a host USB device can access / control supported functions, speed modes (e.g., USB2, USB3, USB4, different generations thereof, etc. ) . When USB devices are connected, an enumeration process within the USB systems can commence, where the USB host device detects presence of a connecting device, determines the type of the connecting device that is connected with host device, defines the speed at which to communicate, etc. The USB host device can include a downward-facing port (DFP) and the connecting device can include an upward-facing port (UFP) . Prior to the enumeration process, for example, a connection can be built, such as a type-C to type-C (C2C) connection where the host device and connecting device support and are coupled by type-C ports and cable. When the C2C connection is built, a power delivery (PD) process can establish a contract between the devices so that one of the USB devices (asource device) can provide power to another one of the USB devices (asink device) .
[0003] As part of establishing the contract, the device with the DFP can instruct the device with the UFP to enter USB4 using an “Enter USB” command. The Enter USB command can include various information regarding capabilities of the device with the DFP, information regarding the cable connecting the devices, information on presence of the host device and alternative mode support, a presence bit indicating whether the hub tree is headless, etc. The device with the UFP can enter USB4 with the device with the DFP based on the Enter USB command. In type-C C2C connect, once USB communication is supported (e.g., after contract establishment) , the sink device can start USB device mode for enumeration. A USB driver can initialize all USB physical layers (PHYs) and related accessories (e.g., redrives / retimers for various generations of USB modes) for USB communications.SUMMARY
[0004] The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
[0005] According to an aspect, a first universal serial bus (USB) device is provided that includes one or more processors, one or more memories coupled with the one or more processors, and instructions stored in the one or more memories. The instructions are operable, when executed by the one or more processors, to cause the first USB device to receive, as part of establishing a power delivery (PD) contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device, activate, based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode, and establish, based on activating the physical layer, a data connection with the second USB device over the physical layer.
[0006] In another aspect, a method for activating a USB connection is provided that includes receiving, by a first USB device as part of establishing a PD contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device, activating, by the first USB device and based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode, and establishing, by the first USB device and based on activating the physical layer, a data connection with the second USB device over the physical layer.
[0007] In another aspect, a computer-readable medium including code executable by one or more processors for activating a USB connection is provided. The code includes code for receiving, by a first USB device as part of establishing a PD contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device, activating, by the first USB device and based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode, and establishing, by the first USB device and based on activating the physical layer, a data connection with the second USB device over the physical layer.
[0008] In a further aspect, an apparatus is provided that includes a transceiver, a memory configured to store instructions, and one or more processors communicatively coupled with the transceiver and the memory. The one or more processors are configured to execute the instructions to perform the operations of methods described herein. In another aspect, an apparatus is provided that includes means for performing the operations of methods described herein. In yet another aspect, a computer-readable medium is provided including code executable by one or more processors to perform the operations of methods described herein.
[0009] To the accomplishment of the foregoing and related ends, the one or more aspects comprise the features hereinafter fully described and particularly pointed out in the claims. The following description and the annexed drawings set forth in detail certain illustrative features of the one or more aspects. These features are indicative, however, of but a few of the various ways in which the principles of various aspects may be employed, and this description is intended to include all such aspects and their equivalents.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The disclosed aspects will hereinafter be described in conjunction with the appended drawings, provided to illustrate and not to limit the disclosed aspects, wherein like designations denote like elements, and in which:
[0011] FIG. 1 is a system level block diagram of an example of a universal serial bus (USB) system including a provider device and a consumer device communicatively coupled via an interface, in accordance with aspects described herein;
[0012] FIG. 2 is an illustration of an example of a timeline for USB device connection and enumeration, in accordance with aspects described herein;
[0013] FIG. 3 illustrates a flow chart of an example of a method for selectively activating physical layers for a portion of supported USB modes of a device, in accordance with aspects described herein;
[0014] FIG. 4 illustrates a flow chart of an example of a method for selectively activating physical layers for a portion of supported USB modes of a device having a power sink, in accordance with aspects described herein; and
[0015] FIG. 5 illustrates a flow chart of an example of a method for selectively activating physical layers for a portion of supported USB modes of a device having a power source, in accordance with aspects described herein.DETAILED DESCRIPTION
[0016] Various aspects are now described with reference to the drawings. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more aspects. It may be evident, however, that such aspect (s) may be practiced without these specific details.
[0017] The described features generally relate to performing universal serial bus (USB) device enumeration based on supported USB mode or speed. For example, a supported or utilized USB mode can be detected prior to USB device enumeration (or other connection establishment) and this information can be used to initialize physical (PHY) layers, accessories (e.g., redrives / retimers) , etc. for only certain USB modes. For example, if a first USB device only supports USB high speed (HS) (e.g., USB2, but not USB3 or UBS4) , a second USB device connecting to the first USB device may not need to initialize USB3 or USB4 PHY layers, accessories, etc. In this example, the second USB device can decrease enumeration latency and / or conserve power by initializing USB2 PHY layer and / or accessories without also initializing USB3 or USB4 PHY layer and / or accessories. In addition, memory used to support active USB2, USB3, and / or USB4 driver stack may be different, e.g., the lower link rate having less buffer size, and high link rate may have more buffer size for increased data transfer. Thus, activating only supported PHY layers may decrease buffer size requirements on the associated device.
[0018] For example, USB4 PHY layer and / or retimer PS8830 can consume at least 15 milliwatts (mw) of power when activated and in standby. In another example, USB2 components (including eUSB repeater, HS PHY, etc. ) can consume around 5mw when enabled. In another example, USB PHY initialization may require a few milliseconds (ms) to complete, and the link detection on separate speed modes may require additional time (e.g., 100-150ms) . Thus, refraining from activating unneeded PHY layers and / or associated accessories can conserve power and setup time at one or more of the associated USB devices.
[0019] In one example, where USB power delivery (PD) is supported at the source device, sink device, cable, etc., a discover identity command or Enter USB command can be used to identify the supported USB speed modes, and to determine whether there is hub connection between devices or not (e.g., based on a product type in discover identity command response) . The USB modes can include different standard versions of USB (e.g., USB2, USB3, USB4, etc. ) and / or generations (e.g., USB2 / USB3 (gen1, gen2) , USB4 (gen2, gen3, gen4) , etc. ) . Once the detailed connection information is obtained, USB hardware and software can be started with associated options (e.g., certain modes and / or accessories) to achieve power, memory, latency, etc. savings during device enumeration.
[0020] The described features will be presented in more detail below with reference to FIGS. 1-5.
[0021] As used in this application, the terms “component, ” “module, ” “system” and the like are intended to include a computer-related entity, such as but not limited to hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or thread of execution and a component can be localized on one computer and / or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local and / or remote processes such as in accordance with a signal having one or more data packets, such as data from one component interacting with another component in a local system, distributed system, and / or across a network such as the Internet with other systems by way of the signal.
[0022] As used herein, a processor, at least one processor, and / or one or more processors, individually or in combination, configured to perform or operable for performing a plurality of actions is meant to include at least two different processors able to perform different, overlapping or non-overlapping subsets of the plurality actions, or a single processor able to perform all of the plurality of actions. In one non-limiting example of multiple processors being able to perform different ones of the plurality of actions in combination, a description of a processor, at least one processor, and / or one or more processors configured or operable to perform actions X, Y, and Z may include at least a first processor configured or operable to perform a first subset of X, Y, and Z (e.g., to perform X) and at least a second processor configured or operable to perform a second subset of X, Y, and Z (e.g., to perform Y and Z) . Alternatively, a first processor, a second processor, and a third processor may be respectively configured or operable to perform a respective one of actions X, Y, and Z. It should be understood that any combination of one or more processors each may be configured or operable to perform any one or any combination of a plurality of actions.
[0023] As used herein, a memory, at least one memory, and / or one or more memories, individually or in combination, configured to store or having stored thereon instructions executable by one or more processors for performing a plurality of actions is meant to include at least two different memories able to store different, overlapping or non-overlapping subsets of the instructions for performing different, overlapping or non-overlapping subsets of the plurality actions, or a single memory able to store the instructions for performing all of the plurality of actions. In one non-limiting example of one or more memories, individually or in combination, being able to store different subsets of the instructions for performing different ones of the plurality of actions, a description of a memory, at least one memory, and / or one or more memories configured or operable to store or having stored thereon instructions for performing actions X, Y, and Z may include at least a first memory configured or operable to store or having stored thereon a first subset of instructions for performing a first subset of X, Y, and Z (e.g., instructions to perform X) and at least a second memory configured or operable to store or having stored thereon a second subset of instructions for performing a second subset of X, Y, and Z (e.g., instructions to perform Y and Z) . Alternatively, a first memory, and second memory, and a third memory may be respectively configured to store or have stored thereon a respective one of a first subset of instructions for performing X, a second subset of instruction for performing Y, and a third subset of instructions for performing Z. It should be understood that any combination of one or more memories each may be configured or operable to store or have stored thereon any one or any combination of instructions executable by one or more processors to perform any one or any combination of a plurality of actions. Moreover, one or more processors may each be coupled to at least one of the one or more memories and configured or operable to execute the instructions to perform the plurality of actions. For instance, in the above non-limiting example of the different subset of instructions for performing actions X, Y, and Z, a first processor may be coupled to a first memory storing instructions for performing action X, and at least a second processor may be coupled to at least a second memory storing instructions for performing actions Y and Z, and the first processor and the second processor may, in combination, execute the respective subset of instructions to accomplish performing actions X, Y, and Z. Alternatively, three processors may access one of three different memories each storing one of instructions for performing X, Y, or Z, and the three processor may in combination execute the respective subset of instruction to accomplish performing actions X, Y, and Z. Alternatively, a single processor may execute the instructions stored on a single memory, or distributed across multiple memories, to accomplish performing actions X, Y, and Z.
[0024] The following description provides examples, and is not limiting of the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. For instance, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Also, features described with respect to some examples may be combined in other examples.
[0025] Various aspects or features will be presented in terms of systems that can include a number of devices, components, modules, and the like. It is to be understood and appreciated that the various systems can include additional devices, components, modules, etc. and / or may not include all of the devices, components, modules etc. discussed in connection with the figures. A combination of these approaches can also be used.
[0026] FIG. 1 is a system level block diagram of an example of a USB system 100 including a provider device 102 and a consumer device 132 communicatively coupled via an interface, in accordance with aspects described herein. Provider device 102 can include one or more processors 104 and / or memory / memories 106 configured to execute or store instructions or other parameters related to providing a device policy manager 108, which can manage one or more policies related to USB communications (e.g., via USB port 112) of the provider device 102. For example, processor (s) 104 and memory / memories 106 may be separate components communicatively coupled by a bus (e.g., on a motherboard or other portion of a computing device, on an integrated circuit, such as a system on a chip (SoC) , etc. ) , components integrated within one another (e.g., processor (s) 104 can include the memory / memories 106 as an on-board component) , and / or the like. Memory / memories 106 may store instructions, parameters, data structures, etc. for use / execution by processor (s) 104 to perform functions described herein.
[0027] In an example, processor (s) 104 and / or memory / memories 106 can provide and / or execute device policy manager 108 to control a policy engine 114 associated with source port 110 for enforcing one or more policies regarding using the USB port 112 to communicate, or couple, with one or more other devices, such as consumer device 132, a protocol 116 corresponding to a USB speed mode, and / or a physical layer 118 for communicating according to the USB speed mode. Source port 110 can include a USB-C port control 120 for operating a CC 122 of the USB port 112, which can also be controlled by the device policy manager 108. In addition, device policy manager 108 can control a power source 124 for providing power to the consumer device 132 via VBUS 126 of the USB port 112.
[0028] Consumer device 132 can include one or more processors 134 and / or memory / memories 136 configured to execute or store instructions or other parameters related to providing a device policy manager 138, which can manage one or more policies related to USB communications (e.g., via USB port 142) of the consumer device 132. For example, processor (s) 134 and memory / memories 136 may be separate components communicatively coupled by a bus (e.g., on a motherboard or other portion of a computing device, on an integrated circuit, such as a system on a chip (SoC) , etc. ) , components integrated within one another (e.g., processor (s) 134 can include the memory / memories 136 as an on-board component) , and / or the like. Memory / memories 136 may store instructions, parameters, data structures, etc. for use / execution by processor (s) 134 to perform functions described herein.
[0029] In an example, processor (s) 134 and / or memory / memories 136 can provide and / or execute device policy manager 138 to control a policy engine 144 associated with sink port 140 for enforcing one or more policies regarding using the USB port 142 to communicate, or couple, with one or more other devices, such as provider device 102, a protocol 146 corresponding to a USB speed mode, and / or a physical layer 148 for communicating according to the USB speed mode. Sink port 140 can include a USB-C port control 150 for operating a configuration channel (CC) 152 of the USB port 142, which can also be controlled by the device policy manager 138. In addition, device policy manager 138 can control a power sink 154 for receiving power from the provider device 102 via VBUS 156 of the USB port 142.
[0030] As described herein, a device, such as the provider device 102, consumer device 132, etc., may refer to any device, apparatus, or system configured to perform one or more techniques described herein. For example, a device may be a server, a base station, user equipment, a client device, a station, an access point, a computer, e.g., a personal computer, a desktop computer, a laptop computer, a tablet computer, a computer workstation, or a mainframe computer, an end product, an apparatus, a phone, a smart phone, a server, a video game platform or console, a handheld device, e.g., a portable video game device or a personal digital assistant (PDA) , a wearable computing device, e.g., a smart watch, an augmented reality device, or a virtual reality device, a non-wearable device, a display or display device, a television, a television set-top box, an intermediate network device, a digital media player, a video streaming device, a content streaming device, an in-car computer, any mobile device, any device configured to generate graphical content, or any device configured to perform one or more techniques described herein, and / or which may be equipped with a USB port for such purposes. Processes herein may be described as performed by a particular component (e.g., a CPU or other processor (s) ) , consistent with disclosed embodiments.
[0031] For example, provider device 102 can be a host device that can function as a source device providing power to the consumer device 132, which can function as a sink device. In this regard, for example, provider device 102 can include source port 110 that can be coupled with consumer device 132 via USB port 112, power source 124, such as a battery, power or voltage line coupled with another power source, such as an alternating current (AC) power outlet, etc., that can provide power to the consumer device 132 via USB port 112, etc. USB port 112 can include the CC 122 over which the PD contract can be established between the provider device 102 and the consumer device 132, VBUS 126, which can provide a path to deliver power between the provider device 102 and the consumer device 132, etc.
[0032] In an example, the consumer device 132 can include the sink port 140 that can be coupled with provider device 102 via USB port 142, a power sink 154, such as a battery, which can receive power from the provider device 102 via USB port 142, etc. USB port 142 can include the CC 152 over which the PD contract can be established between the provider device 102 and the consumer device 132, VBUS 156, which can provide a path to receive power from the provider device 102, etc. In this regard, for example, a cable used to couple USB ports 112 and 142 can support the CC 122 and 152 and VBUS 126 and 156 to facilitate configuration and power transfer between the provider device 102 and the consumer device 132. For example, the port on each device 102 and 132 can be a type-C USB port enabled by USB-C port control 120 or 150.
[0033] In accordance with aspects described herein, the devices 102 and 132 can be connected via a cable having a first connector coupled to USB port 112 and a second connector coupled to USB port 142. Connection between the USB ports 112 and 142 can cause the provider device 102 to send, to the consumer device 132, an Enter USB message as part of power negotiation (e.g., during a PD process) , which can indicate certain parameters of the provider device 102, such as downward-facing port (DFP) information of the provider device 102, information of the attached cable, information on the provider device 102 presence and / or alternative mode support, presence bit, etc. Consumer device 132 can receive the information and can operate an upward-facing port (UFP) based on the information. In another example, consumer device 132 can send, to the provider device 102, a discover identity message as part of power negotiation (e.g., during the PD process) , which can indicate certain parameters of the consumer device 132, such as UFP information of the consumer device 132 (e.g., USB mode) , information of the attached cable (e.g., cable identity) , etc. Provider device 102 can receive the information and can operate the DFP based on the information. In one example, consumer device 132 and / or provider device 102 can initiate a role swap for the data role (e.g., DFP / UFP) or power role (e.g., power source / power sink) functions.
[0034] The Enter USB message can include information regarding supported USB speed modes of the provider device 102 and / or the cable connecting the provider device 102 to the consumer device 132. For example, bits 28-30 of the Enter USB message can indicate various USB modes supported by the provider device 102 (e.g., 000 = USB2, 001 =USB3.2, 010 = USB4, etc. ) , and / or bits 21-23 can indicate supported cable speed (e.g., 000 = USB2.0 only with no SuperSpeed (SS) support, 001 = Gen1 (USB3.2) , 010 = Gen2 (USB3.2) and Gen2 (USB4) , 011 = Gen3 (USB4) , 100 = Gen4 (USB4) , etc. ) . Consumer device 132 can use this information to activate a subset of physical layers, accessories, etc. available at the consumer device 132 to support the indicated USB modes without activating physical layers, accessories, etc. for USB modes not indicated as supported (or indicated as unsupported) by the provider device 102 or not indicated as supported (or indicated as unsupported) for the cable connecting the provider device 102 and consumer device 132.
[0035] The discover identity message can similarly include information regarding supported USB speed modes of the consumer device 132. For example, bits 6-7 of the discover identity message can indicate a specification revision (e.g., USB2, USB3, USB4, etc. ) , an indication of product type (e.g., where at least one value can indicate the product is a USB hub) , etc. Provider device 102 can use this information to activate a subset of physical layers, accessories, etc. available at the provider device 102 to support the indicated USB modes without activating physical layers, accessories, etc. for USB modes not indicated as supported (or indicated as unsupported) by the consumer device 132. The provider device 102 can also use USB hub information to determine whether certain physical layers can be or remain deactivated, as described further herein. As described, refraining from activating physical layers that are not used can decrease enumeration latency, decrease resource consumption at the devices 102 and 132, etc.
[0036] FIG. 2 is an illustration of an example of a timeline 200 for USB device connection and enumeration, in accordance with aspects described herein. Timeline 200 can include a CC 202, VBUS 204, and data bus 206 between USB devices. At 210, the USB Type-C spec at each device can detect a valid attach, which can include, at each device, detecting cable attaching to the other device. At 212, the VBUS of the device detecting the valid attach can provide an initial VBUS and VCON to the attached device. At 214, the USB PD spec at each device can establish an explicit power contract with the other device. At 216, the VBUS at the devices can negotiate and provide power (e.g., negotiate which device is the DFP or source and which is the UFP or sink) . At 218, the devices can discover each other’s identities, and at 220, the USB PD spec of at least a first one of the devices can send an Enter USB message to a second one of the devices. As described, the Enter USB message can indicate information regarding USB speed modes supported by the first device, which the second device can use to activate a subset of physical layers, accessories, etc. to support the supported USB speed modes. At 222, the USB4 spec (or other supported USB speed mode) of the first device can communicate with the second device over the data bus to perform USB enumeration. In an example, as described and / or before USB enumeration at 222, the first device may receive a discover identity message from the second device and may use information from the discover identity message to activate a subset of physical layers that support the USB speed modes identified from the discover identity message.
[0037] FIG. 3 illustrates a flow chart of an example of a method 300 for selectively activating physical layers for a portion of supported USB modes of a device, in accordance with aspects described herein. In an example, a provider device 102, consumer device 132, or substantially any device with a USB port can perform the functions described in method 300 shown in FIG. 3 using one or more of the components described in FIGs. 1 or 2.
[0038] In method 300, at Block 302, a PD message can be received, by a first USB device as part of establishing a PD contract with a second USB device, where the PD message indicates a USB mode supported for communications between the first USB device and the second USB device. In an aspect, CC 122 of the provider device 102 operating as the first USB device (e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, USB port 112, etc. ) , can receive, as part of establishing the PD contract with the consumer device 132 operating as the second USB device, the PD message indicating the USB mode supported for communications between the first USB device and the second USB device. In another aspect, CC 152 of the consumer device 132 operating as the first USB device (e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, USB port 142, etc. ) , can receive, as part of establishing the PD contract with the provider device 102 operating as the second USB device, the PD message indicating the USB mode supported for communications between the first USB device and the second USB device.
[0039] For example, the provider device 102 and consumer device 132 can negotiate a PD contract to determine which USB device is to provide power to the other (e.g., which USB device is the power source and which USB device is the power sink) . Establishing the PD contract can occur after a valid attach is detected on the CC 122 or 152, which may occur as described in FIG. 2 in some examples (e.g., after valid attach is detected at 210 on CC 202, the power contract can be established at 214) . In one example, the first USB device can receive the PD message from the second USB device or can receive the PD message (e.g., from an upper layer) for sending to the second USB device. Moreover, as described, the PD message may include an Enter USB message (e.g., Enter USB at 220 described in FIG. 2) , a discover identity message (e.g., discover identity at 218 described in FIG. 2) , etc., and / or the indication of USB mode may correspond to a capability the USB device (s) and / or a cable connecting the USB devices.
[0040] Though shown and described as the provider device 102 having the power source 124 and the consumer device 132 having the power sink 154 above, the provider device 102 and consumer device 132 can perform role swap for the power role, such that the consumer device 132 can have the power source 124 and the provider device 102 can have the power sink 154. This can be part of the PD contract established between the USB devices 102 and 132.
[0041] In method 300, at Block 304, a physical layer for a portion of multiple USB modes supported by the first USB device, including the USB mode indicated in the PD message, can be activated by the first USB device and based on the USB mode. In an aspect, source port 110 of the provider device 102 operating as the first USB device (e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc. ) , can activate, based on the USB mode indicated in the PD message the physical layer 118 (or associated accessories) for a portion of multiple USB modes supported by the first USB device including the USB mode. In another aspect, sink port 140 of the consumer device 132 operating as the first USB device (e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, etc. ) , can activate, based on the USB mode indicated in the PD message the physical layer 148 (or associated accessories) for a portion of multiple USB modes supported by the first USB device including the USB mode. For example, the provider device 102 or consumer device 132, based on the USB mode indicated in the received PD message, can activate only a portion of supported USB modes where a remaining portion of the supported USB modes are not used. As described, for example, where the PD message indicates USB2.0 HS mode, the provider device 102 and / or the consumer device 132 may not activate physical layers 118 and / or 148 for other USB modes (e.g., USB3.0, USB4.0) for USB enumeration (e.g., USB enumeration at 222 in FIG. 2) . For example, the devices may not activate the physical layer for higher speeds where the PD message does not support the higher speeds, as described in various examples herein.
[0042] In an example, the physical layers not activated can remain deactivated for the duration of the communication session between the devices 102 and 132 (e.g., while the cable is connected and coupling the devices 102 and 132) . When the cable is removed, or attach is no longer detected, it is possible that the devices 102 and / or 132 can activate the previously deactivated physical layers for a subsequent connection / cable attach.
[0043] In method 300, at Block 306, a data connection can be established, by the first USB device and based on activating the physical layer, with the second USB device over the physical layer. In an aspect, source port 110 of the provider device 102 operating as the first USB device (e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, USB port 112, etc. ) , can establish, based on activating the physical layer 118, the data connection (e.g., over data bus 206 in FIG. 2) with the second USB device (e.g., consumer device 132) over the physical layer (e.g., using one of the supported speed modes) . In another aspect, sink port 140 of the consumer device 132 operating as the first USB device (e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, USB port 142, etc. ) , can establish, based on activating the physical layer 148, the data connection (e.g., over data bus 206 in FIG. 2) with the second USB device (e.g., provider device 102) over the physical layer (e.g., using one of the supported speed modes) . In an example, the first USB device can perform USB enumeration (e.g., USB enumeration at 222 in FIG. 2) with the second USB device using the supported USB mode.
[0044] In method 300, optionally at Block 308, after establishing the data connection and based on the USB mode indicated in the PD message, a second physical layer for one of the multiple USB modes other than the USB mode can be deactivated. In an aspect, source port 110 of the provider device 102 operating as the first USB device (e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc. ) , can deactivate, after establishing the data connection and based on the USB mode indicated in the PD message, the second physical layer for one of the multiple USB modes other than the USB mode indicated in the PD message. In another aspect, sink port 140 of the consumer device 132 operating as the first USB device (e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, etc. ) , can deactivate, after establishing the data connection and based on the USB mode indicated in the PD message, the second physical layer for one of the multiple USB modes other than the USB mode indicated in the PD message. For example, the provider device 102 or consumer device 132 can activate physical layers 118 or 148 for multiple USB modes, which may include activating a supported USB mode indicated in the PD message and slowed USB speed modes (e.g., USB 2.0 HS is activated where the PD message indicates USB 3.0 SS, but USB 4.0 may not be activated in this case) . For example, such functionality may be based on the USB specification indicating “Entry into [USB 3.2] and [USB4] include entry into [USB 2.0] . ”
[0045] In this example, once the data connection is established (e.g., via data bus 206 in FIG. 2) , the device (s) may deactivate physical layers for any remaining USB modes not used for the data connection (e.g., the device (s) can deactivate physical layer for USB 2.0 HS where the data connection is established using USB 3.0 SS or vice versa) . For example, powering off USB3 PHY and redrive / retimer in unused case can save 5-10mA. If higher USB bandwidth connection (e.g., USB3 / USB4) is built, disabling low throughput components (e.g., USB HS PHY / eUSB repeater for USB2) for power saving, around 3mA can be saved. In one example, the device 102 or 132 having the UFP can deactivate physical layers for the other USB modes, and / or the device 102 or 132 having the DFP can deactivate the physical layers for the other USB modes if the device 102 or 132 is not a hub.
[0046] In method 300, optionally at Block 310, based on detecting reset of the data connection, the second physical layer can be activated. In an aspect, source port 110 of the provider device 102 operating as the first USB device (e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc. ) , can activate, based on detecting reset of the data connection, the second physical layer. In another aspect, sink port 140 of the consumer device 132 operating as the first USB device (e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, etc. ) , can activate, based on detecting reset of the data connection, the second physical layer. For example, where the data connection is reset, the devices 102 and / or 132 may reestablish the data connection using a different supported USB mode, and thus the physical layer for any deactivated supported USB mode can be reactivated at least until the data connection is reestablished. For example, the detected reset can be a data reset as defined in USB specification (e.g., a PD hardware data reset, PD software data reset, cable reset, etc. ) , which can be used to reset the USB data connection, can be sent by DFP or UFP, can preserve power contract, power and data role, can exit activate alternate modes, can reset the cable by power cycling VCONN, where the VCONN source can revert to the DFP and VCONN can be tuned on, and / or when data reset fails, ErrorRecovery (detach and reattach) can be triggered.
[0047] FIG. 4 illustrates a flow chart of an example of a method 400 for selectively activating physical layers for a portion of supported USB modes of a device having a power sink, in accordance with aspects described herein. In an example, a consumer device 132, or substantially any device with a USB port can perform the functions described in method 400 shown in FIG. 4 using one or more of the components described in FIGs. 1 or 2.
[0048] In method 400, at Block 402, a cable can be connected to the consumer device 132. In an aspect, CC 152 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, USB port 142, etc., can detect the cable connected, which can include detecting a valid attach (e.g., as described at 210 on the CC 202 in FIG. 2) . For example, CC 152 can detect a cable connected to the USB port 142 and / or presence of another device (or CC 122 or USB port 112 of a provider device 102) coupled via the cable.
[0049] In method 400, at Block 404, PD source capability information can be received from the partner. In an aspect, CC 152 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, sink port 140, USB port 142, etc., can receive the PD source capability from the partner (e.g., from provider device 102) . For example, CC 152 can receive the PD source capability in a PD message during establishing a PD contract (e.g., at 214 in FIG. 2) .
[0050] In method 400, at Block 406, it can be determined whether USB communication is supported. In an aspect, CC 152 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, sink port 140, etc., can determine whether USB communication is supported by provider device 102. For example, CC 152 can receive one or more messages from the provider device 102 during PD contract negotiation indicating whether the provider device 102 supported USB communication.
[0051] In method 400, at Block 408, a supported speed mode can be determined. In an aspect, CC 152 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, USB port 142, etc., can determine the supported speed mode for the provider device 102, which can be obtained from a PD message, such as Enter USB.
[0052] Where the supported speed mode determined at Block 408 is USB2.0 HS, in method 400, at Block 410, USB2 HS PHY can be initiated, and / or the USB controller can be set to USB 2.0 Transceiver Macrocell Interface (UTMI) mode. In an aspect, sink port 140 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, etc., can initiate USB2 HS PHY (e.g., without initiating other USB PHY layers) , and / or can set the USB controller (e.g., sink port 140) to UMTI mode.
[0053] Where the supported speed mode determined at Block 408 is USB3.0 SS, in method 400, at Block 412, USB2 HS and USB3 SS PHY can be initiated, and / or the USB controller can be set to UTMI+ low pin interface (ULPI) mode. In an aspect, sink port 140 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, etc., can initiate USB2 HS and USB3 SS PHY (e.g., without initiating other USB PHY layers) , and / or can set the USB controller (e.g., sink port 140) to ULPI mode.
[0054] Where the supported speed mode determined at Block 408 is USB4.0, in method 400, at Block 414, USB2 HS and USB3 / 4 PHY can be initiated, and / or the USB controller can be set to USB3 / 4 mode support. In an aspect, sink port 140 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, device policy manager 138, etc., can initiate USB2 HS and USB3 / 4 PHY, and / or can set the USB controller (e.g., sink port 140) to USB3 / 4 mode support.
[0055] In method 400, at Block 416, the USB gadget can be started for enumeration. In an aspect, device policy manager 138 of the consumer device 132, e.g., in conjunction with processor (s) 134, memory / memories 136, USB port 142, etc., can start the USB gadget for enumeration. For example, device policy manager 138 can establish the data connection with the provider device 102 for performing USB enumeration using one of the supported USB modes.
[0056] FIG. 5 illustrates a flow chart of an example of a method 500 for selectively activating physical layers for a portion of supported USB modes of a device having a power source, in accordance with aspects described herein. In an example, a provider device 102, or substantially any device with a USB port can perform the functions described in method 500 shown in FIG. 5 using one or more of the components described in FIGs. 1 or 2.
[0057] In method 500, at Block 502, a cable can be connected to the provider device 102. In an aspect, CC 122 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, USB port 112, etc., can detect the cable connected, which can include detecting a valid attach (e.g., as described at 210 on the CC 202 in FIG. 2) . For example, CC 122 can detect a cable connected to the USB port 112 and / or presence of another device (or CC 152 or USB port 142 of a consumer device 132) coupled via the cable.
[0058] In method 500, at Block 504, power can be negotiated with another device. In an aspect, CC 122 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, source port, 110, USB port 112, etc., can negotiate power with another device (e.g., with consumer device 132) , which can include provider device 102 establishing itself as the power source and / or transmitting a PD source capability to the other device. For example, CC 122 can transmit the PD source capability in a PD message during establishing a PD contract (e.g., at 214 in FIG. 2) .
[0059] In method 500, at Block 506, a discover identity message can be received. In an aspect, CC 122 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, source port 110, USB port 112, etc., can receive the discover identity message for a UFP and / or cable (e.g., from the consumer device 132) , such as discover identity received at 218 in FIG. 2.
[0060] In method 500, at Block 508, a supported speed mode (for the UFP and / or cable identity) can be determined based on the discover identity message. In an aspect, CC 122 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc., can determine the supported speed mode for the consumer device 132 (e.g., for the UFP or cable) .
[0061] Where the supported speed mode determined at Block 508 is USB2.0 HS, in method 500, at Block 510, USB2 HS PHY can be initiated, and / or the USB controller can be set to UTMI mode. In an aspect, source port 110 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc., can initiate USB2 HS PHY (e.g., without initiating other USB PHY layers) , and / or can set the USB controller (e.g., source port 110) to UMTI mode.
[0062] Where the supported speed mode determined at Block 508 is USB3.0 SS, in method 500, at Block 512, USB2 HS and USB3 SS PHY can be initiated, and / or the USB controller can be set to ULPI mode. In an aspect, source port 110 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc., can initiate USB2 HS and USB3 SS PHY (e.g., without initiating other USB PHY layers) , and / or can set the USB controller (e.g., source port 110) to ULPI mode.
[0063] Where the supported speed mode determined at Block 508 is USB4.0, in method 500, at Block 514, USB2 HS and USB3 / 4 PHY can be initiated, and / or the USB controller can be set to USB3 / 4 mode support. In an aspect, source port 110 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, device policy manager 108, etc., can initiate USB2 HS and USB3 / 4 PHY, and / or can set the USB controller (e.g., source port 110) to USB3 / 4 mode support.
[0064] In method 500, at Block 516, the USB XHCI host controller can be started. In an aspect, device policy manager 108 of the provider device 102, e.g., in conjunction with processor (s) 104, memory / memories 106, USB port 112, etc., can start the USB XHCI host controller. Starting the UXB extensible host controller interface (XHCI) controller may enable the data connection to be established with the consumer device 132 for performing USB enumeration using one of the supported USB modes.
[0065] The following aspects are illustrative only and aspects thereof may be combined with aspects of other embodiments or teaching described herein, without limitation.
[0066] Aspect 1 is a method for activating a USB connection including receiving, by a first USB device as part of establishing a PD contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device, activating, by the first USB device and based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode, and establishing, by the first USB device and based on activating the physical layer, a data connection with the second USB device over the physical layer.
[0067] In Aspect 2, the method of Aspect 1 includes wherein the USB mode indicated in the PD message includes one or more of a USB mode supported by the second USB device or a USB mode supported by a cable connecting the first USB device and the second USB device.
[0068] In Aspect 3, the method of any of Aspects 1 or 2 includes wherein the first USB device is a sink device, and wherein the PD message is a enter USB command.
[0069] In Aspect 4, the method of any of Aspects 1 to 3 includes wherein the first USB device is a source device, and wherein the PD message is a discover identity message.
[0070] In Aspect 5, the method of any of Aspects 1 to 4 includes deactivating, after establishing the data connection and based on the USB mode indicated in the PD message, a second physical layer for one of the multiple USB modes other than the USB mode.
[0071] In Aspect 6, the method of Aspect 5 includes wherein deactivating the second physical layer is based on detecting that the second USB device is not a USB hub.
[0072] In Aspect 7, the method of any of Aspects 5 or 6 includes activating, based at least in part on detecting a reset of the data connection, the second physical layer.
[0073] In Aspect 8, the method of any of Aspects 1 to 7 includes wherein the multiple USB modes include USB2, USB3, and USB4, and wherein activating the physical layer includes one of activating the physical layer for USB2 based on the PD message indicating USB2 mode, and setting a USB controller of the first USB device to (USB2 transceiver macrocell interface) UTMI mode, activating a first physical layer for USB2 and a second physical layer for USB3 based on the PD message indicating USB3 mode, and setting a USB controller of the first USB device to UTMI low pin interface (ULPI) mode, or activating a first physical layer for USB2, a second physical layer for USB3, and a third physical layer for USB4 based on the PD message indicating USB4 mode and setting a USB controller of the first USB device to USB3 / 4 mode support.
[0074] Aspect 9 is an apparatus including one or more processors, one or more memories coupled with the one or more processors, and instructions stored in the one or more memories and operable, when executed by the one or more processors, to cause the apparatus to perform any of the methods of Aspects 1 to 8.
[0075] Aspect 10 is an apparatus including means for performing any of the methods of Aspects 1 to 8.
[0076] Aspect 11 is one or more computer-readable media including code executable by one or more processors, the code including code for performing any of the methods of Aspects 1 to 8.
[0077] The above detailed description set forth above in connection with the appended drawings describes examples and does not represent the only examples that may be implemented or that are within the scope of the claims. The term “example, ” when used in this description, means “serving as an example, instance, or illustration, ” and not “preferred” or “advantageous over other examples. ” The detailed description includes specific details for the purpose of providing an understanding of the described techniques. These techniques, however, may be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form in order to avoid obscuring the concepts of the described examples.
[0078] Information and signals may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, computer-executable code or instructions stored on a computer-readable medium, or any combination thereof.
[0079] The various illustrative blocks and components described in connection with the disclosure herein may be implemented or performed with a specially programmed device, such as but not limited to a processor, a digital signal processor (DSP) , an ASIC, a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination thereof designed to perform the functions described herein. A specially programmed processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A specially programmed processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
[0080] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored on or transmitted over as one or more instructions or code on a non-transitory computer-readable medium. Other examples and implementations are within the scope and spirit of the disclosure and appended claims. For example, due to the nature of software, functions described above can be implemented using software executed by a specially programmed processor, hardware, firmware, hardwiring, or combinations of any of these. Features implementing functions may also be physically located at various positions, including being distributed such that portions of functions are implemented at different physical locations. Also, as used herein, including in the claims, “or” as used in a list of items prefaced by “at least one of” indicates a disjunctive list such that, for example, a list of “at least one of A, B, or C” means A or B or C or AB or AC or BC or ABC (i.e., A and B and C) .
[0081] Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage medium may be any available medium that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) , or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, include compact disc (CD) , laser disc, optical disc, digital versatile disc (DVD) , floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above are also included within the scope of computer-readable media.
[0082] The previous description of the disclosure is provided to enable a person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the common principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Furthermore, although elements of the described aspects and / or embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated. Additionally, all or a portion of any aspect and / or embodiment may be utilized with all or a portion of any other aspect and / or embodiment, unless stated otherwise. Thus, the disclosure is not to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1.A first universal serial bus (USB) device, comprising:one or more processors;one or more memories coupled with the one or more processors; andinstructions stored in the one or more memories and operable, when executed by the one or more processors, to cause the first USB device to:receive, as part of establishing a power delivery (PD) contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device;activate, based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode; andestablish, based on activating the physical layer, a data connection with the second USB device over the physical layer.2.The first USB device of claim 1, wherein the USB mode indicated in the PD message includes one or more of a USB mode supported by the second USB device or a USB mode supported by a cable connecting the first USB device and the second USB device.3.The first USB device of claim 1, wherein the first USB device is a sink device, and wherein the PD message is a enter USB command.4.The first USB device of claim 1, wherein the first USB device is a source device, and wherein the PD message is a discover identity message.5.The first USB device of claim 1, wherein the instructions, when executed by the one or more processors, cause the first USB device to deactivate, after establishing the data connection and based on the USB mode indicated in the PD message, a second physical layer for one of the multiple USB modes other than the USB mode.6.The first USB device of claim 5, wherein the instructions, when executed by the one or more processors, cause the first USB device to deactivate the second physical layer based on detecting that the second USB device is not a USB hub.7.The first USB device of claim 5, wherein the instructions, when executed by the one or more processors, cause the first USB device to activate, based at least in part on detecting a reset of the data connection, the second physical layer.8.The first USB device of claim 1, wherein the multiple USB modes include USB2, USB3, and USB4, and wherein the instructions, when executed by the one or more processors, cause the first USB device to activate the physical layer including one of:activating the physical layer for USB2 based on the PD message indicating USB2 mode, and setting a USB controller of the first USB device to (USB2 transceiver macrocell interface) UTMI mode;activating a first physical layer for USB2 and a second physical layer for USB3 based on the PD message indicating USB3 mode, and setting a USB controller of the first USB device to UTMI low pin interface (ULPI) mode; oractivating a first physical layer for USB2, a second physical layer for USB3, and a third physical layer for USB4 based on the PD message indicating USB4 mode and setting a USB controller of the first USB device to USB3 / 4 mode support.9.A method for activating a universal serial bus (USB) connection, comprising:receiving, by a first USB device as part of establishing a power delivery (PD) contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device;activating, by the first USB device and based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode; andestablishing, by the first USB device and based on activating the physical layer, a data connection with the second USB device over the physical layer.10.The method of claim 9, wherein the USB mode indicated in the PD message includes one or more of a USB mode supported by the second USB device or a USB mode supported by a cable connecting the first USB device and the second USB device.11.The method of claim 9, wherein the first USB device is a sink device, and wherein the PD message is a enter USB command.12.The method of claim 9, wherein the first USB device is a source device, and wherein the PD message is a discover identity message.13.The method of claim 9, further comprising deactivating, after establishing the data connection and based on the USB mode indicated in the PD message, a second physical layer for one of the multiple USB modes other than the USB mode.14.The method of claim 13, wherein deactivating the second physical layer is based on detecting that the second USB device is not a USB hub.15.The method of claim 13, further comprising activating, based at least in part on detecting a reset of the data connection, the second physical layer.16.The method of claim 9, wherein the multiple USB modes include USB2, USB3, and USB4, and wherein activating the physical layer includes one of:activating the physical layer for USB2 based on the PD message indicating USB2 mode, and setting a USB controller of the first USB device to (USB2 transceiver macrocell interface) UTMI mode;activating a first physical layer for USB2 and a second physical layer for USB3 based on the PD message indicating USB3 mode, and setting a USB controller of the first USB device to UTMI low pin interface (ULPI) mode; oractivating a first physical layer for USB2, a second physical layer for USB3, and a third physical layer for USB4 based on the PD message indicating USB4 mode and setting a USB controller of the first USB device to USB3 / 4 mode support.17.A computer-readable medium, comprising code executable by one or more processors for activating a universal serial bus (USB) connection, the code comprising code for:receiving, by a first USB device as part of establishing a power delivery (PD) contract with a second USB device, a PD message indicating a USB mode supported for communications between the first USB device and the second USB device;activating, by the first USB device and based on the USB mode, a physical layer for a portion of multiple USB modes supported by the first USB device including the USB mode; andestablishing, by the first USB device and based on activating the physical layer, a data connection with the second USB device over the physical layer.18.The computer-readable medium of claim 17, wherein the USB mode indicated in the PD message includes one or more of a USB mode supported by the second USB device or a USB mode supported by a cable connecting the first USB device and the second USB device.19.The computer-readable medium of claim 17, wherein the first USB device is a sink device, and wherein the PD message is a enter USB command.20.The computer-readable medium of claim 17, wherein the first USB device is a source device, and wherein the PD message is a discover identity message.