Skip to content

Conversation

@fabiobaltieri
Copy link
Member

@fabiobaltieri fabiobaltieri commented Dec 9, 2021

Hey hi, found few missing region names after #37279 on SDRAM and CCM nodes for some stm32 boards. One had no compatible, the other missed the binding, tested with west build -p -b stm32f429i_disc1 samples/basic/blinky.

Before:

Memory region         Used Size  Region Size  %age Used
           FLASH:       14988 B         2 MB      0.71%
            SRAM:        4320 B       192 KB      2.20%
/memory@10000000:          0 GB        64 KB      0.00%
 /sdram@d0000000:          0 GB         8 MB      0.00%
        IDT_LIST:          0 GB         2 KB      0.00%

after:

Memory region         Used Size  Region Size  %age Used
           FLASH:       14988 B         2 MB      0.71%
            SRAM:        4320 B       192 KB      2.20%
             CCM:          0 GB        64 KB      0.00%
          SDRAM2:          0 GB         8 MB      0.00%
        IDT_LIST:          0 GB         2 KB      0.00%

Also fix the property name used in zephyr_linker_dts_memory, right now it's always using the fallback.

@JordanYates

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Thanks @fabiobaltieri. Only minor comments

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.

Add the compatible property to the board level sdram nodes in few stm32
dts files so that the zephyr,memory-region name is used correctly in the
linker script.

Signed-off-by: Fabio Baltieri <[email protected]>
Include the mem-region bindings for the stm32 ccm nodes and set the name
in the current dtsi files.

Signed-off-by: Fabio Baltieri <[email protected]>
Fix the zephyr_linker_dts_memory to lookup the correct property name
when trying to figre the region name.

Signed-off-by: Fabio Baltieri <[email protected]>
@MaureenHelm MaureenHelm merged commit c07d747 into zephyrproject-rtos:main Dec 10, 2021
@fabiobaltieri fabiobaltieri deleted the mem-reg-names branch December 10, 2021 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants