From 738a5a8931f5c2e0c622151c8f04b3b9cb2a7bf0 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Tue, 3 Sep 2024 19:16:39 +0200 Subject: [PATCH] targets/efinix_trion_t120_bga576_dev_kit.py: added argument to select between RMII PMOD (default) or onboard RGMII Phy --- .../targets/efinix_trion_t120_bga576_dev_kit.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py b/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py index a14a3c119..092b802a6 100755 --- a/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py +++ b/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py @@ -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, @@ -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" @@ -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( @@ -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: