From c8094c0e51bfc104f173a78206dc92a595880034 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 12 Oct 2017 11:22:18 -0700 Subject: mpm: mg: Specify the required overlay for FPGA auto-loading --- mpm/python/usrp_mpm/dboard_manager/magnesium.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index 7dc1f4b29..aba810288 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -97,6 +97,21 @@ class Magnesium(DboardManagerBase): # Maps the chipselects to the corresponding devices: spi_chipselect = {"cpld": 0, "lmk": 1, "mykonos": 2, "phase_dac": 3} + @staticmethod + def list_required_dt_overlays(eeprom_md, sfp_config, device_args): + """ + Lists device tree overlays that need to be applied before this class can + be used. List of strings. + Are applied in order. + + eeprom_md -- Dictionary of info read out from the dboard EEPROM + sfp_config -- A string identifying the configuration of the SFP ports. + Example: "XG", "HG", "XA", ... + device_args -- Arbitrary dictionary of info, typically user-defined + """ + return ['magnesium-{sfp}'.format(sfp=sfp_config)] + ### End of overridables ################################################# + # Class-specific, but constant settings: spi_factories = { "cpld": create_spidev_iface_cpld, "lmk": create_spidev_iface, -- cgit v1.2.3