summaryrefslogtreecommitdiff
path: root/zephyr/projects/kohaku
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-054-107/+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: convert fwctrl register to syscon driverYuval Peress2021-09-271-0/+2
| | | | | | | | | | | | | | | | 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: zmake: implement multiple toolchain support/probingJack Rosenthal2021-09-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: drop v2.5 support from all projectsJack Rosenthal2021-08-111-1/+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: kohaku: support v2.6Jack Rosenthal2021-08-051-0/+1
| | | | | | | | | | | | | | | | Add 2.6 to list of supported versions. Note: need to drop the USE flag from hatch overlay before we can drop v2.5 support in zmake.yaml. BUG=b:195571108 BRANCH=none TEST=flash on kohaku, boot to S0 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ia50e62155826f21aee094ccf80cb699a99a18978 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3072415 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: move all the boards directories under zephyr/boardsJack Rosenthal2021-07-166-468/+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>
* system: Clean up system_get_board_version()Philip Chen2021-07-091-1/+2
| | | | | | | | | | | | | | | | | | | 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>
* 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: kohaku: Delete configs set to NPCX defaultsKeith Short2021-06-111-31/+1
| | | | | | | | | | | | | | Delete the Kconfig options that are now setup by default for the NPCX7 chipset. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I7bfca4a85e2b469e0f9e6d59f873851ca081cf29 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954921 Reviewed-by: Yuval Peress <peress@chromium.org>
* Zephyr: npcx: Move fiu0 to a common locationYuval Peress2021-05-251-11/+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-194-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: kohaku: disable CONFIG_PLATFORM_EC_ADCDenis Brockus2021-05-141-0/+1
| | | | | | | | | | | | | | | | ADC has not been enabled in the device tree yet. BUG=none BRANCH=none TEST=submit build will verify Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I204f3d36f8778e95b230a1668f074898a822ae57 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895789 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: npcx: Fixed the name of nodes in device-tree filesWealian Liao2021-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | CL:2819147 fixed the name of nodes in devoce-tree file following rules: If object is 'phandles', use underscores for object name. If not, such as 'node' or 'property', use hyphens for object name. Modify the related files for build pass. BUG=none BRANCH=none TEST=zmake testall Cq-Depend: chromium:2819147 Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I70284ecb168234493d04b8b26433ec7009232132 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2817684 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: gpio: Move named GPIO entries to devicetreeYuval Peress2021-04-082-22/+25
| | | | | | | | | | | | | | | | Migrate NAMED_GPIO() to devicetree enums. This allows us to create common boards and share the GPIO mappings in dts files. BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I41c6151569a04628ac6dcc597f05e529327b7b46 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2804495 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: i2c mapping using an enumYuval Peress2021-04-081-11/+0
| | | | | | | | | | | | | | | | | | | | Currently, every project will need to provide a custom mapping header for i2c as well as gpios. We'd like to move that overhead to the dts files, which will make the board dts a lot more reusable as well as clean up the bringup of new boards. Add to the i2c_ports enum from the dts named i2c port list. Each enum is only added if a node exists using that enum. This also allowes for verifying that the enum is only used once. BRANCH=none BUG=b:184786824 TEST=build and flashed volteer TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I42cc098a9badac57a3781fa9dfaf32c0ec0c5aca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2780838
* zephyr: Generate initial coverage for every boardJeremy Bettis2021-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 for board filesKeith Short2021-03-241-1/+1
| | | | | | | | | | | | | | | | | | | Move the baseboard and board files into the zephyr_ec library to take advantage of the LTO compiler option enabled for the zephyr_ec library. On Volteer, this reduces the image size by 832 bytes. Total LTO saving is just over 10,000 bytes. BUG=none BRANCH=none TEST=zmake testall TEST=boot zephry-ec on Volteer, verify AP boots Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I2f3aa7f6c400a5b5cd1b346fcf52160b834e66a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776218 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: set the NPCX FW headerWealian Liao2021-03-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | For CONFIG_BOARD_RESET_AFTER_POWER_ON feature, the longer initialization time lets H1 reset EC before EC writes EC_RESET_FLAG_INITIAL_PWR flag to BBRAM. It causes EC couldn't recognize the first reset-pin for the current mechanism. Set the volteer, kohaku, delbin firmware NPCX firmware header to improve the initialization time: core clock to SPI clock ratio - 2, SPI clock - 50MHz, flash read mode - dual BUG=None. BRANCH=None. TEST=Check output header offset 6 = 0x0c, offset 7 = 0x03. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: If9b3cd9a5ed7086a44ec7efa7bb5c7c40d4bcd81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2759763 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: efs2: Enable EFS2 for volteerYuval Peress2021-02-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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: zmake: drop support for zephyr v2.4Jack Rosenthal2021-02-231-1/+0
| | | | | | | | | | | | | | | | | | | Drop support for Zephyr OS v2.4 on all boards, since the v2.5 uprev is successful. If someone still needs to manually compile for v2.4 for testing, one can do so by passing --zephyr-base=$PATH_TO_ZEPHYR_24 and --ignore-unsupported-zephyr-version to zmake. BUG=b:180409973 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I0b3922c0b7f47811b26bad4e7f99125cabdaed91 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2715345 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: disable CONFIG_CORTEX_M_SYSTICKKeith Short2021-02-231-1/+0
| | | | | | | | | | | | | | | | The CONFIG_CORTEX_M_SYSTICK option cannot be used with the Nuvoton kernel timer support. BUG=b:177904393 BRANCH=none TEST=zmake testall Cq-Depend: chromium:2713759 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I30f1c1a2c00319e8f787f4b98bc164fc43125165 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2714262 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: volteer Kohaku: enable watchdogWealian Liao2021-02-221-0/+6
| | | | | | | | | | | | | | | | Enable watchdog on Volteer & kohaku. BUG=b:176523207, b:177604307 BRANCH=None. TEST=Trigger watchdog by 'waitms 2000' && don't trigger watchdog by 'waitms 1000' on volteer. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I59a2031c14725ac8f9ae294e1a5cbfae84ebdab6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706666 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* zephyr: support zephyr v2.5 on all projectsJack Rosenthal2021-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | Zephyr v2.5 will build for all projects now, mark it as supported for all projects and it will be enabled by default. We can delete v2.4 from this list once v2.5 gets a bit more battle testing. If you need to build for v2.4 in the interim, you should pass the --zephyr-base flag to zmake, like so: $ zmake --zephyr-base ~/trunk/src/third_party/zephyr/main/v2.4 ... BUG=b:180409973 BRANCH=none TEST=zmake testall TEST=flash on delbin, test UART console functioning Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9cb7902455b2c6f231bea5c0b08b0e18bca0ddd8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2705192 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: zmake: rename "raw" packer to "npcx" packerJack Rosenthal2021-02-181-9/+1
| | | | | | | | | | | | | | | | | | | | | The "raw" packer used to be a binary packer which simply forwarded zephyr.bin to the output directory with no modifications. A history of CLs has repurposed this packer to be specific to binman RO/RW format, with the RO expected to generate a Nuvoton loader at the beginning of the image. So it's hardly "raw" anymore. Rename it to "npcx" so we can bring back the original "raw" packer, needed by chameleon. (Note this is done in a follow-up CL). BUG=b:180545676 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I73e13426d7c87db1ccf3514dd321640ebc625068 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2702494 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: volteer: update header information using KconfigYuval Peress2021-02-093-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make npcx builds done by zephyr have valid format, this means: 1. Only the first section (RO) should have the header. 2. The header should use the chip information or add new Kconfig values if needed. 3. This should not be done per board (one centralized place). Move the cmake logic to generate the header via ecst.py script ( located in the zephyr repository and is used to generate the header for the npcx chips) to a common place: zephyr/CMakeLists.txt. With that change, the board-specific CMakeLists.txt is now removed, to be replaced with a call to set ECST_CHIP_ARG. This value must be set because zephyr only defines SOC_NPCX7M6FB while our specific chip is different. For the same reason, both volteer and kohaku require overriding zephyr's default CONFIG_FLASH_SIZE for the npcx7m6fb. Additionally, each build (RO/RW) will no longer generate the final output using the board's name. This will help zmake find the image with the header without requiring additional arguments. BRANCH=none BUG=b:164421798 TEST=build volteer, flash the joined binary, see it boot TEST=build kohaku Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I418c138e33812c411503f8260fdaa85059a737c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2682173 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: kohaku: define gpio_edp_bklten_odFabio Baltieri2021-02-082-0/+5
| | | | | | | | | | | | | | | This adds a definition for the backlight enable pin, used in common/backlight_lid.c. BUG=none BRANCH=none TEST=zmake configure -b -B ~/build-kohaku/ zephyr/projects/kohaku/ Change-Id: Iad766459e916111788840fd5017dd6480928cc65 Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2682716 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: volteer & kohaku add 1.8V supportWealian Liao2021-02-081-0/+6
| | | | | | | | | | | | | | | | | | volteer & kohaku add 1.8V support in device tree. BUG=b:171580796, b:179516696 BRANCH=none TEST=zmake testall TEST=get value by `i2c read_byte I2C_0_PORT0 0x68` `i2c read_byte I2C_0_PORT0 0x39` on volteer Cq-Depend: chromium:2682153 Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ia1ad9624531a8b0ff555bf5612761fd94cda7fd3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2680915 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: Move bbram logic to devicetreeYuval Peress2021-02-051-0/+1
| | | | | | | | | | | | | | | | | Move all bbram logic to a common npcx.dtsi file included in both volteer and kohaku. Updates the bbram access logic in zephyr/shim/src/system.c to use devicetree. Updates the unit tests to match. BRANCH=none BUG=b:178807203 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I2a7c65b92a395c622e8cfe751e4e98b3173e38fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2669271 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: zmake: auto-generate SYSCALL_INCLUDE_DIRSJack Rosenthal2021-02-041-9/+0
| | | | | | | | | | | | | | | This can be done by Zmake instead of needing to copy-paste between every CMakeLists.txt. BUG=b:179404290 BRANCH=none TEST=compile for volteer and kohaku Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I2c89e91d7cca7065ee7dcdaa05c7af49d65b4733 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676605 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: Add support for BOARD_VERSIONSimon Glass2021-02-041-0/+3
| | | | | | | | | | | | | | | | | Add Kconfig options for this feature. At present system_get_board_version() is not built for Zephyr. We could split it out but it seems better to wait until we have the existing file brought into the build in toto. BUG=b:178124020 BRANCH=none TEST=make BOARD=volteer -j30 boot zephyr for volteer and see that the options are defined Change-Id: I100c8f3f65db437fbe654e0230e07f59c6e0c7b4 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2644177
* zephyr: kohaku: Add required GPIOs for flash.c/system.cYuval Peress2021-02-011-0/+2
| | | | | | | | | | | | | | | | Add the required GPIO_* values for building with flash.c and system.c. BRANCH=none BUG=b:176828988, b:174481378 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I5e1813c48e0847b89681461edc1f98869e98075d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2659680 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: kohaku: Update build for flashYuval Peress2021-01-302-0/+11
| | | | | | | | | | | | | | | | The build for Kohaku needed to add the include/drivers directory so that system calls can be generated (this mirrors volteer). Additionally, since kohaku isn't upstreamed, it needed the CONFIG_FLASH_SIZE value. BRANCH=none BUG=b:176828988, b:174481378 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I19989e85e22360e12c0dc0ee29b6769673023a22 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2659679 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: kohaku/volteer: unset prefer-zephyr-sdkJack Rosenthal2021-01-261-17/+1
| | | | | | | | | | | | | | | coreboot-sdk is working now, this hack can go away. BUG=b:178363068 BRANCH=none TEST=compile without -t coreboot-sdk, run on device Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ifc5b05557ecf623e709bfd2b464648bd24197e1c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2647536 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org>
* zephyr: enable power sequencing for kohakuJack Rosenthal2021-01-222-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | This adds gpio definitions and enables power sequencing for kohaku. Right now power sequencing makes it to S0 and we start getting some port 80 writes, but we fail at some point after then with some host command errors. They look to be similar to some of the issues volteer is having. See log here if interested: https://paste.googleplex.com/6055863094607872 So submitting this as good incremental progress, even if we can't get AP fully booted yet. BUG=b:177609422 BRANCH=none TEST=on kohaku, make it to S0 with host command errors (see above) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9dbdd9837a2c4864b341b45626e4a1d5da101d8d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633822 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* volteer: i2c: rename i2c-keys node to named-i2c-portsFabio Baltieri2021-01-211-1/+1
| | | | | | | | | | | | | | Rename the node definition and instance to named-i2c-ports. This matches the node name and other references in the code. BUG=none TEST=zmake testall BRANCH=none Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I426cc29073d1725c208e151d0deeb9d5214bf7ac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2638253 Reviewed-by: Keith Short <keithshort@chromium.org>
* dts: binding: add an explicit binding for named-gpiosFabio Baltieri2021-01-201-1/+1
| | | | | | | | | | | | | | | | | | Currently the name-gpios node uses the gpio-keys binding. That is a standard binding used in Zephyr for GPIO keys, as in physical button. This copies the binding over to a dedicated "named-gpios" one, and adds a #gpio-cells property so that we can refer to its nodes from a phandle property of a different node. BUG=none TEST=build and check generated files BRANCH=none Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Iadd3465b23b89cfe08c96c4d03479f1e5f8e3c59 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637643 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: kohaku: bring up eSPIJack Rosenthal2021-01-162-1/+4
| | | | | | | | | | | | | Enable eSPI shim for kohaku. BUG=b:177609422 BRANCH=none TEST=run on kohaku with power sequencing follow-up Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I173e1a091b9e6e46b5207db19248afe102a665a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633163 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kohaku: add gpios to dtsJack Rosenthal2021-01-151-0/+285
| | | | | | | | | | | | | | Auto-generated from board/kohaku/gpio.inc BUG=b:177609422 BRANCH=none TEST=gpioget on kohaku Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I90128d0eff8912861b6d9ced2aff28811f79146d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633162 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: initial support for kohakuJack Rosenthal2021-01-1512-0/+292
Kohaku uses the same EC chip as volteer. Adding a second device will help give us a tiny bit more build diversity too, which is a good thing probably. This just adds a minimal build for kohaku with just UART support. No power sequencing, keyboard, USB-C, charging, etc. BUG=b:177609422 BRANCH=none TEST=flash onto kohaku, observe working shell and timers Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I277510081c9e06b516b6c29f790e16dd1dfe8028 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631361 Reviewed-by: Simon Glass <sjg@chromium.org>