Commit graph

53 commits

Author SHA1 Message Date
Aaron Rossetto
ecb4990297 mpm: n3xx: Recommend reboot USRP after BIST 2022-03-23 16:14:22 -05:00
Wade Fife
929d620bc2 mpm: Fix units for DRAM BIST
There was a mixture of KB/s and B/s in the DRAM BIST. The BIST now
returns B/s in all cases.
2022-02-03 14:21:31 -06:00
Martin Braun
89f99fac00 mpm: Remove references to rfnoc_num_blocks
rfnoc_num_blocks is a device arg that could be used in UHD 3.15 (and
below) to artificially skip enumeration of RFNoC blocks. Since the block
enumeration works very differently in UHD 4, this arg was never
supported there.

This removes references to this arg in some BIST files. It is not
harmful, but also serves no purpose, and could be construed as being
useful upon lecture of these codes.
2021-04-12 15:14:45 -05:00
Steve Czabaniuk
5e0cebdc19 mpm: n3xx: bist: Read mboard and dboard eeprom to determine product
The routine to identify products currently only reads the motherboard
EEPROM. The N310 and N320/N321 use the same motherboard so these devices
can't be distinguished using the motherboard EEPROM alone. This change
makes get_product_id() read both the motherboard and daughterboard
EEPROM in order to determine which N3xx it actually is.
2020-07-31 14:32:54 -05:00
Martin Braun
0cf54ce073 mpm/mpmd: Expose APIs to drive GPIO sources
The N310 has a feature that allows the front panel GPIOs to be driven by
various sources: The PS, or any of the radio channels. The MPM-based
APIs did not expose any way to change that.

Changes:
- Add MPM APIs to PeripheralManagerBase and n3xx classes
- Improve comments and explanations
- Add host-side hooks into these new APIs in mpmd_mb_controller
- Implement these APIs for N3xx

The N3xx devices will have the option to set the GPIO source to "PS", or
to one of "RF0", "RF1", "RF2", "RF3" (if there are four channels; the
N300 and N320 can only go up to RF1).

Note: The N310 radio does not have separate FP-GPIO banks for channels
0 and 1, which needs to be fixed in a separate commit.
2020-01-23 11:37:51 -08:00
Martin Braun
fa52c97c00 mpm: n3xx: bist: Auto-load the AA image for the ddr3 BIST
When running

    $ n3xx_bist ddr3

The test will now load the AA image if the BIST fails, unless the user
specifies

    $ n3xx_bist ddr3 -o skip_load_fpga=1

The rationale is that by default, the AA image is the only one that
includes the DmaFIFO block.
2019-02-20 12:31:49 -08:00
Martin Braun
564a106bd8 mpm: n3xx: Remove DDR3 from standard BIST collection
We can't guarantee that there is actually a DDR3/DRAM FIFO block on the
image. So, don't run that test by default.
In order to run the DDR3 bist, running `n3xx_bist ddr3` is still valid.
However, it requires an image with the DRAM FIFO enabled.
2019-02-20 12:31:49 -08:00
Alex Williams
d8c72d4270 mpm: n3xx_bist: Add QSFP loopback to BIST tests 2018-11-07 18:26:13 -08:00
Martin Braun
bf353515b6 mpm: e320: n3xx: Factor BIST code to common module 2018-10-24 18:53:16 -07:00
Trung Tran
370d464739 n3xx_bist: add ref_clock bist 2018-10-18 18:20:14 -07:00
Brent Stapleton
204d3c96a8 n3xx: Fix UIO usage in Aurora BIST 2018-07-26 15:05:03 -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
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
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
Martin Braun
9cf1a8e99a mpm: n3xx: Refactor n3xx_periphs into its own module 2018-05-08 11:37:12 -07:00
sugandhagupta
38a7bcbff4 n3xx_bist: Ignore errors from uhd_usrp_probe on running ddr3 test
we only care about getting a valid throughput regex match, and can
ignore errors from uhd_usrp_probe, e.g. no daughterboards, etc.
2018-03-06 12:04:08 -08:00
Martin Braun
725debb964 mpm: Rename n310 to n3xx
This module (and class) are, in fact, used for all N3xx-derivates so
renaming it is the more correct thing to do.
2018-03-05 15:56:41 -08:00
Martin Braun
c3cc98cc76 mpm: n3xx: Fix usage of UIO in Aurora tests 2018-03-01 18:34:28 -08:00
sugandhagupta
8ff6175960 mpm: n3xx_bist: Fix regex to match with optional space
Fix regex so it matches an optional additional space.

