The invention is related to an electronic device, and particularly to a universal serial bus (USB) device and an operating method thereof.
In order to reduce the size of electronic device, it is better for electronic device to be equipped with less number of connector. For example, some smart phones are only equipped with one universal serial bus type C (USB type-C, also referred to as USB-C) connector. More smart phones are only equipped with one USB-C connector while the 3.5 mm audio-jack is removed. The USB-C connector on smart phone may be regarded as downstream facing port (DFP). When charger is connected to the USB-C connector, smart phone is charged through the charger. When the earphone is connected to the USB-C connector, user can listen to the music played by the smart phone through the earphone. No matter under what circumstances, when the earphone is connected to the USB-C connector, the user cannot use the charger to charge the smart phone, and vice versa. Since there is a small number of DFP equipped on electronic device, the use of DFP on electronic device is limited.
The invention provides a universal serial bus (USB) device and an operating method thereof to release limit to the use of downstream facing port (DFP) of host.
The embodiment of the invention provides a USB device. The USB device includes a plurality of DFPs, a plurality of physical layer circuits and a control circuit. The physical layer circuits are coupled to a configuration channel pin (CC pin) of the DFPs one by one. The control circuit is coupled to the physical layer circuits. The control circuit dynamically defines the DFPs by controlling the physical layer circuits. When a first external device is connected to a first DFP of the plurality of DFP s and a second DFP of the plurality of DFP is not connected to any external device, the control circuit maintains the first DFP as one of a power source port and a power sink port according to the first external device, and maintains the second DFP as the other one of the power source port and the power sink port regardless of whether the second DFP is connected to a second external device later until the first external device is removed from the first DFP.
An embodiment of the invention provides an operating method of a USB device. The operating method includes the following steps. When a first external device is connected a first DFP of the plurality of DFPs, and a second DFP of the plurality of DFPs is not connected to any external device, the first DFP is maintained as one of a power source port and a power sink port by a control circuit according to the first external device, and a second DFP is maintained as the other one of the power source port and the power sink port regardless of whether the second DFP is connected to a second external device later until the first external device is removed from the first DFP.
Based on the above, through the USB device and the operating method of the embodiments of the invention, the provided two DFPs may respectively dynamically serve as any one of the power source port and the power sink port. When the external device is connected to the first DFP and the second DFP is not connected to any external device, the first DFP is dynamically set as one of the power source port and the power sink port according to the first external device, and the second DFP is dynamically set as the other one of the power source port and the power sink port. Under the condition that the external device is still connected to the first DFP, no matter whether the second DFP is connected to any external device, the role of the second DFP is not changed until the first external device is removed from the first DFP. When the USB device of the embodiment is connected to the DFP of host, the USB device can release the limit to the use of DFP of host.
In order to make the aforementioned features and advantages of the disclosure more comprehensible, embodiments accompanying figures are described in detail below.
“Coupling” (or connecting) used in the full disclosure (including the claims) can refer to any direct or indirect connection means. For example, in the disclosure, if the first apparatus is coupled to (or connected to) the second apparatus, it should be interpreted that the first apparatus can be directly connected to the second apparatus, or the first apparatus can be indirectly connected to the second apparatus through another apparatus or a certain connection means. In addition, where possible, the components/the elements/the steps in the drawings and the embodiments herein share the same or similar reference numerals. In different embodiments, the components/the elements/the steps having the same reference numerals or using the same wording may cross-reference to related descriptions.
In some application circumstances, the number of universal serial bus (USB) connector for an electronic device (referred to as “host” hereafter) may not be sufficient. For example, some smart phones (host) are only equipped with one USB t e-C (USB-C) connector, since the number of the USB connector for host is small, the use of USB connector for host is limited. In order to release the limit to the use of USB connector for host, typically a USB hub is used to increase the number of USB connector for host. No matter under what circumstances, a large circuit area is required for conventional USB hub to provide complete function in each of the USB connectors. That is, the size of conventional USB hub is big, which makes it inconvenient to be carried as a portable product. Furthermore, in order for the USB hub to provide complete function in each of the USB connectors, it is inevitable that the power consumption of conventional USB hub is large.
The following embodiments provide a USB device capable of releasing the limit to the use of USB connector for host. It is not required to use complicated circuit like USB hub, the USB device can use simple a switch circuit to switch data transmission path and thus the USB device can save circuit area and power.
The USB device 100 further includes a plurality of physical layer circuits. The physical layer circuits are coupled to a configuration channel pin (CC pin) of the USB connectors of the USB device 100 one by one. For example, the UFP 140 is coupled to the CC pin of the UFP 110, the physical layer circuit 150 is coupled to the CC pin of the DFP 120, and the physical layer circuit 160 is coupled to the CC pin of the DFP 130. A control circuit 170 is coupled to the physical layer circuits 140, 150 and 160. The control circuit 170 is coupled to an upstream physical layer circuit 140. The control circuit 170 transmits configuration information to the host 10 through the CC pin of the upstream physical layer circuit 140 and the UFP 110. The control circuit 170 dynamically defines the role of the DFP 120 and the DFP 130 by controlling the physical layer circuits 150 and 160.
Depending on actual needs, the DFP 120 and/or DFP 130 may be connected to any external device (e.g., external device 20 and external device 30 shown in
When the first external device is connected to one (referred to as first DFP hereafter) of the DFPs 120 and 130, and the other one (referred to as second DFP hereafter) of the DFPs 120 and 130 is not connected to any external device, the control circuit 170 maintains the first DFP as one of the power source port and the power sink port according to the first external device, and maintains the second DFP as the other one of the power source port and the power sink port regardless of whether the second DFP is connected to a second external device later until the first external device is removed from the first DFP. The power source port may supply power to the external device, and the power sink port may receive power from the external device.
For example, assuming that the external device 20 is a power source device (e.g., charger), when the charger (external device 20) is connected to the DFP 120 and the DFP 130 is not connected to any external device, the control circuit 170 may maintain the DFP 120 as the power sink port and maintains the DFP 130 as power source port regardless of whether any external device is connected to the DFP 130 later until the external device 20 is removed from the DFP 120. In another application circumstances, assuming that the external device 30 is a power source device (e.g., charger), when the charger (external device 30) is connected to the DFP 130 and the DFP 120 is not connected to any external device, the control circuit 170 may maintain the DFP 130 as the power sink port and maintain the DFP 120 as the power source port regardless of whether any external device is connected to the DFP 120 later until the external device 30 is removed from the DFP 130.
In another example, assuming that the external device 20 is a power sink device (e.g., earphone), when the host 10 is connected to the UFP 110 and the earphone (external device 20) is connected to the DFP 120 and the DFP 130 is not connected to any external device, the control circuit 170 may maintain the DFP 120 as the power source port and maintain the DFP 130 as the power sink port regardless of whether any external device is connected to the DFP 130 later until the external device 20 is removed from the DFP 120. In another application circumstances, assuming that the external device 30 is a power sink device (e.g., earphone), when the host 10 is connected to the DFP 110 and the earphone (external device 30) is connected to the DFP 130 and the DFP 120 is not connected to any external device, the control circuit 170 may maintain the DFP 130 as the power source port and maintain the DFP 120 as the power sink port regardless of whether any external device is connected to the DFP 120 later until the external device 30 is removed from the DFP 130.
In the embodiment shown in
The control circuit 170 controls the data switching circuit 180 according to the connection condition of the DFP 120 and the DFP 130 such that the common terminal CM is selectively connected to the first selecting terminal S1 or the second selecting terminal S2. When the DFP 120 is defined as the power source port and the DFP 130 is defined as the power sink port, the control circuit 170 controls the data switching circuit 180 such that the common terminal CM is selectively connected to the first selecting terminal S1. When the DFP 120 is defined as the power sink port and the DFP 130 is defined as the power source port, the control circuit 170 controls the data switching circuit 180 such that the common terminal CM is selectively connected to the second selecting terminal S2.
Depending on the need of design, in some embodiments, the upstream physical layer circuit 140, the physical layer circuit 150, the physical layer circuit 160, the control circuit 170 and the data switching circuit 180 may be integrated into the same integrated circuit. In some other embodiments, the upstream physical layer circuit 140, the physical layer circuit 150 and the control circuit 170 may be integrated into one integrated circuit, the physical layer circuit 160 may be integrated into another integrated circuit (e.g., type-c port controller, TCPC integrated circuit), and the data switching circuit 180 may be another integrated circuit, wherein the communication interface among the integrated circuits may be an inter-integrated circuit (I2C) interface, general purpose input/output (GPIO) interface and/or other communication interfaces.
In the embodiment shown in
The control circuit 170 controls the power switch PSW1, the power switch PSW2, the power switch PSW3, the power supply switch PS1 and the power supply switch PS2 according to the connection condition of the UFP 110, the DFP 120 and the DFP 130. For example, assuming that the external device 20 connected to the DFP 120 is an earphone, and the external device 30 connected to the DFP 130 is a charger. As described above, the DFP 120 is set as the power source port and the DFP 130 is set as the power sink port until the external device 20 and the external device 30 are removed. When the DFP 120 is defined as the power source port and the DFP 130 is defined as the power sink port, the power switch PSW2 and the power supply switch PS2 are turned off, and the power switch PSW1, the power switch PSW3 and the power supply switch PS1 are turned on. At this time, the charger (external device 30) may supply power to the host 10 and the power supply circuit 290 through the DFP 130 and the power switch PSW3, and the power supply circuit 290 may supply power to the earphone (external device 20) through the power supply switch PS1 and the DFP 120.
In yet another example, assuming that the external device 20 connected to the DFP 120 is a charger, and the external device 30 connected to the DFP 130 is an earphone. As described above, the DFP 120 is set as the power sink port, and the DFP 130 is set as the power source port until the external device 20 and the external device 30 are removed. When the DFP 120 is defined as the power sink port and the DFP 130 is defined as the power source port, the power switch PSW3 and the power supply switch PS1 are turned off, and the power switch PSW1, the power switch PSW2 and the power supply switch PS2 are turned on. At this time, the charger (external device 20) may supply power to the host 10 and the power supply circuit 290 through the DFP 120 and the power switches PSW1 and PSW2, and the power supply circuit 290 may supply power to the earphone (external device 30) through the power supply switch PS2 and the DFP 130.
In still another example, assuming that the power pin of the UFP 110, the power pin of the DFP 120 and the power pin of the DFP 130 are rated at the same voltage level (e.g., +5 volts), then the power switch PSW1, the power switch PSW2, the power switch PSW3, the power supply circuit 290, the power supply switch PS1 and the power supply switch PS2 may be omitted depending on the need of design. That is, the power pin of the UFP 110, the power pin of the DFP 120 and the power pin of the DFP 130 may be electrically connected to each other without the power switch.
The resistor circuit 152 is coupled to the CC pin of the DFP 120. When the DFP 120 is not connected to any external device, the control circuit 170 controls the resistor circuit 152 such that the resistor circuit 152 applies one of pull-up resistor Rp and pull-down resistor Rd alternately at different times to the CC pin of the DFP 120. Therefore, when the external device (e.g., external device 20 shown in
When the power source device (external device) is connected to the DFP 120, the control circuit 170 controls the resistor circuit 152 such that the resistor circuit 152 keeps applying the pull-down resistor Rd to the CC pin of the DFP 120 in the period when the DFP 120 is connected to the power source device. That is, in the period when the power source device (external device) is connected to the DFP 120, the DFP 120 is set as the power sink port until the power source device is removed from the DFP 120. When the power sink device (external device) is connected to the DFP 120, the control circuit 170 controls the resistor circuit 152 such that the resistor circuit 152 keeps applying pull-up resistor Rp to the CC pin of the DFP 120 in the period when the DFP 120 is connected to the power sink device. That is, in the period when the power sink device (external device) is connected to the DFP 120, the DFP 120 is set as the power source port until the power sink device is removed from the DFP 120.
The block of the control circuit 170 may be realized as logic circuit (hardware) formed on integrated circuit and may be realized as software by using a central processing unit (CPU). In the latter case, related function of the control circuit 170 may be realized as programming codes of software (i.e., program). For example, general programming languages (e.g., C or C++) or other suitable programming languages may be used to realize the control circuit 170. The software (e.g., program) may be read by computer (or CPU), and may be recorded/stored in read only memory (ROM), a storage device (referred to as “recording media”) and/or random access memory (RAM). Also, the program may be read and executed from the recording media by computer (or CPU), thereby achieving related function. “Non-transitory computer readable medium” such as tape, disk, card, semiconductor memory or programmable logic circuit may be used as the recording media. Meanwhile, the program may be provided to the computer (or CPU) through any transmission media (communication network or radio wave etc.). The communication network may be Internet, wired communication, wireless communication or other communication medium.
In different application circumstances, related function of the control circuit 170 may be realized as firmware or hardware by using general programming languages (e.g., C or C++), hardware description languages (e.g., Verilog HDL or VHDL) or other suitable programming languages. For realizing hardware, one or more controllers, microcontroller, microprocessor, application-specific integrated circuit (ASIC), digital signal processor (DSP), field programmable gate array (FPGA) and/or various logic blocks, modules and circuits in other processing units may be used to realize or perform the functions described in the embodiments of the invention. Additionally, the device and the method of the invention may be realized through a combination of hardware, firmware and/software.
In summary, through the USB device and the operating method of the embodiments of the invention, the provided two DFPs 120 and 130 may respectively dynamically serve as any one of the power source port and the power sink port. Therefore, the USB device described in the embodiments of the invention can release the limit to the use of the DFP 11 of the host 10. When the external device is connected to the first DFP (one of DFPs 120 and 130) and the second DFP (the other one of DFPs 120 and 130) is not connected to any external device, the first DFP is dynamically set as one of the power source port and the power sink port according to the external device, and the second DFP is dynamically set as the other one of the power source port and the power sink port. Under the condition that the external device is still connected to the first DFP, no matter whether the second DFP is connected to any external device, the role of the second DFP is not changed until the external device is removed from the first DFP.
Although the invention has been disclosed by the above embodiments, the embodiments are not intended to limit the invention. It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the invention without departing from the scope or spirit of the invention. Therefore, the protecting range of the invention falls in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
107125971 | Jul 2018 | TW | national |
This application claims the priority benefits of U.S. provisional application Ser. No. 62/623,488, filed on Jan. 29, 2018 and Taiwan application serial no. 107125971, filed on Jul. 27, 2018. The entirety of each of the above-mentioned patent applications is hereby incorporated by reference herein and made a part of this specification.
Number | Name | Date | Kind |
---|---|---|---|
9727109 | Hundal et al. | Aug 2017 | B2 |
20130191653 | Shih | Jul 2013 | A1 |
20160216750 | Hundal | Jul 2016 | A1 |
20160216757 | Kim | Jul 2016 | A1 |
20170220090 | Kim | Aug 2017 | A1 |
20170293335 | Dunstan et al. | Oct 2017 | A1 |
20170351638 | Chen | Dec 2017 | A1 |
20180012559 | Hundal et al. | Jan 2018 | A1 |
20180032350 | Lee | Feb 2018 | A1 |
20180052432 | Kim | Feb 2018 | A1 |
20180341310 | Lambert | Nov 2018 | A1 |
20190068479 | Fu | Feb 2019 | A1 |
Number | Date | Country |
---|---|---|
102567238 | Jul 2012 | CN |
103425613 | Dec 2013 | CN |
104021101 | Sep 2014 | CN |
104731737 | Jun 2015 | CN |
I428761 | Mar 2014 | TW |
Entry |
---|
“Office Action of Taiwan Counterpart Application”, dated May 30, 2019, p. 1-p. 4. |
“Office Action of China Counterpart Application”, dated Feb. 3, 2020, p. 1-p. 8. |
Apple Inc et al., Universal Serial Bus Type-C Cable and connector Specification, 2017 USB 3.0 Promoter Group, Jul. 14, 2017, Release 1.3, p. 1-247. |
Number | Date | Country | |
---|---|---|---|
20190235593 A1 | Aug 2019 | US |
Number | Date | Country | |
---|---|---|---|
62623488 | Jan 2018 | US |