USB control of the CY7C65632-48 downstream HUB individual ports power on/off

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have an application for a custom USB HUB with the ability to programmatically and individually control On/Off the Vcc pin of  each of the downstream ports. There is low (20mA max) current draw on the downstream Vcc pins. Ideally the HUB should enable the power can be controlled by addressing the USB HUB and not by separate I2C or SPI lines. The USB control of the CY7C65632-48 data sheet page 5 implies that it is possible to control the individual port power but has no further information on how to accomplish that. Any clarification / reference design or helpful comments are highly appreciated. The final design will be probably 1:8 hub with an extra uncontrolled standard USB port for chaining hubs. I was thinking of a single HUB driving two others and using one of the spare spare ports for chaining.

0 Likes
1 Solution

Hi David,

Your question regards to the behavior of USB HUB driver on host side

This driver is provided by Intel/AMD( if you use Win7 or previous OS) or Microsoft.(Win8 and Win10).

This driver will be responsed to communicate with any HUB which is connected to PC.

To make a tool in order to talki to a HUB, for example, you need to learn how to write a filter driver.

You could refer to the links below to know what filter driver is.

http://ieeexplore.ieee.org/application/enterprise/entconfirmation.jsp?arnumber=5453612&icp=false

http://https://en.wikipedia.org/wiki/Filter_driver

In addition, this is exactly what BUS HOUND done

http://http://perisoft.net/bushound/

For other question, you need to read the chapter 11 of USB2.0 spec.

View solution in original post

0 Likes
10 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello David Gabbay,

The downstream ports are powered ON/OFF through the nENP# pins which are connected to the downstream devices through a power switch. Please refer to the below link for the reference design of HX2VL.

CY4608 HX2VL Very Low-Power USB 2.0 Compliant 4-Port Hub Development Kit

Please feel free to write back in case of any queries.

Best regards,

Srinath S

Anonymous
Not applicable

In that case I believe that the best scheme is to add a simple USB MCU on the upstream hub that will be addressed by the host to control the Vcc of each of the downstream ports through the Input pins - Must use the 48 pin device for this.

0 Likes

Hello David,

An MCU can be added to enable/disable the power supply to the downstream devices.

But, in order to disable a downstream device, the device manager on the host can be used to enable/disable, which will be the simplest way to implement the same. Please let me know if you would want to remove the power supply to the device or just disable it.

The nENP# pins are generally used together with the over-current protection pins and are used to switch the power ON/OFF to the downstream devices.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Hi Srinath,

I need to place the Vcc of each downstream port individually at 0V by command from the Host. And I need to Identify each hub in someway uniquely so I can know which hub and which port is activated from the host. I prefer not to add another MCU to the custom hub design if you can explain how to accomplish these goals without.

I am designing a custom hub with 8 Vcc controlled downstream ports, and 1 uncontrolled downstream (chaining) USB port. I was thinking of a 1 Hub chip (upstream) driving two Hub (downstream) chips with one of the remaining ports of the Upstream hub used as the chaining port. I can then connect my USB MCU to the remaining port of the Upstrem HUB so It can be accessed on the same USB interface and be used to provide Unique ID and control the Vcc of the 8 downstream ports.

I am very confused by your data sheet

On the one hand it refers to "SetPortPower" command that can power each port - but it does not explain how to send that command and where to send it. It sounds like it should be possible to switch the downstream port Vcc pin to 0V from the data sheet:

     "After enumerating, the host may power each port by sending a SetPortPower  request for that port. Power switching and

     overcurrent detection are managed using respective control signals (PWR# and OVR#) which are connected to an

     external power switch device. Both High/Low enabled power switches are supported and the polarity is configured through

     GPIO setting, see Pin Configuration Options on page 17

     ." and

     "When the hub is configured, the ports are not driven and the host may power the ports by sending a SetPortPower command for each

     port. After a port is powered, any connect or disconnect event is detected by the hub. Any change in the port state is reported by

     the hubs back to the host through the Status Change Endpoint (endpoint 1)."

It seems that the SetPortPower can disable the port Vcc along with the Data (Ok with me).

But it is unclear

  1. How and where to send that command from the Host
  2. How to identify the specific downstream port of a HUB using this command.
0 Likes

Hi David,

Your question regards to the behavior of USB HUB driver on host side

This driver is provided by Intel/AMD( if you use Win7 or previous OS) or Microsoft.(Win8 and Win10).

This driver will be responsed to communicate with any HUB which is connected to PC.

To make a tool in order to talki to a HUB, for example, you need to learn how to write a filter driver.

You could refer to the links below to know what filter driver is.

http://ieeexplore.ieee.org/application/enterprise/entconfirmation.jsp?arnumber=5453612&icp=false

http://https://en.wikipedia.org/wiki/Filter_driver

In addition, this is exactly what BUS HOUND done

http://http://perisoft.net/bushound/

For other question, you need to read the chapter 11 of USB2.0 spec.

0 Likes
Anonymous
Not applicable

Hi yyca,

Thanks for responding on this issue.

I am using a Linux based system and using HIDraw usb low level interface to control 32 USB downstream devices. I would like to selectively and individually shut the power (20mA max) to each of them. This is not a general purpose application - it is a custom application, the hubs are used inside the equipment. we will be using a 1:8 arrangement using 3 Hub chips and I need to identify each downstream port.

Can you point to a document specifying what are the hex codes for SetPortPower commands to the Hub chips?

Can the host store a differrent ID code (like a serial number) inside each Hub chip so that it can uniquely identify each of them?

0 Likes

I post the link of UsbTreeView to let you know which information host could get from a HUB.

http://http://www.uwe-sieber.de/usbtreeview_e.html

After downloading this tool, you could check the devices which connnect to PC and all the related information.

0 Likes
Anonymous
Not applicable

Thanks for your response yyca,

I've been trying to interrogate (using the control interface with a number of C++ codes) the hubs that are connected to my PC. This revealed several issues with the HUB identification scheme. I could not access the webpage you indicated for the tool - I will try later again.

1. I can only detect USB root hubs and devices connected to the USB bus BUT not in-between hubs. (if a hub is connected to the root hub it is not identified even if there is an operating USB device connected to it. lsusb shows it as a device off the root hub tree.

2. Since all the hubs that will be chained in our design would be the same make and chip we will not have identifying distinct information to go by.

3. Following your comments I experimented (see 1) with several hubs that I have lying around from different mfrs I was hoping to find a PPPS enabled commercial HUB and save myself the effort of designing a hub. So far unsuccessful. - I will try with the tool you posted.

0 Likes

I also try to click the link which I paste in my answer. However, I could not access either.

I content of the link is correct but the website is not correct. I suspect there should be some problem with Cypress's community.

Well, you could just search "USB device tree view" in Google. The first result should be the right one.

0 Likes
YangyangC_06
Employee
Employee
750 replies posted 500 replies posted 250 replies posted

Hi David,

Sorry for the late reply.

For the first question, you could refer to USB spec 2.0 or 3.0. Both of them provide one separate chapater to cover the HUB devices. You could send SetPortFeature to the HUB to enable/disable the power of one specific port.

For the second question, you could extract the description file to find any different information between these hubs in order to differ them.

0 Likes