Commit graph

294 commits

Author SHA1 Message Date
Martin Braun
1889469efc mpm: usrp_hwd: Fix logging issue on default_args failure
Failure to provide valid default args no longer results in an
unexpected error.
Also fixed minor formatting issues (PyLint).
2018-01-11 14:50:12 -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
Moritz Fischer
ab1148d62d mpm: Add code to drive the back panel LEDs
Add code to drive back panel LEDs for GPS, Link (claim) and REF

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Reviewed-By: Martin Braun <martin.braun@ettus.com>
2018-01-10 17:31:21 -08:00
Martin Braun
7d428c1b8e mpm: n310: Add status monitor thread
This thread is able to update software-controlled status pins, such as
back-panel LEDs.
2018-01-10 17:31:21 -08:00
Martin Braun
7d67fe5c29 mpm: n310: Shuffle around location of functions for better browsability 2018-01-10 17:31:21 -08:00
Martin Braun
410e87e282 mpm: Add API call for claim and unclaim
These are hooks that the RPC server calls into when claiming a device,
and allow the device implementation to trigger user-definable actions
on claiming/unclaiming.
2018-01-10 17:31:21 -08:00
Martin Braun
0691c5ea75 mpm: Spawn periph manager inside the RPC process
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-01-10 17:29:49 -08:00
Martin Braun
c5acc08e67 mpm: Bump default log level to INFO 2018-01-10 13:42:28 -08:00
Martin Braun
02b407c921 mpmd: Add API to read back logs from device and send to native logging 2018-01-10 12:25:13 -08:00
Martin Braun
838b71902f mpm: n310: Factor out compat number check
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-01-08 16:33:10 -08:00
Martin Braun
877f833983 mpm: utils: Add assert_compat_number function
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-01-08 16:33:10 -08:00
Martin Braun
de88d61c54 mpm: n310: Move SID re-alloc log message to right spot 2018-01-08 16:28:00 -08:00
Martin Braun
121c37751c mpm: Add API to read back log buffer
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-01-08 11:48:25 -08:00
djepson1
476f888392 jesd: mg bug fix: default state of the RX link is scrambled
Reviewed-by: Trung Trang <trung.tran@ettus.com>
2018-01-05 14:05:17 -08:00
Brent Stapleton
1398aaab34 fixup! mpm: mg: Added magnesium_update_cpld.py 2018-01-05 10:28:09 -08:00
Martin Braun
33c944dbdf mpm: mg: Assert that ref clock freq was actually set before init()
There was a theoretical chance otherwise that we forgot to set the
ref_clock_freq value and it set up the LMK incorrectly.

Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com>
2018-01-05 10:26:00 -08:00
djepson1
f5cf6460e8 mg cpld: update compatibility checking to major/minor
Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-01-04 14:13:33 -08:00
djepson1
d36c3a7f8c jesd: add in detailed error reporting for JESD204b links
- add version control checks and bump to match latest core
 - add detailed mykonos reporting
 - add detailed fpga deframer reporting
 - misc cleanup

Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-01-04 07:27:00 -08:00
Martin Braun
7a588a5645 mpm: n310: Fix setting time source 2017-12-22 16:47:50 -08:00
Ashish Chaudhari
57ec3d765a n3xx: MPM: Add FPGA build timestamp
- Fixed the interpretation of the git hash

Reviewed-by: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:06:11 -08:00
Martin Braun
29bff463b2 mpm: n310: Add temp and fan sensors 2017-12-22 15:06:11 -08:00
Trung Tran
0db52a520b mpm: Add sysfs_thermal module
This will provide an API call to read thermal values via udev.
2017-12-22 15:06:11 -08:00
Martin Braun
e2b155726e mpm: mg: Fix CPLD rev check
Now checks the oldest-compat-rev register. Current rev is read out for
logging purposes.

Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
2017-12-22 15:06:03 -08:00
Ashish Chaudhari
8eeb664b67 n3xx: Removed PHY reset after Aurora BIST
- A PHY reset is not needed for SFP Aurora. It is only really
  useful when the entire quad including the commong clocking
  block needs to be reset
2017-12-22 15:06:03 -08:00
Martin Braun
edc8170246 mpm: Drop default log level to DEBUG 2017-12-22 15:06:03 -08:00
Martin Braun
27f2aa86ac n310: Move SID framing all the way to n310.py
MPM will now no longer keep a SID framer variable.

