opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

RFC: SPI Flash Mode

Open eunchan opened this issue 7 years ago • 14 comments

Request For Comments: SPI Device Flash / Mailbox Mode

This RFC suggests two features in SPI Device HWIP, which are the SPI Flash mode (EEPROM) and the Mailbox mode. SPI Flash mode is to enable the host to access internal eFlash storage with standardized SPI Flash command set and protocol. It leads to the eventual goal, SPI passthrough mode later. The second feature, Mailbox mode is to communicate between the host and the core inside OpenTitan SoC with write only commands and address.

https://docs.google.com/document/d/13_7_BB68dziCwpukN9TS6i7zIcT7kA6s16pTb6iDeUE/edit?usp=sharing

eunchan avatar Dec 02 '19 23:12 eunchan

sorry @eunchan i didn't provide input sooner. I'm going to have a look today.

tjaychen avatar Dec 09 '19 19:12 tjaychen

sorry again! i finally read through it and left some comments. Thanks for the write-up @eunchan ! looks pretty good to me overall.

tjaychen avatar Dec 17 '19 19:12 tjaychen

@weicaiyang to review as well

sjgitty avatar Dec 18 '19 01:12 sjgitty

Adding the comments from @mwbranstad

On Tue, Jan 07, 2020 at 05:21:05PM +0000, Mark Branstad wrote:

Hi Eunchan,

I reviewed the document, but my questions were mostly at a high level. Also, I was unable to comment in this doc - is that a permission issue, or do I not have the doc in the correct mode? Anyway, my comments where along the lines of:

What problem are we really solving with these new modes? (how does the software differ?)

This SPI Flash mode is to support SPI interface. It eventually leads to the SPI Passthrough combining this SPI Flash mode. So that, the host can access the OT eFlash and the external Flash (BIOS) with same protocol.

What is driving the speeds, buffer sizes, etc. - can this be a very simple interface change, or does the extra hw really help the overall performance?

It doesn't increase the speed of the SPI interface but the throughput as it can support Dual IO, Quad IO eventually. Current Firmware Download mode doesn't support it as its assumption is to send/receive through the SPI interface at the same time.

It is not clear how a mailbox mode was better than a direct command/address mode - there appears to be assumptions on this not explained.

Again, more high-level in nature. I have modified an I2C/SPI type controller in the past, but too long along to remember fine details.

eunchan avatar Jan 08 '20 17:01 eunchan

Based on RFC Process , it is supposed to be tagged with TC Review but I cannot see the tag in the list.

Once the author is happy that the RFC is complete, they submit it to the Technical Committee for review by adding the label For TC Review.

@aytong Could you add the tag to the system? I think it is good to go for TC Review.

eunchan avatar Jan 13 '20 22:01 eunchan

@eunchan @sjgitty, I don't have privilege to create labels in opentitan repo. Not sure if it is because I don't have commit rights. Can either of you create labels?

aytong avatar Jan 14 '20 03:01 aytong

I can try, I have before. What labels are you looking to create? Or do you mean applying labels?

Scott

On Mon, Jan 13, 2020 at 7:55 PM Andy Tong [email protected] wrote:

@eunchan https://github.com/eunchan @sjgitty https://github.com/sjgitty, I don't have privilege to create labels in opentitan repo. Not sure if it is because I don't have commit rights. Can either of you create labels?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/1121?email_source=notifications&email_token=AJZQKVILNU4T7NMPLYUK32TQ5UZULA5CNFSM4JUNNBXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI3F3CA#issuecomment-573988232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJZQKVNM7OPRP2WJ6DAPA5DQ5UZULANCNFSM4JUNNBXA .

sjgitty avatar Jan 14 '20 06:01 sjgitty

the RFC process doc mentioned that "TC Review" label need to be added to proceed.

On Mon, Jan 13, 2020 at 10:23:47PM -0800, Scott Johnson wrote:

I can try, I have before. What labels are you looking to create? Or do you mean applying labels?

Scott

On Mon, Jan 13, 2020 at 7:55 PM Andy Tong [email protected] wrote:

@eunchan https://github.com/eunchan @sjgitty https://github.com/sjgitty, I don't have privilege to create labels in opentitan repo. Not sure if it is because I don't have commit rights. Can either of you create labels?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/1121?email_source=notifications&email_token=AJZQKVILNU4T7NMPLYUK32TQ5UZULA5CNFSM4JUNNBXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI3F3CA#issuecomment-573988232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJZQKVNM7OPRP2WJ6DAPA5DQ5UZULANCNFSM4JUNNBXA .

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/lowRISC/opentitan/issues/1121#issuecomment-574022901

eunchan avatar Jan 14 '20 16:01 eunchan

Created

On Tue, Jan 14, 2020 at 8:28 AM Eunchan Kim [email protected] wrote:

the RFC process doc mentioned that "TC Review" label need to be added to proceed.

On Mon, Jan 13, 2020 at 10:23:47PM -0800, Scott Johnson wrote:

I can try, I have before. What labels are you looking to create? Or do you mean applying labels?

Scott

On Mon, Jan 13, 2020 at 7:55 PM Andy Tong [email protected] wrote:

@eunchan https://github.com/eunchan @sjgitty https://github.com/sjgitty, I don't have privilege to create labels in opentitan repo. Not sure if it is because I don't have commit rights. Can either of you create labels?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/lowRISC/opentitan/issues/1121?email_source=notifications&email_token=AJZQKVILNU4T7NMPLYUK32TQ5UZULA5CNFSM4JUNNBXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI3F3CA#issuecomment-573988232 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJZQKVNM7OPRP2WJ6DAPA5DQ5UZULANCNFSM4JUNNBXA

.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/lowRISC/opentitan/issues/1121#issuecomment-574022901

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/1121?email_source=notifications&email_token=AJZQKVIZWBVD34PTWY7BDTDQ5XR3BA5CNFSM4JUNNBXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI5HXZY#issuecomment-574258151, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJZQKVID6TNPMWTINDQZDOTQ5XR3BANCNFSM4JUNNBXA .

sjgitty avatar Jan 15 '20 01:01 sjgitty

Thanks @sjgitty

eunchan avatar Jan 15 '20 19:01 eunchan

@eunchan

  • How is the spec & review of two new features (Flash mode, Mailbox mode) for SPI device coming along?
  • When do you expect this RFC to be ready for TC review? Afaik, these two features can affect timing (closure) of the SPI device. Therefore we want a decision and then implementation asap.

mateenfaisal avatar Dec 03 '20 17:12 mateenfaisal

Hi @eunchan - ping on the above.

asb avatar Jan 08 '21 15:01 asb

@eunchan @tjaychen I think both features proposed in this RFC have been implemented since. Can we close this issue?

imphil avatar Oct 05 '21 10:10 imphil

yes that's right, let's close this.

tjaychen avatar Oct 05 '21 16:10 tjaychen