From 08ccf384aad32161da1dc7eb16e03a595dcb4107 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Wed, 24 Feb 2021 14:52:43 +1030 Subject: [PATCH] targets/arty: Allow selection of sdcard mod adaptor The default stays with the Digilent/Antmicro layout, but the user can optionally provide --sdcard-adaptor numato to use the Numato layout. Signed-off-by: Joel Stanley --- litex_boards/targets/arty.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litex_boards/targets/arty.py b/litex_boards/targets/arty.py index 78be95a..270d0e8 100755 --- a/litex_boards/targets/arty.py +++ b/litex_boards/targets/arty.py @@ -118,6 +118,7 @@ def main(): sdopts = parser.add_mutually_exclusive_group() sdopts.add_argument("--with-spi-sdcard", action="store_true", help="Enable SPI-mode SDCard support") sdopts.add_argument("--with-sdcard", action="store_true", help="Enable SDCard support") + parser.add_argument("--sdcard-adaptor", type=str, help="SDCard PMOD adaptor: digilent (default) or numato") parser.add_argument("--no-ident-version", action="store_false", help="Disable build time output") builder_args(parser) soc_sdram_args(parser) @@ -134,7 +135,10 @@ def main(): ident_version = args.no_ident_version, **soc_sdram_argdict(args) ) - soc.platform.add_extension(arty._sdcard_pmod_io) + if args.sdcard_adaptor == "numato": + soc.platform.add_extension(arty._numato_sdcard_pmod_io) + else: + soc.platform.add_extension(arty._sdcard_pmod_io) if args.with_spi_sdcard: soc.add_spi_sdcard() if args.with_sdcard: