First of all, I think we have the hub enumerating now!
bash-4.2# cat /proc/driver/musb_hdrc.0
Status: MHDRC, Mode=Host (Power=f0, DevCtl=5d)
OTG state: a_host; active
Options: ?dma?, otg (peripheral+host), [eps=16]
Peripheral address: 00
Root port status: 00000503
CPPI: txcr=0 txsrc=0 txena=0; rxcr=0 rxsrc=280de80 rxena=0
RX10: 1buf rxcsr 3020 interval 0c max 0001 type 71; dev 2 hub 0 port 0
rx dma9: 0 left, 00000000 00000000, 00000000 00000000; 00000000 00000000 00000000 .. 00000000
qh cf027180 dev2 ep1-int max1
in urb cf057d40 0/1
bash-4.2#
bash-4.2#
bash-4.2# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 04b4:6572 Cypress Semiconductor Corp.
Just as an update. We tried several things, the SW workaround for ID and VBUS. In addition to Bin Liu's patch to omap_phy_internal.c code, I added:
u32 usbphymode;
scm_base = ioremap((id ? AM33XX_USB1_BASE : AM33XX_USB0_BASE), 0x2FF);
if (on && cpu_is_am33xx()) {
usbphymode = __raw_readl(scm_base + USB_MODE_REG); // 0x47401000 + 0xE8
usbphymode &= ~ USB_PHY_LOOPBACK | IDDIG;
}
__raw_writel(usbphycfg, scm_base + USB_MODE_REG);
iounmap(scm_base);
Just in case, soldered the AM335x USB0_ID pin to Gnd. The dubious reset circuit on the hub was pulling the reset line up to 3.3V instead of VBUS, so according to the AN72332 Application Note I pulled it up to 5V instead and added 50K (didn't have the recommended 47K) resistor to GND.
Had a call with our HW guy who spotted the downstream DP and DM lines were crossed over and then checking the upstream lines we discovered the same! Silly error that I don't know why we didn't spot earlier and Bin Liu was absolutely right that it was a HW issue.
Apart from the swapped lines, I'd like to see if it will still work if we roll back the other HW changes and keep the SW changes.
Thanks for all your support on this! Just need to swap the downsteam lines back (another soldering job) and fingers crossed we'll be good to go.