From: Florent Kermarrec Date: Wed, 14 Aug 2019 05:35:45 +0000 (+0200) Subject: cores/spi_flash/S7SPIFlash: make cs_n optional in pads (when driven externally) X-Git-Tag: 24jan2021_ls180~1051 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d5fddc160ac5778eefe1216f78dc3aa6d526f93;p=litex.git cores/spi_flash/S7SPIFlash: make cs_n optional in pads (when driven externally) --- diff --git a/litex/soc/cores/spi_flash.py b/litex/soc/cores/spi_flash.py index b00e6fc6..d2b8fd5c 100644 --- a/litex/soc/cores/spi_flash.py +++ b/litex/soc/cores/spi_flash.py @@ -337,9 +337,9 @@ class S7SPIFlash(Module, AutoCSR): pads.vpp.reset = 1 if hasattr(pads, "hold"): pads.hold.reset = 1 - + if hasattr(pads, "cs_n"): + self.comb += pads.cs_n.eq(spi.pads.cs_n) self.comb += [ - pads.cs_n.eq(spi.pads.cs_n), pads.mosi.eq(spi.pads.mosi), spi.pads.miso.eq(pads.miso) ]