Unverified Commit 3f0f1201 authored by enjoy-digital's avatar enjoy-digital Committed by GitHub
Browse files

Merge pull request #70 from ilya-epifanov/ecp5-evn-spi1x-and-flash-params

ECP5-EVN SpiFlash parameters
parents b9ee3a79 0ba80457
......@@ -4,6 +4,7 @@
from litex.build.generic_platform import *
from litex.build.lattice import LatticePlatform
from litex.build.lattice.programmer import OpenOCDJTAGProgrammer
from litex.soc.cores.spi_flash import SpiFlash
import os
......@@ -43,6 +44,14 @@ _io = [
Subsignal("dq", Pins("W2 V2 Y2 W1"), IOStandard("LVCMOS33")),
),
("spiflash1x", 0,
Subsignal("cs_n", Pins("R2"), IOStandard("LVCMOS33")),
Subsignal("mosi", Pins("W2"), IOStandard("LVCMOS33")),
Subsignal("miso", Pins("V2"), IOStandard("LVCMOS33")),
Subsignal("wp", Pins("Y2"), IOStandard("LVCMOS33")),
Subsignal("hold", Pins("W1"), IOStandard("LVCMOS33")),
),
("clk200", 0,
Subsignal("p", Pins("Y19")),
Subsignal("n", Pins("W20")),
......@@ -125,11 +134,20 @@ class Platform(LatticePlatform):
def __init__(self, **kwargs):
LatticePlatform.__init__(self, "LFE5UM5G-85F-8BG381", _io, _connectors, **kwargs)
def make_spiflash(self):
flash_pads = self.request("spiflash1x")
spiflash = SpiFlash(flash_pads, endianness="little", div=2, dummy=8)
spiflash.add_clk_primitive(self.device)
return spiflash
def request(self, *args, **kwargs):
if "serial" in args:
print("R22 and R23 should be removed, two 0 Ω resistors shoud be "
"populated on R34 and R35 and the FT2232H should be configured to "
"UART with virtual COM on port B")
print("Make sure your on-board FT2232H can properly talk UART.")
print("Follow instructions here: https://github.com/trabucayre/fixFT2232_ecp5evn")
if "ext_clk50" in args:
print("an oscillator must be populated on X5")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment