zephyr/doc/build/dts
Carlo Caione 7483e43f0c devicetree: Add 'zephyr,memory-attr' and DT helpers
The 'zephyr,memory-region-mpu' property was addede gqas a
convenient way to create and configure MPU regions using information
coming from DT. It has been used a lot since it was introduced so I
guess we can consider it a Zephyr success story ™ .

Unfortunately it has been proved to be a bit limited and with some
important limitations:

1. It was introduced as a property of the compatible
   zephyr,memory-region that is used to create linker regions and
   sections from DT data. This means that we can actually create MPU
   regions only for DT-defined regions and sections.
2. The naming is unfortunate because it is implying that it is used only
   for MPU.
3. It is misplaced being in include/zephyr/linker/devicetree_regions.h
   and still it has nothing to do with the linker at all.
4. It is exporting a function called LINKER_DT_REGION_MPU that again has
   nothing to do with the linker.

Point (1) is also particularly limiting because it is preventing us to
characterize memory regions that are not generated using the
'zephyr,memory-region' compatible, like generic mmio-sram regions.

While we fix all the issues, we also want to extend a bit the range of
usefulness of this property. We are renaming it 'zephyr,memory-attr' and
it is now carrying information about the type of memory the property is
attached to (cacheable, non-cacheable, IO, eXecutable, etc...). The user
can use this property and the DT API coming with it to act on the memory
node it is accompanied by.

We are still providing the DT_MEMORY_ATTR_APPLY() macro that can be used
to create the MPU regions as before, but we are adding also a
DT_MEMORY_ATTR_FOREACH_NODE() macro that can be used to cycle through
the memory nodes and act on those.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
..
api devicetree: Add 'zephyr,memory-attr' and DT helpers 2023-07-25 11:22:10 +02:00
api-usage.rst doc: dts: touch up api-usage 2023-01-23 07:16:04 -08:00
bindings-intro.rst doc: dts: add missing entry to dts/bindings search path 2023-01-23 07:16:04 -08:00
bindings-syntax.rst doc: dts: add guide to phandles 2023-01-23 07:16:04 -08:00
bindings-upstream.rst doc: dts: document zephyr, prefix for props/compats 2023-01-23 07:16:04 -08:00
bindings.rst doc: dts: split up bindings docs 2023-01-23 07:16:04 -08:00
design.rst doc: dts: clarify a design requirement 2023-01-23 07:16:04 -08:00
dt-vs-kconfig.rst doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00
howtos.rst doc: introduce EXTRA_CONF_FILE and EXTRA_DTC_OVERLAY_FILE 2023-05-23 16:40:21 +02:00
index.rst doc: dts: add guide to phandles 2023-01-23 07:16:04 -08:00
intro-input-output.rst doc: dt: fix links to script files 2023-02-28 11:51:24 -08:00
intro-scope-purpose.rst doc: dts: split up intro 2023-01-23 07:16:04 -08:00
intro-syntax-structure.rst doc: dts: clarify reg format 2023-01-23 07:16:04 -08:00
intro.rst doc: dts: split up intro 2023-01-23 07:16:04 -08:00
macros.bnf scripts: dts: add special tooling for handling GPIO hog nodes 2023-01-27 14:38:52 -08:00
main-example.dts doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00
phandles.rst doc: dts: add guide to phandles 2023-01-23 07:16:04 -08:00
troubleshooting.rst doc: dts: adjust CONFIG_COMPILER_TRACK_MACRO_EXPANSION text 2023-05-05 12:19:36 -07:00
zephyr-user-node.rst doc: dts: improve zephyr-user-node.rst 2023-01-23 07:16:04 -08:00
zephyr_dt_build_flow.png doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00
zephyr_dt_build_flow.svg doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00
zephyr_dt_i2c_example.png doc: build: dts: Remove refs to label property 2022-08-18 19:50:39 -05:00
zephyr_dt_i2c_example.svg doc: build: dts: Remove refs to label property 2022-08-18 19:50:39 -05:00
zephyr_dt_i2c_high_level.png doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00
zephyr_dt_i2c_high_level.svg doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00
zephyr_dt_inputs_outputs.svg doc: move DTS under Build/Configuration systems section 2022-04-07 16:35:19 +02:00