Commit graph

436 commits

Author SHA1 Message Date
Martin Braun
276cd040f3 mpm: n3xx: Improve error messages for invalid clock/time settings 2018-08-13 13:32:04 -07:00
Martin Braun
f2914ff437 mpm: n3xx: Bump max rev to G/6 2018-08-10 13:10:35 -07:00
Sugandha Gupta
4683f0fa18 e320: Add all 5 temp sensors, fan sensor and rssi sensors per channel 2018-08-09 17:39:14 -07:00
Sugandha Gupta
2c91648c7f mpm: sys_utils: Get list of temperatures from all thermal zones 2018-08-09 17:39:14 -07:00
Sugandha Gupta
79cad066ab e320: bist: Add link_up test
- Returns true if the link of sfp0 is up (1G/10G)
2018-08-06 11:14:33 -07:00
Sugandha Gupta
61ac937294 adf400x: Fix adf400x driver for ref counter and charge pump mode
- For different ref clock frequencies, the ref_counter should change
and not the n_counter.
- The charge pump should be set to normal mode and tristate as that
would prevent the PLL to lock.
2018-08-02 16:07:15 -07:00
Sugandha Gupta
327ea7540b e320: bist: Fix ref_clock lock test implementation
- ref_clock_(int/ext) test was not changing adf400x driver settings
for new ref clock frequency. Therefore, changed the implementation
to use uhd_usrp_probe --sensor to set clock_source and get
'ref_locked' sensor value
2018-08-02 16:07:15 -07:00
Daniel Jepson
065740babd mpm: n3xx: clocking API changes for transitioning clock and time sources
Added set_sync_source method to set both the time and clock sources
without forcing a re-init twice. Modified the existing set_time_source
and set_clock_source methods to call into set_sync_source.
2018-08-02 12:37:34 -07:00
Martin Braun
5f624d6592 mpm: mg: periphs: Modify AD9361 reset function to keep it in reset 2018-08-02 12:37:34 -07:00
Sugandha Gupta
0d45bda1c4 e320: Update temp and fan bist
- Add mapping for 5 thermal zones for TMP464
- Update to one cooling_device as e320 has 1 fan (optional)
2018-07-31 14:02:02 -07:00
Sugandha Gupta
4f51e3307f e320: update sfp loopback test to load AA FPGA image
- Load AA FPGA image before sfp bist and load default image
after the test
2018-07-31 14:02:02 -07:00
Sugandha Gupta
07ea501abe e320: Fix front panel gpio to support 3.3V
- E320 will support only 3.3 V for the front panel GPIO
- Remove other voltage options
2018-07-31 14:02:02 -07:00
Sugandha Gupta
0e0b62baf8 e320: Add 'ref_locked' sensor to mboard sensors 2018-07-31 14:02:02 -07:00
Brent Stapleton
476b65f35e n3xx: Fixup for parsing the EEPROM
EEPROM parsing in MPM was ignoring the dt_compat number (MPM doesn't
need it), so when the dt_compat number was non-zero, the CRC
calculation was incorrect. CRC calculations are now done on the raw
data.
2018-07-30 18:17:29 -07:00
Brent Stapleton
204d3c96a8 n3xx: Fix UIO usage in Aurora BIST 2018-07-26 15:05:03 -07:00
Trung Tran
a39b6680a5 mpm: n3xx: Allow to run without daughterboards connected
The product ID will fall back to the motherboard ID (n300, n310). This
will load FPGA images even if there is no daughterboard connected.
2018-07-23 18:11:32 -07:00
Brent Stapleton
5b18614d39 uio: mpm: Fixup for opening mboard-regs UIO
- Fix the syntax to open mboard-regs UIO objects, and change the open()
and close() functions to be private.
- We were calling open() twice in every context manager line- once
manually, and once in __enter__. This commit corrects those usages, and
allows the context manager to fully manage the opening and closing of
UIO objects.
2018-07-23 10:33:34 -07:00
Martin Braun
c2d22b75d5 mpm: n3xx: bist: Only conditionally reload FPGA image
The tests for white rabbit and SFP loopback require a specific FPGA
image. We now check if that image is already available before running
uhd_image_loader.
2018-07-19 10:31:40 -07:00
Martin Braun
fc95b29280 mpm: n3xx: bist: Provide switch for not reloading default FPGA image 2018-07-19 10:31:40 -07:00
Martin Braun
e56d9188f7 mpm: uio: Fix use of logger
When logger==None, it uio.py would fail.
2018-07-19 10:31:40 -07:00
Martin Braun
04064035f4 mpm: n3xx: bist: Add White Rabbit lock test 2018-07-19 10:31:40 -07:00
Trung Tran
cb54b9b7e3 n3xx_bist: update sfp loopback test
Load AA image  before doing the bist and load HG image after the bist.
2018-07-18 18:57:47 -07:00
Martin Braun
118e7a21bf mpm: n3xx: Init device on boot
Specify skip_boot_init=1 to not init during boot. This will increase
boot time for an N310, typically by around 15 seconds.
2018-07-18 17:55:50 -07:00
Sugandha Gupta
59b4e8f892 mpm: e320_bist: Add tests for running BIST on E320 2018-07-18 15:37:27 -07:00
Sugandha Gupta
1e4649ce29 e320: mpm: Add dboard and mboard sensors
Adding the following sensors:
- Catalina temperature, RSSI, and LO Lock sensors
- GPS lock, time, TPV, and SKY sensors

Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-07-18 15:37:27 -07:00
Brent Stapleton
300a5e3f6e mpm: initial commit of E320 code
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-07-18 15:37:27 -07:00
Martin Braun
2787e2dee4 mpm: mg: Adding fast-reinit mode
When a device is re-initialized without any changes (e.g.,
master_clock_rate, ref_clock_freq) then we can skip the initialization
sequence and move on. This shaves a significant amount of time from the
init sequence.

