| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the keyboard backlight enable gpio on enable/disable. This will
improve power usage on some boards.
BUG=b:187757151
TEST=Set backlight to 0, 50, 0 and observe the enable gpio is 0, 1, 0
BRANCH=None
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: Ie03e98d939d05aea861c7b885a45b7e0c476db59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2887550
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not ignore a requested VCONN Swap if VDM setup is done. Use a DPM
request flag (which is always handled in the ready state) instead of the
VCONN Swap PE flag (which is only handled if mode entry hasn't
completed).
BUG=b:187861138
TEST=make buildall
BRANCH=firmware-volteer-13672.B-main
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I32ebb7c50e9abc47351398f229a2b464605f634d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895425
Tested-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PD 3.0, a DUT must reply with Not_Supported when a SVDM isn't
supported. Note that PD 2.0 is still perfectly welcome to send a NAK
reply for this case.
BRANCH=None
BUG=b:181194535
TEST=with follow-on CL, verify TD.PD.VNDI3.E3 VDM Identity passes
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie3b554cca017494b86342df1e9149b4452c83852
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2881028
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SDA and SCL components of the struct i2c_port_t are only used in
and for the i2c_wedge.c logic. This isn't needed in Zephyr. Remove
the values and functions that use them from the Zephyr build.
BRANCH=none
BUG=b:188179405
TEST=build volteer and trogdor
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I71a26fbd9bc51def744ef1f16a540728482c5a2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2896235
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Today some platforms include MKBP_KEYBOARD because they use side buttons,
switches or other events that share the same driver with MKBP keyboard.
Those platforms don't enable KEYSCAN task. The CL is moving key emulation
functionality to MKBP input devices, to make a clear separation
between the real keyboard usage and emulation/buttons/switches/etc.
All boards that were selecting `CONFIG_KEYBOARD_PROTOCOL_MKBP` without
KEYSCAN task are now updated to select `CONFIG_MKBP_INPUT_DEVICES`
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I515140ebf6e175f4b29991329f92266ffca232a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2824044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowing EC buttons and switches to be signaled via MKBP protocol, using
CONFIG_MKBP_INPUT_DEVICES. Default behaviour is unchanged.
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Cq-Depend: chromium:2824044
Change-Id: Ib96f98ecb3717a8ee8963be69fb7d7eb72e6d132
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2796382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, PCHG can send a device event any time. When a signal is
sent to the host while it's attempting to suspend, suspend is delayed
by 10 seconds.
A solution is to make Powerd disable a corresponding PCHG event (i.e.
EC_DEVICE_EVENT_WLC) when it's notifying an upcoming suspend to other
processes.
This patch makes PCHG re-enable EC_DEVICE_EVENT_WLC after suspend is
complete.
BUG=b:182973695, b:173235954
BRANCH=trogdor
TEST=Verify CoachZ suspends without a delay.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I10d7fcf234a7e0e05ce5d77b8e930a0cf0748331
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2863564
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, Storo uses the state of charge provided from the battery.
This isn't the same as the SoC shown on the screen because Powerd
compensates it based on the full factor and the low battery shutdown
threshold.
This change makes Storo use the display SoC for the charge LED module
so that the charge LED and the display SoC synchronously work.
BUG=b:181506409
BRANCH=dedede
TEST=Storo's LED turns from amber to white when the display soc
reaches 95% (internally 94.6%).
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I42c505c9fbd39f82de2318f0d7ff8589eeca4d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876165
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling with C++, the implicit casting that is performed in C is
disallowed. Add casts in preparation for C++ compatibility.
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I5c25440819428db65225c772c1c5115a735db58a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864519
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a given axis is reporting 1.1g or over, it means the device is
moving.
The constant representing the limit was not set properly.
BUG=b:187338766
TEST=unittests.
BRANCH=none
Signed-off-by: Gwendal Grignou <gwendal@google.com>
Change-Id: I36e38b5d7957ecaccc2c4e088d9aa506af6a2315
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875484
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously once we had one sample from a sensor, we considered the
fifo initialized. Meaning we would use our computed next timestamp
to spread the timestamps. This was causing issues with some devices
that ended up causing the timestamps to run ahead.
Reset next_timestamp_initialized back to 0 after each commit. This
will allow repeated timestamps but only if a driver stages/commits
the same timestamp twice. Staging the same timestamp with only a
single commit will still work as before (which is the expected path).
BRANCH=none
BUG=b:168335284
TEST=make run-motion_sense_fifo
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ib7c566f69d7c1e4e898050b67105555dd05376e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2871055
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original Port80 implementation assumes that the Port80 code is
only 2-byte wide and is less than 0x100. In the recent AMD chipset
(CEZANNE), AP will send a 4-byte Port80 code via a single PUT_IOWR_SHORT
eSPI transaction in PSP. This CL adds a config option to allow the
Port80 to print 4-byte code when the config is defined.
BRANCH=none
BUG=b:184872297
TEST=build the image with "#define CONFIG_PORT80_4_BYTE";
connect npcx9_evb to the eSPI host emulator; the host sends a
PUT_IOWR_SHORT transaction to IO address 0x80 with 4 bytes of code
"0xEEE20400"; the EC console shows:
Port 80 writes:
eee20400 <--new
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I3b93d9fc41e1875bb628a15c58231005e9555cfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2858296
Tested-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Commit-Queue: CH Lin <chlin56@nuvoton.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When not defining CONFIG_WATCHDOG or in Zephyr builds setting
CONFIG_WATCHDOG=n the build would fail here because
CONFIG_WATCHDOG_PERIOD_MS was not defined. This is avoided by
using #ifdef instead of IS_ENABLED
BRANCH=none
BUG=none
TEST=built lazor with and without zephyr
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I9f390bf32840fc98d38612cc1fcf00d779f902ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2859466
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both DP Status and DP Attention messages contain a MF bit which allows
the UFP-D to signal to the DPF-D its multi-function
preference. Chromeos host machines only act on this bit in the DP
Status message. However, other host machines may also use this bit in
the DP Attention message.
This CL adds a call to a board specific policy function so that the MF
bit can be set correctly in both the DP Status and DP Attention
message.
BUG=b:186632734
BRANCH=quiche
TEST=ODM partner verifed that with this bit set in both DP Status and
DP Attention, the host machine will select pin configuraiton
D. Previously, the host machine was selecting pin configuration C.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I0242d2a5ad056ec210d7364b606528e4a54858c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2856290
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, CrOS EC passes the battery remaining capacity (mAh) and the
full capacity (mAh) through ACPI to the AP so that the host can
calculate the battery SoC.
The host further manipulates the SoC to get the display SoC, which is
used to determine user visible behaviors. To get consistent behaviors
in all power states, this change enables the EC to send the display
SoC to the host via EC_CMD_DISPLAY_SOC command.
The Powerd's part is I5bd1371f2569d21d55df1b50a3d709b98bbf0325.
BUG=b:174433637, b:181506409, b:80270446, b:109954565
BRANCH=dedede, trogdor, nami, hatch
TEST=Storo, CoachZ
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Idc6992625d992a73be141987d02ed220508d3b74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853142
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before retimer firmware update, check power, if battery is not present,
or battery level is low (<5%), not allow PD suspend/performing
retimer firmware update process.
BUG=b:185320314
BRANCH=none
TEST=On Voxel DVT, AC only, no battery, boot up system and confirm
NDA PD port is not suspended, and retimer firmware update is not performed.
DA port has correct device functions.
TEST=On Voxel DVT, battery is low (< 5%), boot up system and
confirmed NDA PD ports is not suspended, and retimer firmware update is not
performed; DA port has correct device functions.
TEST=On Voxel DVT, when battery level >=5%, confirmed NDA PD port can be
suspended and retimer is scanned. DA port has correct device functions; device
tested are DP dongle, TBT dock and USB4 device.
Signed-off-by: li feng <li1.feng@intel.com>
Change-Id: I1c5b2bc54b2f6307503f82112f28bbc8d6b0591a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2858283
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This comment is from CL:1123314:
We do not want to allow depthcharge to suspend the PD port for a
firmware upgrade if there is not enough battery power to last during
the full firmware upgrade.
A common routine is created to check power:
pd_firmware_upgrade_check_power_readiness() in usb_common.c.
Firmware upgrade which needs to suspend PD port should check
this function to make sure there is enough power.
BUG=none
BRANCH=none
TEST=make -j buildall
Signed-off-by: li feng <li1.feng@intel.com>
Change-Id: I47910a4d82da9b569c297ad2cd399a2faf4cf98a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2862556
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a contract is invalidated, it's important we advertise our current
limit Rp rather than a residual collision avoidance Rp. However, we
should not attempt to set CC's when we're in a disconnected state. This
may cause us to set an unexpected CC selection, such as Ra if the TC
layer hasn't set the first termination yet.
BRANCH=None
BUG=b:183182447
TEST=on guybrush, boot with i2c tracing enabled and ensure Ra is never
set during init. Perform PR swaps and hard resets as source to ensure
correct Rp is set.
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I8fbe06685e4b4a6493dfbf55270ce3bda8cfbdfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845013
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 4ac1d81e1430dbfbfba1376a23ab19dfa845d7ef.
The config name collides with the same config name in zephyr.
Also, renames zephyr Kconfig CONFIG_PLATFORM_EC_FLASH to
CONFIG_PLATFORM_EC_FLASH_CROS as the corresponding change at Kconfig
side.
BUG=chromium:1202406,b:180980668
TEST=make -j16 runhosttests buildall && zmake testall && \
/mnt/host/source/src/platform/ec/zephyr/firmware_builder.py --metrics \
/tmp/tmplt8ty8ci test ; echo $?
BRANCH=none
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I5b5e58b30d936b5232e049827f458d9a2ed06340
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855320
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type-C ports may not be symmetrical on Reference Design Platforms hence
check if the port supports TBT & USB4 mode before entering the mode.
BUG=none
BRANCH=none
TEST=Tested on ADLRVP, TBT is not entered on non supported port
Change-Id: Ifd3eae72f6226686462b07f9008b66bd60c7895b
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2846634
Reviewed-by: Ayushee Shah <ayushee.shah@intel.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Detaching protocol-related info command from the keyboard driver.
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I7943f7537bdf003145e9bd909a14f9451d922a5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2796381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move protocol-related functionality out from the keyboard driver. This
change is required to allow passing button events via MKBP on devices with
non-MKBP keyboards. It reorganizes the code without changing the logic.
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: Ifb5b9d8e605f491313ee1dfe2c9950eb52152aa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2669355
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we arrive in the EC image without a battery and with a PD
supplier, we would eventually consider sending a HardReset since we
are expecting SourceCaps to be sent by the port partner. However,
since we no longer maintain our contract across images and we would
like for the board to not brown out, we avoid sending the HardReset
and simply disable the port instead.
However, this situation can occur before we decide on a charge port.
Therefore, this commit simply adds another condition when deciding to
skip sending the HardReset. If a battery is not present, but there's
no active charge port, we must be running on AC somehow so don't send
the HardReset as this port may in fact be the previous charge port.
BUG=b:176214112,b:178728138
BRANCH=dedede
TEST=Build and flash galith; plug in charger on C1, remove battery,
sysjump between RO and RW many times, verify that SoC remains in S0.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I16054d9c1ddac780243524e23a656ba3770bb4a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2848290
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a vconn swap check in pe_attempt_discovery that is used to
trigger a possible vconn role swap requeest. This check takes into
account a board's specific policy (if necessary). But, a vconn role
swap can also be triggered when sending a VDM message to
SOP'/SOP''. In this case, board specific policy still needs to be
checked.
BUG=b:183026242
BRANCH=quiche
TEST=tested on quiche and verified that there is no longer a continous
stream of vconn swap attempts.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I5d239c78dc0d324e0c3dbb99dfc7fa093e2f6570
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2827510
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 4e074a16c5703f0cdd7b7d780a8ae1bea53a445a.
Reason for revert: responsible for CQ failures (crbug.com/1202406)
BUG=chromium:1202406
BRANCH=none
TEST=CQ
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Original change's description:
> config: rename CONFIG_FLASH to CONFIG_FLASH_CROS
>
> The config name collides with the same config name in zephyr.
>
> Also, renames zephyr Kconfig CONFIG_PLATFORM_EC_FLASH to
> CONFIG_PLATFORM_EC_FLASH_CROS as the corresponding change at Kconfig
> side.
>
> BUG=b:180980668
> TEST=make buildall
> BRANCH=none
>
> Change-Id: Ibac008ddff8c041aae04dca0bbf973823abe7640
> Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816622
> Tested-by: Eric Yilun Lin <yllin@google.com>
> Reviewed-by: Keith Short <keithshort@chromium.org>
> Commit-Queue: Keith Short <keithshort@chromium.org>
Bug: b:180980668
Change-Id: Idc5e799d3b0ea8cc76dbbb49a91b3758ce6e9719
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2847274
Auto-Submit: Jack Rosenthal <jrosenth@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the boot banner to match Chromium OS. This also modifies the
version output to include "_zephyr" after the board name to clearly
identify the image type.
Boot banner:
Booting Zephyr OS build zephyr-v2.5.0-31-g6fcd6373e58a
--- UART initialized after reboot ---
[Image: RO, volteer_zephyr_v2.0.8350-190d6f 2021-04-08 11:15:09
keithshort@mtbaldy]
[Reset cause: reset-pin]
uart:~$ version
Chip: Nuvoton NPCX796FC 02
Board: 1
RO: volteer_zephyr_v2.0.8350-190d6f
RW: volteer_zephyr_v2.0.8350-190d6f
Build: volteer_zephyr_v2.0.8350-190d6f
2021-04-08 11:15:09 keithshort@mtbaldy
BUG=none
BRANCH=none
TEST=zmake testall
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ia136c4e025aba95217f1d8c51de39255fef54f7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2822208
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The config name collides with the same config name in zephyr.
Also, renames zephyr Kconfig CONFIG_PLATFORM_EC_FLASH to
CONFIG_PLATFORM_EC_FLASH_CROS as the corresponding change at Kconfig
side.
BUG=b:180980668
TEST=make buildall
BRANCH=none
Change-Id: Ibac008ddff8c041aae04dca0bbf973823abe7640
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816622
Tested-by: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a common state to communicate that we're off due to insufficient
power. If not defined, allow this state to fall back to OFF since many
systems with batteries will be using the battery LED to communicate this
information.
BRANCH=None
BUG=b:185508707
TEST=on boten, confirm no regressions with fake low battery in S5
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie8b37785a43fdfdd6619fe72c8bd7e2be6776e43
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832694
Reviewed-by: Rob Barnes <robbarnes@google.com>
Commit-Queue: Rob Barnes <robbarnes@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The header for charge_get_percent() will only define this function if
CONFIG_CHARGER is present. Make a declaration for complilation to use,
and then allow most of the led_get_state() function to be optimized out
with IS_ENABLED().
BRANCH=None
BUG=b:185508707
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I3d94f290ac5b9ec82b46b9c0a6fc668b2e8dd91c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832693
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, all boards using the LED On/Off module have battery LEDs.
However, if we'd like to expand support to Chromeboxes then the battery
LED must become optional.
BRANCH=None
BUG=b:185508707
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the LED on/off module towards using a more flexible LED support
approach. Define a weak power LED table and setter for boards to
override when needed. Note that during run-time these functions will
not get called since led_auto_control_is_enabled() will return false for
nonexistent LEDs.
This consumes an average of 165 additional bytes of flash space on
boards which do not use a power LED.
BRANCH=None
BUG=b:185508707
TEST=make -j buildall, load on guybrush (battery LED only) and confirm
no errors are seen. Load on Boten (both LEDs) and confirm behavior
appears normal
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Iaa1e22a7f5d8be39eb8792ee13d358087d7f7482
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832691
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds logic to clear any pending DPM_REQUEST_PR_SWAP once we
accept a PRS request from the port partner. This prevents a possible
back to back swap if we want to PRS, but the port partner sends the
request before PRS swap request is generated.
BUG=b:182441965
BRANCH=quiche
TEST=tested quiche with kohaku where quiche attaches in sink
role. This case causes quiche to want to power role swap and causes
the port partner to request a power role swap. Verified that only 1
power role swap occurs.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I05ee27897d5900e71257d268acd3bd37c8abb787
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799450
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cannot return a value from a different enum. Doing so produces an
error with clang:
battery_fuel_gauge.c:228:10: warning: implicit conversion from
enumeration type 'enum ec_error_list' to different enumeration
type 'enum battery_disconnect_state' [-Wenum-conversion]
Fix it by returning the existing error value.
BUG=none
BRANCH=none
TEST=CQ
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I1f3826ef26b1255934ea96cd1541f60436546b57
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2842204
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added option to get the Sinking or Sourcing state from either
PD or PPC.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: Ibb21ef69b5825ea5722ceacd5d7ef6f535aad17c
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2838127
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some PD chips have integrated SRC FET and control the SRC/SINK FET
from GPIOs hence cleaned up the code to enable Power Path Control
from either from PD or from Power MUX.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I77f96b681fd2e5fca35bce425e4bd5ec87d5ccfd
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2828980
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EC can enter hibernate via a keyboard shortcut alt+vol_up+H when
in S0. However, the EC will never actually hibernate from S0;
instead, it waits until the system is in S5/Pseudo G3 for 1hr
(default setting). If the system is in S0 when hibernate is
requested, it performs an unclean shutdown and then enters hibernate
immediately. However, this can allow spurious interrupts to wake up
the EC again.
This commit simply adds a 1s delay after the unordely shutdown and
before entering hibernate.
BUG=b:185302895,b:185206379
BRANCH=dedede
TEST=Build and flash DUT, boot to S0, press alt+vol_up+H, verify DUT
turns off and stays off.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I98e094a64ae716811e44fe1858ad981403da7b39
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2829116
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr builds, the I2C_PORT_* values are enums generated from
devicetree (instead of #define values). This means that in Zephyr,
it should suffice to just check VIRTUAL_BATTERY_ADDR_FLAGS.
BRANCH=none
BUG=b:185392974
TEST=zmake testall
TEST=make buildall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ifedaf45ec8bcfa33bb75c8381604ad565ca08d6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2826919
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Poll-based RX was technically incorrect since Zephyr was setting up
the UART to FIFO mode (instead of byte mode). This change replaces
polling the RX UART with interrupt based callbacks. When calling
uart_shell_stop(), the ISR will be replaced and will instead queue
items to a ring buffer which can be read from uart_getc() (it can
also be cleared via the uart_clear_input() function).
BRANCH=none
BUG=b:181352041
TEST=Build volteer, run, see expected 0xec07 from the GSC.
Cq-Depend: chromium:2730870, chromium:2730869
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I5d2b61e914b56f678a259b373969522da87e8df3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728824
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inform the AP when the PRL completes a Hard Reset.
BUG=b:183946291
TEST=Observe event during transition-to-default states
TEST=With kernel patch, observe mode reentry after Hard Reset
BRANCH=firmware-volteer-13672.B-main
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I4af576bd3a8fb57d820bd91d74817040214eaa5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799924
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a non-interruptible AMS is interrupted, the unexpected message
should yield a soft reset on the SOP* of the incoming message. Before
sending PS_RDY, check for this condition and soft reset if necessary.
BRANCH=None
BUG=b:182221344
TEST=on sasuke, confirm charger can successfully connect reliably
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I6612cb5d5d74cf99155cac99894a7746462a7b9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2823633
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we'll check the partner dual role flag when entering
Attached.SNK not from a power role swap. However, we have no way to
know the partner dual role capabilities at that point. Set up
connections as dedicated, and then allow the PE to update accordingly
when source capabilities are received.
BRANCH=None
BUG=None
TEST=on guybrush, confirm we automatically charge from a PD charger,
non-PD charger, and do not automatically charge from another chromebook
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ia7cdf4259c35af32a303113befe0bd2fb26cf6d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2821365
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always ensure we update our source PDO flags when storing partner source
cap replies during PE_SNK_Evaluate_Capability. However, only propose a
power role swap the first time we're storing source capabilities to
prevent infinite PR swap loops between Chromebooks.
BRANCH=volteer
BUG=b:184971310
TEST=ensure connection with a DRP partner results in correct setting of
dual role flags (dual-role for anything we don't want to automatically
charge from, dedicated for anything we do want to automatically charge
from).
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ida139af43fb384096b14e686cf5bd6bbfdf16aa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2821602
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wad -> was
BUG=none
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I75647696c7150b03d681e190d803fd5de28523d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2812140
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If entering DP or TBT alt mode fails, leave the state machine in an
inactive state. Allow the DPM to see that the mode entry process is done
and stop trying to send more VDMs.
BUG=b:184197145,b:179443762
TEST=make buildall
TEST=Pass TDA.2.1.2.1 on Voxel with AP-driven mode entry
TEST=Enter, exit, and reenter DP and TBT mode with host commands
BRANCH=firmware-volteer-13672.B-main
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: If72b3410f9aa174c48c65a8ca908d79e2090fa62
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2798525
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When requesting the next chunk in the RCH state machine, set the SOP
type for the request to the type of the just-received chunk response. Do
not just use the SOP type of the last transmitted message.
BUG=b:179443762
TEST=Pass TD.PD.SRC3.E32 with SOP' traffic immediately before chunk 0
BRANCH=firmware-volteer-13672.B-main
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ifb520bb7ee439ea895b11938395a943d5ca32edf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2812138
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new config CONFIG_USB_PD_ONLY_FIXED_PDOS. If that config is
enabled, ignore non-FIXED PDOs in both the console command `ada_srccaps`
and also when selecting the preferred PDO for a voltage.
Enable CONFIG_USB_PD_ONLY_FIXED_PDOS for servo_v4 and servo_v4p1, since
they don't expose non-fixed PDO in their srccaps. Without this change,
there is a risk that the "best" PDO for a given voltage will be
non-FIXED and then that voltage just won't be supported at all.
BRANCH=none
BUG=b:178484932
TEST=added
Change-Id: I0d1187ca372120c7fe21d627e1b82b59f6334add
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809353
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes pd_extract_pdo_power() to output the correct voltage and current
for non-fixed PDOs. Add unit test.
BRANCH=none
BUG=b:178484932
TEST=added
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I6de55be3c753e01ef26424896c6fd41b8df8f94b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2805226
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds an API to the CBI to allow the EC to update the FW_CONFIG
tag field. This API is dependent on not having a the chipset task
defined.
BUG=b:164157329
BRANCH=quiche
TEST=Verified on quiche that long button presses toggle bit 0 of the
FW_CONFIG field.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I3a4360b32feac4a04fe53b518c122940f4b340f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776227
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Sam Hurst <shurst@google.com>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A simple implementation to manage PD Policies
on honeybun devices. This is meant as an
interim solution until a more robust solution
is implemented
BUG=b:183026242
BRANCH=none
TEST=make runtests
Tested on Voxel by plugging in a dock
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: Ib8b38754e21b8497fe28855a7f80d2962a4ae7f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774128
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On MT8183, when EC detects a watchdog reset, EC needs to reboot itself
in preparation for the next boot. This means that AP loses the reset
cause (as AP system reset is toggled), and, therefore, we need to save
the reset reason in the EC.
This has been done in CL:1295890 for chip stm32. For the new MT8183
model 'cozmo', we need to do the same for chip it83xx.
BUG=b:184225435
TEST=firmware_EventLog passed on Cozmo
TEST=FW_NAME=cozmo emerge-jacuzzi chromeos-ec
BRANCH=none
Change-Id: I08d165b5dbd8e1d92fad66ef3873fc406ab6a0e0
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2814079
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
|