CrosEC: Add support for talking to the EC over SPI using protocol version 2.

The only devices which communicate with the EC over SPI also support protocol
version 3, but we don't yet support version 3 in depthcharge at all and this
is a reasonable stepping stone in that direction.

There are two oustanding issues with the SPI interface. First, transactions
with the EC can't be too close together or it gets tripped up at the start of
the later transaction and never responds. Second, when writing a new EC image
as part of EC software sync, bytes are occasionally dropped. We haven't yet
determined whether those bytes were send correctly but lost by the EC, or of
they were never sent in the first place somehow.

BUG=chrome-os-partner:19420
TEST=Built and booted on Pit with this driver and EC software sync enabled.
Saw that the EC was initialized successfully and commands to it completed as
expected.
BRANCH=None

Change-Id: I43b97cb728a0c4fa0eaa9dd3710a92389b2a8085
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62893
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
3 files changed
tree: 15b2c553c7bee475c01703b145a053bac879f0f2
  1. board/
  2. src/
  3. util/
  4. .gitignore
  5. Kconfig
  6. Makefile
  7. Makefile.inc
  8. PRESUBMIT.cfg