summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2022-08-24 09:25:10 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-25 00:34:40 +0000
commit8b1cc0ef3a5aa1b87530c8743bf7bceb95d4f111 (patch)
treece0fe99f4cbd9339d7339f7da8a99b4c9c6a2091
parent0f8843fb36cb619bdd14a3232851600cee3eac10 (diff)
downloadchrome-ec-8b1cc0ef3a5aa1b87530c8743bf7bceb95d4f111.tar.gz
zephyr: test: Choose the "cros,flash" node
The flash size is retrieved from the "cros,flash" node. Originally it was 0 as the "cros,flash" node hasn't been chosen. This CL chooses the node and define its attributes. It enables more coverage as the flash size is no longer 0. BRANCH=None BUG=b:236075281 TEST=./twister -s zephyr/test/drivers/drivers.default Change-Id: Ifdfc3b03e45d3468b73c02a3496b913236f03a93 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3854312 Reviewed-by: Tristan Honscheid <honscheid@google.com>
-rw-r--r--zephyr/test/drivers/boards/native_posix.overlay7
1 files changed, 7 insertions, 0 deletions
diff --git a/zephyr/test/drivers/boards/native_posix.overlay b/zephyr/test/drivers/boards/native_posix.overlay
index 296cc768fd..f838a37d8c 100644
--- a/zephyr/test/drivers/boards/native_posix.overlay
+++ b/zephyr/test/drivers/boards/native_posix.overlay
@@ -14,6 +14,7 @@
cros-ec,espi = &espi0;
cros-ec,watchdog = &wdt_counter;
cros-ec,raw-kb = &cros_kb_raw;
+ cros-ec,flash = &flash0;
cros-ec,flash-controller = &cros_flash;
};
@@ -965,3 +966,9 @@
&thermistor_3V3_51K1_47K_4050B {
status = "okay";
};
+
+&flash0 {
+ erase-block-size = <0x10000>;
+ write-block-size = <1>;
+ reg = <0x00000000 DT_SIZE_K(512)>;
+};