USB control circuit with built-in bypass function

A USB hub device includes an upstream port and a downstream port. A USB control circuit of the USB control circuit includes an upstream interface; a downstream interface; a first switch circuit for coupling with the upstream port; a second switch circuit for coupling with the downstream port; a control signal transmission interface coupled with the first switch circuit and the second switch circuit; and a control unit, coupled with the control signal transmission interface, configured to operably control the first switch circuit and the second switch circuit through the control signal transmission interface, so that the first switch circuit selectively couples one of the upstream interface and the second switch circuit with the upstream port, while the second switch circuit selectively couples one of the downstream interface and the first switch circuit with the downstream port.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority to Patent Application No. 201510393757.6, filed in China on Jul. 7, 2015; the entirety of which is incorporated herein by reference for all purposes.

BACKGROUND

The disclosure generally relates to a USB control circuit and, more particularly, to a USB control circuit with built-in bypass function.

The USB hub device is a common data transmission equipment and utilized for converting and dispatching data between a USB host device and a USB peripheral device. The USB hub device includes an upstream port for connecting with the USB host device and a downstream port for connecting with the USB peripheral device.

The supplementary specification of the USB protocol has defined an On-the-Go (OTG) function, which allows a USB peripheral device supporting the OTG function (a.k.a. an OTG device) to selectively play the role of a USB host device or a USB peripheral device in different situations. Accordingly, the OTG device is categorized as a dual role device.

However, the devices to be connected to the upstream port and the downstream port of the conventional USB hub device are not swappable. Otherwise, data communication between the USB host device and the USB peripheral device cannot be conducted successfully through the conventional USB hub device. For example, when the OTG device is connected to the upstream port of the conventional USB hub device, the OTG device is only allowed to play the role of a USB host device, and not allowed to play the role of a USB peripheral device. On the other hand, when the OTG device is connected to the downstream port of the conventional USB hub device, the OTG device is only allowed to play the role of a USB peripheral device, and not allowed to play the role of a USB host device.

As a result, when two OTG devices are respectively connected to the upstream port and the downstream port of the conventional USB hub device, the roles of the two OTG devices are restricted and cannot be swapped.

It is apparent that the conventional USB hub device severely restricts the functions of the OTG devices, thereby reducing the usage flexibility of the OTG devices.

SUMMARY

An example embodiment of a USB control circuit of a USB hub device is disclosed. The USB hub device comprises an upstream port and a downstream port. The USB control circuit comprises: an upstream interface; a downstream interface; a first switch circuit, utilized for coupling with the upstream port; a second switch circuit, utilized for coupling with the downstream port; a control signal transmission interface, coupled with the first switch circuit and the second switch circuit; and a control unit, coupled with the control signal transmission interface, arranged to operably control the first switch circuit and the second switch circuit through the control signal transmission interface, so that the first switch circuit selectively couples one of the upstream interface and the second switch circuit to the upstream port while the second switch circuit selectively couples one of the downstream interface and the first switch circuit to the downstream port; wherein when the control unit controls the first switch circuit to couple the second switch circuit to the upstream port, the control unit controls the second switch circuit to couple the first switch circuit to the downstream port.

Both the foregoing general description and the following detailed description are examples and explanatory only, and are not restrictive of the invention as claimed.

DETAILED DESCRIPTION

Reference is made in detail to embodiments of the invention, which are illustrated in the accompanying drawings. The same reference numbers may be used throughout the drawings to refer to the same or like parts, components, or operations.

FIG. 1shows a simplified functional block diagram of a USB hub device100according to one embodiment of the present disclosure. The USB hub device100comprises an upstream port102, a downstream port104, and a USB control circuit110. In the embodiment ofFIG. 1, the USB control circuit110comprises an upstream interface111, a downstream interface112, a first switch circuit113, a second switch circuit114, a control signal transmission interface115, a command receiving interface116, and a control unit117.

In the USB control circuit110, the first switch circuit113is utilized for coupling with the upstream port102. The second switch circuit114is utilized for coupling with the downstream port104. The control signal transmission interface115is coupled with the first switch circuit113and the second switch circuit114. The command receiving interface116is coupled with the control unit117, and arranged to operably receive a predetermined command from an external circuit, such as a switch device of a button arranged on the USB hub device100. The control unit117is coupled with the control signal transmission interface115, and arranged to operably control the first switch circuit113and the second switch circuit114through the control signal transmission interface115, so that the first switch circuit113selectively couples one of the upstream interface111and the second switch circuit114to the upstream port102while the second switch circuit114selectively couples one of the downstream interface112and the first switch circuit113to the downstream port104.

