zephyr/tests/lib/devicetree/api_ext/app.overlay
Carlo Caione 18ffcdcf74 linker: Introduce zephyr,memory-region compatible
Introduce a new "zephyr,memory-region" compatible to be used when a new
memory region must be created in the linker script from the devicetree
nodes using the compatible.

Remove also the LINKER_DT_REGION_FROM_NODE macro and add a new
LINKER_DT_REGIONS macro to cycle through all the compatible regions.

In the same PR modify the DTS files and the linker scripts.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:02:04 -05:00

30 lines
751 B
Plaintext

/*
* Copyright (c) 2021, Commonwealth Scientific and Industrial Research
* Organisation (CSIRO) ABN 41 687 119 230.
*
* SPDX-License-Identifier: Apache-2.0
*
* Application overlay for testing the devicetree.h extension API's.
*
* Names in this file should be chosen in a way that won't conflict
* with real-world devicetree nodes, to allow these tests to run on
* (and be extended to test) real hardware.
*/
/ {
test {
#address-cells = < 0x1 >;
#size-cells = < 0x1 >;
test_sram1: sram@20000000 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = < 0x20000000 0x1000 >;
zephyr,memory-region = "SRAM_REGION";
};
test_sram2: sram@20001000 {
compatible = "mmio-sram";
reg = < 0x20001000 0x1000 >;
};
};
};