Fast re-init can be overridden by providing the `force_reinit=1` device
arg.
2018-07-17 10:49:21 -07:00
Martin Braun
4a4d1d797f mpm: mg: Move RF cal initialization after JESD init 2018-07-17 10:49:21 -07:00
Martin Braun
e364ad4281 mpm: mg: Store init args between runs 2018-07-17 10:49:21 -07:00
Martin Braun
c8c4cf1b0c mpm: Remove unused _init_args from PeriphManagerBase 2018-07-17 10:49:21 -07:00
Martin Braun
8e02dec0fb mpm: n3xx: mg: Refactor init code
All code relevant to initializing an N310/N300 daughterboard is moved to
its own module (mg_init.py).

No functional changes.
2018-07-17 10:49:21 -07:00
Martin Braun
2fce1974d9 mpm: n3xx: Remove unused imports 2018-07-17 10:49:21 -07:00
Martin Braun
6c7a4193a3 mpm: mg: Print AD9371 info as debug message during init 2018-07-17 10:49:21 -07:00
Brent Stapleton
05722dcc51 mpm: n3xx: Factor out component updating
- Refactoring component (FPGA, DTS) updating functions out of
n3xx.py into their own components.py. The ZynqComponent class now
defines the methods to update these two components.
- Adding super().__init__() to the PeriphManagerBase class. This is
needed to get the multiple inheritance used in N3XX now to work, and
(apparently) good Python practice.
2018-07-11 12:42:45 -07:00
Brent Stapleton
6eaf521d2b mpm: n3xx: Factor out GPSd Iface functions
- Refactoring GPSd interface to be instead wrapped by a
GPSDIfaceExtension class. This class will faciliate "extending" an
object, allowing that object to call the GPSDIfaceExtension methods as
their own.
- New MPM devices (or whatever else) can now use the GPSDIfaceExtension
class instead of writing their own GPSDIface handling functions.
- N3XX now instantiates a GPSDIfaceExtension object, and extends
itself. This means that an n3xx object can call the `get_gps_time`
method as its own, for example.
- N3XX must get through initialization in order for the GPSd methods
to be registered.
2018-07-06 15:00:20 -07:00
Brent Stapleton
9c2e1907e9 mpm: n3xx: Overridable crossbar base port
Moving the RFNoC crossbar base port to the class overridables. MPM
devices may need to reserve different numbers of ports for non-blocks;
this can now be done by overriding the crossbar_base_port.
2018-07-06 14:53:40 -07:00
Brent Stapleton
4f49b4a937 mpm: adding adf400x support to chips
Adding ADF400X driver to MPM. This uses the Boost.Python bound spidev,
and is largely a translation from the C++ driver in UHD.
2018-06-27 10:22:25 -07:00
Moritz Fischer
91a5518443 mpm: tools: Introduce dt-compat and mcu-compat fields
Introduce dt-compat and mcu-compat fields into the eeprom
structure.
For the motherboard eeprom this is straightforward, since
there's still padding bytes that could be (ab)used for this.
On the dboard side more creativity is required and the
original revision field of 2 bytes is reduced to only
one byte revision and one byte dt-compat.
Since this will only affect new units being backwards
compatible with older versions of the bootloader is not
an issue.

Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-06-20 17:10:05 -05:00
Martin Braun
0935bf5c2a mpm: dboard_manager: Fix docstring for get_serial() 2018-06-18 17:37:11 -07:00
Mark Meserve
f473df0a0b mpm: fix sanity check in _init_peripherals
- change scoping of product_map in n3xx
2018-06-13 14:09:13 -07:00
Martin Braun
444857598f mpm: xportmgr_udp: Catch inconsistent Ethernet device detections
This manager first detects all valid Ethernet devices. The checks for
validity happen across multiple calls in a non-atomic fashion, so it's
possible to end up with inconsistent results. To avoid such issues, we
filter results without talking to the network stack as a final pass.
2018-06-08 14:58:20 -07:00
Martin Braun
8762a4d444 mpm: net: Fix rare failures for IP addr detection
Because the detection of valid Ethernet devices happens across multiple
calls in a non-atomic fashion, we cannot assume that a device passed to
net.get_iface_info() actually has a valid IP address, so we don't make
that assumption.
2018-06-08 14:58:20 -07:00
Martin Braun
22d684c3c8 mpm: Use device_info to determine overlay list 2018-06-08 13:27:13 -07:00
Martin Braun
cd716e264e mpm: n3xx: Derive product key programmatically
Since there is no simple mapping from an arbitrary tuple of mboard- and
dboard info dictionaries, we use generate_device_info() to figure out
the product key.
2018-06-08 13:27:13 -07:00
Martin Braun
30cc2e9982 mpm: Distinguish mboard_info and device_info
In the N3xx series, the motherboard ID and the device ID can differ. For
example, the N310 could share the same motherboard with a different
device that uses different daughterboards.
2018-06-08 13:27:13 -07:00
Martin Braun
d1e1ac71be mpm: Remove 'test' periph_manager 2018-06-08 13:27:13 -07:00
Martin Braun
aa0cc703fe mpm: Refactor periph manager init; split EEPROM read from rest
The readout of EEPROMs is moved to their own functions. This will allow
us to read out EEPROM values before starting the initialization.
2018-06-08 13:27:13 -07:00
Brent Stapleton
cc6121e0ac mpm: Adding FPGA type to device info 2018-06-06 08:19:48 -07:00
Mark Meserve
e942181f60 mpm: allow multiple spi device objects to use the same chip select 2018-05-14 17:55:15 -07:00
Martin Braun
5df5177d49 n3x0: Pick different standard tests for BIST
Replaced 'clock_int' (which is not implemented) with 'fan'.
2018-05-14 14:46:25 -07:00