As shown inFIG. 1, a first signal channel121is arranged between the first switch circuit113and the upstream interface111; a second signal channel122is arranged between the second switch circuit114and the downstream interface112; and a third signal channel123is arranged between the first switch circuit113and the second switch circuit114. In practice, each of the first switch circuit113and the second switch circuit114can be realized with a multiplexer.

The control unit117may control the first switch circuit113to switch to either the first signal channel121or the third signal channel123while control the second switch circuit114to switch to either the second signal channel122or the third signal channel123, so as to change the operating mode of the USB hub device100.

Under the control of the control unit117, the USB hub device100may be configured to operate in a common mode or in a bypass mode.

Please refer toFIG. 2, which shows a simplified schematic architecture of the USB hub device100when it operating in a common mode.

The control unit117may control the first switch circuit113to switch to the first signal channel121through the control signal transmission interface115, and also control the second switch circuit114to switch to the second signal channel122through the control signal transmission interface115, so as to configure the USB hub device100to operate in the common mode. In this situation, the third signal channel123is in an inactive status, and thus illustrated with a dotted line.

In other words, the control unit117controls the first switch circuit113to couple the upstream interface111to the upstream port102and also controls the second switch circuit114to couple the downstream interface112to the downstream port104in the common mode. That is, when the control unit117controls the first switch circuit113to couple the upstream interface111to the upstream port102, the control unit117also simultaneously controls the second switch circuit114to couple the downstream interface112to the downstream port104.

In the common mode, the USB hub device100functions like a conventional USB hub device and acts as a data intermediate device between a device connecting to the upstream port102and a device connecting to the downstream port104. Accordingly, the upstream port102of the USB hub device100can be employed to connect to a USB host device or a first OTG device playing the role of the USB host device, while the downstream port104can be employed to connect to a USB peripheral device or a second OTG device playing the role of the USB peripheral device.

Please refer toFIG. 3, which shows a simplified schematic architecture of the USB hub device100when it operating in a bypass mode.

The control unit117may control the first switch circuit113to switch to the third signal channel123through the control signal transmission interface115, and also control the second switch circuit114to switch to the third signal channel123through the control signal transmission interface115, so as to configure the USB hub device100to operate in the bypass mode. In this situation, the first signal channel121and the second signal channel122are both in an inactive status, and thus illustrated with dotted lines.

In other words, the control unit117controls the first switch circuit113to couple the second switch circuit114to the upstream port102and also controls the second switch circuit114to couple the first switch circuit113to the downstream port104in the bypass mode. That is, when the control unit117controls the first switch circuit113to couple the second switch circuit114to the upstream port102, the control unit117also simultaneously controls the second switch circuit114to couple the first switch circuit113to the downstream port104.

In the bypass mode, the upstream interface111and the downstream interface112of the USB hub device100are both bypassed by a bypass structure formed by the first switch circuit113and the second switch circuit114. In this situation, the roles of the devices connecting to the upstream port102and the downstream port104are no longer restricted.

For example, in the situation where the upstream port102is connected to a first OTG device, the downstream port104is connected to a USB host device or a second OTG device playing the role of a USB host device, the first switch circuit113couples the second switch circuit114to the upstream port102, and the second switch circuit114couples the first switch circuit113to the downstream port104, the first OTG device is enabled to operate as a USB peripheral device and to communicate data with the second OTG device (or the USB host device) through the third signal channel123.

For another example, in the situation where the upstream port102is connected to a first OTG device, the downstream port104is connected to a USB peripheral device or a second OTG device playing the role of a USB peripheral device, the first switch circuit113couples the second switch circuit114to the upstream port102, and the second switch circuit114couples the first switch circuit113to the downstream port104, the first OTG device is enabled to operate as a USB host device and to communicate data with the second OTG device (or the USB peripheral device) through the third signal channel123.

