Commit Graph

19 Commits

Author SHA1 Message Date
Dave Parker
666bbdb3d7 Initial board commit for Wolf based on Slippy.
Additional fix-ups will come in subsequent CLs.

BUG=chrome-os-partner:20760
BRANCH=wolf
TEST=Verify "make BOARD=wolf" complete succesfully.

Change-Id: I24a37f3bebb1feb37c83c2c1b4f8f8db7bbcb2d8
Signed-off-by: Dave Parker <dparker@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61318
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2013-07-09 16:20:14 -07:00
Jimmy Zhang
28ebc86751 ec: puppy: add support to flash ec
BUG=none
TEST=flashed ec on venice board

Change-Id: I9a8ba6fcbc974d971af7af0f84ff7088cd69b987
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/60706
Reviewed-by: Andrew Chew <achew@nvidia.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-07-03 15:15:07 -07:00
Randall Spangler
a47bda8042 Make flash_ec capable of writing to an incorrectly-protected STM32
If EC-RO protects itself via the WRPx option bytes, flash_ec will fail
to reprogram it.  And if EC-RO is broken/unbootable, it won't be able
to clear the WRPx option bytes itself when it sees the write protect
GPIO is not asserted.

Add the -u flag to stm32mon so that it will automatically attempt to
unprotect the flash via the option bytes.

BUG=chrome-os-partner:19723
BRANCH=none
TEST=enable write protect GPIO.  Then from console, 'flashwp enable'.
     Then from the chroot:
        ./util/flash_ec --board=pit --ro --image=build/pit/ec.RO.flat
     That should successfully reflash the board.

Change-Id: Ic356d29104294d04d5e2a36dc75fd0206b89bd34
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56659
2013-06-03 14:32:39 -07:00
Randall Spangler
b490e866dc Clean up flash section defines and increase lm4 image size
The firmware defines had two almost-identical sets.  Coalesce into one
consistent set.

Link had 256 KB flash, but only allowed 2 80KB images.  Future
LM4-based platforms (slippy/peppy/falco/etc) will now use the entire
flash, with RO=124KB, pstate=4KB, RW=128KB.  This matches what the
STM32 platforms do, where pstate is contiguous with the RO firmware.

No functional change to STM32-based platforms.

BUG=chrome-os-partner:19176
BRANCH=none
TEST=build all platforms and dump_fmap ec.bin.
  - stm32-based platforms should report RO=61440@0, RW=65536@0x10000
  - link should report RO=81920@0, RW=81920@0x14000
  - slippy should report RO=129024@0, RW=131072@0x20000

Change-Id: I20b1d95c16250d9a5d228ead06eef03d96548823
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56655
2013-06-03 14:32:38 -07:00
Dave Parker
3443478d76 Create board configuration for peppy bringup
This change copies the slippy board configuration as a starting
point for peppy. This change is essentially the same as
https://gerrit.chromium.org/gerrit/55820

BUG=chrome-os-partner:19640
BRANCH=none
TEST=manual

Tested on slippy as there are no peppy-specific changes yet.

  cros_workon --board peppy start chromeos-ec
  emerge-peppy chromeos-ec
  ~/trunk/src/platform/ec/util/flash_ec --board peppy

Signed-off-by: Dave Parker <dparker@chromium.org>

Change-Id: I4c5f7a77fa55a6364effe838f7a656d56bfad9fb
Reviewed-on: https://gerrit.chromium.org/gerrit/56332
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Queue: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
2013-05-23 15:58:51 -07:00
Bill Richardson
93ec62ebc3 Create board configuration for falco bringup
This change just copies slippy and tweaks a few things that were
slippy-specific instead of not-link-specific (there are still bugs
open for those things).

BUG=chrome-os-partner:18788
BRANCH=none
TEST=manual

Since there are no Falco-specific changes yet (just slippy with another
name), I can try it on Slippy:

  cros_workon --board falco start chromeos-ec
  emerge-falco chromeos-ec
  ~/trunk/src/platform/ec/util/flash_ec --board falco

I also built and tested Link EC, to make sure nothing broke there either.

Change-Id: I9b3682032bd51adab4450520dfe52e3036750ef9
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/55820
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-05-20 17:01:29 -07:00
Bill Richardson
f10abeb19f Slippy: Changes needed to boot EC without bricking.
This commits the hacks made during board bringup. Bugs can be filed and
fixed based on this starting point.

BUG=chrome-os-partner:18825
BRANCH=slippy
TEST=manual

Try it and see.

Change-Id: Ia663eaf9a357633873b1b5d5cc6dbdda63513082
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50875
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-05-10 16:37:11 -07:00
Randall Spangler
ca2de14f9f Add pit support to flash_ec
Pit flashes the same way daisy does.

BUG=chrome-os-partner:18657
BRANCH=none
TEST=./util/flash_ec --board=pit --ro --image=build/pit/ec.bin

Change-Id: Id3db86b348963f66e7eb03c38a8efabe3379d21b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49320
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-04-26 13:46:37 -07:00
Vincent Palatin
0498d68732 flash_ec: add support for flashing with Toad cable
Add support for flashing Spring board through the Toad cable (given the
Write Protect screw is not on).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=spring
BUG=chrome-os-partner:17570
TEST=with both a Toad cable and a servo v2, flash EC on Spring EVT
with the following command:
./util/flash_ec --board=spring
and check the state of the servo/toad before and after.

Change-Id: Ia4e0d32b062d58b4e906d3f006003fa6097add83
Reviewed-on: https://gerrit.chromium.org/gerrit/48031
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
2013-04-16 08:37:51 -07:00
Todd Broch
abc11d883c stm32: Force disconnect of UART prior to writing firmware.
For chromeos devices with the stm32 EC we write the firmware via
uart.  Often developers are connected to this UART for console I/O
which causes flash_ec to fail.

