Skip to content

Commit

Permalink
Merge pull request #609 from trabucayre/efinix_trion_t120_eth_rgmii_p…
Browse files Browse the repository at this point in the history
…hy_arg

targets/efinix_trion_t120_bga576_dev_kit.py: added argument to select between RMII PMOD (default) or onboard RGMII Phy
  • Loading branch information
enjoy-digital authored Sep 3, 2024
2 parents d85fe97 + 738a5a8 commit c8a86e5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, sys_clk_freq=75e6,
with_ethernet = False,
with_etherbone = False,
eth_phy = 0,
eth_rmii_pmod = True,
eth_rgmii_phy = False,
eth_ip = "192.168.1.50",
remote_ip = None,
with_led_chaser = True,
Expand Down Expand Up @@ -95,7 +95,7 @@ def __init__(self, sys_clk_freq=75e6,
# Ethernet / Etherbone ---------------------------------------------------------------------
if with_ethernet or with_etherbone:
# Use board's Ethernet PHYs.
if not eth_rmii_pmod:
if eth_rgmii_phy:
msg = "\n"
msg += "rx_ctl/tx_ctl pads location aren't compatible with DDIO mode.\n"
msg += "An hardware modification must be done:\n"
Expand Down Expand Up @@ -377,11 +377,12 @@ def main():
parser.add_target_argument("--sys-clk-freq", default=75e6, type=float, help="System clock frequency.")
parser.add_target_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed).")
ethopts = parser.target_group.add_mutually_exclusive_group()
ethopts.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support.")
ethopts.add_argument("--with-etherbone", action="store_true", help="Enable Etherbone support.")
parser.add_target_argument("--eth-ip", default="192.168.1.50", help="Ethernet/Etherbone IP address.")
parser.add_target_argument("--remote-ip", default="192.168.1.100", help="Remote IP address of TFTP server.")
parser.add_target_argument("--eth-phy", default=0, type=int, help="Ethernet PHY: 0 (default) or 1.")
ethopts.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support.")
ethopts.add_argument("--with-etherbone", action="store_true", help="Enable Etherbone support.")
parser.add_target_argument("--eth-ip", default="192.168.1.50", help="Ethernet/Etherbone IP address.")
parser.add_target_argument("--remote-ip", default="192.168.1.100", help="Remote IP address of TFTP server.")
parser.add_target_argument("--eth-rgmii-phy", action="store_true", help="Uses onboard RGMII Phy instead of RMII PMOD.")
parser.add_target_argument("--eth-phy", default=0, type=int, help="Ethernet PHY: 0 (default) or 1. (Only available with --eth-rgmii-phy")
args = parser.parse_args()

soc = BaseSoC(
Expand All @@ -392,6 +393,7 @@ def main():
eth_ip = args.eth_ip,
remote_ip = args.remote_ip,
eth_phy = args.eth_phy,
eth_rgmii_phy = args.eth_rgmii_phy,
**parser.soc_argdict)
builder = Builder(soc, **parser.builder_argdict)
if args.build:
Expand Down

0 comments on commit c8a86e5

Please sign in to comment.