mnt_rkx7: Add SDCard support.

This commit is contained in:
Florent Kermarrec 2021-09-30 11:34:23 +02:00
parent 31b404c42f
commit 84f0d715ff
2 changed files with 13 additions and 0 deletions

View File

@ -28,6 +28,16 @@ _io = [
IOStandard("LVCMOS33")
),
# SDCard.
("sdcard", 0,
Subsignal("data", Pins("A14 B10 A12 B15"), Misc("PULLUP True")),
Subsignal("cmd", Pins("A15"), Misc("PULLUP True")),
Subsignal("clk", Pins("C11")),
Subsignal("cd", Pins("A10")),
Misc("SLEW=FAST"),
IOStandard("LVCMOS18"),
),
# DDR3 SDRAM.
("ddram", 0,
Subsignal("a", Pins(

View File

@ -83,6 +83,7 @@ def main():
parser.add_argument("--load", action="store_true", help="Load bitstream")
parser.add_argument("--sys-clk-freq", default=100e6, help="System clock frequency (default: 100MHz)")
parser.add_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed)")
parser.add_argument("--with-sdcard", action="store_true", help="Enable SDCard support")
builder_args(parser)
soc_core_args(parser)
args = parser.parse_args()
@ -92,6 +93,8 @@ def main():
with_spi_flash = args.with_spi_flash,
**soc_core_argdict(args)
)
if args.with_sdcard:
soc.add_sdcard()
builder = Builder(soc, **builder_argdict(args))
builder.build(run=args.build)