-
Notifications
You must be signed in to change notification settings - Fork 792
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
[sw/silicon_creator] Add SFDP table definition and READ_SFDP command #11742
Conversation
e58cc40
to
9f508fa
Compare
@eunchan, can you take a quick look at the changes in |
Yep . Looks good to me Thanks! |
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.
LGTM, but I will defer to @a-will's judgment given his experience with the spi_device DIFs.
Signed-off-by: Alphan Ulusoy <[email protected]>
.address = false, | ||
.dummy_cycles = 0, | ||
}); | ||
// Configure READ_SFDP command (CMD_INFO_4). |
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 a comment: I wonder if we ought to have regtool generate constants / macros that associate cmd_info slots with the specific hardware-handled commands.
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.
/** | ||
* BFPT 17th Word | ||
* -------------- | ||
* [31: 0]: Fast read (1S-8S-8S) (1S-1S-8S) (not supported, 0x0) | ||
*/ | ||
#define BFPT_WORD_17(X) \ | ||
X(31, 0, kBfptNotSupported) |
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.
nit: Given the non-support of anything past word 16, one wonders if we should find a JEDEC parameter table version that doesn't include words [17..23] and use that version and save a bit of parameter space.
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.
I agree. I'll try to find something from a credible source when I get the chance but jedec.org is not very helpful when it comes to previous versions of the specs.
This PR adds the initial definition of the SFDP table that OpenTitan will use and the READ_SFDP command. The values are from the doc (SFDP and the BFPT headers) and the spreadsheet (basic flash parameters table) that I've been working on.
Following issues track some open items:
READ_SFDP
response seem to be incorrect).Signed-off-by: Alphan Ulusoy [email protected]