-
Notifications
You must be signed in to change notification settings - Fork 782
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
[Spi_host] Test a Macronix flash #18977
[Spi_host] Test a Macronix flash #18977
Conversation
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.
Looks good to me except for the commented tests.
e77f010
to
b01d60d
Compare
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 as far as I understand the test, only comments on the style but don't let them block this PR.
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.
Per previous comment - SGTM
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.
Looks good
As james mentioned, it would be nice to fix the docstring mismatch (addr_width
vs addressing_width
).
b01d60d
to
e1b355d
Compare
e1b355d
to
10139a7
Compare
addr_width = kDifSpiHostWidthDual; | ||
case 1: |
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.
Missing break
?
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.
It's intentional, because the case 1 is the value initialized, but I just realized that it would be much clearer if I remove the case 1
.
4e99d0a
to
e6c13c8
Compare
kPageQuadProgramOpcode = 0x38, | ||
// The Macronix flash requires that the addr in sent using 4 lanes as the | ||
// data when issuing the `kPageQuadProgramOpcode` operation. | ||
kPageQuadProgramAddrWidth = 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.
FYI, this style of SPI flash IO is known as 1-4-4 mode (1 lane for the opcode, 4 lanes for the address phase and 4 lanes for the data phase). Support for this particular configuration should be described by the SFDP (and similarly, support for the 1-1-4 style used by the Winbond part should be described by its SFDP).
For the purpose of these tests, I don't think we need to be parsing the SFDPs, I just wanted to fill in a bit of background information.
The only thing you might want to change is the comment to use the SPI terminology:
// The Macronix flash `4PP` opcode operates in 1-4-4 mode.
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.
Thanks for the information! I changed the comment.
e6c13c8
to
f39d17d
Compare
Some flash when performing the page program in quad mode requires the address to also be sent using the four lanes. This commit makes this configurable. Signed-off-by: Douglas Reis <[email protected]>
f39d17d
to
00c627c
Compare
This commit add a function to connect spi_host1 to the BoB via pinmux. Signed-off-by: Douglas Reis <[email protected]>
Signed-off-by: Douglas Reis <[email protected]>
00c627c
to
bd5dba8
Compare
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.
Approve based on brief look at code and based on the reviews from other people in the software team.
This PR only add a new spi_host test. The test execute various commands of a Macronix flash on the BoB.