diff --git a/arch/arm/src/lpc31xx/lpc31_ehci.c b/arch/arm/src/lpc31xx/lpc31_ehci.c index a91a3a1d6d8..19d1c2c5a2d 100755 --- a/arch/arm/src/lpc31xx/lpc31_ehci.c +++ b/arch/arm/src/lpc31xx/lpc31_ehci.c @@ -4513,8 +4513,24 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller) * PORTSC register to enable power. */ - lpc31_usbhost_vbusdrive(0, true); - up_mdelay(50); + /* Handle root hub status change on each root port */ + + for (i = 0; i < LPC31_EHCI_NRHPORT; i++) + { + /* Enable VBUS power for the port */ + + lpc31_usbhost_vbusdrive(i, true); + up_mdelay(25); + + /* Power up the power. REVISIT: Is this necessary? The PP bit never + * gets set unless I explicitly set it here. + */ + + regval = lpc31_getreg(&HCOR->portsc[i]); + regval |= EHCI_PORTSC_PP; + lpc31_putreg(regval, &HCOR->portsc[i]); + up_mdelay(25); + } /* If there is a USB device in the slot at power up, then we will not * get the status change interrupt to signal us that the device is