| 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
Tricium: disable
Change-Id: I58e7c3c81184c42c60f87460cdd8e53351da5055
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749427
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: If15dc0c1e01fbe5d95fa83968880b151f17bfa3b
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729113
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I067e6595e063bdf32f0e662c04ba263a154ab849
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729105
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Ib0bbdb30156168b779606173dfaa6f04a6e0e2da
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729104
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I2c0a818b8c8a94f019ee861e7219dcd561fbad5e
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729103
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I6ffa89f678f4407698c9df3873a5e32d2df804a0
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729112
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I9a1efea86a538a286027060d68f0366ffe98cd60
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729111
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a finer grain set of define, to allow some sensors to use interrupt
when wired properly and some use force mode when not using interrupt.
BUG=b:230401133
BRANCH=asurada,dedede,brya
TEST=Build all. Check Zephyr with herobrine. Check on bugzzy.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I9c7d50b88a0eaec017f4e5e2ccfdb80761d71fb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3609121
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang warns:
error: initializer element is not a compile-time constant
There is an upstream LLVM review with proposed fix:
https://reviews.llvm.org/D76096.
In the meantime, we will work around it.
BRANCH=none
BUG=b:172020503, b:202062363
TEST=./util/compare_builds.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I066e082870bcd726555a5f2461f09988d4e6ce55
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3237042
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building with clang, it warns:
board/lalala/board.c:819:28: error: use of logical '&&' with constant operand
[-Werror,-Wconstant-logical-operand]
if (adc_key_state_change && ADC_VOL_DOWN_MASK)
^ ~~~~~~~~~~~~~~~~~
board/lalala/board.c:819:28: note: use '&' for a bitwise operation
if (adc_key_state_change && ADC_VOL_DOWN_MASK)
^~
&
board/lalala/board.c:819:28: note: remove constant to silence this warning
if (adc_key_state_change && ADC_VOL_DOWN_MASK)
~^~~~~~~~~~~~~~~~~~~~
The code appears to have been copied to several boards, which were found
with:
git grep --name-only 'adc_key_state_change &&'
BRANCH=none
BUG=b:172020503
TEST=make CC=arm-none-eabi-clang BOARD=lalala
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I2c473f27f2ea805c94aab0276049acf8282b6092
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3210242
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates a few board files that were including adc_chip.h instead of
adc.h. adc_chip.h should not be included explicitly in most cases.
BRANCH=none
BUG=b:181271666
TEST=buildall passes
Change-Id: I42f8b5b2129ebe18a96d089f0355b581cba1b274
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120316
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each board defines its own callback lid_angle_peripheral_enable().
The implementation is very similar. Create a common implementation
and reduce the duplicated code.
This CL removes the board callbacks which are identifical to the
common callback. If it is slightly different, keep it and add
the __override tag.
The check of TEST_BUILD is unnecessary as the board callback is not
linked in the test build.
BRANCH=None
BUG=b:194922043
TEST=Build all the images.
Change-Id: I73d381730f35b80eff69399cdfc5fb54f839aee0
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3069175
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently keyboard_scan_config is defined by each board using
CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as
__override hence removes CONFIG_KEYBOARD_BOARD_CONFIG.
BUG=None
BRANCH=None
TEST=buildall
Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@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>
|
|
BUG=b:192103649
TEST=build_packages and build_image
BRANCH=none
Signed-off-by: Bob Moragues <moragues@chromium.org>
Cq-Depend: chromium:3002421
Cq-Depend: chromium:3002658
Cq-Depend: chrome-internal:3942638
Cq-Depend: chrome-internal:3942797
Cq-Depend: chrome-internal:3952181
Cq-Depend: chrome-internal:3952182
Change-Id: I4d06932c9e50765428890f3aef562ec64264f713
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002714
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|