-
Notifications
You must be signed in to change notification settings - Fork 781
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_device] Add an enable bit for the IP to prevent partial configuration? #14665
Comments
ah i like this idea...i think it's better than whatever CSb edge hunting idea I had. |
A number of FSMs and stuff would probably need to be "reset" etc. |
Should we assign this to "Future Release"? I don't think we have enough time changing the design and review CDC. |
we might have to quantify the host impact a bit. |
I will add an enable bit to CSR (rather than adding CG to SPI_CLK or OR gate on CSb) that blocks cmdparse to activate any datapaths. It would take less effect to the timing. |
Applying assumption of tying SCK while resetting chip or IP. Related issue to folllow up later: lowRISC#14665 or lowRISC#9503 Signed-off-by: Eli Kim <[email protected]>
Applying assumption of tying SCK while resetting chip or IP. Related issue to folllow up later: lowRISC#14665 or lowRISC#9503 Signed-off-by: Eli Kim <[email protected]>
Applying assumption of tying SCK while resetting chip or IP. Related issue to folllow up later: lowRISC#14665 or lowRISC#9503 Signed-off-by: Eli Kim <[email protected]>
Applying assumption of tying SCK while resetting chip or IP. Related issue to folllow up later: #14665 or #9503 Signed-off-by: Eli Kim <[email protected]>
Triaged for |
We have to add this enable bit. The proposal is as follows: Add an
Keeping
Priority:P1
|
|
It looks like we can reset both opentitan/hw/top_earlgrey/data/top_earlgrey.hjson Lines 155 to 157 in 00b0568
Hence, even if it would be convenient to implement this in the blocks themselves, there is a workaround for this available, hence I think we can deprioritize this to after M2.5. |
This also resets |
@andreaskurth you are right, this workaround would only partially address the issue at hand. Specifically:
So, while this is a good feature to have for M3, we decided to de-prioritize this feature for M2.5 and defer it. |
Related comment : #14861 (review) |
This is likely not necessary. The data sheet will always have a spec requirement to wait some amount of time before transactions are allowed (the "reset delay" or similar). The response to such activity is considered undefined behavior. We can sweep this sort of configuration need into that time requirement. |
I'm going to close this, since that time requirement is always present. However, if someone wants to implement this to improve robustness in the future, then we do have a "Disabled" mode now that generic mode is gone. The bits would need to be held steady and sampled at the right moment to allow the transition to the SPI domain, in addition to ensuring the atomicity of SPI transactions. |
For the spi_device IP, should we add an IP-wide enable bit in a CSR? Currently, the spi_device IP is never actually off (power / clock / reset inputs notwithstanding). This means that the spi_device could respond to transactions before the full configuration is ready. Should we gate responses to the host, events on CSRs / interrupts, and the filling of FIFOs until software has a chance to complete configuration?
On the spi_host clock side, this would likely mean sampling the enable bit at the beginning of a transaction and discarding the data if the enable was low.
The text was updated successfully, but these errors were encountered: