v3/ec: allow FPGA to boot without EC involvement

Modify the FPGA boot state machine so that the EC can recognize the
current state of the FPGA (off, powering up, configured, running)
and enter the appropriate state.
Update the unit tests.

BUG=b:187735501
TEST=Run the unit tests.
Test on hardware with an FPGA module installed:
* Power on, connect to the EC, and run the `fpga status` command a
bunch of times. It will show the values for PWR_EN, PWR_GOOD, and
FPGA_DONE as the FPGA boots up.
* Cleanly shut down the FPGA (`sudo shutdown -h now` in Linux, wait,
then `fpga off` on the EC). Reset the EC. Check `fpga status` and
it will show OFF. Run `fpga on` and the FPGA will start up.
* (Only on Proto 2!) Reset the EC. Check `fpga status` again; it
will be running.

Change-Id: Ic62c340492c2f4a6bf19dcf78883655ccbe4cd0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/chameleon/+/3202383
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
8 files changed