summaryrefslogtreecommitdiff
path: root/zephyr/projects/kohaku/boards
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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: 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-081-0/+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: 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: 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: 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: 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-081-0/+4
| | | | | | | | | | | | | | | 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: kohaku: Update build for flashYuval Peress2021-01-301-0/+1
| | | | | | | | | | | | | | | | 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>
* 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: 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-157-0/+198
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>