summaryrefslogtreecommitdiff
path: root/zephyr/app
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-0512-583/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* zephyr: kconfig: Add options for AMD power sequencingJack Rosenthal2021-09-171-6/+6
| | | | | | | | | | | | | | Add config options for AMD power sequencing and wire up to guybrush. Note this doesn't toggle any more code to compile yet. BUG=b:195137794 BRANCH=none TEST=compile for guybrush Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ifd17c6eec05335079bd52955c37f37407501e270 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169565 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: it8xxx2: use half space (512KB) from flashDino Li2021-08-171-0/+31
| | | | | | | | | | | | | | | | This saved about 3 seconds erasing time while running software sync. This also pull configurations of flash/memory layout to chip level. BRANCH=none BUG=b:195954913 TEST=software sync successfully. (without erase timeout patch of depthcharge) Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Ia7fa08fdf6bdde4c47ca8d852f8eeaa83f39dae5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3097250 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: rename kconfig PLATFORM_EC_VBOOTJack Rosenthal2021-08-111-1/+1
| | | | | | | | | | | | | | | | | | | Rename CONFIG_PLATFORM_EC_VBOOT to CONFIG_PLATFORM_EC_VBOOT_EFS2, since this is what is actually toggled by the config. EFS2 is only a small component of verified boot, and we have many boards which don't actually use it (e.g., trogdor family) for verified boot, making the existing name very confusing. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I68ea5815b4a001c680fc78196bb7a02815799b52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088164 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: it8xxx2: re-configure ROM_BASE address for RW imageDino Li2021-08-061-0/+10
| | | | | | | | | | | | | | RW image is at the CROS_EC_RW_MEM_OFF offset from the beginning of flash. BRANCH=none BUG=b:194794622 TEST=sysjump rw/ro, sysinfo Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I7456376a790a354876b1b7312310e9a6a5fcef44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3063100 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: npcx: Add default config for npcx7m6fb & npcx9m6fWealian Liao2021-07-272-58/+25
| | | | | | | | | | | | | | | | | | | | NPCX series (NPCX7/9) uses the most same config in chromium projects. This CL adds default config for npcx7m6fb & npcx9m6f. So we can use the same config style. Moreover, fix CROS_EC_RW_MEM_OFF for npcx9 series. BUG=none BRANCH=none TEST=zmake testall TEST=npcx9_evb get 'version' correct in RW image. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I6cbd014d006aa68851231173477c8f22e234af6f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3033229 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: npcx: Cleanup the header default configWealian Liao2021-07-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current setting lets choice select & config value misalign. e.g., ``` // Earlier definition in Kconfig.npcx CONFIG_NPCX_HEADER_SPI_MAX_CLOCK=50 // Default choice automatically set CONFIG_NPCX_HEADER_SPI_MAX_CLOCK_20=y ``` Upstream PR(https://github.com/zephyrproject-rtos/zephyr/pull/36999) adds symbols for those choice options. This CL change to override the header setting by the choice symbols. BUG=none BRANCH=none TEST=zmake testall TEST=get the aligned header config on Lazor Cq-Depend: chromium:3038117, chromium:3038118 Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ie11b462d0dd52e14becdfef9ad195c81b67242aa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034783 Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: npcx: Default the NPCX header generator in Kconfig.npcxWai-Hong Tam2021-07-151-0/+13
| | | | | | | | | | | | | | | The NPCX header generator configs are duplicated on multiple projects. Move them to the default in Kconfig.npcx. BRANCH=None BUG=b:192253134 TEST=Built the brya, kohaku, lazor, volteer, asurada, and posix-ec images. Booted the lazor image on Lazor board. Change-Id: I560434473d76ba67fc089ead4ab39efbb5ab6703 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3029002 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Source the chip/ Kconfig in ARCH-specificWai-Hong Tam2021-07-154-1/+1
| | | | | | | | | | | | | | | | The Zephyr upstream sources the soc/ directory in ARCH-specific. Our shim zephyr/app/ec should align to source the chip/ directory in ARCH-specific. So it won't result defining a default value in the shim layer but missing the original definition in Zephyr. BRANCH=None BUG=b:192253134 TEST=Built the brya, lazor, asurada, and posix-ec images. Change-Id: I20476f8b071d530008333850d4d0a4c9598d0958 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3032867 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: npcx9: Move chip specific configs to Kconfig.npcx9Wai-Hong Tam2021-07-154-36/+89
| | | | | | | | | | | | | | | | | | Similar to Kconfig.npcx7, move the NPCX9 specific configs to this file. And create Kconfig.npcx which contains the configs shared by all NPCX chipsets. This CL just moves the configs and doesn't modify the values. BRANCH=None BUG=b:192253134 TEST=Built the brya and lazor images. Booted the lazor image on Lazor board. Change-Id: I68a126e0102d3be49c2fb1620da64ba371d1404e Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3029001 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: npcx: Remove PLL setting for NPCX chipWealian Liao2021-07-011-13/+1
| | | | | | | | | | | | | | | | | | | UPSTREAM PR(https://github.com/zephyrproject-rtos/zephyr/pull/36217) moves clock setting from Kconfig to devicetree. This CL removes the Kconfig setting for clock configuration. BUG=none BRANCH=none TEST=zmake testall TEST=Check timer by 'timerinfo' on volteer with zephyr v2.5 & v2.6 Cq-Depend: chromium:2994365, chromium:2994237 Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I8fd60a715a6b81ad0afe56f46c752ae42a619ea5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994230 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: Increase priority of shell threadSam Hurst2021-06-231-0/+16
| | | | | | | | | | | | | | | | Increase the priority of the shell thread so console commands like waitms and sysjump work properly. BRANCH=none BUG=b:184643483,b:189220025 TEST=Verified that "sysjump rw" works properly and firmware_ECWatchdog test passed. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I3676508d4ccc79e700833da30c27a4d7b391b240 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957584 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: npcx: Move common config defaultsKeith Short2021-06-112-0/+134
| | | | | | | | | | | | | | | Create Kconfig.npcx7 to set the config defaults that are required by the NPCX7 chipset. BUG=none BRANCH=none TEST=zmake testall TEST=Build and run lazor Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I41cad23dfe7c57438b6126e0210c9f7223dfc834 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2951220 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: faft_ec: print time stamped init labelSam Hurst2021-06-021-0/+7
| | | | | | | | | | | | | | | | | Print time stamped label, [<time> Inits done], after initialization is complete. The label is used in the firmware_ECBootTime test. BRANCH=none BUG=b:189218631 TEST=sudo test_that -b trogdor-zephyr 192.168.0.70 firmware_ECBootTime results-1-firmware_ECBootTime [ PASSED ] results-1-firmware_ECBootTime/firmware_ECBootTime [ PASSED ] Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ifa96d1eb0035a823d5e25b2f3973f4bb063ca044 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2927464 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* qcom: Create new configs for SC7280Wai-Hong Tam2021-05-181-0/+7
| | | | | | | | | | | | | | | Create new configs (Chromium EC namespace and Zephyr namespace) for SC7280. In this state, SC7280 power sequence has no difference from SC7180. BRANCH=None BUG=b:187980397 TEST=Built all the Chromium EC images and Zephyr EC images. TEST=Modify a board to use the new CONFIG. Change-Id: I178b8ffa5d79d3828baf222ac77906ab2262cf76 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2893069
* zephyr: Move watchdog initialization earlierMichał Barnaś2021-05-181-4/+4
| | | | | | | | | | | | | | | | | | On CrosEC the watchdog is initialized just after printing banner. Without this change, hangup in eg. vboot hash calculation can result in EC being unresponsive. BUG=none BRANCH=none TEST=Add infinite loop in hash calculation function (efs2.c). Without this change, EC will be unresponsive. With it, watchdog will reboot the EC. Change-Id: I68c33bf79ad9645da55c1782662c19d9cb7cc58d Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897240 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Remove CONFIG_VBOOT_HASH_RELOAD_WATCHDOGMichał Barnaś2021-05-181-4/+4
| | | | | | | | | | | | | | | | | | This reverts commit 0e5fa530e2f1eba6e16188be65ac39974a151a17. After commit 97e22d467 it is no longer needed to reload watchdog during hash calculation. BUG=b:182499153 BRANCH=none TEST=Flash EC and verify that hash calculation is correctly done without rebooting by watchdog. Reading watchdog value shows that there is enough remaining time. Change-Id: Ia7bb6452a6ac42cda88d8b5e1203876cd0465b31 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897239 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Set system workqueue priority to preemptiveKeith Short2021-05-101-0/+9
| | | | | | | | | | | | | | | | | | | | | The deferred tasks are now run as part of the workqueue (see CL:2854850). By default, Zephyr runs the workqueue as the lowest priority cooperative thread, which prevents preemption by any other thread. This blocked the PD tasks from servicing new PD requests, causing spec violations. Change the system workqueue priority to be the lowest preemptive thread priority. This is done at runtime because the Kconfig system doesn't support setting integer values using other configuration options. BUG=b:187173381 BRANCH=none TEST=Volteer connect charger. Verify SrcCap response takes 23 ms. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I95d024a510a743e967fcc9bd10e3acb6c36e8b77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2880716 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: shim: do not return from main if thread monitoring is enabledFabio Baltieri2021-04-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Returning from main causes the corresponding thread structure to be skipped from the thread list, so that it does not get displayed by commands such as "kernel stacks". The structure is statically allocated though, so it is convenient to keep it active when thread monitoring is enabled so that the corresponding stack can be tuned. After this patch: uart:~$ kernel stacks ... 0x200c76f8 main (real size 1024): unused 148 usage 876 / 1024 (85 %) ... BUG=b:183748844 BRANCH=none TEST=kernel stacks Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Iee34fac36f5e8989e9d7c761b7cc6b9a14a7b987 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853598 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: Update banner to match Chromium OSKeith Short2021-04-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* zephyr/app: ec: add configuration for AP SoC generationtim2021-04-141-0/+6
| | | | | | | | | | | | | | | | | | Add Kconfig options of MT8192 to select the AP's SoC. BUG=b:185202623 BRANCH=none TEST=zmake -lDEBUG configure -b -B zephyr/build_ite zephyr/projects/it8xxx2_evb/ CONFIG_AP=y CONFIG_AP_ARM_MTK_MT8192=y Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Change-Id: If6404d53f19b29ec870531ae54bb4fe8f0e3787c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2825079 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: New test of ec appJeremy Bettis2021-04-024-2/+27
| | | | | | | | | | | | | | | | | | | | | | | Change zephy/app/ec/main.c:main to instead be named ec_app_main, so that it can be called from tests, and created a trivial stub main to call it. Fix up the CMake files for this change. Add a new ec_app test which calls the ec_app_main() and verifies that hooks of HOOK_INIT type are called. The CONFIG_PLATFORM_EC_HOOKS is the only config currently enabled in tests, so that is the only thing tested for now. BUG=b:184273560 TEST=zmake configure --test zephyr/test/ec_app BRANCH=none Change-Id: I84ca9b36d3f387629ff5bd83463429d762cc2301 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799914 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: main: initialize the buttonsWai-Hong Tam2021-03-301-0/+6
| | | | | | | | | | | | | Initialize the button states and enables the interrupts. BRANCH=None BUG=b:182398910 TEST=With the following CLs, tested the volume buttons working. Change-Id: I4d5b6965915c1103093114c3b01acb965c619a37 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2792693 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Enable link time optimization (LTO)Keith Short2021-03-242-1/+13
| | | | | | | | | | | | | | | | | | | The upstream Zephyr repo does not support LTO. Reconfigure the platform/ec source files into a cmake library so the LTO option can be enabled for all the platorm/ec sources. This reduces the Volteer flash image size by 9176 bytes. BUG=none BRANCH=none TEST=zmake testall TEST=boot zephyr-ec on Volteer, verfiy AP boots Cq-Depend: chromium:2776218 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I8312773c8b21c498ec8116a8558b7571831159ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776217 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Fix recovery modeKeith Short2021-03-161-0/+11
| | | | | | | | | | | | | | | | | | | The Zephyr initialization was missing a call to lpc_int_mask(), which caused the detected recovery event to be ignored. Add this call before keyboard_scan_init() to match Chromium EC initialization. Note - this requires CL:2731180 for recovery mode be detected correctly. BUG=b:182808955 BRANCH=none TEST=zmake testall TEST=Press recovery combo, verify depthcharge starts recovery mode. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: If03a837208d6fc025aef1359e72c09fcf39b5656 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2760805 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: add AP Kconfig options for Qualcomm SC7180Jack Rosenthal2021-03-111-0/+13
| | | | | | | | | | | | | | Add Kconfig options to enable support for Qualcomm SC7180 CPU. BUG=b:182398910 BRANCH=none TEST=compile for lazor Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ie3cf6b316f12af589cba3f2386a9d28d0d9c43ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748279 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* vboot_hash: Add watchdog reloadsKeith Short2021-03-091-4/+4
| | | | | | | | | | | | | | | | | | | | When neither CONFIG_SHA256_HW_ACCELERATE nor CONFIG_SHA256_UNROLLED are enabled, calculating the hash can trip the watchdog. Add watchdog reloads at a rate of 1/2 the watchdog period when both these options are disabled. BUG=b:182208446 BRANCH=none TEST=zmake testall TEST=Boot zephyr-ec on Volteer, powerdown AP and observe watchdog timeouts are fixed Signed-off-by: Keith Short <keithshort@chromium.org> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I6170b457c91f3247adf9ad47cd7e93b128a1d13b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744356 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: fix compiler warningKeith Short2021-03-081-0/+1
| | | | | | | | | | | | | | Correct "vboot_man()" undefined warning. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5d058c249893b77ee607f086e434f885b08d8d9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2743543 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: enable flash-space optimized defaultsJack Rosenthal2021-03-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable two options by default, CONFIG_SHELL_MINIMAL and CONFIG_CBPRINTF_NANO. Together, these cut back on flash space by a bunch: Before (volteer): Memory region Used Size Region Size %age Used FLASH: 258804 B 512 KB 49.36% SRAM: 63328 B 62 KB 99.75% IDT_LIST: 0 GB 2 KB 0.00% After (volteer): FLASH: 244996 B 512 KB 46.73% SRAM: 61432 B 62 KB 96.76% IDT_LIST: 0 GB 2 KB 0.00% BUG=b:169158406 BRANCH=none TEST=above flash space reduction TEST=boot volteer to OS TEST="help" in uart console now lists all commands Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I05d3eab717f1880755f7589c186c7f53c4ff1c74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727840 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: efs2: Enable EFS2 for volteerYuval Peress2021-02-261-4/+14
| | | | | | | | | | | | | | | | | | | | | | Enable efs2 running at boot for volteer using the CONFIG_PLATFORM_EC_VBOOT flag. When enabled, prior to starting any tasks, the RO image will compute the hash of the RW image and send it to the cr50 for verification. Note that the cr50 verification will fail right now until we update chromeos-bootimage-0.0.3.ebuild's add_ec() function to compute the hash using the zephyr build's output. This final change will be needed because zmake does not produce build/${BOARD}/R(O|W)/ec.R(O|W).flat BRANCH=none BUG=b:164421798 TEST=zmake testall TEST=build volteer, flash, see TX data to cr50 and correct response. Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I2c8b3f726a843297cec3fc08306d8edaaa1999f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2721498 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: add watchdogWealian Liao2021-02-221-0/+5
| | | | | | | | | | | | | | | | | | | In npcx7 series, the Timer and Watchdog module (TWD) generates the clocks and interrupts used for timing periodic functions in the system. It also provides watchdog reset signal generation in response to a failure detection. This CL enables the watchdog functionality in zephyr system. BUG=b:176523207, b:177604307 BRANCH=None. TEST=add stall function to check the system can reset by the watchdog Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Iee0312dd6132ce76e622178b3a666aa415bc735a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2659135 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: initialize the system codeYuval Peress2021-02-181-0/+3
| | | | | | | | | | | | | | | | | | | | At present the data pointer is not valid and we're not able to store any data between jumps. Fix this by adding a call to system_common_pre_init(). Add an empty test implementation so that tests still pass BRANCH=none BUG=b:167392037 TEST=zmake testall TEST=build/flash volteer, make sure that jdata was set up correctly (it is at the end of the data RAM address). Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I8e948b68484927fa0da9f7d4db00ff339c22bae2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2695957 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* main: Add chipset.h headerSimon Glass2021-02-041-0/+1
| | | | | | | | | | | | | This is needed for init_reset_log(). Add it. BUG=none BRANCH=none TEST=builds host_sleep.c without warnings Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Id7251f1e16d17d19aef6e9ad3e60851f9b63124b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676263 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: add HOOKS taskKeith Short2021-01-291-0/+9
| | | | | | | | | | | | | | | | Enable the HOOKS task so the periodic HOOK_TICK and HOOK_SECONDS are called. HOOK_TICK is required by the PWM LED support. BUG=b:174851299 BRANCH=none TEST=make buildall, zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Id00f38833d05e32b921d92d2441831058294c994 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2636481 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: test: provide Kconfig defaults for testsPaul Fagerburg2021-01-251-0/+13
| | | | | | | | | | | | | | | | | | When we're building a unit test, provide defaults for many of the hardware options that don't need to be included in a unit test, or have to be there for the linker's sake but aren't actually used. BUG=b:178220157 BRANCH=none TEST=`zmake testall` Signed-off-by: Paul Fagerburg <pfagerburg@google.com> Change-Id: Iaab2a3a3a8175e7e08099467947cf183b707cef6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645695 Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Add support for CMD_AP_RESET_LOGSimon Glass2021-01-221-0/+9
| | | | | | | | | | | | | | | | Add the options for this along with the the host command that presses it into service. BUG=b:178104134 BRANCH=none TEST=build for zephyr See that host command 121 is processed without error now: 21-01-21 12:14:50.829 [7.981900 HC 0x121] Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I63b8586a6e2065cbfba8de81d3690cd2f7082c9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643617 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: add comet lake power sequencing optionsJack Rosenthal2021-01-161-0/+6
| | | | | | | | | | | | | Add Kconfig options to enable cometlake power sequencing. BUG=b:177609422 BRANCH=none TEST=with kohaku CLs Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ib40873f623a4860e83bd4692e0d2ade1abbecb99 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633164 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: copy zephyr-chrome/app directory to platform/ecJack Rosenthal2021-01-126-0/+202
Previous Git history can be found here: https://chromium.googlesource.com/chromiumos/platform/zephyr-chrome/+/cc6e5d19939c03ac091b5e91d1a3b511ba99b68a/app/ BUG=b:177157241 BRANCH=none TEST=zmake testall Cq-Depend: chromium:2623408 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ib66a60b5404ed04e330721e96ab91e38ad97d2db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622901 Reviewed-by: Yuval Peress <peress@chromium.org>