Commit Graph

3 Commits

Author SHA1 Message Date
Bill Richardson
5a4ae0c3cd Cr50: Fix spshc console command
The SPS RX FIFO handler prototype changed from passing cs_enabled
to cs_disabled, but the callback function for the spshc command didn't.
Now it does.

The spshc command switches the protocol on the SPI Slave bus to
expect EC Host Commands.

BUG=none
BRANCH=none
TEST=manual

At the EC console:

  spstpm off
  spshc

On the build machine, with an FTDI cable connected to the SPS
input:

  cd extra/ftdi_hostcmd
  make
  ./test_cmds

Change-Id: I69294a977b83854c5f6348904330bf74416cc6ec
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/293619
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2015-08-15 01:32:39 +00:00
Bill Richardson
08414a6da2 Cr50: Add verbose & range options to extra/ftdi_hostcmd/
This just helps debug the SPI traffic.

BUG=none
BRANCH=none
TEST=make buildall

Change-Id: I09c2f0e0fed9a9f7d0b4cbcea6719c73cdf61068
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/284409
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2015-07-10 03:40:02 +00:00
Bill Richardson
0eb88ff59b Cr50: Enable host commands over SPI bus
This enables the feature that lets the Cr50 receive host commands
via the SPI (slave) interface.

BUG=chrome-os-partner:40969
BRANCH=none
TEST=make buildall
CQ-DEPEND=CL:283998

This CL also adds a test example in the extra/ftdi_hostcmd/
directory. To use it, you need the Cr50 attached to the build
host via an FTDI USB-to-SPI adapter.

  cd extra/ftdi_hostcmd
  make
  ./test_cmds

Change-Id: Ia719b1c898afc45b3105a9cd573a8492178d9be2
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/284001
2015-07-09 12:30:38 +00:00