update_dynamic/static_battery_info update information in the memmap
shared with the host. When there is not host, these functions
cannot do anything.
The battery information will, eventually, have to be passed to
host (through lid EC), but this will be implemented later.
BRANCH=none
BUG=b:66575472
TEST=make BOARD=wand -j
Change-Id: I1640bb0c5a9eb242183b957ccbef4d4999112160
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/678754
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT Rp is applied when neither port
is a source, so apply it at boot to be consistent.
BUG=chromium:766814
BRANCH=gru
TEST=On kevin, verify 3A Rp is applied to both ports at boot.
Change-Id: Ib62a96063783e8ef9ac9240800f445fa9e5a59af
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/675845
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
When battery is at critical charge level, reject charge port disable
request. Since battery is not able to provide enough power to the EC
on boot, we should not cut off our input power, regardless of
dual-role determination or other charging policy.
(Reference:
https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/351224)
BUG=b:64703097
BRANCH=None
TEST=make -j buildall. Verified that both right and left port are
able to boot the EC up successfully. No reboot loops observed in
critical battery conditions.
Change-Id: I098083036388783c0975ac772da3a3412895e26f
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/675586
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Chromebox ECs performs EFS: verifying firmware before the AP boots.
This patch updates host commands which are required for the EFS.
When EC_REBOOT_FLAG_SWITCH_RW_SLOT is specified, EC_CMD_REBOOT_EC
changes the active slot before it reboots the system.
BUG=b:65264494
BRANCH=none
TEST=On Fizz, verify:
1. RW_B is old and updated by soft sync. RW_B is activated and
executed after reboot. System continues to boot to OS.
2. RW_A is old and updated by soft sync. RW_A is activated and
executed after reboot. System continues to boot to OS.
Change-Id: I08050c985ce0b27b30cb842e6b5b4660f32e5211
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648450
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
When EFS finds the active slot is invalid, it tries the other slot.
This patch makes the other slot active so that the following boots
will try the other slot first.
This patch also replaces enum flash_rw_slot with system_image_copy_t.
The new APIs are therefore renamed from *_slot to *_copy. Basically,
this makes vboot see slots as a conceptual place instead of physical
spaces bound to flash storage.
BUG=b:65028930
BRANCH=none
TEST=On Fizz, verify:
1. RW_B is old and updated by soft sync. RW_B is activated and
executed after reboot. System continues to boot to OS.
2. RW_A is old and updated by soft sync. RW_A is activated and
executed after reboot. System continues to boot to OS.
Change-Id: Icf97da13e651e7a931b9d507052b9422566eb16c
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648449
The Vbus adc channel was defined as 0 in the enum, however, we don't
actually have a Vbus ADC channel, therefore it should be defined as -1.
BUG=None
BRANCH=None
TEST=Flash zoombini; Verify that when charge manager tries to read the
Vbus voltage, the EC doesn't panic due to a non-existing channel.
Change-Id: I53dd3259afc7ae76f587e5b7925ce2f9daa06402
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/670123
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit enables the PSL pins for zoombini. Previously, we were
initializing the PSL_OUT pin to high, but it actually turns out that
setting the output from a 0 to a 1 indicates that the firmware wants to
remove Vcc1. This caused the EC to not boot up. This commit removes
the improper initialization of the GPIO and additionally sets up the
hibernate wake pins accordingly such that they can be used by the PSL
glue logic.
BUG=b:65647213
BRANCH=None
TEST=Flash zoombini without rework. Verify board comes up okay.
TEST=Enter `hibernate` on console; Verify board goes to sleep. Verify
that each hibernate wake pins wakes up the board successfully.
Change-Id: Ife1b82eec7957b44bbe409cdeba9c3972168812f
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/670062
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
The keyboard config was the old chrome OS keyboard, but it should be the
new one introduced in April of this year.
Additionally, change KSO2 inverted to be push-pull instead of open
drain. This was causing the entire row to not be detected.
BUG=None
BRANCH=None
TEST=Flash zoombini; Verify that every key on the keyboard is detected.
Change-Id: I408739eed84f06bd9a2df5a9053c75859f8aaa0b
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/670061
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
The LEDs were on when they were intended to be off. This commit just
inverts the duty cycles.
BUG=None
BRANCH=None
TEST=Flash zoombini. Verify all LEDs are off. Plug in battery, verify
that Red LED is on.
Change-Id: I78e2bce45603fd223ebaeacb024a210c5db70123
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/670060
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Was set in Hz unit instead of mHz.
The minimal frequency of the gyroscope is 25Hz.
By setting it at 25mHz, we make believe that the gyro was also
supporting 5Hz or 10Hz: the test would complain when instead the samples
came with a 25Hz.
Fix up of cl/482703
BUG=b:65000611
TEST=compile
BRANCH=caroline,eve,twinkie
Change-Id: I162d0d2e9b545af82698d8d484875761f426efe4
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/674003
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Using builtin function in macro.
Compact macros.
BUG=none
BRANCH=master
TEST=Tested on discovery BOARD with LSM6DSM sensor connected
to I2C master interface of target board.
Using accelrate motion sense console command is possible to
test with different data rate: all supported ODR has been tested
for acc and gyro
Change-Id: Icb11f90254521715dfb2abb5bac6eb87ce45b92d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Mario Tesi <mario.tesi@st.com>
Reviewed-on: https://chromium-review.googlesource.com/465375
Commit-Ready: mario tesi <mario.tesi@st.com>
Tested-by: mario tesi <mario.tesi@st.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
This is used for factory test with following command
1. ectool command
ectool led power query
ectool led power green=100
ectool led power red=100
ectool led power amber=100
ectool led power off
ectool led power auto
2. console command
led debug >> enter debug mode
led green
led red
led amber
led off
led debug >> exit debug mode
BUG=b:65651340
BRANCH=master
TEST=`ectool ...` works good
Change-Id: Icb87e479075d90f509d60121a3e1df0afe66d41f
Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/666418
This change makes the power LEDs pulse using PWM.
S0: solid green.
S3: pulsing amber (= mix of green and red)
S5: off
BUG=b:64975836
BRANCH=none
TEST=Verify LED behavior described above on Proto3
Change-Id: I696cf8279dd762236b7b7f000a316820d58916bf
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669773
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This will be used by the updater to first check that the touchpad
FW on AP side matches the one for which we stored hashes on EC
side.
This guarantee that we do not accidentally try to flash an
incorrect FW, which would render the touchpad non-functional.
BRANCH=none
BUG=b:63993173
TEST=make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \
BOARD=hammer -j
TEST=./usb_updater2 -t
includes output of
sha256sum A459C-1211_ForGoogleHammer_3.0.bin
Change-Id: Id30ab2d7c7d7e2d0f25cc893f685d218c44c022e
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/641736
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
After mulptiple edits of the script, there is a case when bash
variable is not properly quoted, let's fix it.
BRANCH=cr50
BUG=b:64698702
TEST=verified proper tag description set by git
Change-Id: I5847437cde717bb6e1f4b672fe6008b8e6e6f4e3
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/667917
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
With longer git SHA1s reported by git commands and longer version
strings, the entire SHA1 could be not fitting into the 32 byte version
of the VERSION string. So, instead of adding the 'dirty' marker to the
end of SHA1 let's replace the prefix dash with it in case the tree is
dirty.
This way the length of the version string does not change (as long as
the 'dirty' marker is one character long).
BRANCH=cr50
BUG=b:64698702
TEST=verified output of running getversion.sh with a clean tree
$ ./util/getversion.sh | grep VERSION32
#define CROS_EC_VERSION32 "_v1.1.7046-591608e2e"
and a 'dirty' tree
$ ./util/getversion.sh | grep VERSION32
#define CROS_EC_VERSION32 "_v1.1.7046+591608e2e"
Change-Id: I42684522beaff9e9714206cfaddaf97e6cd644be
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/665958
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
In the USB 2.0 specification, the "8.5.3 Control Transfers"
chapter says that "When all of the data structure is returned to the host,
the function should indicate that the Data stage is ended by returning a
packet that is shorter than the MaxPacketSize for the pipe. If the data
structure is an exact multiple of wMaxPacketSize for the pipe, the function
will return a zero-length packet to indicate the end of the Data stage."
When doing a 'Control Read' transfer and the returned data (in IN
packets) was a multiple of MaxPacketSize, we were omitting the
zero-length packet and so the host was blocked waiting for a successful
IN transaction.
This corner-case was a regression introduced by the re-writing of the
control transfer handling done by CL 318864. So the STM32 USB code which
is similar to the former code is dealing properly with this case.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=cr50
BUG=none
TEST=manual, extend the configuration descriptor to be exactly 64 bytes,
and see the enumeration is no longer failing.
Change-Id: I108e8c6bb9eb727c41f3e1c607f0919fa1192d5a
Reviewed-on: https://chromium-review.googlesource.com/664814
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Make use of the generated touchpad firmware hashes to validate
the blocks before writing them to the touchpad.
BRANCH=none
BUG=b:63993173
TEST=make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \
BOARD=hammer -j
TEST=./usb_updater2 -p SA459C-1211_ForGoogleHammer_3.0.bin works
TEST=./usb_updater2 -p SA459C-1211_ForGoogleHammer_4.0.bin fails
Change-Id: If5d2be57b63e16ee81aa9acaf840c5084f9b92de
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/616371
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Based on the passed TOUCHPAD_FW parameter to the make command, the
build system generates hashes for the touchpad FW.
To generate the hashes, gen_touchpad_hash splits the touchpad FW
in blocks of CONFIG_UPDATE_PDU_SIZE, that are hashed individually
(SHA-256), and then stored in the EC image.
This will allow the USB updater code to verify the integrity of
the touchpad firmware being flashed.
When no FW is provided, zeros are output, which do not match
any valid data.
BRANCH=none
BUG=b:63993173
TEST=make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \
BOARD=hammer -j
TEST=Using variations of
make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \
BOARD=hammer -j
make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_4.0.bin \
BOARD=hammer -j
make BOARD=hammer -j
Check that TPHASH touchpad_fw_hash.h is only regenerated when
the parameter changes.
Change-Id: Ie347270aa9c00342de13489c9422e45e681b94c2
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/615321
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Some Elan touchpad ICs have a different firmware sizes (48, 56, or 64
KB). We use CONFIG_TOUCHPAD_VIRTUAL_SIZE, set in the board file, to
determine the appropriate size, and, at runtime, we sanity check the
firmware size according to the IC type reported by the touchpad.
BRANCH=none
BUG=b:65188846
TEST=Manually modify the CONFIG_TOUCHPAD_VIRTUAL_SIZE in hammer,
executed and verified both (1) "EC_ERROR_UNKNOWN" returned
(2) ic_type shows 0x09 on EC console
TEST=Successfully flashing 48k firmware using CL:658920 on hammer and
56k firmware on staff. With success here, we specifically test
with different firmware version and make sure it reflected in
hammerd's touchpad info.
Change-Id: Ib30917d8376d4a2e8b6137daabad2341ac48d1f8
Signed-off-by: Chun-Ta Lin <itspeter@google.com>
Reviewed-on: https://chromium-review.googlesource.com/664937
Commit-Ready: Chun-ta Lin <itspeter@chromium.org>
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Proto2 board has the line ADP_IN, which is raised to 2.5 V when a BJ
adapter is plugged. This patch makes EC running on proto2 and above
use this line to detect the power source at boot (as opposed to proto1
guessing a BJ adapter is plugged if PPVAR_BOOSTIN_SENSE is 19v).
BUG=b:37573548
BRANCH=none
TEST=Boot proto3 Fizz on BJ and Type-C.
Change-Id: I4052a73729d62694ce154bfb33255974dc110841
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/626879
The script tries to determine the upstream branch name, and finds out
which is the first sha1 of the current branch.
Then the script tags the branch and generates a git command strings
the operator is supposed to check for sanity and enter to push the new
tag to the server.
With the new tag set each following run of ./util/getversion.sh would
generate version strings including the new tag name and number of
patches above the branch point.
More implementation details are included in the comments in the
script.
BRANCH=cr50
BUG=b:64698702
TEST=tried the script in cr50 and gru firmware branches:
cr50$ <path to>/tagbranch.sh
A new tag 'v1.9308_B.0' has been set. Use the following command
to push it to the server
git push --tags https://chromium.googlesource.com/chromiumos/platform/ec v1.9308_B.0
Or if you want to delete it:
git tag -d v1.9308_B.0
cr50$ ./util/getversion.sh | grep -w VERSION
#define VERSION "_v1.9308_B.192-b5c9d0aa7"
cr50$
cr50$ cd <path/to>gru
gru$ <path to>/tagbranch.sh
A new tag 'v1.8785_B.0' has been set. Use the following command
to push it to the server
git push --tags https://chromium.googlesource.com/chromiumos/platform/ec v1.8785_B.0
Or if you want to delete it:
git tag -d v1.8785_B.0
es^o: ~/new_projects/gru-8785/src/platform/ec 175 > ./util/getversion.sh | grep -w VERSION
gru$ #define VERSION "_v1.8785_B.218-5d857ed8c"
gru$
Change-Id: I0c0067f6b7bb837a0c119bc14ff48cb9223a3fa5
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/656575
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Servo / Suzy-Q related debugging methods is a big challenge
in factory especially after servo debug header is removed.
Expose some information to OS from EC will do a great help
for massive production.
+ expose charge/battery related state to ectool
1. chg_ctl_mode
2. manual_mode
3. battery_seems_to_be_dead
4. battery_seems_to_be_disconnected
5. battery_was_removed
6. disch_on_ac (learn mode state)
7. battery DFET
BUG=b:65265543
BRANCH=master
TEST=`ectool chargestate param x10000~0x20006 get correct state`
Change-Id: Ib64ab3c7b68a634ea098425c93e5234361cd1936
Reviewed-on: https://chromium-review.googlesource.com/662318
Commit-Ready: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>
Tested-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
The self signed images generated when running 'make BOARD=cr50' use
constant default values for the epoch, major and minor image header
fields. For the purposes of continuous testing we need the generated
images have sensible values in those header fields.
Since adding a full blown C++ based parser to the signer image is too
much trouble, let's just have a very basic Python based parser, which
pays attention only to the required fields from the current manifest.
BRANCH=cr50
BUG=none
TEST=built the new image and checked its version:
$ make BOARD=cr50
...
$ ./extra/usb_updater/usb_updater -b build/cr50/ec.bin
read 524288(0x80000) bytes from build/cr50/ec.bin
RO_A:0.0.23 RW_A:0.0.23[00000000:00000000:00000000] RO_B:-1.-1.-1 ...
Change-Id: I822475ed0a3c481b08e9268f9c13663b0b132d4a
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/651132
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
kernel will get the battery info through command "ectool battery",
so we need to get the remaining capacity dynamic.
BUG=b:65494883
BRANCH=none
TEST=run "ectool battery" in kernel, and get the battery info.
Change-Id: Idf824f6dc1e72acd17156c03d81c0ca87adc109f
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/658160
Reviewed-by: Philip Chen <philipchen@chromium.org>
We use rand to get timestamp counter low word and do random test
(test_dev = rand % i2c_test_dev_used).
But we will get a negative index (test_dev) if low word larger than
0x80000000 and cause the array to access the wrong locations and
trigger an exception.
This change also fix following error:
error: i2c_s_test may be used uninitialized in this function
[-Werror=maybe-uninitialized]
BRANCH=none
BUG=none
TEST="forcetime 0 0x80000000" then "i2ctest", no exception triggered.
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: Ia2f5a2ff034a6b7b96f7bd4f3b42bf5645a05aed
Reviewed-on: https://chromium-review.googlesource.com/663110
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
This patch adds USB_CHG_TYPE_DEDICATED to enum usb_chg_type. It's
for dedicated AC adapters like a barrel jack adapter used for Fizz.
BUG=b:65591971
BRANCH=none
TEST=make buildall
Change-Id: Ib883c97eb5e468753c73453d7dedd228547ae025
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/665327
Reviewed-by: Shawn N <shawnn@chromium.org>
lsusb scans for USB_DT_DEBUG, which produces logspam
on the cr50 console. This isn't an error, just unimplemented.
Remove the printout.
BRANCH=cr50
BUG=b:65407184
TEST=no logspam on lsusb
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: Ib4fc7105015506927f45ee02f587f97e46e1ad9b
Reviewed-on: https://chromium-review.googlesource.com/663786
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This patch gives the highest priority to dedicated chargers. It
means if a dedicated power supply is being connected, other power
supplies such as USB-C adapters will not be recognized as a new
charger.
BUG=b:65059574
BRANCH=none
TEST=Boot Fizz on BJ adapter. Verify plugging in Type-C adapter
doesn't shut down the system.
Change-Id: Ie49b128ae64f917a227f9081148565a3f5356212
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/655638
Reviewed-by: Shawn N <shawnn@chromium.org>
This patch makes EC refuse PR swap when the system is powered
through the USB-C port because switching from SNK to SRC will
cause the system to shut down.
BUG=b:65481832
BRANCH=none
TEST=Boot Fizz on USB-C and BJ.
Change-Id: I52c5813adc1ea9b4e69e65599c1794ae43192a1e
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/655643
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
1. Add a new config option CONFIG_PORT80_PRINT_IN_INT which is
disabled by default to disable printing of port80 messages in
interrupt context.
2. If CONFIG_BRINGUP is defined, redefine CONFIG_PORT80_PRINT_IN_INT
to enable printing of port80 messages in interrupt context for boards
that are in bringup phase.
3. If print_in_int is disabled, add a deferred call to dump port80
buffer to EC console 4 seconds after the last port80 message is
received.
BUG=b:64196191
BRANCH=None
TEST=Verified following:
1. make -j buildall
2. Port80 messages are not printed by default on Soraka
3. Port80 buffer is dumped 4 seconds after last port80 message, if
BIOS is stuck for 4 seconds, in recovery mode and when reboot from AP
console.
4. Boot time on soraka went down from ~1.59seconds to ~1.45 seconds in
EC reboot case (savings of ~140ms).
Change-Id: I9aee0987765f905b4ac49d04ffc54d71ee3a04f9
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/661880
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Messages generated using the CPRINTS macro include a newline in the
end by design, no need to explicitly include it in the message.
BRANCH=cr50
BUG=none
TEST=verified that the message is printed without the extra newline
Change-Id: I01994bcb95c78e2deaa2dc3617bea9ca8a6d1381
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/663668
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
The modified CRC8 implementation didn't detect some errors. For
example, using the modified CRC8: CC5QQLALU and DC5QQLALU calculates
to the same value.
BUG=b:37952913
BRANCH=none
TEST=make buildall
Used online CRC-5-USB calculator to test several values against
this implementation.
Signed-off-by: Sam Hurst <shurst@chromium.org>
Change-Id: I5a17941e25691872a25b41525f65f36e2ed1d4fa
Reviewed-on: https://chromium-review.googlesource.com/660812
Commit-Ready: Sam Hurst <shurst@google.com>
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Michael Tang <ntang@chromium.org>
The manufacturer names for the Robo LG and Simplo batteries were
incorrect. Both of them had an '/011' which is not actually part of
the name. This has been fixed. In addition, the ship mode command
needs to be 0x0000 followed by 0x1000, but it was using 0x0000 and 0x0001.
BUG=b:64821365
BRANCH=None
TEST=manual
Tested Celpext, SMP, and LG batteries with EVT systems. Verified that
'cutoff' from EC console and 'ectool batterycuttof' from AP console
caused the battery cutoff to take effect. Also verified the
manufacturer name from the batteries matched the what's stored in the
battery info table.
Change-Id: I48369da4d2c6137b50614b003df57a359a49c4f4
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/662137
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
We use address 0x80000000, which is not mapped to anything in
STM32F0 address space.
BRANCH=none
BUG=b:63993173, b:65188846
TEST=./usb_updater2 -p 144.0_2.0.bin
CQ-DEPEND=CL:601814
Change-Id: I9a9044d29ebe058d3792dc984cac4051a005cf8f
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/597468
Commit-Ready: Chun-ta Lin <itspeter@chromium.org>
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Provides touchpad_update_write functions that fw_update.c uses
to update the FW over the USB updater interface.
BRANCH=none
BUG=b:63993173, b:65188846
TEST=./usb_updater2 -t touchpad.bin
CQ-DEPEND=CL:593373
Change-Id: I5246cbfa65311cd6f0b1872f9bbc164f3a972153
Signed-off-by: Chun-Ta Lin <itspeter@google.com>
Reviewed-on: https://chromium-review.googlesource.com/601814
Commit-Ready: Chun-ta Lin <itspeter@chromium.org>
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Chromebox ECs performs EFS: verifying firmware before the AP boots.
This patch updates host commands which are required for the EFS.
The change includes:
* Update EC_CMD_FLASH_REGION_INFO to accept EC_FLASH_REGION_UPDATE
* Update EC_CMD_VBOOT_HASH to accept EC_VBOOT_HASH_OFFSET_UPDATE
When EC_FLASHS_REGION_UPDATE is specified, EC_CMD_FLASH_REGION_INFO
returns the slot which currently is not hosting a running RW copy.
When EC_VBOOT_HASH_OFFSET_UPDATE is specified, EC_CMD_VBOOT_HASH
computs the hash of the update slot. This hash covers the entire
region, including the signature at the end.
This patch undefines CONFIG_CMD_USBMUX and CONFIG_CMD_TYPEC
for gru to create space.
BUG=b:65028930
BRANCH=none
CQ-DEPEND=CL:648071
TEST=On Fizz, verify:
1. RW_B is old and updated by soft sync. RW_B is activated and
executed after reboot. System continues to boot to OS.
2. RW_A is old and updated by soft sync. RW_A is activated and
executed after reboot. System continues to boot to OS.
Change-Id: I9ece907b764d07ce94054ba27996e048c665a80a
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648448