-
Notifications
You must be signed in to change notification settings - Fork 8.1k
drivers: flash: Add support for Atmel AT25 SPI flash variant #92980
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
drivers: flash: Add support for Atmel AT25 SPI flash variant #92980
Conversation
|
Hello @Liam-Ogletree, and thank you very much for your first pull request to the Zephyr project! |
d9a8fa6 to
938b962
Compare
|
It would be good to add an entry to |
Added an entry to /spi.dtsi for this flash driver. |
938b962 to
aca63fe
Compare
09c8642 to
2199a6a
Compare
1a323c3 to
0570b3c
Compare
0570b3c to
3a033d7
Compare
|
Hi @de-nordic, Following up on this PR request -- thank you for your review from July 15th! I think I've addressed the changes requested, but please let me know if there are any additional changes you'd like me to make. Thanks for your time, |
3a033d7 to
742b5ab
Compare
|
Next time, please do 2 separate pushes for rebase and the changes after a review, so reviewer can easily check the diff using GitHub |
742b5ab to
0abdd53
Compare
@JarmouniA -- Sorry about that, makes sense. Appreciate your help/review! |
0abdd53 to
56252d1
Compare
|
Hi @de-nordic, Following up after @JarmouniA's review. Please let me know if you'd like any further changes, but I think I've addressed the changes requested above. Thanks for your time! |
| include: "spi-device.yaml" | ||
|
|
||
| properties: | ||
| jedec-id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the spec is for very specific compatible, shouldn't this, if possible, be also set to id for that exact device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parts manufactured by Renesas and Adesto (acquired by Renesas in ~2020) have the same JEDEC IDs, and I don't think there are any other AT25XV021A manufacturers today. So, I could make the JEDEC ID a fixed value in the driver and remove this binding, or I could leave it here with a default value for future flexibility.
I went ahead and removed the required: true property and set a default for the JEDEC ID. Please let me know if you'd like me to remove JEDEC ID entirely and hard-code it, or leave it as the default and allow for future flexibility.
Thanks!
| type: uint8-array | ||
| required: true | ||
| description: | | ||
| JEDEC ID as manufacturer ID (1 byte) and device ID (2 bytes), e.g., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just JEDEC id. The format is more complicated than that, and manufacturer of the compatible device can have actually something like 17 bytes of id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
The AT25XV021A variant is a flash variant of Atmel's AT25 family that adds extra protections, requiring additional writes to the device to program or erase data. This commit adds a flash driver for AT25XV021A devices instead of modifying (1) the existing AT45 SPI flash driver or (2) the existing AT24/25 EEPROM driver because this variant poses fundamental changes that affect all aspects of the driver. Notably, - AT25XV021A includes a second status register, and the format and functions of the existing status register is changed from the existing drivers. - AT25XV021A requires executing page or chip erase commands before writing, making it incompatible with the existing AT24/25 EEPROM driver. - AT25XV021A adds a software protection layer that requires extra writes before executing program or erase commands. Tested writing to and erasing from an AT25XV021A device. Tested reading from an AT25XV021A device across page boundaries. Tested chip erase function. Tested driver initialization from varying initial hardware states. Signed-off-by: Liam Ogletree <[email protected]>
Dummy values mirror at25 and spi-nor implementation. Signed-off-by: Liam Ogletree <[email protected]>
56252d1 to
3c7e8c6
Compare
|
|
Hi @de-nordic, Just wanted to follow up with you since addressing your latest comments. When you get a chance, let me know whether the change to Thank you for your time! |
|
Hi @pdgendt, With de-nordic's recent approval, could I ask you to re-review since you previously reviewed/approved this PR? Thanks for your time, |
|
Hi @Liam-Ogletree! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |



The AT25XV021A variant is a flash variant of Atmel's AT25 family that adds extra protections, requiring additional writes to the device to program or erase data.
This commit adds a flash driver for AT25XV021A devices instead of modifying (1) the existing AT45 SPI flash driver or (2) the existing AT24/25 EEPROM driver because this variant poses fundamental changes that affect all aspects of the driver.
Notably,
Tested writing to and erasing from an AT25XV021A device. Tested reading from an AT25XV021A device across page boundaries. Tested chip erase function. Tested driver initialization from varying initial hardware states.