Skip to content

Commit

Permalink
dts: nrf: Add flash controller and alignment description for nRF52840
Browse files Browse the repository at this point in the history
Added flash-controller description and moved flash description to
it (for coherence). Added property for description of
the flash alignment required by write operations.
Thanks to that l-value FLASH_WRITE_BLOCK_SIZE macro
will be generated. It is useful for any component uses
the flash.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
  • Loading branch information
nvlsianpu authored and Anas Nashif committed Sep 11, 2017
1 parent de3f3a9 commit d868a0b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dts/arm/nordic/nrf52840.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
};
};

flash0: flash@0 {
reg = <0x00000000 DT_FLASH_SIZE>;
flash-controller@4001E000 {
compatible = "nrf,nrf52-flash-controller";
reg = <0x4001E000 0x550>;

#address-cells = <1>;
#size-cells = <1>;

flash0: flash@0 {
compatible = "soc-nv-flash";
reg = <0x00000000 DT_FLASH_SIZE>;
write-block-size = <4>;
};
};

sram0: memory@20000000 {
Expand Down
26 changes: 26 additions & 0 deletions dts/common/yaml/soc-nv-flash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Flash base node description
id: soc-nv-flash
version: 0.1

description: >
This binding gives a base FLASH description
properties:
- compatible:
type: string
category: optional
description: compatible strings
constraint: "soc-nv-flash"

- write-block-size:
type: int
description: address alignment required by flash write operations
generation: define
category: optional
label: alignment

base_label: FLASH
use-property-label: yes

...

0 comments on commit d868a0b

Please sign in to comment.