| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NPCX & IT8xxx2 series are both use BBRAM for scratchpad/reset_flags
access. cros_bbram API already handles the chip-specific code. This CL
moves scratchpad/reset_flags access functions to the common system.c to
avoid duplicate those functions.
BUG=none
BRANCH=none
TEST=zmake testall
TEST=check reset cause on lazor & npcx_evb
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I0a394e5fbf784ec2e3caea77f194c88ae9d5542e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3067156
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert various device_get_binding to DEVICE_DT_GET, which is processed
at link time and more efficient. Same pattern on different modules where
the output is checked using device_is_ready.
BRANCH=none
BUG=none
TEST=zmake configure -b -B ~/build-volteer/ zephyr/projects/volteer/volteer
TEST=zmake configure -b -B ~/build-it8xxx2_evb/ zephyr/projects/it8xxx2_evb
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: If426420da2c61b3bc02eb77e122469a1a40799f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2985463
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per CL:2731180, system_preinitialize() should be added in ztest. Add
the dependency functions to ztest_system & add system_preinitialize
back to ztest.
BUG=b:183611735
BRANCH=none
TEST=zmake testall
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: Iea90e1909d28556421471d7e905d0e56705b3fc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2878761
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add power management support for the NPCX family.
BUG=b:184653704
BRANCH=none
TEST=zmake testall
TEST=Verify deep sleep on Volteer (with next CL) and measure power.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I86eef50c13742e7ca717da38a92636e589af6c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855527
Reviewed-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements non-psl hibernate mechanism for cros_system driver. First,
we plan a little hibernate function locates in the last 32K ram block
in npcx7 series. Then power down the other ram blocks and go to deep
sleep mode for better power consumptions.
Please notice do not use global or call the other functions in this
hibernate utility since we have turned off the other ram blocks.
BUG=b:177904393, b:183745774
BRANCH=none
TEST=zmake testall
TEST=All wake-up GPIOs can wake-up ec from hibernating on npcx7 evb.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I48f95b0e616ad27f77a6d0ada8251ec438427741
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2821116
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add chip vendor, name, and revision information via cros_system driver
API in the shimmed system driver.
BUG=none
BRANCH=none
TEST=build & boot ec on volteer
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I09ff25d7ad07371900211426a15560ee61326b12
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807478
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add hibernate support via cros_system driver api in the shimmed
system driver. It also saves related reset flag for reset cause
checking.
BUG=b:173787365
BRANCH=none
TEST=zmake testall
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I6c919ac46b9f38a9a2888967be0f55412d4bcc26
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2794205
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reset cause will influence the initialization flow. We define some
of initial flow of the reset cause for the following development.
This CL include the following:
1. Add check_reset_cause() which sets the system reset flag.
2. Add chip_bbram_status_check() to clear the error status & show the
error message.
3. Add CONFIG_BOARD_RESET_AFTER_POWER_ON feature.
4. Define the initialize flow for reset cause.
BRANCH=none
BUG=b:178101173
TEST=check the following reset cause by 'sysinfo'
1. power-up
2. reset-pin reset
3. soft by 'reboot' console command
4. watchdog by 'waitms 2000'
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I515868d8cda4544fdbe782210b0108b4dda0d8cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2731180
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL include the following:
1. Adds BBRAM system call.
2. BBRAM read/write data isn't really for characters. Change to use
uint8_t.
BUG=None.
BRANCH=None.
TEST=build & boot EC on volteer
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: Iff92071e1808c4dacb24bf46e663898120369821
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2731177
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __image_size should match used portion of the flash. Note that in
Zephyr, different linker scripts have different variables. _flash_used
is only available for the verified chips. Other chips may use a
different name or may require manual calculation.
Compute the size by using the Zephyr sections. This is the parallel
to core/cortex-m/ec.lds.S's logic.
BRANCH=none
BUG=b:164421798
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: If91acd5dc2b925ad226f2d1c3feccc77617e04df
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2721495
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move all bbram logic to a common npcx.dtsi file included in
both volteer and kohaku. Updates the bbram access logic in
zephyr/shim/src/system.c to use devicetree. Updates the unit
tests to match.
BRANCH=none
BUG=b:178807203
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I2a7c65b92a395c622e8cfe751e4e98b3173e38fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2669271
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring both flash.c and system.c into the build.
zephyr/shim/src/system.c now includes only code that is needed
to stub out the chip specific system.c implementation in
platform/ec (which is now using the devicetree values).
BRANCH=none
BUG=b:176828988, b:174481378
TEST=zmake testall
TEST=build volteer, flash, and test flashinfo.
Cq-Depend: chromium:2631353
Change-Id: I5c542fca01dcc4af98401bcbbf402e579cd45e36
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2649463
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add basic panic implementation for Zephyr. Not using any fancy shared
or always-on memory for now ... need to resolve how that will be
handled later.
BUG=b:178011288
BRANCH=none
TEST=run various crash commands on volteer, observe output
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia1ce386f738283a2a2b9b60ef7e0bf97f8317837
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645687
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This task is used to ramp up charging from an external source. Add
support for this along with required Kconfig options.
Add one more stub in system to make it build. This is covered by the
existing bug.
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
build volteer on zephyr
So far the output is not interesting (need more drivers):
uart:~$ chgramp
Chg Ramp:
State: 0
Min ICL: 0
Active ICL: 0
Port 0:
OC idx:0
OC 0: s-1 oc_det0 icl0
OC 1: s0 oc_det0 icl0
OC 2: s0 oc_det0 icl0
Port 1:
OC idx:0
OC 0: s-1 oc_det0 icl0
OC 1: s0 oc_det0 icl0
OC 2: s0 oc_det0 icl0
Signed-off-by: Simon Glass <sjg@chromium.org>
Cq-Depend: chromium:2613607
Change-Id: I603ba43d4384b62ed0c1a64b580599b42ae85e81
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617039
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add stubs for this and system_get_image_copy(). These should be
implemented when we have the underlying functionality available.
BUG=b:176171847
BRANCH=none
TEST=build on zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Iddee3b94cdb9e93a52718e49aea2750f77f5ea2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2601141
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shim the system_jumped_late() and system_enter_hibernate() that needed
by keyboard scan.
BRANCH=none
BUG=b:167405015
TEST=compile with keyboard scan
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I4f79dd3b0313f4ed19550b1896ed0e439407caf6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552321
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Needed by power sequencing. Doing nothing will work fine for now.
BUG=b:173787365
BRANCH=none
TEST=compile with power sequencing
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia4e48d92ebbee7a788e4515f6583095349aea0f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548306
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Required by power sequencing. Should always be false for now as
sysjump is not implemented.
BUG=b:171312361
BRANCH=none
TEST=compiles with power sequencing
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I1dc6e553211734307ce5a28ed3b5b9feeff002a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548304
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to align with go/zephyr-shim-how-to, update all of the
platform/ec header files to use "quotes" and only use <brackets> for
zephyr header files. Also include an empty line between the two.
BRANCH=none
BUG=none
TEST=all zephyr tests build and pass; build volteer
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I27c275c24aa4f8eb40e100b07517b60f548f06cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521594
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
platform/ec/include/system.h defines an extern uint32_t sleep_mask
which is used in a few modules, but specifically for our interest
right now in enable_sleep and disable_sleep inline functions also
defined in include/system.h. These functions are used in the following
CL when shimming common/i2c_master.c and will likely be used in other
.c files that will be shimmed in later.
Note that in platform/ec this is also defined in common/system.c it
just wasn't needed until now.
BRANCH=none
BUG=b:171302975
TEST=Built zephyr-chrome/projects/experimental/volteer
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I026be635fad85688301f1009c13722c0f788227f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508761
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed a compiler warning for multiple definitions of BUILD_ASSERT.
BUG=None
BRANCH=None
TEST=build, see that the warning about BUILD_ASSERT is gone.
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: I97ed721fc3a28bc29b985e335fbd223cac28eb1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2499501
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Auto-Submit: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
This change adds the system.h/system.c shim layer to import jump data
passing between images.
BRANCH=none
BUG=b:167392037
TEST=Added tests in zephyr-chrome/tests/
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I8c6ae2cf579be063c5b3f7219c440aadad3eefa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2491430
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|