For another example, in the situation where the upstream port102is connected to a USB host device or a first OTG device playing the role of a USB host device, the downstream port104is connected to a second OTG device, the first switch circuit113couples the second switch circuit114to the upstream port102, and the second switch circuit114couples the first switch circuit113to the downstream port104, the second OTG device is enabled to operate as a USB peripheral device and to communicate data with the first OTG device (or the USB host device) through the third signal channel123.

For another example, in the situation where the upstream port102is connected to a USB peripheral device or a first OTG device playing the role of a USB peripheral device, the downstream port104is connected to a second OTG device, the first switch circuit113couples the second switch circuit114to the upstream port102, and the second switch circuit114couples the first switch circuit113to the downstream port104, the second OTG device is enabled to operate as a USB host device and to communicate data with the first OTG device (or the USB peripheral device) through the third signal channel123.

It can be appreciated from the foregoing descriptions, in the bypass mode, the upstream port102of the USB hub device100can be employed to connect to a USB peripheral device or a first OTG device playing the role of the USB peripheral device, while the downstream port104can be employed to connect to a USB host device or a second OTG device playing the role of the USB host device. Alternatively, the upstream port102of the USB hub device100can be employed to connect to a USB host device or a first OTG device playing the role of the USB host device, while the downstream port104can be employed to connect to a USB peripheral device or a second OTG device playing the role of the USB peripheral device. From another aspect, an OTG device connecting to the upstream port102in the bypass mode is enabled to operate as a USB peripheral device. Similarly, an OTG device connecting to the downstream port104in the bypass mode is enabled to operate as a USB host device.

In the bypass mode, since the upstream interface111and the downstream interface112of the USB hub device100are bypassed, the upstream interface111and the downstream interface112may be temporarily turned off to reduce the power consumption of the USB hub device100. In addition, since the upstream port102and the downstream port104transmit signals through the third signal channel123in the bypass mode without using the upstream interface111and the downstream interface112as intermediate circuits, the signal transmission delay can be reduced, thereby improving the transmission efficiency between the upstream port102and the downstream port104.

In practice, the default operating mode of the USB hub device100may be configured to be the common mode, and the operating mode of the USB hub device100may be switched to the bypass mode when the control unit117receives a predetermined command That is, when the control unit117receives a predetermined command, the control unit117may control the first switch circuit113to couple the second switch circuit114to the upstream port102and also control the second switch circuit114to couple the first switch circuit113to the downstream port104.

In this embodiment, for example, when the user manipulates the aforementioned external circuit (e.g., a switch device or a button arranged on the USB hub device100), the command receiving interface116receives a predetermined command from the external circuit and then transmits the predetermined command to the control unit117, so as to instruct the control unit117to switch the operating mode of the USB hub device100to the bypass mode.

In practice, the USB hub device100may provide a software application program for the user to input the predetermined command, so that the predetermined command is transmitted to the control unit117by the software application program. In this situation, the command receiving interface116may be omitted to simplify the circuitry structure of the USB hub device100.

Additionally, the control unit117may be configured to switch the operating mode of the USB hub device100to the bypass mode when the upstream port102and the downstream port104are both connecting to devices while the other connection ports (not shown in figures) of the USB hub device100are not connecting to any device, so as to reduce power consumption and improve signal transmission efficiency.

It can be appreciated from the foregoing descriptions that the USB control circuit110utilizes the combination of the first switch circuit113, the second switch circuit114, and the third signal channel123to provide a bypass structure which the conventional USB hub device lacks, and thus can flexibly switch the roles of the OTG devices connecting to the USB hub device100.

From another aspect, the USB control circuit110allows an OTG device connecting to the upstream port102to operate as a USB peripheral device and also allows an OTG device connecting to the downstream port104to operate as a USB host device.

Certain terms are used throughout the description and the claims to refer to particular components. One skilled in the art appreciates that a component may be referred to as different names. This disclosure does not intend to distinguish between components that differ in name but not in function. In the description and in the claims, the term “comprise” is used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to.” The term “couple” is intended to compass any indirect or direct connection. Accordingly, if this disclosure mentioned that a first device is coupled with a second device, it means that the first device may be directly or indirectly connected to the second device through electrical connections, wireless communications, optical communications, or other signal connections with/without other intermediate devices or connection means.

The term “and/or” may comprise any and all combinations of one or more of the associated listed items. In addition, the singular forms “a,” “an,” and “the” herein are intended to comprise the plural forms as well, unless the context clearly indicates otherwise.