From 6d5fddc160ac5778eefe1216f78dc3aa6d526f93 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 14 Aug 2019 07:35:45 +0200 Subject: [PATCH] cores/spi_flash/S7SPIFlash: make cs_n optional in pads (when driven externally) --- litex/soc/cores/spi_flash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/soc/cores/spi_flash.py b/litex/soc/cores/spi_flash.py index b00e6fc60..d2b8fd5cf 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) ]