invert cs_n pin in Tercel
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 31 Mar 2022 13:44:24 +0000 (14:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 31 Mar 2022 13:44:24 +0000 (14:44 +0100)
src/soc/bus/tercel.py

index 328bf661d374589f7fefc859467b55e7e9597e9f..3e71a3bfb61718c31c48de037bb01bb25e27904f 100644 (file)
@@ -168,12 +168,11 @@ class Tercel(Elaboratable):
         if pins is not None:
             comb += pins.dq.o.eq(self.dq_out)
             comb += pins.dq.oe.eq(self.dq_direction)
-            comb += pins.dq.oe.eq(self.dq_direction)
             comb += pins.dq.o_clk.eq(ClockSignal())
             comb += self.dq_in.eq(pins.dq.i)
             comb += pins.dq.i_clk.eq(ClockSignal())
             # XXX invert handled by SPIFlashResource
-            comb += pins.cs.eq(~self.cs_n_out)
+            comb += pins.cs_n.eq(self.cs_n_out)
             # ECP5 needs special handling for the SPI clock, sigh.
             if self.lattice_ecp5_usrmclk:
                 m.submodules += Instance("USRMCLK",