From 7e95816baf20d7dbf07054d23eca6f31a404f426 Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Fri, 3 May 2024 09:20:27 +0200 Subject: [PATCH] dts: bindings: Move zephyr,memory-region property definition Move it to a common file named `zephyr,memory-common.yaml`, which replaces `zephyr,memory-attr.yaml` and takes its contents as well. This is so that another binding, e.g., `vnd,memory-region`, can support being combined with the `zephyr,memory-region` binding like so: node@deadbeef { compatible = "vnd,memory-region", "zephyr,memory-region"; zephyr,memory-region = "NAME"; ... }; To allow this, edtlib would require `vnd,memory-region` to include the property definitions from this new common file. The same can't be done by including `zephyr,memory-region.yaml` directly because that file marks the property in question as always required, and it shouldn't be required whenever the `vnd,memory-region` compatible is used on its own. Signed-off-by: Grzegorz Swiderski --- ...{zephyr,memory-attr.yaml => zephyr,memory-common.yaml} | 8 ++++++++ dts/bindings/base/zephyr,memory-region.yaml | 8 +------- dts/bindings/test/vnd,memory-attr.yaml | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) rename dts/bindings/base/{zephyr,memory-attr.yaml => zephyr,memory-common.yaml} (67%) diff --git a/dts/bindings/base/zephyr,memory-attr.yaml b/dts/bindings/base/zephyr,memory-common.yaml similarity index 67% rename from dts/bindings/base/zephyr,memory-attr.yaml rename to dts/bindings/base/zephyr,memory-common.yaml index 1a5611b5258..f2ccbdb3c41 100644 --- a/dts/bindings/base/zephyr,memory-attr.yaml +++ b/dts/bindings/base/zephyr,memory-common.yaml @@ -4,6 +4,14 @@ include: [base.yaml] properties: + zephyr,memory-region: + type: string + description: | + Signify that this node should result in a dedicated linker script + memory region in the final executable. The region address and size + is taken from the property, while the name is the value of + this property. + zephyr,memory-region-mpu: type: string deprecated: true diff --git a/dts/bindings/base/zephyr,memory-region.yaml b/dts/bindings/base/zephyr,memory-region.yaml index 60308af7173..1d9486de8b3 100644 --- a/dts/bindings/base/zephyr,memory-region.yaml +++ b/dts/bindings/base/zephyr,memory-region.yaml @@ -5,14 +5,8 @@ description: Compatible for devices resulting in linker memory regions compatible: "zephyr,memory-region" -include: [base.yaml, "zephyr,memory-attr.yaml"] +include: [base.yaml, "zephyr,memory-common.yaml"] properties: zephyr,memory-region: - type: string required: true - description: | - Signify that this node should result in a dedicated linker script - memory region in the final executable. The region address and size - is taken from the property, while the name is the value of - this property. diff --git a/dts/bindings/test/vnd,memory-attr.yaml b/dts/bindings/test/vnd,memory-attr.yaml index 0303d255c54..8696279859d 100644 --- a/dts/bindings/test/vnd,memory-attr.yaml +++ b/dts/bindings/test/vnd,memory-attr.yaml @@ -5,4 +5,4 @@ description: Test memory and memory attributes compatible: "vnd,memory-attr" -include: [base.yaml, "zephyr,memory-attr.yaml"] +include: [base.yaml, "zephyr,memory-common.yaml"]