Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boards/arm/stm32f429i_disc1/stm32f429i_disc1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
};

sdram2: sdram@d0000000 {
compatible = "mmio-sram";
device_type = "memory";
reg = <0xd0000000 DT_SIZE_M(8)>;
zephyr,memory-region = "SDRAM2";
Expand Down
2 changes: 2 additions & 0 deletions boards/arm/stm32f769i_disco/stm32f769i_disco.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
};

sdram1: sdram@c0000000 {
compatible = "mmio-sram";
device_type = "memory";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this (and not related to this PR):
@mbolivar-nordic: device_type prop is nowhere documented in bindings. Shouldn't it be removed ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious as well, shows up in edtlib.py but I don't think it's used anywhere and it's declared as deprecated in the specs https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#device_type-deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's declared as deprecated in the specs https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#device_type-deprecated.

@fabiobaltieri the link you pasted says (emphasis mine):

new use of the property is deprecated, and it should be included only on cpu and memory nodes for compatibility with IEEE 1275–derived devicetrees.

So from a specification point of view, it seems fine to keep this as is.

@galak asked about this on the spec mailing list, but the results were inconclusive: https://www.spinics.net/lists/devicetree-spec/msg00800.html

Take from that what you will.

reg = <0xc0000000 DT_SIZE_M(16)>;
zephyr,memory-region = "SDRAM1";
};

leds {
Expand Down
1 change: 1 addition & 0 deletions boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
};

sdram2: sdram@d0000000 {
compatible = "mmio-sram";
device_type = "memory";
reg = <0xd0000000 DT_SIZE_M(32)>;
zephyr,memory-region = "SDRAM2";
Expand Down
2 changes: 1 addition & 1 deletion cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3376,7 +3376,7 @@ function(zephyr_linker_dts_memory)

dt_reg_addr(addr PATH ${DTS_MEMORY_PATH})
dt_reg_size(size PATH ${DTS_MEMORY_PATH})
dt_prop(name PATH ${DTS_MEMORY_PATH} PROPERTY "memory-region")
dt_prop(name PATH ${DTS_MEMORY_PATH} PROPERTY "zephyr,memory-region")
if (NOT DEFINED name)
# Fallback to the node path
set(name ${DTS_MEMORY_PATH})
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f3/stm32f303X8.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(8)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f3/stm32f303Xc.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(8)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f3/stm32f303Xe.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(16)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f3/stm32f334X8.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(4)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f405Xg.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f407Xe.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f407Xg.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f415Rg.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f417Xe.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f417Xg.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f427Xi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f427vi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f429Xi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f429vi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f437Xi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/st/f4/stm32f469Xi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ccm0: memory@10000000 {
compatible = "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(64)>;
zephyr,memory-region = "CCM";
};

sram0: memory@20000000 {
Expand Down
2 changes: 1 addition & 1 deletion dts/bindings/arm/st,stm32-ccm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: STM32 CCM (Core Coupled Memory)

compatible: "st,stm32-ccm"

include: base.yaml
include: [base.yaml, mem-region.yaml]

properties:
reg:
Expand Down
4 changes: 4 additions & 0 deletions dts/bindings/memory-controllers/st,stm32-fmc-sdram.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ description: |
memory device/s in DeviceTree:

sdram1: sdram@c0000000 {
compatible = "mmio-sram";
device_type = "memory";
reg = <0xc000000 DT_SIZE_M(X)>;
zephyr,memory-region = "SDRAM1";
};

sdram2: sdram@d0000000 {
compatible = "mmio-sram";
device_type = "memory";
reg = <0xd000000 DT_SIZE_M(X)>;
zephyr,memory-region = "SDRAM2";
};

It is important to use sdram1 and sdram2 node labels for bank 1 and bank 2
Expand Down