Reviewed-by: Trung Tran <trung.tran@ettus.com>
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2017-12-22 15:06:03 -08:00
djepson1
2a83c6133f mg: ignore Mykonos framer error
According to ADI, this bit toggles a lot so ignoring it for now.
2017-12-22 15:06:03 -08:00
djepson1
62efbfff1e mpm: mg: Repeat deframer init upon failure
This is a band-aid solution.
2017-12-22 15:06:03 -08:00
Ashish Chaudhari
2e32f96291 n3xx: Updated Aurora BIST reg offsets
- Aurora registers moved around after SFP refactoring
  in the FPGA. Reflecting changes in MPM
2017-12-22 15:06:03 -08:00
Martin Braun
a5432174b9 mpm: Fix linter warnings
- Magnesium: Bad formatting in DRP setup
- PeriphManagerBase: Import order
- dtoverlay: Missed default value for param
2017-12-22 15:06:03 -08:00
Martin Braun
5599b95b78 mpm: n310: Set default clock source to 'internal' 2017-12-22 15:06:03 -08:00
Martin Braun
08be477b88 mpm: periph_manager: Clarify request/commit protocol 2017-12-22 15:05:59 -08:00
Martin Braun
f45e3c3df0 mpm: xports: Sort requested transport options by QoS
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2017-12-22 15:05:59 -08:00
Martin Braun
77dd58640c mpm: udp xport: Bind SID addr 0 and 1 to respective SFP ports
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2017-12-22 15:05:59 -08:00
Martin Braun
8b700c7e08 mpm: udp xport: Increment TX/RX allocations for streamers
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2017-12-22 15:05:59 -08:00
Martin Braun
a3cbdf481b mpm: xports: Amend protocol for request/commit xport, add allocation
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2017-12-22 15:05:59 -08:00
Martin Braun
7c7d509017 mpm: Fix ECHO command
The echo server was using the wrong socket options, allowing responses
to be fragmented. Since we use the echo server for MTU discovery, that
would have beaten the purpose.

Also includes minor formatting fixes.
2017-12-22 15:05:59 -08:00
Martin Braun
87dbcd9f1a mpmd: Refactor MPM transport architecture, use managers
This splits up the transport code in mpmd_impl across multiple classes
to properly leverage the request_xport/commit_xport API in MPM.
Different types of transport (UDP, liberio) use their own distinct
classes, which are generated dynamically on request.

This is a true refactoring despite the large amount of changes; there
are no functional differences.

Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
Reviewed-By: Trung Tran <trung.tran@ettus.com>
Reviewed-By: Ashish Chaudhari <ashish.chaudhari@ettus.com>
2017-12-22 15:05:58 -08:00
Brent Stapleton
a927a364c5 mpm: mpmd: Add MPM compat number check
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:05:58 -08:00
Martin Braun
0c94fff330 mpm: rpc_server: Unregister old RPC calls _init_rpc_calls()
On FPGA loads, when the periph_manager is respawned, this will now
clear the previously registered methods.

Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
2017-12-22 15:05:58 -08:00
Martin Braun
20160e8061 mpm: rpc_server: Fix use of to_binary_str()
Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
2017-12-22 15:05:58 -08:00
Brent Stapleton
02cbe06c30 mpm: mg: Added magnesium_update_cpld.py
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:05:58 -08:00
Brent Stapleton
f7e88fbf03 mpm: adding GPS time sensor
Adding GPS time sensor to MPM, and its respective getter.

Reviewed-By: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:05:58 -08:00
Daniel Jepson
6e1213149a mpm: tdc: fixed typos in comments
Reviewed-By: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:05:58 -08:00
Daniel Jepson
cb44bccd1e mpm: tdc: compensate for the trace delay differences between daughterboards
Reviewed-By: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:05:58 -08:00
Martin Braun
d5e44fe6e4 mpm: n310: Support RevE
Bump the max supported rev accordingly.

Reviewed-By: Trung Tran <trung.tran@ettus.com>
2017-12-22 15:05:58 -08:00
Martin Braun
fadf6e2eba mpm: mg: Fix lookup of user EEPROM map
For unknown revs, this now scales back to the last known rev.

Reviewed-By: Trung Tran <trung.tran@ettus.com>
2017-12-22 15:05:58 -08:00
Martin Braun
8815098747 mpm: Harmonize all license header
Now uses SPDX headers everywhere.
2017-12-22 15:05:58 -08:00
Trung N Tran
d899f160d8 mpm: n310: add fpga compat number check
Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
Reviewed-By: Sugandha Gupta <sugandha.gupta@ettus.com>
Reviewed-By: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:05:58 -08:00
Martin Braun
8210fc9b17 mpm: xport: Let UDP manager re-enumerate available CHDR ifaces on init()
This will enumerate CHDR interfaces as late as possible, so that the
user changing the IP address will not affect operations. Note that IP
is considered static during a UHD session.
2017-12-22 15:05:58 -08:00