| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the "i2cspeed port [speed]" console command. If only the port
number is given, then the current port bus speed is reported. With 2
arguments, the port bus speed is changed. Valid speeds are 100, 400,
1000 and the unit is kHz.
BRANCH=none
BUG=b:201039003
TEST=with follow-on patches, switched I2C bus speed between 400 kHz
and 1 MHz.
Change-Id: I7ca6b2c7a8fd9abe8e8ec77e4d1702529b297fe8
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3181504
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the sysjump, the watchdog has been installed by the last image.
The watchdog install function return -EBUSY while the watchdog has
already been set up. This CL adds watchdog running check & reinstall
watchdog for sysjump.
BUG=none
BRANCH=none
TEST=RO/RW use the different timeout setting & test the timeout.
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: Ibe36d50c030afcfe79eb804ca05c7b426468cb07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180705
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NPCX BBRAM module provides VBAT/VSBY/VCC power drop information. The
status bit will set when the chip power-up or hibernate PSL wake-up,
which provides the false error alarm. This CL changes the power drop
information to LOG_INF.
BUG=none
BRANCH=none
TEST=Check the log with LOG_LEVEL_INF.
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I36bafedbc694333236ae8824310cfdfcceab7ac8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180704
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that currently CONFIG_SYSCON=y is required. There's an ongoing
PR (https://github.com/zephyrproject-rtos/zephyr/pull/38762) to remove
that requirement in favor of simply detecting an enabled node in DT
via the compatible string.
BRANCH=none
BUG=b:179900857, b:165777478, b:200642229
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@google.com>
Change-Id: Idad1f53afbda503e0e0b2fdf2931d5267a391d4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3177749
Reviewed-by: Sam Hurst <shurst@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thermistor drivers now query the device tree for configuration.
Thermistor tests have been updated to be parameterized
on all thermistors enabled in the device tree.
BRANCH=none
BUG=b:184374937
TEST= 1) zmake testall
2) make runhosttests
Cq-Depend: chromium:3161332
Signed-off-by: Aaron Massey <aaronmassey@chromium.org>
Change-Id: Ic5330cd5c33e79e192428ca857651de9a225856e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133812
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Aaron Massey <aaronmassey@google.com>
Commit-Queue: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a generic led_get_brightness_range function using static
values from the device tree. This is currently ignoring led_id, but no
pwm_led based device is using it right now anyway, so this could cover
all existing use cases.
BRANCH=none
BUG=b:177452529
TEST=called the function, verified the values in runtime
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I67dc7564eb6724e401961261ff5cc5892899ad5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170401
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes macros used to create named-fans instances.
It will enable to have multiple named-fans declared in devicetree
without raising "multiple definitions" error during compilation.
BRANCH=main
BUG=none
TEST=Add named-fans instance in device tree and build firmware.
Compilation with 2 or more names-fans should work correctly.
Change-Id: If5c9a74f743749efc3a2872b0ced98500e96ca52
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3176200
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add taskinfo command as alias for "kernel threads" for backward
compatibility with CrOS EC.
BRANCH=main
BUG=b:190224781
TEST=Check that taskinfo correctly executes "kernel threads" command
Change-Id: Ibdce9d8342fb7a99577b1f8d031c419fa485e7b0
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174058
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a set of properties for color mapping in the device tree for
the pwm-leds device, and maps them to the internal "struct
pwm_led_color_map".
BRANCH=none
BUG=b:177452529
TEST=compared the structure on gdb
TEST=build and run on volteer
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ib3a704afccad40eab7115371dbf72c568f5602d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170400
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of the other atomic operations return an
atomic_val_t value. This should be so for
atomic_clear_bits as well. The standard return
value is the field value prior to applying the
operation to it.
BUG=b:141363146
BRANCH=none
TEST=zmake configure -b $PROJ_HAYATO
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I7a64fddb1174e57ed0e04ef1502310d8494e860d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3173092
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 20222d48571fa44c76fdb0ededd0ed042e9f8244.
Reason for revert: brya thinks it's in EC-RW when it's really still in EC-RO.
Original change's description:
> npcx: correct the image copies indication bits for npcx9
>
> In npcx5/7, we use two reserved bits in the BSC1 register (offset 0x07
> of the MDC register) to indicate what the current image copy is.
> In npcx9, these two bits are used by the booter. We need to change them
> to another two empty scratch bits which are not used by the booter.
>
> BUG=b:165777478
> BRANCH=none
> TEST=pass "make buildall"
> TEST=check the related bits changed by "sysump ro" and "sysjump rw"
>
> Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
> Change-Id: I6bcfe6d8752c6fa10022a21956d2e0ceb7f9418e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153119
> Tested-by: CH Lin <chlin56@nuvoton.com>
> Reviewed-by: caveh jalali <caveh@chromium.org>
> Auto-Submit: CH Lin <chlin56@nuvoton.com>
> Commit-Queue: caveh jalali <caveh@chromium.org>
Bug: b:165777478
Change-Id: I24cdfec0d5c8cd998f087525ae21b2a3daea43a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3172266
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Tested-by: caveh jalali <caveh@chromium.org>
Commit-Queue: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restructure the GPIO interrupt table to separate the constant data from
the data that needs to be updated at runtime.
On Herobrine, this saves 180 byts flash and 240 bytes RAM.
BUG=b:199328071
BRANCH=none
TEST=zmake testall
TEST=Boot zephyr on herobrine
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I096aec5b00fd7dc661db326a278ab44a0a1286da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169563
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move a comment and a function to make the next CL cleaner.
BUG=none
BRANCH=none
TEST=none
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I83185db995b083f839709eb564353a66364e87d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169562
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In npcx5/7, we use two reserved bits in the BSC1 register (offset 0x07
of the MDC register) to indicate what the current image copy is.
In npcx9, these two bits are used by the booter. We need to change them
to another two empty scratch bits which are not used by the booter.
BUG=b:165777478
BRANCH=none
TEST=pass "make buildall"
TEST=check the related bits changed by "sysump ro" and "sysjump rw"
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I6bcfe6d8752c6fa10022a21956d2e0ceb7f9418e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153119
Tested-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: caveh jalali <caveh@chromium.org>
Auto-Submit: CH Lin <chlin56@nuvoton.com>
Commit-Queue: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for CONFIG_I2C_DEBUG and CONFIG_I2C_DEBUG_PASSTHRU options
to zephyr.
BUG=none
BRANCH=none
TEST=zmake testall
TEST=Add CONFIG_PLATFORM_EC_I2C_DEBUG=y on herobrine, verify "i2ctrace"
command is available and functional.
TEST=Add CONFIG_PLATFORM_EC_I2C_DEBUG_PASSTHRU=y on herobrine, verify
I2C passthru messages shown during TCPC firmware sync.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ic2d9977af4fa707dab4fdaff332fbcc34491c5fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3163211
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some functions requires to call task_wait_event in test task context.
Because of that there is needed shimmed_tasks entry for
TASK_ID_TEST_RUNNER.
BUG=none
BRANCH=none
TEST=make configure --test zephyr/test/drivers
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I92cd3776a827f9a7f9bb1faee67ed998260e23a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3159528
Tested-by: Tomasz Michalec <tmichalec@google.com>
Tested-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For TCPC firmware updates, the host first queries the I2C port from the
EC and passes this back during I2C passthrough operations. Default to a
1:1 mapping of the remote port to local port, if the devicetree doesn't
explicitly set the remote-port property.
BUG=b:197153501
BRANCH=none
TEST=Boot zephyr with AUX firmware updates enabled in depthcharge,
verify the TCPC firmware is updated.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ie45d302044e94c0325b36cc41c528fc0ca858384
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3158974
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete the "physical-port" node from named-i2c-ports, and automatically
detected when multiple children point to the same I2C bus.
This ensures that the I2C bus locking always blocks all matching I2C
nodes, without the user needing to specify this relationship manually
in the devicetree.
BUG=none
BRANCH=none
TEST=Dump out i2c_physical_ports[] on herobrine.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I3d254684483a95af12e7940446f4cd8743684708
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154694
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In v2.7, the gp register was removed from the data collected during a
fatal error. See this PR for more details:
https://github.com/zephyrproject-rtos/zephyr/pull/36235
Since that PR implies gp has no useful value, let's just drop it from
the panic data.
BUG=b:198824039
BRANCH=none
TEST=build with Zephyr main branch for hayato
note: still fails at link step due to missing symbol
"_image_rom_size"
Change-Id: Ia917d50c193fd2e493612a6d2dd6c0c6d92a1e6b
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3160405
Commit-Queue: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC version does not follow the the AP and OS version. This causes
confusion during development. This change augments the EC version output
to include the CrOS FWID when available. The CrOS FWID will be missing
when the CrOS EC is built outside of cros_sdk. When CrOS FWID is missing
'CROS_FWID_MISSING' will be used.
Zephyr/zmake support will be added later, CROS_FWID32 is set to
'CROS_FWID_MISSING' in zephyr builds until then.
BUG=b:188073399
TEST=version
21-05-20 16:43:18.627 Chip: Nuvoton NPCX993F A.00160101
21-05-20 16:43:18.631 Board: 1
21-05-20 16:43:18.631 RO: guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.634 guybrush_13983.0.21_05_20
21-05-20 16:43:18.639 RW_A: * guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.641 * guybrush_13983.0.21_05_20
21-05-20 16:43:18.644 RW_B: guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.644 guybrush_13983.0.21_05_20
21-05-20 16:43:18.647 Build: guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.651 guybrush_13983.0.21_05_20 2021-05-20
21-05-20 16:43:18.657 16:31:19 robbarnes@robbarnes0
ectool version
RO version: guybrush_v2.0.8770+f47439f75
RO cros fwid: guybrush_13983.0.21_05_20
RW version: guybrush_v2.0.8770+f47439f75
RW cros fwid: guybrush_13983.0.21_05_20
Firmware copy: RO
Build info: guybrush_v2.0.8770+f47439f75
guybrush_13983.0.21_05_20 2021-05-20 16:31:19 robbarnes@robbarnes0
Tool version: 1.1.9999-f47439f @robbarnes0
BRANCH=None
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: Ief0a0c6e9d35edc72ac2d4780ee203be41d7305f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2894145
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the I2C initialization to compile time, saving a modest amount of
RAM space
BUG=b:199328071
BRANCH=none
TEST=zmake testall
TEST=boot Zephyr on Herobrine.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I9d324eedca25666bcce1928b069918a357cf6081
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3158973
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr does not use the GPIO based I2C recovery. Delete
i2c_get_line_levels() and I2C_CONFIG_GPIO() as these symbols are no
longer referenced.
Move a the DT_NODE_EXISTS to the top of the file as the named-i2c-ports
node is need throughout this file.
BUG=none
BRANCH=none
TEST=zmake testall
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I62cec339b448b78d1e9ca150227f604f23af32f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3158972
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current initial stage couldn't use the kernel delay function. Use
CPU nop instruction to wait for the external reset from H1.
BUG=b:182875520
BRANCH=none
TEST=Enable CONFIG_BOARD_RESET_AFTER_POWER_ON for evb & toggle GPIO.
Check the delay is 2 seconds.
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: If221181358c2a4df758d5bb9b57c3fbba31100aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3143633
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The APIs of BBRAM read and write have been renamed and moved to
drivers/bbram. The related call routines of shim/system.c need to
be fixed.
BUG=b:195843756
BRANCH=none
TEST=the board of asurada and it8xxx2_evb can boot EC and
access bbram successfully after adding this CL.
zmake testall --> pass
Change-Id: I98e51a278a24eeb4bbc92343fe6fc97e3e758e8a
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153117
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set up the pwm_leds data from the device tree, gets rid of most static
map defines and sets CONFIG_LED_PWM_COUNT automatically.
BRANCH=none
BUG=b:177452529
TEST=build and run on volteer
TEST=compared the built up pwm_leds structure with gdb
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ib41faf86ae018f5a1ed8a1c96c4b6ec081e175d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154256
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate the BBRAM driver to the upstream version.
BRANCH=none
BUG=b:195843756
TEST=zmake testall
Cq-Depend: chromium:3147080
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I441e58f94c4874e268aad36df2f036a88187801b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3147230
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add EC root directory to include directories list and
fix include directive in kx022 driver info file.
BRANCH=main
BUG=b:194424288
TEST=Compilation for lazor should work correctly.
Change-Id: I1312b4cac8695e61936b9635c7a59c2f59907502
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3129961
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON to Kconfig
BRANCH=main
BUG=b:183544739
TEST=Define added configs to prj.conf file and verify that
compilation takes them into account.
Change-Id: I7672315a6938102878b5b3b87a9dcf96b0a71d46
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141561
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing Kconfigs for:
- PLATFORM_EC_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF
- PLATFORM_EC_BATTERY_CHECK_CHARGE_TEMP_LIMITS
- PLATFORM_EC_BATTERY_MEASURE_IMBALANCE
- PLATFORM_EC_BATTERY_MAX_IMBALANCE_MV
Change help text in battery yamls to use Kconfigs instead of
legacy CONFIGs
BRANCH=main
BUG=b:183544739
TEST=Define added configs to prj.conf file and verify that
compilation takes them into account.
Change-Id: I01716c1515350550c18bbfd4944638034a25c7b5
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141598
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
k_work_reschedule will reschedule a work item if it's already been
scheduled. Switching from k_work_schedule to k_work_reschedule fixes
us the hooks test snag we saw during the v2.6 uprev.
BUG=b:195971523
BRANCH=none
TEST=zmake testall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I66f6bbad1cd39847e68a178165c9c59922abbb7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3144378
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr v2.7, DT_ENUM_TOKEN is deprecated in favor of
DT_STRING_TOKEN. Additionally, DT_ENUM_UPPER_TOKEN is deprecated in
favor of DT_STRING_UPPER_TOKEN.
See the v2.7 release notes for details:
https://docs.zephyrproject.org/latest/releases/release-notes-2.7.html
Since we backported the DT_STRING_* macros to our v2.6 branch, let's
switch to them ahead of time to prepare for the v2.7 uprev.
Note: the DT_STRING_* macros are compatible with Zephyr's device tree
enums, but also allow non-enum properties to be used in the same
fashion. This commit does the bare minimum for compatibility with
v2.7, i.e., just swap the macros without dropping enum properties
anywhere. We should investigate whether we want to continue using the
enum properties or abandon some of them for any string in the future.
BUG=b:198824039
BRANCH=none
TEST=zmake testall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I1efd8f99bc7d93504c0ab94510406cd36ad24cd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3144536
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr 2.7+, CONFIG_UART_SHELL_ON_DEV_NAME is removed in favor of
using the zephyr,shell-uart device chosen by the UART driver. Since
we choose zephyr,shell-uart on all of our boards, we are clear to make
this change ahead of the v2.7 uprev.
Also see https://github.com/zephyrproject-rtos/zephyr/pull/37902.
BUG=b:198824039
BRANCH=none
TEST=zmake testall
TEST=compile posix-ec with v2.7_rc1
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ic066ce0617fa900ae7c1c96a2cbece0b698764bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3142750
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove duplicated Kconfig option for EC_BATTERY_REVIVE_DISCONNECT
BRANCH=main
BUG=none
TEST=Verify that this Kconfig option still exists
Change-Id: I02d8ef4912cff8c4388b2490c73e06b5bffd151a
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141597
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds possibility to define board's batteries in device
tree. Default battery is defined by adding "default_battery" as node's
label.
It also adds common batteries definitions that can be used using
compatible string.
If no 'batteries' node is defined in device tree, custom board's
logic must be used and old "named-batteries" should be defined.
BRANCH=main
BUG=b:183544739
TEST=This commit shouldn't change behaviour of any build.
Compiling and flashing CrOS EC and Zephyr should
work without problems.
Change-Id: I94f0121f45eb061f1358fadbcd7d8006c08b0bea
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107385
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code calling task_get_current() requires to return from this function
valid task ID. To test this code, new TASK_ID_TEST_RUNNER is introduced.
Test can set current thread as test runner and guarantee that
task_get_current() return valid task ID.
BUG=b:184856919
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Id5470e5337ab2419aad07f0f22de5f1576e870c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110086
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Kconfig options CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805 and
CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815 to enable/disable the workaround
for PS8805/PS8815 firmware reporting the incorrect device ID.
BUG=none
BRANCH=none
TEST=zmake testall
TEST=On herobrine, verify that "ectool pdchipinfo 0" reports a device ID
0x02.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I16367ae5276e974671b034294275104d5831df21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3140325
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support dynamic PDO selection CONFIG_USB_PD_DPS.
This config controls the charging voltage and power according to the
input power and battery configuration.
DPS would continuously evaluate the system load and current charging
voltage, and decide a new one by below:
1. If the PDO can fulfill system desired power.
2. If the PDO is efficient for the battery configuration.
To detect if the system load cannot be fulfilled by the current PDO,
it checks:
1. if the input current closes to the PDO current limit.
2. if the input power closes to the PDO maximum power.
To detect if the system load can be fulfilled by a more efficient PDO,
it checks:
- if the voltage of a new PDO is closer to the battery voltage than the
current PDO, and the power is able fulfill the system load.
BUG=b:169532537
TEST=1. tested on asurada, the charging voltage is able to switch to
different PDOs under different system loads
2. tested that the DPS is able to switch charge port
(e.g. C1 12V -> C0 9V) based on the provided PDOs.
BRANCH=asurada
Change-Id: I7c7706b331dc0d4f8ac68569dc7ed852fc9308e3
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897064
Tested-by: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verify that we can call host commands from driver tests by adding a test
that calls the EC_CMD_GET_PROTOCOL_INFO host command. Add a few
convenience functions to host_command.h when building with CONFIG_ZTEST
enabled. Also, add eSPI emulator to support the test.
Coverage:
- lines 17.4% -> 17.8%
- functions 21.4% -> 22.0%
BRANCH=none
BUG=b:189954415
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ib9e750eeab555ea629a560cbf3beed28e346c460
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3031842
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a "math.h" to "builtin" and rename "math.h" in the "core"
directories to "fpu.h". "builtin" is the directory containing headers
that mirror those in the standard library and is used for device builds.
The host builds exclude the "builtin" directory and use the standard
library. Without this change, building host tools such as "ectool" and
attempting to include "math.h" would result in incorrectly picking up
the "math.h" from the device "core" directory, not the standard library
version.
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Id6b2df42cb0ff5ec2cfc07aa8f29861da6804bdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3130625
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add board_get_vbus_voltage to get vbus voltage by board, for
ADC_VBUS maybe is only for one typec port when the DUT supports
multiple typec.
BUG=b:196001868
BRANCH=none
TEST=show correct C1 vbus voltage on tomato
Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com>
Change-Id: Ia567ec3bddf4f62a08c9902b4f0721783f2c07ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3084403
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the CONFIG_ADC_CHANNELS_RUNTIME_CONFIG config option to allow
the adc_channels array to be tweaked at runtime.
BRANCH=none
BUG=b:183452273,b:181271666
TEST=buildall passes
Change-Id: I1241012b6e36c19baa7fe80853a6c6de4affeefa
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3116990
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compile the NPCX monitor code under the Zephyr environment.
BUG=b:197162681
BRANCH=none
TEST=Build zephyr for volteer. Verify npcx_monitor.bin is created.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Idba6e013288eb9c300c91ea57313db08e13b2e97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3116567
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: CH Lin <chlin56@nuvoton.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit moves some of the standard library functions from util.c
file to util_stdlib.c file. It will allow to use util.c for both
CrOS EC and Zephyr builds and will make shim util file unnecessary.
BRANCH=main
BUG=b:177096231
TEST=Build both, CrOS EC and Zephyr firmwares
Compilation should finish without any problems
After flashing, both versions work as they should
Change-Id: If6f930a04d28bec35faa16759f43b36176bf3de7
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3081827
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current API for system_get_scratchpad mixes the status and the value
being read. Update the signature to allow both.
BRANCH=none
BUG=b:195481980
TEST=make testall && zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I3a5f5ad523d507c53a5d474806f58afafb82e70c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3074828
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code was added after v2.5 was already dropped from the tree.
These macros are not necessary.
BUG=b:197159539
BRANCH=none
TEST=zmake testall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Idbbf3d6431542a707f5abe954b56838a4b18403b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104787
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was using the values of invalid PLATFORM_EC_ defines
BUG=none
BRANCH=none
TEST=zmake configure -b $PROJ_HAYATO
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I86ab2ff1e1018732e0b4bbaaaebe6786c38cc644
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105486
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for disabling the console command help strings.
With CONFIG_SHELL_HELP=n, 2000 bytes saved on Volteer
BUG=none
BRANCH=none
TEST=zmake testall
TEST=Verify console on Volteer with and without CONFIG_SHELL_HELP
enabled.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I2186828f28691182f673851ac27d207b4a4a6f44
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3093492
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the console command shim to pass in a struct, reducing the amount
of duplicated code.
This change saves 500 bytes on Volteer
BUG=none
BRANCH=none
TEST=zmake testall
TEST=verify console on Volteer
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I2da374b9a3b3b78a3e7b66d5c31f4ed2131aef01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3093491
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Kconfig option for CONFIG_KEYBOARD_REFRESH_ROW3.
BRANCH=None
BUG=b:196885613
TEST=zmake testall
Change-Id: Idd55e5bc3af4aab95aa9577b49eb3d8eb5e90630
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3102286
Reviewed-by: Keith Short <keithshort@chromium.org>
|