faft: firmware_ECUsbPorts: Fix several issues on new platforms.

- The command to re-enable USB ports differs on smart vs dumb ports.
  Check the newly defined EC attribute.
- 'ectool usbchargemode' no longer returns non-zero when a non-existing
  port is passed, so we need to define a port range.
- wait_port_disabled is racy because the USB port may become disabled
  during the shutdown sequence before the device is powered down. If so,
  the subsequent power button press can be missed.

BUG=chrome-os-partner:21171.
TEST=Pass firmware_ECUsbPorts test on Peppy.

Change-Id: I62dd61d81862c1e0914f95863da856e7bc806b33
Reviewed-on: https://gerrit.chromium.org/gerrit/64444
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
1 file changed