Signed-off-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-03-01 18:22:51 -08:00
Trung N Tran
cf7667fe71 n3xx_bist: set fp_gpio master to PS 2018-02-21 16:58:51 -08:00
Trung N Tran
43969f4758 mpm: remove GPIOBank.set_all function
-set_all function doesn't fit well with the GPIO api. It is rather
a test sepecific function.
-Add gpio_set_all helper to n3xx_bist.

Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-02-09 18:02:44 +01:00
Martin Braun
31f9d3dce7 mpm: n310: bist: Add error_msg for temp bist if no sensores were found 2018-02-07 08:21:06 -08:00
Martin Braun
de51d0ec9c fixup! mpm: Harmonize imports, tidy + sort modules
- Fixes n3xx_bist, which failed on a an import
2018-01-22 14:00:20 -08:00
Martin Braun
d682a90255 mpm: Factor GPIO panel code into common module
GPIOBank is the new class, n310.FrontpanelGPIO and BackpanelGPIO now
derive from that.

Other minor changes:
- Renamed classes to FrontpanelGPIO and BackpanelGPIO in accordance
  with coding guidelines
- Moved MboardRegsControl before n310 class for consistent code layout
2018-01-10 17:31:21 -08:00
Martin Braun
8815098747 mpm: Harmonize all license header
Now uses SPDX headers everywhere.
2017-12-22 15:05:58 -08:00
Martin Braun
1cf5c1600f n3xx_bist: Fix spurious reference to self.REV 2017-12-22 15:04:03 -08:00
Martin Braun
89420d97b9 n3xx_bist: Specify localhost for opening UHD sessions 2017-12-22 15:04:03 -08:00
Trung N Tran
aeaea49360 mpm: add n310 motherboard revD support
This will enable both RevC and RevD from an MPM perspective. The
revision read back from the EEPROM is used to enable the code for either
rev.

The impact on the code is limited to the port expander GPIOs. Port
expander objects are instantiated in both the N310 MPM module as well as
the n3xx_bist executable.
2017-12-22 15:04:02 -08:00
Martin Braun
1585af8814 mpm: n3xx_bist: Added more comments, clarified timeout units 2017-12-22 15:04:02 -08:00
Trung N Tran
e4e5788a19 n3xx: BIST add GPS option and fix minor gps timing conversion bug 2017-12-22 15:04:01 -08:00
Trung N Tran
93e443697e mpm: n310 BIST change aurora default phy name
... to match dts spec
2017-12-22 15:04:01 -08:00
Martin Braun
25197587f4 n3xx bist: Fixed defaults for LV compat mode 2017-12-22 15:04:00 -08:00
Trung N Tran
d4047be7f2 n310_bist: add ddr3 bist 2017-12-22 15:04:00 -08:00
Martin Braun
c701ea815d n3xx bist: Refactored functions with timeout 2017-12-22 15:04:00 -08:00
Martin Braun
34474597f3 n3xx bist: Added socket read timeout
When the GPS chip is non-functional, gpsd could simply fail to return a
value. In that case, the recv() call to the socket would hang
indefinitely. This adds a graceful failure for that case.
2017-12-22 15:04:00 -08:00
Martin Braun
1d0f1aa99d n3xx bist: Properly sequence GPSDO test
It now does:
- Power on GPS
- Wait for WARMUP to go low
- Wait for LOCKOK, with timeout
- Read the TPV response and return it
2017-12-22 15:04:00 -08:00
Martin Braun
5897780896 n3xx bist: Added LV compat mode 2017-12-22 15:04:00 -08:00
Martin Braun
f1ad20cfe1 n3xx bist: Minor refactoring of GPIO code 2017-12-22 15:04:00 -08:00
Martin Braun
e3b38be233 n3xx bist: Better pass/fail conditions, flattened results
To placate fussy JSON consumers, we now avoid nested dictionaries. The
dry-run results now return a more accurate representation of the N310
system responses.
2017-12-22 15:04:00 -08:00
Martin Braun
5f99240bd2 mpm: Made Python3 the default interpreter for all N3xx-related executables 2017-12-22 15:04:00 -08:00
Trung N Tran
a745877cc9 n310: gpio bist 2017-12-22 15:04:00 -08:00
Martin Braun
8b4bc49764 n3xx bist: Added --verbose and --debug options 2017-12-22 15:04:00 -08:00
Martin Braun
ef6382c6ab n3xx bist: Added SFP loopback tests 2017-12-22 15:04:00 -08:00
Martin Braun
7ae94d0ae9 n3xx bist: Make sure error_msg is in every result
Some downstream consumers of n3xx_bist output require the error_msg key
to be in every result, even if no error occurred. The default value is
an empty string.
2017-12-22 15:04:00 -08:00
Martin Braun
aefbc5b957 n3xx bist: Added both time and date to rtc test, added error_msg common key 2017-12-22 15:03:59 -08:00
Martin Braun
a53976c6ea n3xx bist: Stubbed out all tests, implemented TPM test 2017-12-22 15:03:59 -08:00
Martin Braun
527c4fe470 n3xx bist: Added dry-run version of sfp test 2017-12-22 15:03:59 -08:00
Martin Braun
5c64735057 n3xx bist: Added gpsd test 2017-12-22 15:03:59 -08:00