summaryrefslogtreecommitdiff
path: root/zephyr/projects/trogdor
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-0520-1993/+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: create led.c file local to Lazor projectParth Malkan2021-09-282-3/+158
| | | | | | | | | | | | | | Add led.c file locally to zephyr lazor project and unlink from CrOs led.c file BRANCH=None BUG=b:201007290 TEST=builds Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Ibf3223da8889233cbc7cb3b21e78c6ea0773201a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3183184 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: convert fwctrl register to syscon driverYuval Peress2021-09-272-0/+4
| | | | | | | | | | | | | | | | 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>
* zephyr: lazor: add history and kernel threads commandsMichał Barnaś2021-09-221-0/+8
| | | | | | | | | | | | | | Enable commands for displaying shell history and threads statistics. BRANCH=main BUG=b:190224781 TEST=Check if "history" and "kernel threads" commands work Change-Id: Iedfaa3856c065120966f4d683646fa51218f1e0a Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174057 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Remove herobrine_npcx7 buildJack Rosenthal2021-09-139-860/+0
| | | | | | | | | | | | | | Obsolete since the NPCX9 IOB is now widely available. BUG=b:191803008 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I3865dcf368d7542abaf5126ccb7548933b4ab25f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3150053 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* NPCX: RTC: Add CONFIG_CROS_RTC_NPCX=y to prj.confSam Hurst2021-09-073-0/+3
| | | | | | | | | | | | | | | The CONFIG_CROS_RTC_NPCX config defaults to 'n'. Explicitly add CONFIG_CROS_RTC_NPCX=y to herobrine_npcx7, lazor, and trogor devices. BRANCH=none BUG=b:194710429 TEST=none Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I7a551f5574a645ea5e1495c19ec6ed09c4866ea5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3144534 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: define lazor's batteries in device treeMichał Barnaś2021-09-032-14/+7
| | | | | | | | | | | | | | | | | | | This commit adds lazor's batteries definitions to device tree and removes old battery.c usage in Zephyr. BRANCH=main BUG=b:183544739 TEST=Compile and flash CrOS EC firmware to lazor. It should work the same as without this commit. TEST=Compile and flash Zephyr, battery should be detected correctly and its model should be logged in EC console. Change-Id: I937f7b56cb5acdea949a655cc2a107f360cbf535 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107387 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org>
* zephyr: define trogdor's batteries in device treeMichał Barnaś2021-09-032-6/+3
| | | | | | | | | | | | | | | | | | | This commit adds trogdor's batteries definitions to device tree and removes old battery.c usage in Zephyr. BRANCH=main BUG=b:183544739 TEST=Compile and flash CrOS EC firmware to trogdor. It should work the same as without this commit. TEST=Compile and flash Zephyr, battery should be detected correctly and its model should be logged in EC console. Change-Id: I75c30b4d278dbb88ff4e0776924d9b85d3d0b4ad Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107386 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org>
* zephyr: zmake: implement multiple toolchain support/probingJack Rosenthal2021-09-013-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our GitLab builder uses different toolchains than the supported ones we use for development. At present, this means that the GitLab CI needs to call -t for each build with the desired toolchain, preventing us from using the more general commands "zmake coverage" or "zmake testall". Extend the idea of toolchain in our config files to be "supported toolchains" instead (i.e., multiple toolchains can be supported instead of one. We do this by refactoring our toolchain support code to consist of two related methods: - "probe" returns True if the toolchain is detected on the system, or False otherwise - "get_toolchain_config" returns the BuildConfig associated with the toolchain for the system, mirroring the functionality previously implemented in lambda functions. Also dropped support for arm-none-eabi, as I believe this was only used early on during scarlet development, and am not aware of any current users. BUG=b:178731498 BRANCH=none TEST=./run_tests.sh TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9b2ad508ae6703f0c3b56518fc32606c0ff1777c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3134668 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: add herobrine_npcx7 definitions of sku id and board versionMichał Barnaś2021-08-181-6/+30
| | | | | | | | | | | | | | | | | Add pins definitions in device tree file used to build zephyr BRANCH=main BUG=b:194136536 TEST=Build zephyr for herobrine npcx7 and verify if sku id and board version in EC console are correct. Change-Id: Ib47a4cafcd74c816ae26f884f811898eb2d46b89 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077542 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
* zephyr: add lazor definitions of sku id and board version in dtMichał Barnaś2021-08-181-6/+30
| | | | | | | | | | | | | | | | | Add pins definitions in device tree file used to build zephyr BRANCH=main BUG=b:194136536 TEST=Build zephyr for lazor and verify if sku id and board version in EC console are correct. Change-Id: Ibdc1dcb456b5cecd48ddafeafff0f765ffa45081 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077541 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Fix keyscan_configWealian Liao2021-08-121-2/+0
| | | | | | | | | | | | | | | | DT_DRV_COMPAT doesn't have the compatible node. Fix it to use cros_keyscan. BRANCH=none BUG=none TEST=zmake testall TEST=check volteer & lazor key by "ksstate on" Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ib1280f64ac2fa42539fb93d24922626c9adf2278 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088960 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: rename kconfig PLATFORM_EC_VBOOTJack Rosenthal2021-08-113-6/+6
| | | | | | | | | | | | | | | | | | | 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: drop v2.5 support from all projectsJack Rosenthal2021-08-113-3/+0
| | | | | | | | | | | | | | | | Remove support for v2.5 for all projects which still indicate it's supported. BUG=b:195571108 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5c22e382545741181866a4e88cb3d486a392f2f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3086365 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: lazor: add keyscan parametersKeith Short2021-08-102-1/+30
| | | | | | | | | | | | | Add the keyscan parameters specific to the Lazor board. BUG=b:195945894 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I07718e093c2ac1c12f6af854d4656fb4f224db32 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3083723 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* lid_angle: Create a common callback for lid angle changesWai-Hong Tam2021-08-056-93/+0
| | | | | | | | | | | | | | | | | | | | | | Each board defines its own callback lid_angle_peripheral_enable(). The implementation is very similar. Create a common implementation and reduce the duplicated code. This CL removes the board callbacks which are identifical to the common callback. If it is slightly different, keep it and add the __override tag. The check of TEST_BUILD is unnecessary as the board callback is not linked in the test build. BRANCH=None BUG=b:194922043 TEST=Build all the images. Change-Id: I73d381730f35b80eff69399cdfc5fb54f839aee0 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3069175 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: trogdor: Configure unused pinsWai-Hong Tam2021-07-273-0/+87
| | | | | | | | | | | | | | | Configure the unused pins, which are NC in hardware. BRANCH=None BUG=b:191803008 TEST=Built the lazor, trogdor, and herobrine_npcx7 images successfully. Booted the lazor image on the lazor board. Change-Id: Ia62c8e9f6e89cbf7505d23acbcc8247968607dbb Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3053104 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: move all the boards directories under zephyr/boardsJack Rosenthal2021-07-168-319/+0
| | | | | | | | | | | | | | | | | | | | Move all the boards directories together under zephyr/boards from their scattered locations under projects/. This is the first step towards de-coupling the concept of a Zephyr board from baseboard/board/model, as it currently is. Further work will be required to actually unify these directories and delete the baseboard-specific names from our tree. BUG=b:193814903 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I33a344af6890b2c2c54f1e91f0f0fa85caaf19d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3035222 Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: npcx: Default the NPCX header generator in Kconfig.npcxWai-Hong Tam2021-07-151-6/+0
| | | | | | | | | | | | | | | 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>
* qcom: Move enabling/disabling 3.3V rail to the board levelWai-Hong Tam2021-07-142-0/+2
| | | | | | | | | | | | | | | | | | | | | | In the next generation, the 3.3V rail is not controlled by EC anymore. Move the control logic to the board level. The 3.3V rail should be enabled before the power on sequence, so use the hook chipset pre-init hook. Disable it on the chipset shutdown complete hook. For Trogdor, do it on the baseboard level. For Herobrine, do it on the board level, Herobrine-NPCX7, only. Herobrine-NPCX9 and other future boards don't need it. BRANCH=None BUG=b:187980397, b:192253134 TEST=Tested the Lazor EC-OS and Zephyr images and booted to AP. TEST=Tested the Herobrine-NPCX7 EC-OS and Zephyr images and booted to AP. Change-Id: I7e025123f8997629b9b0db46e30ea9c716bdbf99 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2993213 Reviewed-by: Keith Short <keithshort@chromium.org>
* herobrine: Move hibernate config to the board levelWai-Hong Tam2021-07-131-1/+0
| | | | | | | | | | | | | | | Move the config of hibernate wake source and hook from the baseboard level to the board level. The new Herobrine hardware will use different wake sources and have different hook. BRANCH=None BUG=b:192253134 TEST=Built the herobrine_npcx7 EC-OS and Zephyr images successfully. Change-Id: Idbad8f985252fdef0657427d5f8d5883029a641f Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2993211 Reviewed-by: Keith Short <keithshort@chromium.org>
* herobrine_npcx7: Use SC7280 power sequenceWai-Hong Tam2021-07-131-2/+2
| | | | | | | | | | | | | | This CL is the Zephyr-equivalent of CL:2987911. BRANCH=None BUG=b:191803008, b:187980397 TEST=Built the herobrine_npcx7 image successfully. Tried booting on an existing Trogdor board. Change-Id: I2e59fb509b6d850e112609b388dc523d359fdedd Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994755 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: herobrine_npcx7: Create initial Zephyr image for herobrine_npcx7Wai-Hong Tam2021-07-1310-0/+838
| | | | | | | | | | | | | | | | | | | | | | | | Herobrine_npcx7 is a project to use the Trogdor hardware but swap the AP-related component. Create the project under the Trogdor family and use the Zephyr board: trogdor. This patchset first copies the the directories * trogdor/trogdor -> trogdor/herobrine_npcx7 And do the following modification. * Rename the board term "trogdor" to "herobrine_npcx7" * Update the copyright year * Use the Herobrine USB PID BRANCH=None BUG=b:191803008 TEST=Built the Zephyr image and booted it on an existing Trogdor board. Change-Id: I72c45a68ac463d18ce1a8503942ad0dcefc6e138 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994754 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: trogdor: Create Zephyr image for trogdorWai-Hong Tam2021-07-1310-0/+837
| | | | | | | | | | | | | | | | | | | | | | | | | | | Trogdor is a reference design, which doesn't have Zephyr support yet. Lazor is a shipping design of the Trogdor family, which already have Zephyr support. This CL creates the Trogdor Zephyr image and modifies the hardware difference. The CL first copies the directory lazor/ to trogdor/. And do the following changes: * Rename all the board term lazor -> trogdor * Update the GPIOs (recheck the result of gpios_to_zephyr_dts) * Update the GPIO interrupts * Update the battery info * Update the sensor info * Do not support multi-TCPM driver * Do not include sku.c (trogdor doesn't have it yet) BRANCH=None BUG=b:184071830 TEST=Built the Zephyr image. Booted it on an existing Trogdor board. Change-Id: I3b603284c719c119bb05460e7d4386d2c2eabda4 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994753 Reviewed-by: Keith Short <keithshort@chromium.org>
* system: Clean up system_get_board_version()Philip Chen2021-07-091-1/+0
| | | | | | | | | | | | | | | | | | | Refactor system_get_board_version() a bit so that we can remove CONFIG_BOARD_VERSION_CUSTOM and CONFIG_BOARD_VERSION from config.h. BRANCH=None BUG=b:186264627 TEST=make buildall -j TEST=zmake testall Cq-Depend: chromium:3015243 Change-Id: Id5ab809493c297b7d330ea13dcd6934ec00042a6 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3004112 Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zephyr: lazor: Enable mkbp wake event masksSam Hurst2021-06-282-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the following host mkbp wake masks: EC_HOST_EVENT_LID_OPEN EC_HOST_EVENT_POWER_BUTTON EC_HOST_EVENT_AC_CONNECTED EC_HOST_EVENT_AC_DISCONNECTED EC_HOST_EVENT_HANG_DETECT EC_HOST_EVENT_RTC EC_HOST_EVENT_MODE_CHANGE EC_HOST_EVENT_DEVICE EC_MKBP_EVENT_KEY_MATRIX EC_MKBP_EVENT_HOST_EVENT EC_MKBP_EVENT_SENSOR_FIFO BRANCH=None BUG=b:190503252 TEST=make buildall TEST=zmake testall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I40c2206892e9d4109821227eee1ff017ba501462 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2985821 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: fix CQ when migrating to 2.6Yuval Peress2021-06-231-0/+1
| | | | | | | | | | | | | | | As it turns out the CQ can't checkout both 2.5 and 2.6. For now each project will need to support both. BRANCH=none BUG=b:190731415, b:191892353 TEST=emerge-volteer-zephyr chromeos-base/chromeos-zephyr Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ib73777560ad40b5d45f79d30525ced26e1acfb41 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2983841 Reviewed-by: Jora Jacobi <jora@google.com> Commit-Queue: Jora Jacobi <jora@google.com>
* zephyr: lazor: uptick zephyr version to 2.6Yuval Peress2021-06-231-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:190731415 TEST=flash EC and verify sysjump TEST=flash EC and verify it boots to OS Change-Id: Ibe83899b95342524b70c6cd982544d51ffd262df Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2976755 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: trogdor: set EC chip type to NPCX797Keith Short2021-06-233-3/+3
| | | | | | | | | | | | | | | | | | | Change the trogdor default chip type to NPCX797FC to allow for a larger image size. BUG=none BRANCH=none TEST=zmake testall TEST=Boot zephyr image on lazor TEST=Boot trogdor-zephyr AP image and verify EC software sync Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Iabe9d7e817a8db55acc7cdb40f3c4e108d38fb5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954923 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Tested-by: Yuval Peress <peress@chromium.org> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* zephyr: lazor: Enable configs to match the original CrOS EC settingWai-Hong Tam2021-06-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | Enable the following configs: * keyboard backlight control * power sequence sleep failure detection * resume-init and suspend-complete hooks The following configs are not enabled because not enough code RAM: * accel sensor spoof mode * sysrq event emulation BRANCH=None BUG=b:190224781, b:183054226 TEST=Checked the following console commands showing up: kblight, sleeptimeout Change-Id: I2bd12f27d1688da64917ada978edb65e817aeafa Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941802 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zmake: update NPCX_IMAGE_FILE name to match zephyr 2.6Yuval Peress2021-06-171-1/+1
| | | | | | | | | | | | | | In Zephyr v2.6 we no longer have the option of setting the output file name. Set it to match so projects can build with either 2.5 or 2.6 BRANCH=none BUG=b:190731415 TEST=build projects with 2.5 and 2.6 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I3637e832eeac43e497f31dd1bf60bcd525b4497c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2970985 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: add GPIO VBOB_EN enum nameWai-Hong Tam2021-06-111-0/+1
| | | | | | | | | | | | | | | Some code in EC OS will use this GPIO, i.e. CL:2943986. Make the Zephyr CQ pass. BRANCH=None BUG=b:190250108 TEST=Build the Zephyr image. Change-Id: Ib98c09916a2c7860653689a4c4d0d66bd4f64fdf Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957073 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: trogdor: delete NPCX common configsKeith Short2021-06-111-32/+1
| | | | | | | | | | | | | | | Delete the Kconfig options that are now setup by default for the NPCX7 chipset. BUG=none BRANCH=none TEST=zmake testall TEST=build and run zephyr on lazor Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ia815bfddb56fc1113a1bc6664317328ade4a83ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2951221 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: lazor: Clean up includesDawid Niedzwiecki2021-06-111-1/+1
| | | | | | | | | | | | | | | | Don't include config_chip.h directly in the platform-specific i2c.c source file, use i2c.h instead. It will remove the build warning. BUG=b:188885798 BRANCH=none TEST='zmake testall' and make sure there are no warnings Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I1309cd4e1888df2125c66c9bde56520e3485b201 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2953282 Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: lazor: remove the WLC I2C bus from dtsWai-Hong Tam2021-06-111-5/+0
| | | | | | | | | | | | | | | | The WLC I2C bus on Lazor is used for other purposes: GPIO and NC. Remove the bus from dts, such that it won't appear in the i2c_ports[]. The `i2cscan` won't scan this bus. BUG=b:182398910 BRANCH=None TEST=Tested the `i2cscan` command (need to enable a CONFIG). Change-Id: Id1d029c380726e8846f93a04a666441a537421de Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954724 Reviewed-by: Keith Short <keithshort@chromium.org>
* zepyr: npcx: clean keyboard driverYuval Peress2021-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | The current cros,kb-raw-npcx driver relies on the label cros_kb_raw instead of the compatible string like it should. Since currently, it doesn't make sense for there to be more than one instance of the driver, a new BUILD_ASSERT check is added to make sure that if the driver is added via Kconfig, it is also used exactly once. Further, the creation of the driver via DEVICE_DEFINE is now using DT_DRV_COMPAT to create the instance. BRANCH=none BUG=b:190457512 TEST=build brya, volteer, and lazor Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I242c0f2f20a6d89cad7ab4269fc4c854aa29554b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2944624 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Dawid Niedzwiecki <dawidn@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: lazor: Enable I2C_PASSTHRU_RESTRICTED configDawid Niedzwiecki2021-06-093-1/+21
| | | | | | | | | | | | | | | | | Enable the I2C_PASSTHRU_RESTRICTED config for Lazor. Define board_allow_i2c_passthru function in platform-specific code. BUG=b:188885798 BRANCH=none TEST=Verify that I2C_PASSTHRU command works properly e.g. DUT displays the battery level correctly. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Icf8a13f1c3aaecc660322a2153654c70c1accd7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2939675 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: trogdor: Disable host command debug outputKeith Short2021-06-091-0/+6
| | | | | | | | | | | | | | Disable the host command debugging by default. This matches the Chromium-EC configuration and lessens the amount of console spam. BUG=none BRANCH=none TEST=Build zephyr for lazor, verify hostcmd console channel is disabled. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5420a6fcb4f71c71f0c00e2de8c087b87925b3f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2947581 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Fix I2C_PASSTHRU host commandDawid Niedzwiecki2021-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | ZephyrEC uses different I2C port numbers than CrosEC does, so convert the received remote port via I2C_PASSTHRU command into a proper one. The conversion is done based on a new property remote-port, which tells what port number is used by external components like kernel. The change fixes an issue with unexpected entering OTG mode by the charger. BUG=b:188885798 BRANCH=none TEST=Flash Lazor and make sure that no "charge problem" prints are displayed. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Id00265a3abf286ca59cbecb38ff7933d75e0d361 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2933296 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: dts: Move cros_kb_raw node to npcx.dtsiWealian Liao2021-06-071-37/+25
| | | | | | | | | | | | | | | | | | | | | | | cros-kb-raw@400a3000 is a npcx chip node. Move it to npcx.dtsi & overwrite the pin control setting in the corresponding dts file. For the status property in cros_kb_raw, npcx kbsan only has one hardware instance. NPCX cros_kb_raw driver doesn't use status property to enable the device. Remove status setting in cros_kb_raw node. Compared with 'gpio.inc' for boards based on trogdor, the keyboard doesn't use KSO13, 14. Remove KSO13, 14 in 'trogdor.dts'. BUG=none BRANCH=none TEST=zmake testall TEST=Check all keys work on volteer & lazor by "ksstate on". Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ie352b91ee13b18fa9079001ab7c3685f059ba299 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2931750 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: lazor: enable Virtual Battery driverDawid Niedzwiecki2021-05-311-0/+1
| | | | | | | | | | | | | | | | Enable I2C_VIRTUAL_BATTERY config for lazor. This is one of a few steps to fix getting data about the battery by the host. Also, set I2C_PORT_VIRTUAL_BATTERY to I2C_PORT_BATTERY, but it might be changed in the future. BUG=b:188885798 BRANCH=none TEST=zmake testall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I12da1b57b6e2cf0b98822c71243ccd1667d73506 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919907 Reviewed-by: Yuval Peress <peress@chromium.org>
* Zephyr: npcx: Move fiu0 to a common locationYuval Peress2021-05-251-9/+0
| | | | | | | | | | | | | | | The fiu0 node is common to all npcx family chips. So it can live in npcx.dtsi. BRANCH=none BUG=b:188605676 TEST=build kohaku, trogdor, and volteer Cq-Depend: chromium:2916719 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ied2ceaf04c32a2bf748c37bf70c303d3a6c94aab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2909753 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: npcx: rename cros/nuvoton/npcx.dtsi to npcx7Yuval Peress2021-05-251-1/+1
| | | | | | | | | | | | | | | | | The the upstream changes to support npcx9 there have been some changes to the nuvoton dtsi structure. These allow us to now depend on the more generic npcx7.dtsi instead of the specific npcx7m6fb.dtsi. It also moves some of the common code of the npcx family away from the more specific npcx7. BRANCH=none BUG=b:188605676 TEST=build volteer, trogdor, and kohaku Change-Id: I552bad25c2d9392059ab5dcb0684a2bdac01d545 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2909752 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: npcx: Move ecst configuration options to upstreamWealian Liao2021-05-192-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: lazor: Enable Tablet Mode Switch configDawid Niedzwiecki2021-05-181-0/+1
| | | | | | | | | | | | | | | | | Enable the Tablet Mode Switch config to fix activating Tablet Mode on Lazor. BUG=b:188147017 BRANCH=none TEST=Build and flash Zephyr on Lazor, boot to OS and verify that Chormebook switches to the Tablet Mode after 'tabletmode on' console command. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I95c7fa645dd5e8325147d7548fa99f2a1ddcccaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2900217 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: Use correct power signal interrupt handlersWai-Hong Tam2021-05-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | The SC7180 power signals, like AP_RST_L, WARM_RESET, and POWER_GOOD need special interrupt handlers. Missing them will cause: * AP warm reset doesn't notify the reset hook; * AP firmware flashing may fail. BRANCH=None BUG=b:183054226 TEST=Toggling the WARM_RESET, like `dut-control warm_reset:off`, EC UART shows the message: Long warm reset ended, cold resetting to restore confidence. TEST=Execute AP warm reset, check it triggers CHIPSET reset hook. Change-Id: Id6ea38abb1a10017bf603852908ac6d5dd6f78f4 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2901239 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: lazor: fix touchpadDawid Niedzwiecki2021-05-141-0/+1
| | | | | | | | | | | | | | | Add GPIO_TRACKPAD_INT_GATE pin to let the OS manage the trackpad. BUG=b:188127604 BRANCH=none TEST=Build and flash firmware for Lazar, boot to OS, verify that touchpad works. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I526b9bc440456fdcb700c04d91c5976189840484 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897237 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: i2c: remove scl and sda referencesYuval Peress2021-05-141-8/+0
| | | | | | | | | | | | | | | The SDA and SCL components of the struct i2c_port_t are only used in and for the i2c_wedge.c logic. This isn't needed in Zephyr. Remove the values and functions that use them from the Zephyr build. BRANCH=none BUG=b:188179405 TEST=build volteer and trogdor Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I71a26fbd9bc51def744ef1f16a540728482c5a2b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2896235 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: i2c: remove frequency from devicetreeYuval Peress2021-05-141-1/+0
| | | | | | | | | | | | | | | | The frequency wasn't actually being used as it was set by the i2c controller in the proper Zephyr driver. Also, remove the kbps field in struct i2c_port_t for Zephyr builds to make sure we don't accidentally use it later on. BRANCH=none BUG=none TEST=build trogdor and volteer Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I2eea231ff629d3e6f0ebbe71923a7b0ae96af87c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2896234 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: enable power managementYuval Peress2021-05-121-0/+6
| | | | | | | | | | | | BRANCH=none BUG=b:185284644 TEST=Run 'hibernate` command in EC console Cq-Depend: chromium:2889855 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I044ffa440c7120b269cb58be7c4e1a04f99be980 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2878906 Reviewed-by: Wai-Hong Tam <waihong@google.com>