add qspi module to arty_a7
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 29 Mar 2022 12:45:51 +0000 (13:45 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 29 Mar 2022 12:45:51 +0000 (13:45 +0100)
src/ls2.py

index 82186e2f3991818fbd312553da6ec221eddd71de..f16425b5665421c359d98c3f84a0f901f9309122 100644 (file)
@@ -390,15 +390,16 @@ class DDR3SoC(SoC, Elaboratable):
 
         # SPI controller
         if spi_0_pins is not None and fpga in ['sim',
-                                             'rcs_arctic_tern_bmc_card']:
+                                             'rcs_arctic_tern_bmc_card',
+                                             'arty_a7']:
             # The Lattice ECP5 devices require special handling on the
             # dedicated SPI clock line, which is shared with the internal
             # SPI controller used for FPGA bitstream loading.
             spi0_is_lattice_ecp5_clk = False
-            if platform is not None and fpga in ['versa_ecp5',
-                                                 'versa_ecp5_85',
-                                                 'rcs_arctic_tern_bmc_card',
-                                                 'isim']:
+            if fpga in ['versa_ecp5',
+                        'versa_ecp5_85',
+                        'rcs_arctic_tern_bmc_card',
+                        'isim']:
                 spi0_is_lattice_ecp5_clk = True
 
             # Tercel contains two independent Wishbone regions, a
@@ -674,6 +675,7 @@ def build_platform(fpga, firmware):
             spi_0_pins = platform.request("spi_flash_4x", 0,
                                         dir={"dq":"io", "cs_n":"o", "clk":"o"},
                                         xdr={"dq": 1, "cs_n": 1, "clk": 0})
+    print ("spiflash pins", spi_0_pins)
 
     # Get Ethernet RMII resource pins
     ethmac_0_pins = None