summaryrefslogtreecommitdiff
path: root/zephyr/shim/chip
diff options
context:
space:
mode:
authorMulin Chao <mlchao@nuvoton.com>2021-03-31 22:57:59 -0700
committerCommit Bot <commit-bot@chromium.org>2021-04-08 00:21:01 +0000
commit51cf9f6619f2979a43e7ef5c6e9824b4bd715966 (patch)
treeb2a31bad982768e24bbb587158215a7e24e85a52 /zephyr/shim/chip
parent3f8889741a207e54d1f111bbcd73a9f7efd8c7f8 (diff)
downloadchrome-ec-51cf9f6619f2979a43e7ef5c6e9824b4bd715966.tar.gz
zephyr: npcx: Add cros_system chip info implementation
Add NPCX chip_vendor(), chip_name(), and chip_revision implementation for cros_system driver. BUG=none BRANCH=none TEST=Build & boot ec on volteer. TEST=Press 'version' in console and show related chip information: ``` 21-04-06 17:53:00.681 uart:~$ version 21-04-06 17:53:01.795 Chip: Nuvoton NPCX796FC 02 21-04-06 17:53:01.795 Board: 2 21-04-06 17:53:01.795 RO: _v2.0.8287+db38ffd6d 21-04-06 17:53:01.795 RW: _v2.0.8287+db38ffd6d 21-04-06 17:53:01.795 Build: _v2.0.8287+db38ffd6d ``` Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I73d016f5fa1da6c03e38b312eb4f1b0445a2c1d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807479 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/shim/chip')
-rw-r--r--zephyr/shim/chip/npcx/include/rom_chip.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/zephyr/shim/chip/npcx/include/rom_chip.h b/zephyr/shim/chip/npcx/include/rom_chip.h
index aab166e6f1..00b4c0b080 100644
--- a/zephyr/shim/chip/npcx/include/rom_chip.h
+++ b/zephyr/shim/chip/npcx/include/rom_chip.h
@@ -54,4 +54,7 @@ typedef void (*download_from_flash_ptr) (
enum API_RETURN_STATUS_T *status /* Status fo download */
);
+#define NPCX_CHIP_REV_ADDR 0x00007FFC
+#define NPCX_CHIP_REV_STR_SIZE 3
+
#endif /* __CROS_EC_ROM_CHIP_H */