Skip to content

Commit 28b4fdf

Browse files
committed
dts: bindings: mpu: add PPB and IO regions
Extends zephyrproject-rtos#43119 with PPB and IO values of `memory-region-mpu`. That allows MPU region definition with PPB or IO attributes in the DTS. Signed-off-by: Georgij Cernysiov <[email protected]>
1 parent 70dbf7e commit 28b4fdf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

dts/bindings/base/zephyr,memory-region.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ properties:
2424
- "RAM"
2525
- "RAM_NOCACHE"
2626
- "FLASH"
27+
- "PPB"
28+
- "IO"
2729
description: |
2830
Signify that this node should result in a dedicated MPU region. The
2931
region address and size are taken from the <reg> property, while the MPU

include/zephyr/linker/devicetree_regions.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,19 +224,23 @@
224224
* to the MPU_FN macro using the 'attr' parameter, in the form
225225
* REGION_{attr}_ATTR.
226226
*
227-
* Currently only three enums are supported for the 'zephyr,memory-region-mpu'
227+
* The following enums are supported for the 'zephyr,memory-region-mpu'
228228
* property:
229229
*
230230
* - RAM
231231
* - RAM_NOCACHE
232232
* - FLASH
233+
* - PPB
234+
* - IO
233235
*
234236
* This means that usually the arch code would provide some macros or defines
235237
* with the same name of the extended property, that is:
236238
*
237239
* - REGION_RAM_ATTR
238240
* - REGION_RAM_NOCACHE_ATTR
239241
* - REGION_FLASH_ATTR
242+
* - REGION_PPB_ATTR
243+
* - REGION_IO_ATTR
240244
*
241245
* Example devicetree fragment:
242246
*
@@ -249,6 +253,10 @@
249253
* };
250254
* };
251255
*
256+
* For detailed information about MPU region attribute define configuration refer
257+
* to the specific architecture MPU header.
258+
* For example: include/zephyr/arch/arm/aarch32/mpu/arm_mpu_v7m.h.
259+
*
252260
* The 'attr' parameter of the MPU_FN function will be the extended
253261
* 'REGION_RAM_NOCACHE_ATTR' token and the arch code will be usually
254262
* implementing a macro with the same name.

0 commit comments

Comments
 (0)