Commit graph

148 commits

Author SHA1 Message Date
Martin Braun
7a8967e71e mpm: n300: Warn when user tries to use external LOs
The N300-variant has no front-panel LO connectors, so we need to warn
ther user when trying to use them.
2018-03-09 11:54:53 -08:00
Martin Braun
f9a8098cae mpm: Fix some Pylint warnings
No functional changes.
2018-03-06 15:45:15 -08:00
Martin Braun
ed2d1ac3e4 mpm: Demote some log messages
The log output at level 'INFO' was pretty cluttered. This cleans up the
log messages at the higher levels. In some cases, log message typos or
capitalizations were also fixed.
2018-03-06 15:28:33 -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
9d55c58858 mpm: n300/n310: Select correct overlay based on product ID 2018-03-05 15:56:41 -08:00
Martin Braun
d150449822 n310: Make MPM report FPGA version and description, UHD read it
The FPGA and MPM version as well as the description of the device
("N300-Series Device") and its name (its the hostname) are now properly
reported coming from MPM, properly saved in the prop tree, and
uhd_usrp_probe can nicely display them this way.
2018-03-02 13:48:14 -08:00
Martin Braun
7e5fffa3cc mpm: n310: Default-initialize some members
This allows flawless execution of code paths regardless of
initialization status.
2018-02-28 15:20:58 -08:00
Martin Braun
c73a013d01 mpm: periph_manager: Guarantee self.dboards exists
Other components assume the existence of mgr.dboards, and so it needs to
be default-initialized before doing any code that can go wrong.
2018-02-28 15:20:12 -08:00
Trung N Tran
6d0404c678 n3xx: add front panel gpio control registers 2018-02-21 16:58:51 -08:00
Brent Stapleton
a9ba8a9fd9 mpm: N310 updates FPGA information on init
-Adding MboardRegsControl.get_fpga_type(), which reads the SFP info
registers and determines the FPGA image type (HG, XG, AA, etc). This is
a minor FPGA compat number bump.
-Adding N310._update_fpga_type(), which updates the component
information using the get_fpga_type() function described above. This
information can then be accessed through get_component_info().
2018-02-19 16:58:52 -08:00
Brent Stapleton
94aedfd2d9 mpm: adding get_component_info
Add getter function for updateable component information. This is a
minor compat number bump.
2018-02-19 16:58:52 -08:00
Martin Braun
e9288a439c mpm: Update all license headers
- Fix typo in company name (missing 'a')
- Updated SPDX license identifier to version 3.0
2018-02-19 16:55:08 -08:00
Moritz Fischer
e2a6b2e077 mpm: n310: Remove some leftover cruft
The lines removed here are no longer needed, get rid of them

Suggested-by: Martin Braun <martin.braun@ettus.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-02-13 19:04:16 +01:00
Moritz Fischer
8f153c9497 mpm: Add entries for renamed sfps
In order to match the front panel 0 and 1 for the SFPs, as well as for
clarity and consistency reasons, udev rules will be put onto future
filesystems in order to rename the eth1 eth2 devices to sfp0 and sfp1.

This change *should* be backwards compatible, nevertheless, be careful
and bump compat number.

This also updates the uhd image loader manifest.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-02-13 19:04:16 +01:00
Brent Stapleton
167bc5942e fixup! mpm: magnesium_update_cpld.py: Add axi_bitq support 2018-02-09 21:20:45 +01:00
Martin Braun
832cbe095a mpm: Use prefs API for periph manager
- Allow to set default args via config file
- Read them from prefs API
- override-db-pids uses the same APIs now ([overrides] section in
  config file, prefs API, and same dictionary as --default-args when
  used on the command line
2018-02-08 22:18:14 +01:00
Martin Braun
852bf3aa10 mpm: n310: Return CHDR addresses as part of device_info
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-02-07 14:04:30 -08:00
Martin Braun
c2747ed0ce mpm: n310: Removed superfluous import 2018-02-07 13:41:27 -08:00
Brent Stapleton
d9366ba7d4 mpm: Fixup for argument parsing in N310
Adding helper function to parse strings to a boolean value. We can
then use that function to parse MPM's default_args, and set enable_gps
and enable_fp_gpio. This replaces the usages of the Python builtin
bool(), which returns True for any non-empty string.
2018-02-07 17:21:43 +01:00
Ashish Chaudhari
081e81274d usrp3: Changes for Vivado 2017.4
- Bumped compat number for e3xx, n230, x3xx, n3xx
- Updated images package for e3xx, n230, x3xx, n3xx
- Updated fpga-src submodule
2018-01-24 15:09:29 -08:00
Martin Braun
4c81ed0a5d fixup! mpm: Log timeouts during API calls, reset timer on claimed calls 2018-01-23 15:21:28 -08:00
Martin Braun
dee1d75339 mpm: n310: Fix setting time source depending on clock source
- When clock source is set, but time source is not, still set time
  source to guarantee correct ref clock freq
- Enable unconditional setting of time source

Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com>
2018-01-22 14:02:24 -08:00
Brent Stapleton
2ba7dba5f4 n310: removed orphaned comments 2018-01-19 17:10:09 -08:00
Martin Braun
5eb2a59e1d mpm: Demoted some log statements from INFO to TRACE or DEBUG 2018-01-17 10:45:00 -08:00
Martin Braun
3a58a5f03c mpm: n310: Bump compat number to 2.0
- Updated fpga-src submodule pointer
2018-01-16 13:13:51 -08:00
Martin Braun
0da3eefcc3 mpm/mpmd: Report device state using get_init_status() and verify
When trying to run init(), mpmd will first query the initialization
status of the MPM device. If it is found to be in a bad state, it will
not go forward with initialization, but instead print the error message.
2018-01-16 13:10:37 -08:00
Martin Braun
3d2a9ac551 mpm: n310: Refactor N3xx periph manager
- Sort methods by functional groups
- Reorder init from less likely to fail to more likely (this enables
  the LINK LED on claim for when FPGA fails to initialize, e.g. on
  compat errors)
2018-01-16 12:55:24 -08:00
Martin Braun
2d424a54fc mpm: Refactor PeriphManager classes
- Sort methods by functional groups
- Removed some cruft
2018-01-16 12:10:37 -08:00
Trung N Tran
400713fba4 mpm: add init clock and time source from args
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-01-16 09:51:51 -08:00
Martin Braun
4e873a4cb1 mpm: n310: Check all periphs for initialization status 2018-01-12 18:17:54 -08:00
Martin Braun
1821168103 mpm: n310: Fix various bugs in sensor API 2018-01-12 16:18:01 -08:00
Martin Braun
ca74d5cd8c mpm: periph_manager: Pass default args to dboard manager 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
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
de88d61c54 mpm: n310: Move SID re-alloc log message to right spot 2018-01-08 16:28: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
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
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
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
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
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
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