-
Notifications
You must be signed in to change notification settings - Fork 8.3k
dts: bindings: mtd: add erase-block-size property to spi-nor #96443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dts: bindings: mtd: add erase-block-size property to spi-nor #96443
Conversation
Add an optional `erase-block-size` property to the `jedec,spi-nor` Devicetree binding. This ensures that devices whose `slot1_partition` is on a SPI flash device do not encounter the following warning from mcuboot. ```shell Unable to determine size of slot1 partition, cannot calculate minimum \ sector usage ``` Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
|
|
Was already proposed in #95152 |
Hmmm... That PR seems to address write block size rather than erase block size (although I haven't read through all of the comments). |
Yes my bad, didn't pay close attention, but I think the same rule applies to the two. |
Is the argument there that the write or erase block size of the spi nor flash device is a global software property? Different flash devices can and do have different write or erase block sizes, so configuring that globally in software is not really representative of real world scenarios. This change is mainly to fix a warning that arises when building MCUBoot, which should be avoided if easily possible, like by adding an (optional) DT property. Without the DT binding, the warning can cause problems in some build environments, which is kind of a bug. I would be happy to file an issue for it. |
|
why are we adding MCuboot parameter? I hate these MCUboot configuration scripts. We are basically adding this param to make warning go away, without reflecting the change in device driver. |
It provides an (optional) compile-time-constant value for the erase size, which certainly helps the application (be it mcuboot or a user app). It's possible that patching MCUBoot would also work (although that patch might be more complex). Would be great if the driver could make use of it, but I know that JEDEC is capable of reporting multiple erase sizes as well. Of course, if zephyr/drivers/flash/spi_nor.c Line 1046 in 5d02fac
|
|
The proposed property already exists in a generic flash binding
In my opinion, the external Flash nodes that are generating the MCUboot warning should just add the |
Just learned of that recently as well. So the idea is to create an |
Either create a child flash node, of the controller node, with compatible Or just add
|
|
Using the soc-nv-flash workaround. |



Add an optional
erase-block-sizeproperty to thejedec,spi-norDevicetree binding.This ensures that devices whose
slot1_partitionis on a SPI NOR flash device do not encounter the following warning from mcuboot.