This change looks for any pids currently attached to the UART and
forcibly kills them prior to attempting to write the firmware.

Signed-off-by: Todd Broch <tbroch@chromium.org>

BRANCH=spring
BUG=none
TEST=manual,

./util/flash_ec --board spring ...

Forcibly grabs UART from both:
  cu -l /dev/pts/<num>
  minicom -p /dev/pts/<num>

Change-Id: Ie2a2b7aaf437c2cedd1d16e399c63068f2b02da3
Reviewed-on: https://gerrit.chromium.org/gerrit/45217
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
2013-03-13 13:50:27 -07:00
Todd Broch
1da883a6bc Unify dut-control command.
Previous CL included --port but I neglected one invocation.  Better to
just unify how dut-control is called with a global.

BRANCH=none
BUG=none
TEST=manual,

./util/flash_ec --board spring
- device connected to servod @ port 9999 is successfully flashed

./util/flash_ec --board spring --port 9902
- device connected to servod @ port 9902 is successfully flashed

Change-Id: I9cf57d0ddd94cf825d3015f9768effffca94eaf2
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43222
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2013-02-13 19:46:11 -08:00
Todd Broch
6fd61fa6f1 Allow flashing of EC binary from host with multiple servod invocations.
Adds argument --port to provide ability to flash from host that has
multiple servos running.

BRANCH=none
BUG=none
TEST=manual,

./util/flash_ec --board spring
- device connected to servod @ port 9999 is successfully flashed

./util/flash_ec --board spring --port 9902
- device connected to servod @ port 9902 is successfully flashed

Signed-off-by: Todd Broch <tbroch@chromium.org>
Change-Id: Iecc4b8df51236a1f21be5feca8bb87f5a1d03e97
Reviewed-on: https://gerrit.chromium.org/gerrit/43182
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2013-02-13 13:00:59 -08:00
Dave Parker
3182778dbb Add 'unprotect' flag for flashing link ec.
BRANCH=link
BUG=chromium-os:37967
TEST=Remove write protect, reflash without 'unprotect', flag
     and verify the write protect flag is stil enabled with
     flashrom -p internal:bus=lpc --wp-status. Power down,
     then reflash with the --unprotect flag. Now verify the
     write protect status flag is disabled.

Change-Id: Ie05b5dc85dd31d29ab43a392fe948a52d547fff3
Signed-off-by: Dave Parker <dparker@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41477
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-01-17 13:44:24 -08:00
Vadim Bendebury
4efe1ed157 Fix the ec flash programming script to properly handle errors
When a nonexisting file is specified as the EC image, the ec flash
programming script reports the error, but continues running and
returns zero status (success) after completion.

With this change the exit status on some errors gets communicated to
the caller.

The openocd script is edited to drop the unused parameter of the
flash_lm4() function and the flash_ec script is edited not to require
EC images to be executable.

BRANCH=none
BUG=chrome-os-partner:15610
TEST=manual
   . run flash_ec with nonexisting or nonreadable file as a parameter,
     observe it to report proper return status. Run it with a proper
     image file name and observe it succeed.
   . run the command again, while the device is being programmed enter
     'ctl-c', observe programming stepped but the 'Restoring servo
     settings..." message still showing up.

Change-Id: Iac0b233fe579b0d5a84cf5a9acf85ed8bf10422e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37363
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-11-07 09:48:29 -08:00
Vincent Palatin
0e693fc437 Add Spring board configuration
Assign GPIOs and board specific peripheral/pin mux configurations.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BUG=chrome-os-partner:14313
TEST=make BOARD=spring
run spring binary on snow for basic sanity checking.
BRANCH=none

Change-Id: I6384024a0f27af67744e98a55b66d08f587bffa0
Reviewed-on: https://gerrit.chromium.org/gerrit/33631
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
2012-09-20 07:14:19 -07:00
Mike Frysinger
6bbddfbfb8 drop get_default_board usage
The common code will set up DEFAULT_BOARD for us automatically now.

BUG=None
TEST=`flash_ec --help` showed the right default board

Change-Id: I02a009bba757c78fa5606debe567be6f6bc4f742
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30261
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-08-14 16:11:51 -07:00
Louis Yung-Chieh Lo
e533adccb7 The jtag_buf_en was not set.
The dut_control function only accepts the first parameter. Thus,
the jtag_buf_en:on is actually dropped in flash_link. This caused
flash_ec script failed sometimes.

BUG=None
TEST=tested on link.
util/flash_ec --board=link --image=...

Change-Id: Ib7f8cdcd651a573ad4bdc6e446f3c715dce29b71
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28569
Commit-Ready: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Tested-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-07-26 23:11:30 -07:00
Louis Yung-Chieh Lo
89f6448982 Change the path check of --image in util/flash_ec.
BUG=None
TEST=test on link.
% util/flash_ec --board=link --image=a/random/file/path
flash successfully.

Change-Id: I82980783585ac7d2979cf195b7eb820dbf072156
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28252
Commit-Ready: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Tested-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-07-24 23:05:17 -07:00
Vincent Palatin
0aa39fc1e6 helper script to flash EC on boards
The script ensures that the servo parameters are correct,
and restores original servo parameters afterwards.

Daisy EC flashing works from the build tree :
 ./util/flash_ec --board=daisy --ro

The Link flashing is using the new openOCD 0.5.0 in the chroot.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BUG=None
TEST=./util/flash_ec --board=snow --ro
./util/flash_ec --board=link

Change-Id: Ifc87a8d21a5dac6ad8c4a0fb38694aa5f5bbf992
Reviewed-on: https://gerrit.chromium.org/gerrit/21664
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
2012-06-18 18:37:30 -07:00