summaryrefslogtreecommitdiff
path: root/zephyr/CMakeLists.txt
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-051-407/+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>
* SSFC: Framework to support two charger sourcesParth Malkan2021-09-241-1/+2
| | | | | | | | | | | | | | | | | | Many platforms have requirements to support more than one charge source (eg. pirika). It can't be supported by just enabling two different CONFIGS as that can lead to conflicts. Eg.USD_PD_VBUS_DETECT_TCPC vs USB_PD_VBUS_DETECT_DISCHARGE. This change provides a framework that supports two different charger sources in the same build. Please see the CL for relevant logs. BRANCH=None BUG=b:194375840 TEST=make -j buildall Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I309cc5930233983e615d90a4290fc749abf7aa2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088232 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: guybrush: Bringup power sequencingJack Rosenthal2021-09-171-1/+4
| | | | | | | | | | | | | | | | | Bringup power sequencing for AMD and enable for guybrush. Note that at the moment we had to copy-paste the power signals and related funcitons, the code was a bit too far from shimming without extensive editing. We can try and merge together later. BUG=b:195137794 BRANCH=none TEST=power sequence to S0, nothing useful on ap console (yet!) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9a577e24d80fe0ff992af4b847e14695b82f871d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169568 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: add support for I2C debuggingKeith Short2021-09-151-0/+2
| | | | | | | | | | | | | | | | | | | 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>
* zephyr: fix compilation of kx022 driverMichał Barnaś2021-09-091-0/+1
| | | | | | | | | | | | | | | 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>
* test: accel_cal: fix for gitlabYuval Peress2021-09-031-0/+2
| | | | | | | | | | | | | | | | | | Fix a rounding error. See documentation for details. It is important to include the detailed documentation as it provides strong details for why these flags are necessary. It will avoid confusion in the future. BRANCH=none BUG=b:178731498 TEST=zmake configure --test zephyr/test/accel_cal (both in chroot and in gitlab docker). Change-Id: Ie040f49dfaacb84dc10b76481a16213be6a2f09e Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3139254 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* RTC: Zephyr PCF85063A RTC driverSam Hurst2021-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zephyr PCF85063A RTC driver BRANCH=none BUG=b:194710429 TEST=ectool rtcset 30000 ectool rtcget Current time: 0x0000753d (30013) ectool rtcsetalarm 10 after ~10 (measured with a timer) printed on ec console: [160.248900 event set 0x0000000002000000] I tested the alarm up to one hour. Hibernation test: $ rtc RTC: 0x00047624 (292388.00 s) $ hibernate Hibernating until wake pin asserted. # Wait approx. 30s before pressing power button [Reset cause: hibernate wake-pin] $ rtc RTC: 0x00047645 (292421.00 s) # 292421s - 292388s = 33s Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I3d5eb7d209dd63df54049a02165076f393d53be1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115449 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Build a script to call gcovJeremy Bettis2021-08-311-0/+2
| | | | | | | | | | | | | | | | | | | In chroot, you can always use llvm-cov to parse the coverage files, but in zephyr sdk, you have to use the right gcov binary for each toolchain. Use cmake to build a gcov shell script, and call it from zmake coverage. BUG=None TEST=zmake coverage in chroot and gitlab BRANCH=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I6203445f0a412193e8280bb5cdf7994d5346fdbd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3130622 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* common: move standard library functions from util.c to another fileMichał Barnaś2021-08-251-0/+1
| | | | | | | | | | | | | | | | | | 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>
* Reland "zephyr: pull in the version string from zmake"Jack Rosenthal2021-08-201-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93adb802c1a626fbb73d762124e90be4fee08a8b. This commit was reverted due to build failures with the chromeos-zephyr ebuild. The root cause of the build failures was that the ebuild uses different working directories between the configure and build phases, and so the path to the include directory we generate during the configure phase won't work in the build phase. Use the full path here so that we can run the diffrerent phases in different working directories. Diff from original commit: Change-Id: Idcbd0c0546f9fcb12fcd66c617e024b8aa2a893a > --- a/zephyr/zmake/zmake/zmake.py > +++ b/zephyr/zmake/zmake/zmake.py > @@ -235,7 +235,7 @@ class Zmake: > self.logger.info("Clearing old build directory %s", build_dir) > shutil.rmtree(build_dir) > > - generated_include_dir = build_dir / "include" > + generated_include_dir = (build_dir / "include").resolve() > base_config = zmake.build_config.BuildConfig( > environ_defs={"ZEPHYR_BASE": str(zephyr_base), "PATH": "/usr/bin"}, > cmake_defs={ BUG=b:197287679 BRANCH=none TEST=emerge-volteer chromeos-zephyr Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I80cec7a1622edcecc670b7dbeed56dadcdf71555 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3111305 Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* Revert "zephyr: pull in the version string from zmake"Rob Barnes2021-08-201-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 10809eb023d475681b45863e68d906fae4667eda. Reason for revert: Causing build errors b/197287679 Original change's description: > zephyr: pull in the version string from zmake > > Zmake computes a version string and stores it in FRID/FWID, but this > was never plumbed all the way out into the version functionality in > the OS, which was reporting the version generated by > util/getversion.sh. > > Add a mechanism to generate the version header from zmake and replace > the getversion.sh generation with that. > > BUG=b:184832251 > BRANCH=none > TEST=provided unit tests > TEST=get this version string on posix-ec: > posix-ec_v2.6.73347-cmsis:c3bd20,ec:c814a9,hal_stm32:f8ff8d,os:efe095 > 2021-08-18 14:10:18 jrosenth@germania > > Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> > Change-Id: Idec1c5f8b5f014126706e4fdc1f3d158edf40a63 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104625 > Reviewed-by: Denis Brockus <dbrockus@chromium.org> Bug: b:184832251 Change-Id: Ifcc4830e3097c8dc8126bb76adfeb3ce75a7a667 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110293 Auto-Submit: Rob Barnes <robbarnes@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
* zephyr: pull in the version string from zmakeJack Rosenthal2021-08-191-26/+4
| | | | | | | | | | | | | | | | | | | | | | Zmake computes a version string and stores it in FRID/FWID, but this was never plumbed all the way out into the version functionality in the OS, which was reporting the version generated by util/getversion.sh. Add a mechanism to generate the version header from zmake and replace the getversion.sh generation with that. BUG=b:184832251 BRANCH=none TEST=provided unit tests TEST=get this version string on posix-ec: posix-ec_v2.6.73347-cmsis:c3bd20,ec:c814a9,hal_stm32:f8ff8d,os:efe095 2021-08-18 14:10:18 jrosenth@germania Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Idec1c5f8b5f014126706e4fdc1f3d158edf40a63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104625 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Enable -WerrorKeith Short2021-08-171-0/+3
| | | | | | | | | | | | | | | | | Enable -Werror compile options so that code warnings cause build failures. BUG=b:174871569 BRANCH=none TEST=zmake testall TEST=Introduce unused variable warning, verify build fails Change-Id: Ifecfc391dc936a56ba9c02d70f089e058f0453d2 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3101832 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* 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: asurada: enable voltage regulatorDino Li2021-07-231-0/+2
| | | | | | | | | | | | | | | Fixed error of host commands (0x12c~0x130) for controlling voltage regulator. BUG=b:189855648 BRANCH=none TEST=Verified that no error on regulator host commands. (verified on both cros-ec and zephyr fw image) Change-Id: Ib7c5782e80262a38be0517181afbd78160847040 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3007380 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* cbi: Introduce CONFIG_CBI_GPIOPhilip Chen2021-07-141-0/+3
| | | | | | | | | | | | | | | | | | | For the boards where SKU_ID/BRD_ID comes from the strapping pins on EC, this new config enables AP to ask EC for those hardware configs using the CBI host command `EC_CMD_GET_CROS_BOARD_INFO`. BRANCH=None BUG=b:186264627 TEST=make buildall -j TEST=Enabled CONFIG_CBI_GPIO for lazor and manually verified with `ectool cbi get`. Change-Id: I7ec9097bab96d2076d9d42db2d003460db000113 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002452 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* driver/tcpm/ite_pd_intc: separate pd interrupt to ite_pd_intcRuibin Chang2021-07-091-0/+2
| | | | | | | | | | | | | | | | | Separate pd interrupt functions to ite_pd_intc for easier maintenance on cros_ec and zephyr. And enable PD interrupt functions for zephyr. BRANCH=none BUG=none TEST=1.can zmake hayato and make asurada 2.PD port functions work on board hayato Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Change-Id: I67082bb442da7dfb669e23d8315d81f4abe7ba76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2999358 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr/drivers: npcx: reorganizes the flash driver(3)Tim Lin2021-07-011-2/+1
| | | | | | | | | | | | | | | | | | | | | Move NPCX specific code crec_flash_physical_get_protect(), crec_flash_physical_get_protect_flags(), crec_flash_physical_protect_at_boot(), and crec_flash_physical_protect_now() from shim/flash.c to cros_flash/cros_flash_npcx.c. BUG=b:187192628 BRANCH=none TEST=zmake -lDEBUG configure -b -B zephyr/build_volteer \ zephyr/projects/volteer/volteer/ Cq-Depend: chromium:2994430 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Id6ed382ad4578969838339c9eb874b323390c485 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891674 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org>
* cbi: Separate CBI EEPROM driver from CBI protocolPhilip Chen2021-06-291-1/+2
| | | | | | | | | | | | | | | | | Factor out the physical storage driver (cbi_eeprom.c) from the CBI data/protocol layer (cbi.c), setting up the groundwork to support more options of CBI sources. BRANCH=None BUG=b:186264627 TEST=make buildall -j Change-Id: Ic30a6f789970dd6723cf70d4e852ddb7161f796f Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2965848 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* zephyr: asurada: move power/it8xxx2 to be in power/mt8192Denis Brockus2021-06-221-1/+0
| | | | | | | | | | | | | | | | | | | | The power_signal_list was mistakenly moved to a new file power/it8xxx2.c and is used by both zephyr and cros-ec. This moves the content of this file into where it belongs at power/mt8192.c BUG=b:180980668 BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I687f097bee37ac5211c3a7d04019e2dd70207889 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2980111 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* config: Rename CONFIG_CROS_BOARD_INFOPhilip Chen2021-06-161-1/+1
| | | | | | | | | | | | | | | | | | Rename CONFIG_CROS_BOARD_INFO to CONFIG_CBI_EEPROM to make it clear that the information comes from on-board EEPROM. It sets up the groundwork for adding more options of CBI sources later. BRANCH=None BUG=b:186264627 TEST=make buildall -j Signed-off-by: Philip Chen <philipchen@google.com> Change-Id: I9a6feee0a8b35bbf29e445544243485507767ad8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2945792 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* zephyr: Add support for the PS8743 USB muxSimon Glass2021-06-151-0/+2
| | | | | | | | | | | | | Add a Kconfig for this chip so it can be used with zephyr. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: If2eedaf9100462a9d591525d21bfa76c7e861af1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941888 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Support the IT5205 USB muxSimon Glass2021-06-151-0/+2
| | | | | | | | | | | | | Add support for this chip on Zephyr, needed for Asurada. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I868f46ee617003eef5ceba65be4241b502d6d280 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941886 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Add support for ISL9238 Rev CSimon Glass2021-06-151-0/+2
| | | | | | | | | | | | | | | This chip version cannot be detected at runtime. Add support for the Kconfig option to signal that this revision is on the board, needed for Asurada. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I3a86b94e4b4936dc6f6f071d6facd364555865a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941885 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Add support for the MT6360Simon Glass2021-06-151-0/+2
| | | | | | | | | | | | | Add a Kconfig for this driver so it can be used from zephyr. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I14434a52388b21d2f4200cea50c326ffb2788abe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941884 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: driver: add ST accel_lis2dw12Denis Brockus2021-06-071-0/+4
| | | | | | | | | | | | | | | BUG=b:180980668,b:189857004 BRANCH=none TEST=make buildall TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ib743f0dbcc4a9731ccb575344413f161cd0dbba2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2944617 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: add I2C_VIRTUAL_BATTERY configDawid Niedzwiecki2021-05-271-1/+2
| | | | | | | | | | | | | | Add I2C_VIRTUAL_BATTERY config to use virtual battery driver. BUG=b:188885798 BRANCH=none TEST=zmake testall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I6d1a4bfd8c950aa569ee836d9d22e438eeaef67b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919906 Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: Add IT8XXX drivers to KconfigMichał Barnaś2021-05-261-0/+4
| | | | | | | | | | | | | | | | | | | | There was no possibility to use ITE_ON_CHIP in zephyr. This commit adds possibility to use it as TCPM. It adds also Kconfigs for IT8XXX2 and IT83XX drivers BUG=b:182500469 BRANCH=none TEST=Manipulate prj.conf to check if drivers are compiled: PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP=y PLATFORM_EC_USB_PD_TCPM_DRIVER_IT83XX=y PLATFORM_EC_USB_PD_TCPM_DRIVER_IT8XXX2=y Try building with different options. Eg. enabling drivers without using ITE_ON_CHIP should change nothing in build. Signed-off-by: Michał Barnaś <mb@semihalf.com> Change-Id: I31a9a6899123b855ed82d92b46f023db77714b5a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919909 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Enable power button and sequencingDenis Brockus2021-05-191-0/+3
| | | | | | | | | | | | | BUG=b:180980668 BRANCH=none TEST=get powerbtn command in shell Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I1af4673b7eff84149e3aabad7ff09445a1f96e1b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895306 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: npcx: Move ecst configuration options to upstreamWealian Liao2021-05-191-76/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | NPCX series ROM code changes the chip basic setting by firmware binary header for loading the firmware from flash to RAM. All the NPCX series chips could use it, so those configuration options are moved to upstream. The ecst chip version automatic select by CONFIG_SOC_NPCX7MNX. Currently, the project setting doesn't set to the expected chip part number. Change the following project to select the target chip & configure ecst header: - volteer: npcx7m7fc - trogdor: npcx7m6fc - kohaku: npcx7m6fc BUG=b:184448653 BRANCH=none TEST=zmake testall TEST=volteer boot to OS Cq-Depend: chromium:2872415 Signed-off-by: Yuval Peress <peress@chromium.org> Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ieed6c21536401f70950ddd1f18d243b127d896ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2867128 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org>
* zephyr: Add Smart Battery emulatorTomasz Michalec2021-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | Add Smart Battery emulator which is emulated device on i2c bus. Emulated battery properties are defined through device tree, but they can be changed in runtime through Smart Battery emulator API. It allows to set custom handlers for write and read messages to emulate more complex scenarios or malfunctioning device. BUG=b:184855975 BRANCH=none TEST=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ia94a0a122123e3259882dfdc80d067c61c98379b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2903206 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* qcom: Create new configs for SC7280Wai-Hong Tam2021-05-181-0/+2
| | | | | | | | | | | | | | | 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: Fix EC version depedendencyKeith Short2021-05-171-0/+4
| | | | | | | | | | | | | | | | Add an explicit dependency between the generated ec_version.h file and the app library. This ensures the version header file is created before compiling the app library. BUG=b:188439971 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5876939b76ffcf5691f40f59b39a1e02a8314ebb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2896933 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* qcom: Generalize the filenames for Qualcomm chipsetsWai-Hong Tam2021-05-171-1/+1
| | | | | | | | | | | | | | | The existing SC7180 power sequence can be reused on its next generation. Generalize the filenames, sc7180.c/sc7180.h to qcom.c/qcom.h. BRANCH=None BUG=b:187980397 TEST=Built all the Chromium EC images and Zephyr EC images. Change-Id: Ie04218ef0a12a4e8aa2db353040c5c39c533ae6f Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2893484 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* mkbp: EC buttons and switches via MKBPBoris Mittelberg2021-05-101-0/+4
| | | | | | | | | | | | | | 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
* config: rename CONFIG_FLASH to CONFIG_FLASH_CROSJeremy Bettis2021-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mkbp: Separate MKBP_INFO host command from the keyboard driverBoris Mittelberg2021-04-271-1/+2
| | | | | | | | | | | | 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
* mkbp: Separate FIFO from the keyboard driverBoris Mittelberg2021-04-271-1/+2
| | | | | | | | | | | | | | 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
* Revert "config: rename CONFIG_FLASH to CONFIG_FLASH_CROS"stabilize-13935.B-mainJack Rosenthal2021-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* zephyr: Update banner to match Chromium OSKeith Short2021-04-231-1/+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>
* config: rename CONFIG_FLASH to CONFIG_FLASH_CROSEric Yilun Lin2021-04-231-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* zephry: drivers: add KX022 driver supportYuval Peress2021-04-231-0/+2
| | | | | | | | | | | | | Add the kionix driver via a CONFIG_ flag to the Zephyr build. BRANCH=none BUG=b:185966444 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I7cd41cb522c2f7963f9c5d3b2849ed973a230374 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845557 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: driver: bmi160: Add Kconfig to enable bmi160Yuval Peress2021-04-221-0/+2
| | | | | | | | | | | | | | Adds a Kconfig option to add the bmi160 drivers. BRANCH=none BUG=b:185966444 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I602c4fe9564ebb49dc0db5bb00d51b413ebe76c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2842710 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* driver: bmi: fix use of I2C_PORT_ACCELYuval Peress2021-04-161-2/+3
| | | | | | | | | | | | | | | | | | | | | The BMI driver is currently using I2C_PORT_ACCEL incorrectly as a CONFIG_ value. Update the use cases to a new config option that selects between SPI and I2C communication specifically for the chip. To avoid a lot of device.h changes, the value of the config value is automatically inferred if not explicitly set. BRANCH=none BUG=b:185392974, b:146065507 TEST=zmake testall TEST=make buildall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I6196cc595dc61877ab2b8ed5416bebee51276927 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2829010 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* driver: icm: fix use of I2C_PORT_ACCELYuval Peress2021-04-161-0/+4
| | | | | | | | | | | | | | | | | | | | | The ICM driver is currently using I2C_PORT_ACCEL incorrectly as a CONFIG_ value. Update the use cases to a new config option that selects between SPI and I2C communication specifically for the chip. To avoid a lot of device.h changes, the value of the config value is automatically inferred if not explicitly set. BRANCH=none BUG=b:185392974, b:146065507 TEST=zmake testall TEST=make buildall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I8b1a507a76031c2bb1aaf4ca7b14b92252a941f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2826920 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* mp2964: Add PMIC driverCaveh Jalali2021-04-161-2/+4
| | | | | | | | | | | | | | | | | This adds a driver for the mp2964 IMVP9.1 PMIC. This driver enables programming control registers within the PMIC. BRANCH=none BUG=b:185424011 TEST=buildall passes. functional testing was done with the follow-on patch. Change-Id: I9b2d89007b5f6933ceeb9a1bcd3bbefb819888a3 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2827950 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* TCPMV2: Default PD Policy ManagementSam Hurst2021-04-091-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* zephyr: Disable LTO for zephyr toolchainKeith Short2021-04-051-1/+8
| | | | | | | | | | | | | | | | | | | | | If both CONFIG_LTO and CONFIG_FPU are enabled, the Zephyr toolchain generates linker errors. Disable LTO to unblock non-chroot builds and Gitlab builds. BUG=b:184302085 BRANCH=none TEST=Build zephyr EC for volteer with coreboot toolchain, verify LTO is enabled TEST=Build zephyr EC for volteer with zephyr toolchain, verify LTO is disabled Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib8e99df0b96c3a1579bdcb1f98b023bf13f0be8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2801251 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* zephyr: Generate initial coverage for every boardJeremy Bettis2021-03-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Create a new ninja target 'all.libraries' which is everything that zephyr.elf depends on, but doesn't actually link the zephyr.elf binary. This allows creating coverage info for boards that run on SOCs that are too small for real coverage runs. Enabled the HAS_COVERAGE_SUPPORT for all boards, so that the all.libraries target will build with coverage enabled. HAS_COVERAGE_SUPPORT can't be set in prj files, as it is not directly user assignable. This is probably somewhat of a misuse of this flag, but nothing depends on it except for CONFIG_COVERAGE. Tweaked the instructions to exclude some more directories that are not useful code, like tests and generate headers. BUG=b:183007888 TEST=Ran commands in code_coverage.md BRANCH=none Change-Id: I6cf1b889b6b3883f7a76d1ae4957805bfa6d7b96 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2786067 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Enable link time optimization (LTO)Keith Short2021-03-241-110/+141
| | | | | | | | | | | | | | | | | | | 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>