soc/add_sdcard: add minimal SDClockerECP5 on ECP5.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 3 Jun 2020 12:34:59 +0000 (14:34 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 3 Jun 2020 12:34:59 +0000 (14:34 +0200)
litex/soc/integration/soc.py

index 303d67f773a0a63acbc8bbf89e0dfd1f3e46c5bf..f415b4819200237141e0288d42b6c1ef513405bf 100644 (file)
@@ -1269,6 +1269,11 @@ class LiteXSoC(SoC):
             self.submodules.sdclk = SDClockerS7(sys_clk_freq=self.sys_clk_freq)
             self.add_csr("sdclk")
 
+        if self.platform.device[:5] == "LFE5U":
+            from litesdcard.clocker import SDClockerECP5
+            self.submodules.sdclk = SDClockerECP5()
+            self.add_csr("sdclk")
+
         # Core
         if hasattr(sdcard_pads, "rst"):
             self.comb += sdcard_pads.rst.eq(0)