| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have a v1 anymore, so the name makes no sense. Move it into
the existing file.
Include charge_state.h instead of v2, doing this in the same change to
avoid build errors.
This makes no functional change.
BUG=b:218332694
TEST=make buildall
Change-Id: Ic3e3adc45e4d002c2cd5ba8aa65e24686e01d628
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516191
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not derating seems like a common pitfall that can cause problems with
some chargers, so set a reasonably conservative default.
5% is chosen as the most common derating factor used among boards today
(counting occurrences in source code, so this may undercount 5%
occurrences because several projects set 5% at the project rather than
board-level):
1. 38 x 5%
2. 23 x 4%
3. 6 x 10%
3. 2 x 3%
4. 1 x 2%
Boards that currently configure this setting are modified only to
continue building without warnings regardless of whether they use the
new default value in order to signal that they were explicitly
configured.
BUG=b:260774380
TEST=make buildall / zmake build -a
BRANCH=none
Change-Id: I017849d38572fbc48090ae1fa2c539b808e426f9
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4109651
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sort all includes in board with the clang-format rules used by
the zephyr project.
BRANCH=None
BUG=b:247100970
TEST=zmake build -a
TEST=./twister --clobber -v -i
TEST=make -j72 buildall_only runtests
TEST=zmake compare-builds -a
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I6ad72b167cbb768a64c338fa633eb4bf5a401897
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060360
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The majority of boards simply call charge_set_input_current_limit()
from board_set_charge_limit() now that the minimum current limit and
derating are available as config options. Make this the default behavior
of the charge manager, overridable by boards as needed.
Boards that have existing custom behavior retain it, with their versions
of board_set_charge_limit() marked as __override as necessary.
BUG=b:163093572
TEST=make buildall; zmake build -a
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I72475ca0e8381596cafbcda4b042c7f884ae0432
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022857
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This splits the dual use of CONFIG_CHARGER_INPUT_CURRENT into two
different symbols, changing the uses of that which are used to set a
minimum current limit to be CONFIG_CHARGER_MAX_INPUT_CURRENT_LIMIT.
Most boards implement this in the same way within either the board or
baseboard, so handling of the new option is moved into
charge_set_input_current_limit (which is called by every user of the
option) and every board which repeated this pattern has the new symbol
set to the same value as the old one, with the duplicated code deleted.
One functional change to the charge manager is made: when charging
stops, the input current limit is set to the default value
(CONFIG_CHARGER_INPUT_CURRENT) rather than 0. This captures the intent
that the default current is appropriate at any time, which was previously
configured by individual boards' implementation of board_set_charge_limit()
while still allowing the limit to be set lower as needed.
To verify that all changes are appropriate, the following has been
manually checked:
* All boards with a change to a .c file also have a .h change
* All boards without a changed .h file have a changed baseboard.h
* For Zephyr projects, those with a changed .c file have config added
for the minimum limit and others (only corsola) are unchanged to
leave it off.
This is intended to verify that each board that duplicated the MAX()
logic has its configuration updated to use the shared copy, and that
boards with that code in the baseboard also update their configuration.
BUG=b:163093572
TEST=make buildall; zmake build -a
BRANCH=none
LOW_COVERAGE_REASON=added lines will soon be deleted
Change-Id: Ia460a16293c1fb82aac3784fd9be57ba0985f2fe
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4019703
Reviewed-by: Keith Short <keithshort@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many boards derate their charge current limits by some fixed ratio,
which results in duplicate code appearing in many different boards.
Since nearly all of these are in implementations of
board_set_charge_limit() and themselves call
charge_set_input_current_limit(), make that derating a config option
and move it into charge_set_input_current_limit(). This makes most
boards' implementations uniform and ripe for further simplification
in later changes.
For those boards that do more complex adjustments, those can be
retained by keeping the existing logic in board_set_charge_limit().
Several boards also uselessly defined multiple versions of
board_set_charge_limit(): the redundant ones are removed.
BUG=b:163093572
TEST=make buildall; zmake build -a
BRANCH=none
LOW_COVERAGE_REASON=follow-up CLs delete uncovered code
Change-Id: I0a7162e72538a91ad06ba85b91a10b93eb6af96b
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4015966
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update keeby boards to use new struct usb_mux_chain.
BUG=b:236274003
TEST=make buildall
BRANCH=None
Cq-Depend: chromium:3748785
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I348fd0950d630747deb9e02b7ea789ff5e395fed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779630
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally we don't do this, but enough changes have accumulated that
we're doing a tree-wide one-off update of the name & style.
BRANCH=none
BUG=chromium:1098010
TEST=`repo upload` works
Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Silicon Mitus have stated that the SM5803 may be damaged by voltage spikes
on VBUS in excess of 20V, and recommended that VBUS above 15V not be used
to prevent damage. Although dedede configures the max PD power to 45W which
will usually result in 15V@3A maximum, 20V@2.25A is also a valid choice
that would be dangerous.
Boards that do not use the SM5803 are unchanged, but the setting must
now be specified for each board because it is not uniform across all
dedede boards.
BUG=b:230712704
TEST=make buildall
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I5b2359fc2720ef0b5a7f2480ff67e0e821c378ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778900
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I68f875b4534d130cfead52c0fa0a68477e6636fd
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728132
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I0dae6e34b51333d0a6354eff9c2c9f150f4e9294
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728137
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I28d1591e48b359cf795598e8a4f5c3ed7a32edd4
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728131
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I92c4f13d61cf1f37c96beef1b3391da048ea16aa
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728134
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I195b65b5db7c5838d0fe9399c4c3b1e318e6cbec
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728136
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Ie9ce9ece1edc1ae7e5ce8881b026180085da783c
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728133
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I1bacb0070a8b7720ffe1f031e40297f399f55311
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728135
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define an explicit function to set events for the usb charger tasks, so
that the caller is not coupled to the internal task implementation, and
we can use a single task on a later patch.
BRANCH=none
BUG=b:226411332
TEST=make buildall
TEST=zmake testall
TEST=cq dry run
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I7a1223642b800568bf4f9864f75b2b647c84d29f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3663746
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split the temp_sensor_power config to separate config and
gpio definition.
To match the behavior of other optional gpios, there should be
config that enables support for feature that requires gpio and
per-board define that assigns custom GPIO name to board specific one.
BRANCH=main
BUG=b:181983966
TEST=zmake testall, compare_build.sh
Change-Id: I57ff2532444960170d7a8a08027f13fbce8f34a2
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3314583
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the checks that runs as part of "repo upload" looks for a single
newline at the end of each file. I'm getting warnings about this when I
touch files that do not follow this, even though I didn't add the extra
newlines.
This commit fixes all files by running the following:
for f in $(find . -name '*.[ch]');
do printf '%s\n' "$(cat ${f})" > ${f};
done
BRANCH=none
BUG=b:172020503
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ia3ece5b64b549d21ca11708791368002bb6e9b0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229797
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the static information may be read error when the battery
is initialized, so the battery information in share memory
need update.
BUG=b:199102576
BRANCH=keeby
TEST=make BOARD=cappy2 pass
Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com>
Change-Id: I408627ca9a61f8e5edd95297c09f165c5ac32524
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3168452
Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
Commit-Queue: Henry Sun <henrysun@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the spec, add the battery swelling function.
BUG=b:196308789
BRANCH=keeby
TEST=make BOARD=cappy2 pass
After testing, consistent with the battery spec.
Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com>
Change-Id: Ie8232d720a04974ccbb71c26b95fb0c0097b4a53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3090226
Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add EC_CBI_WP pin to EC.
BUG=b:195103187
BRANCH=keeby
TEST=make BOARD=cappy2 pass
Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com>
Change-Id: If0c181a2c690d4425590e54bbc9fe46b054fa288
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088959
Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modified so that the battery can reach 8.8V
after fully charged.
BRANCH=keeby
BUG=b:195080060
TEST=make BOARD=cappy2
Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com>
Change-Id: I952abe577060e1b4b96b7c72b74bb6eed0edca59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3062059
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit simply adds the GPIO_EC_CBI_WP pin for the keeby boards and
also sets CONFIG_EEPROM_CBI_WP.
BUG=b:181769483
BRANCH=None
TEST=`make -j buildall`
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I31694cb748d8b8a197b84634fbd9417d274a79d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3046413
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create Cappy2
BUG=b:191718716
BRANCH=Keeby
TEST=make BOARD=cappy2 pass
Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com>
Change-Id: Id374b76eb020d429c5281ed6e9b7d1d7050c62d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3020642
Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SSFC bit definition started diverging between coreboot and EC. To
avoid conflicts move the definitions of SSFC bits within EC to per
board instead of at a baseboard level.
Base sensor and Lid sensor components are common across all boards
Base Sensor - bits 0-2
Lid Sensor - bits 3-5
In addition, Sasuke uses bits 6-8 for usb superspeed mux
Cret board uses bits 9-11 in coreboot for audio codec
BRANCH=firmware-dedede-13606.B
BUG=b:187694527
TEST=make buildall
Signed-off-by: Parth Malkan <parthmalkan@google.com>
Change-Id: Ib0f732e5d41668135ff180c545ff4bb6a1cb1427
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3021932
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Marco Chen <marcochen@chromium.org>
|
|
Create the initial EC image for the cappy2 variant by copying the
lalala reference board EC files into a new directory named for
the variant.
(Auto-Generated by create_initial_ec_image.sh version 1.5.0).
BUG=b:192035460
BRANCH=None
TEST=make BOARD=cappy2
Signed-off-by: Sunway <lisunwei@huaqin.corp-partner.google.com>
Change-Id: I402e5425f25b07122a84294f9f413e576683952a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2992609
Tested-by: Tao Xia <xiatao5@huaqin.corp-partner.google.com>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Bob Moragues <moragues@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|