summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhurima Paruchuri <mparuchuri@google.com>2023-04-11 14:54:01 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-12 12:51:54 +0000
commite06fe77101c2cea6f0ed51e108c39315c3729971 (patch)
treead3187880a186e6d79424c013b69250125198d8f
parentca4eb6b6aea1c24c01923bb38a67065960d15ad4 (diff)
downloadchrome-ec-e06fe77101c2cea6f0ed51e108c39315c3729971.tar.gz
binman: Add binman nodelabel and use it
BRANCH=none BUG=b:272272649 TEST=build rex with cbi_flash overlap and check zephyr.dts Change-Id: I2316fd922bd05b3e9ed0a29456b1d9ff99dd3ffb Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4415257 Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r--zephyr/boards/arm/npcx9/npcx9m7f.dts62
-rw-r--r--zephyr/include/cros/binman.dtsi2
-rw-r--r--zephyr/include/cros/cbi_flash.dtsi22
-rw-r--r--zephyr/include/cros/ite/it8xxx2.dtsi41
-rw-r--r--zephyr/program/nissa/yaviks/overlay.dtsi28
-rw-r--r--zephyr/program/nissa/yavilla/overlay.dtsi28
6 files changed, 90 insertions, 93 deletions
diff --git a/zephyr/boards/arm/npcx9/npcx9m7f.dts b/zephyr/boards/arm/npcx9/npcx9m7f.dts
index 0083f2da6f..2f02cb9887 100644
--- a/zephyr/boards/arm/npcx9/npcx9m7f.dts
+++ b/zephyr/boards/arm/npcx9/npcx9m7f.dts
@@ -9,39 +9,37 @@
#include <nuvoton/npcx9m7f.dtsi>
#include "npcx9.dtsi"
-/ {
- /*
- * The NPCX9m7F includes 384 kB of code RAM, and 1 MB flash. Padding
- * is added to make the image the same size as the internal flash. This
- * is required to support the flashrom tool which requires an image that
- * matches the full internal flash size.
- */
- binman {
- wp-ro {
- /*
- * wp-ro must match a block protect region supported by
- * by the internal flash device. In practice, that's
- * 512 KiB starting at address 0.
- */
- offset = <0x0>;
- size = <0x80000>;
- };
- ec-rw {
- offset = <0x80000>;
- size = <0x50000>;
- rw-fw {
- rw-fwid {
- /* Fix the lcoation of the FWID to the
- * last 32 bytes of the flash. This
- * ensures the RW entries in the FMAP
- * stored in the RO section of flash
- * are always correct.
- */
- offset = <(0x50000 - 32)>;
- };
+/*
+ * The NPCX9m7F includes 384 kB of code RAM, and 1 MB flash. Padding
+ * is added to make the image the same size as the internal flash. This
+ * is required to support the flashrom tool which requires an image that
+ * matches the full internal flash size.
+ */
+&binman {
+ wp-ro {
+ /*
+ * wp-ro must match a block protect region supported by
+ * by the internal flash device. In practice, that's
+ * 512 KiB starting at address 0.
+ */
+ offset = <0x0>;
+ size = <0x80000>;
+ };
+ ec-rw {
+ offset = <0x80000>;
+ size = <0x50000>;
+ rw-fw {
+ rw-fwid {
+ /* Fix the lcoation of the FWID to the
+ * last 32 bytes of the flash. This
+ * ensures the RW entries in the FMAP
+ * stored in the RO section of flash
+ * are always correct.
+ */
+ offset = <(0x50000 - 32)>;
};
};
- pad-byte = <0xff>;
- pad-after = <0x30000>;
};
+ pad-byte = <0xff>;
+ pad-after = <0x30000>;
};
diff --git a/zephyr/include/cros/binman.dtsi b/zephyr/include/cros/binman.dtsi
index 1ba7a3bde6..7fc0ebaf9a 100644
--- a/zephyr/include/cros/binman.dtsi
+++ b/zephyr/include/cros/binman.dtsi
@@ -6,7 +6,7 @@
/ {
#address-cells = <1>;
#size-cells = <1>;
- binman {
+ binman: binman {
filename = "ec.bin";
pad-byte = <0x1d>;
wp-ro {
diff --git a/zephyr/include/cros/cbi_flash.dtsi b/zephyr/include/cros/cbi_flash.dtsi
index adb4f43cde..136977a6f1 100644
--- a/zephyr/include/cros/cbi_flash.dtsi
+++ b/zephyr/include/cros/cbi_flash.dtsi
@@ -3,18 +3,16 @@
* found in the LICENSE file.
*/
-/ {
- binman {
- wp-ro {
- ec-ro {
- cbi_flash: cbi {
- compatible = "cros-ec,flash-layout";
- type = "fill";
- offset = <0x40000>;
- size = <0>;
- fill-byte = [ff];
- preserve;
- };
+&binman {
+ wp-ro {
+ ec-ro {
+ cbi_flash: cbi {
+ compatible = "cros-ec,flash-layout";
+ type = "fill";
+ offset = <0x40000>;
+ size = <0>;
+ fill-byte = [ff];
+ preserve;
};
};
};
diff --git a/zephyr/include/cros/ite/it8xxx2.dtsi b/zephyr/include/cros/ite/it8xxx2.dtsi
index 983bf46663..4117bb894d 100644
--- a/zephyr/include/cros/ite/it8xxx2.dtsi
+++ b/zephyr/include/cros/ite/it8xxx2.dtsi
@@ -72,27 +72,28 @@
};
/* it8xxx2 has 1MB of flash. currently, we use 768KB from flash. */
- binman {
- wp-ro {
- offset = <0x0>;
- size = <0x60000>;
- };
- ec-rw {
- offset = <0x60000>;
- size = <0x60000>;
- rw-fw {
- rw-fwid {
- /* Fix the lcoation of the FWID to the
- * last 32 bytes of the flash. This
- * ensures the RW entries in the FMAP
- * stored in the RO section of flash
- * are always correct.
- */
- offset = <(0x60000 - 32)>;
- };
+};
+
+&binman {
+ wp-ro {
+ offset = <0x0>;
+ size = <0x60000>;
+ };
+ ec-rw {
+ offset = <0x60000>;
+ size = <0x60000>;
+ rw-fw {
+ rw-fwid {
+ /* Fix the lcoation of the FWID to the
+ * last 32 bytes of the flash. This
+ * ensures the RW entries in the FMAP
+ * stored in the RO section of flash
+ * are always correct.
+ */
+ offset = <(0x60000 - 32)>;
};
};
- pad-byte = <0xff>;
- pad-after = <0x40000>;
};
+ pad-byte = <0xff>;
+ pad-after = <0x40000>;
};
diff --git a/zephyr/program/nissa/yaviks/overlay.dtsi b/zephyr/program/nissa/yaviks/overlay.dtsi
index 663b538953..a93b02c51c 100644
--- a/zephyr/program/nissa/yaviks/overlay.dtsi
+++ b/zephyr/program/nissa/yaviks/overlay.dtsi
@@ -213,24 +213,24 @@
};
};
};
+};
- binman {
- ec-rw {
- size = <0x50000>;
- rw-fw {
- rw-fwid {
- /* Fix the lcoation of the FWID to the
- * last 32 bytes of the flash. This
- * ensures the RW entries in the FMAP
- * stored in the RO section of flash
- * are always correct.
- */
- offset = <(0x50000 - 32)>;
- };
+&binman {
+ ec-rw {
+ size = <0x50000>;
+ rw-fw {
+ rw-fwid {
+ /* Fix the lcoation of the FWID to the
+ * last 32 bytes of the flash. This
+ * ensures the RW entries in the FMAP
+ * stored in the RO section of flash
+ * are always correct.
+ */
+ offset = <(0x50000 - 32)>;
};
};
- pad-after = <0x50000>;
};
+ pad-after = <0x50000>;
};
&thermistor_3V3_51K1_47K_4050B {
diff --git a/zephyr/program/nissa/yavilla/overlay.dtsi b/zephyr/program/nissa/yavilla/overlay.dtsi
index 663b538953..a93b02c51c 100644
--- a/zephyr/program/nissa/yavilla/overlay.dtsi
+++ b/zephyr/program/nissa/yavilla/overlay.dtsi
@@ -213,24 +213,24 @@
};
};
};
+};
- binman {
- ec-rw {
- size = <0x50000>;
- rw-fw {
- rw-fwid {
- /* Fix the lcoation of the FWID to the
- * last 32 bytes of the flash. This
- * ensures the RW entries in the FMAP
- * stored in the RO section of flash
- * are always correct.
- */
- offset = <(0x50000 - 32)>;
- };
+&binman {
+ ec-rw {
+ size = <0x50000>;
+ rw-fw {
+ rw-fwid {
+ /* Fix the lcoation of the FWID to the
+ * last 32 bytes of the flash. This
+ * ensures the RW entries in the FMAP
+ * stored in the RO section of flash
+ * are always correct.
+ */
+ offset = <(0x50000 - 32)>;
};
};
- pad-after = <0x50000>;
};
+ pad-after = <0x50000>;
};
&thermistor_3V3_51K1_47K_4050B {