depthcharge: Increase initial wait time for the EC to be ready

Create a config item for the initial wait time to delay after an
EC warm boot (such as a sysjump to RW), and before starting to poll it.
Also reduce the timeout for the LPC HELLO cmd/response to allow
retries during the wait polling loop.

Zephyr based ECs take longer to reboot and initialise the ESPI
device. The root cause is not clear as to why trying to
use the bus before it is ready is causing the bus hang,
so this is a workaround until the cause is found.

Also start the timer before the initial delay so that an
accurate time can be obtained for how long the EC is
actually taking to be ready.

The EC host command task needs to be running before
the EC can reply, and for nivviks this is taking up to
300 ms to start, so having a longer initial delay
should not impact the overall time (unless some ECs
can reboot, initialise, and start the host command task
under the initial delay time).

Time now (on nivviks):
EC returned from reboot after 434822us

BUG=b:230459351
TEST=Nivviks (ensure reboot works after recovery mode)
BRANCH=none

Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: If831508a5e22dc9770c3e51ece70cf88fc984992
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+/3617311
Reviewed-by: Julius Werner <jwerner@chromium.org>
4 files changed