Skip to content
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

Support the SPI RAM found on HAD badge #25

Closed
mithro opened this issue Apr 10, 2020 · 5 comments · Fixed by #70
Closed

Support the SPI RAM found on HAD badge #25

mithro opened this issue Apr 10, 2020 · 5 comments · Fixed by #70

Comments

@mithro
Copy link
Contributor

mithro commented Apr 10, 2020

The HackADay badge has

two Lyontek LY68L6400 64 Mbit SPI SRAM chips

These SPI SRAM chips, kinda look like SPI NOR chips.

It would be good to have these devices supported as memory mappable for both read and write.

Clock rate:

  • 33MHz(max) for normal read
  • 100MHz(max) for fast read
  • Mode: SPI/QPI

Datasheet -> https://www.electrodragon.com/w/images/0/04/LY68L6400_0.3.pdf

@machdyne
Copy link

Hi @mithro. I have been trying to get memory-mapped (Q)SPI PSRAM working with LiteX for some time now with no success. I have some working Verilog for QSPI PSRAM in this repo: https://github.com/machdyne/qqspi

If anyone wants to attempt this I can probably provide a 32MB QSPI PSRAM PMOD.

@xobs
Copy link
Member

xobs commented Jul 24, 2022

I had this working in https://github.com/xobs/haddecks/blob/master/rtl/spi_ram.py, and I was working on interleaving access in https://github.com/xobs/haddecks/blob/master/rtl/spi_ram_dual.py

There are tests in https://github.com/xobs/haddecks/blob/master/sim/spiram.v

@machdyne
Copy link

Thanks! This is working for me. I had to use dummy=6 with APS6404L-3SQR-SN PSRAM.

Maybe this can be merged into litex.soc.cores or litespi?

I have noticed a few boards with similar SPI PSRAM and with the QQSPI PMOD it's possible to add 32MB to any board with a PMOD socket, having this capability in LiteX might be useful, especially for the smaller boards.

@suarezvictor
Copy link
Contributor

suarezvictor commented Feb 27, 2023

I sucessfully integrated the PSRAM core from @xobs into a newer version of LiteX by patching the example SoC script, see litex-hub/micropython@d7d2203

I think this is ready to go mainstream. Excellent core! It worked first time

image

@suarezvictor
Copy link
Contributor

This development makes the PSRAM appear as SPI flash litex-hub/litex-boards@b1df2c0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants