cores/spi_flash/S7SPIFlash: make cs_n optional in pads (when driven externally)
This commit is contained in:
parent
383c05e239
commit
6d5fddc160
|
@ -337,9 +337,9 @@ class S7SPIFlash(Module, AutoCSR):
|
||||||
pads.vpp.reset = 1
|
pads.vpp.reset = 1
|
||||||
if hasattr(pads, "hold"):
|
if hasattr(pads, "hold"):
|
||||||
pads.hold.reset = 1
|
pads.hold.reset = 1
|
||||||
|
if hasattr(pads, "cs_n"):
|
||||||
|
self.comb += pads.cs_n.eq(spi.pads.cs_n)
|
||||||
self.comb += [
|
self.comb += [
|
||||||
pads.cs_n.eq(spi.pads.cs_n),
|
|
||||||
pads.mosi.eq(spi.pads.mosi),
|
pads.mosi.eq(spi.pads.mosi),
|
||||||
spi.pads.miso.eq(pads.miso)
|
spi.pads.miso.eq(pads.miso)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue