Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
litex-boards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel LiteX
litex-boards
Commits
133ea64e
Unverified
Commit
133ea64e
authored
Feb 25, 2021
by
enjoy-digital
Committed by
GitHub
Feb 25, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #179 from shenki/arty-numato-sdcard-pmod
Numato sdcard pmod for Arty
parents
c55b606f
aa5c4f9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
litex_boards/platforms/arty.py
litex_boards/platforms/arty.py
+23
-0
litex_boards/targets/arty.py
litex_boards/targets/arty.py
+5
-1
No files found.
litex_boards/platforms/arty.py
View file @
133ea64e
...
...
@@ -306,6 +306,29 @@ def sdcard_pmod_io(pmod):
]
_sdcard_pmod_io
=
sdcard_pmod_io
(
"pmodd"
)
# SDCARD PMOD on JD.
def
numato_sdcard_pmod_io
(
pmod
):
return
[
# SDCard PMOD:
# https://numato.com/product/micro-sd-expansion-module/
# This adaptor does not have the card detect (CD) pin connected
(
"spisdcard"
,
0
,
Subsignal
(
"clk"
,
Pins
(
f"
{
pmod
}
:5"
)),
Subsignal
(
"mosi"
,
Pins
(
f"
{
pmod
}
:1"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"cs_n"
,
Pins
(
f"
{
pmod
}
:4"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"miso"
,
Pins
(
f"
{
pmod
}
:2"
),
Misc
(
"PULLUP True"
)),
Misc
(
"SLEW=FAST"
),
IOStandard
(
"LVCMOS33"
),
),
(
"sdcard"
,
0
,
Subsignal
(
"data"
,
Pins
(
f"
{
pmod
}
:2
{
pmod
}
:6
{
pmod
}
:0
{
pmod
}
:4"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"cmd"
,
Pins
(
f"
{
pmod
}
:1"
),
Misc
(
"PULLUP True"
)),
Subsignal
(
"clk"
,
Pins
(
f"
{
pmod
}
:5"
)),
Misc
(
"SLEW=FAST"
),
IOStandard
(
"LVCMOS33"
),
),
]
_numato_sdcard_pmod_io
=
numato_sdcard_pmod_io
(
"pmodd"
)
# SDCARD PMOD on JD.
# Platform -----------------------------------------------------------------------------------------
class
Platform
(
XilinxPlatform
):
...
...
litex_boards/targets/arty.py
View file @
133ea64e
...
...
@@ -119,6 +119,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-adapter"
,
type
=
str
,
help
=
"SDCard PMOD adapter: 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
)
...
...
@@ -138,7 +139,10 @@ def main():
ident_version
=
args
.
no_ident_version
,
**
soc_sdram_argdict
(
args
)
)
soc
.
platform
.
add_extension
(
arty
.
_sdcard_pmod_io
)
if
args
.
sdcard_adapter
==
"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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment