Commit graph

136 commits

Author SHA1 Message Date
Martin Braun
e212936218 mpm: mg: Minor cleanup in __init__
- Moved AD9371 API generation around
- Fixed some PyLint warnings
2017-12-22 15:04:02 -08:00
Martin Braun
be7e72ed1d mpm: mg: Enable user EEPROM data read/write 2017-12-22 15:04:02 -08:00
Martin Braun
f3a6a013c3 mpm: n310: Enable read/write of user EEPROM data
This exposes two new API calls to read and write arbitrary data to the
device's EEPROM.
Please keep in mind that EEPROMs have limited write cycles!
2017-12-22 15:04:02 -08:00
Martin Braun
221805d8b1 mpm: Add BufferFS serialization library
BufferFS is a serialization format with CRC checking and optional
byte-alignment for records. It allows storing arbitrary blobs, together
with a 8-character identifier, in a contiguous buffer that supports
random access. This is suitable for storing arbitrary blobs in EEPROM,
but could also support other things.

Signed-off-by: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:04:02 -08:00
Ryan Marlow
c6f228452d n3xx: enable 1G clock with gpio settings. 2017-12-22 15:04:02 -08:00
Trung N Tran
832e9fc794 mpm: mg: Specify I2C parents for GPIO devices
The Magnesium daughterboards have GPIO port expanders, but both have the
same udev label. In order to specify which port expander to use, we pass
in the parent udev I2c device.
2017-12-22 15:04:02 -08:00
Trung N Tran
894d1a1a0a mpm: n3xx: Add GPS locked sensor 2017-12-22 15:04:02 -08:00
Martin Braun
c8094c0e51 mpm: mg: Specify the required overlay for FPGA auto-loading 2017-12-22 15:04:02 -08:00
Martin Braun
016866d3f1 mpm: Provide default dboard EEPROM getter/setters
The setter will throw an exception though. It is supposed to be
overriden by device-specific classes.
2017-12-22 15:04:02 -08:00
Martin Braun
d601fd03d5 mpm: Properly populate device_info dict for dboard classes
Prior to this commit, device_info was always an empty dictionary on all
dboard classes. The device_info dict is now auto-populated from the
EEPROM contents, if any were provided.

Dboard classes can still opt to amend that dictionary in specific class
implementations.

Signed-off-by: Martin Braun <martin.braun@ettus.com>
2017-12-22 15:04:02 -08:00
Trung Tran
4e9b707a66 mpm: sysfsgpio: Allow to filter by parent device
There are cases where we need to specify a parent device in order to
disambiguate GPIO devices with the same label. This lets you passing in
a parent udev device to clarify.
2017-12-22 15:04:02 -08:00
Brent Stapleton
d7df618524 bit to bin: initial commit of converter script 2017-12-22 15:04:02 -08:00
Martin Braun
96f012a14a mpm: n310: Add mboard EEPROM support
This is a specific override for the N310. It returns all the default
device info as a dict.
2017-12-22 15:04:02 -08:00
Martin Braun
cea45dda8f mpm: Add mboard EEPROM support
MPMD binds a property for the mboard EEPROM to the appropriate RPC
calls. PeriphManager now provides default implementations for an mboard
EEPROM.
2017-12-22 15:04:02 -08:00
djepson1
9a9759e2cf Sync: Improved range checking for offset measurements. 2017-12-22 15:04:02 -08:00
djepson1
4e0600b00a mg: Updated JESD204b init seq and documentation.
- Based on feedback from ADI, updated SYSREF sequencing for
    meeting deterministic latency requirements.
  - Changed majority of register addresses in nijesdcore.py to
    constants.
  - Corrected write data to SYSREF_CAPTURE_CONTROL to produce
    the correct SYSREF toggle rate inside the FPGA.

Signed-off-by: djepson1 <daniel.jepson@ni.com>
2017-12-22 15:04:02 -08:00
djepson1
6858b05357 mg: Fix debug support for CPLD accesses
Signed-off-by: djepson1 <daniel.jepson@ni.com>
2017-12-22 15:04:02 -08:00
djepson1
58e83611f4 mg: Clean up CPLD initialization.
Signed-off-by: djepson1 <daniel.jepson@ni.com>
2017-12-22 15:04:02 -08:00
djepson1
ca847bb474 mg: Preliminary clock sync support
Signed-off-by: djepson1 <daniel.jepson@ni.com>
2017-12-22 15:04:02 -08:00
djepson1
6bb1e12503 mg: Clean up radio_regs creation
Signed-off-by: djepson1 <daniel.jepson@ni.com>
2017-12-22 15:04:02 -08:00
djepson1
ee3f82e454 mg: Updated support for LMK
- add clock shifting
  - add DAC support
  - modify __init__ calls for cleanup

Signed-off-by: djepson1 <daniel.jepson@ni.com>
2017-12-22 15:04:02 -08:00
Martin Braun
5c489c2597 mpm/n310: Moved the mboard ref_locked sensor into MPM
An N310 device will query all its dboards for ref lock status and
return a Boolean combination as a motherboard sensors (note: the N310
does not actually have a ref_locked sensor on the motherboard, this is
mostly for backwards-compat with UHD applications that expect a
motherboard ref lock sensor).
2017-12-22 15:04:02 -08:00
Martin Braun
e2f8f8e0bd mpm: Added sensor API
- Motherboard sensors are automatically populated into the property
  tree, they can be automatically enumerated and queried
- Daughterboard sensors have an API for querying and enumerating
  sensors, but this commit does not automatically add them to the
  property tree
2017-12-22 15:04:02 -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
Daniel Jepson
3b716315fe mpm: Update TDC sync code to make it generic for N dboards 2017-12-22 15:04:01 -08:00
Daniel Jepson
febfdf27b4 mpm: Minor updates to nijesdcore
- Better logging
- Better error messages
2017-12-22 15:04:01 -08:00
Daniel Jepson
39e7b7fd13 mpm: Added lmk_mg to CMake 2017-12-22 15:04:01 -08:00
Martin Braun
688637522a mpm: Added max rev check overridable
When reading revision numbers from EEPROM, we now have an easy way of
checking of our version MPM is sufficient to run on the current device.
N310 implicitly makes use of this starting with this commit.
2017-12-22 15:04:01 -08:00
DJ Epson
f141f71180 mpm: Streaming-related improvements to Magnesium controls 2017-12-22 15:04:01 -08:00
Trung N Tran
2472134af0 mpm: minor change trace log of sysfs_gpio 2017-12-22 15:04:01 -08:00
Mark Meserve
309a2f04e3 mg: General fixes
- Make DB probe-able
- Add RPC client
2017-12-22 15:04:00 -08:00
Martin Braun
8ee3da3ef9 mpm: n3xx: Don't set time and clock source without dboards
When there are no daughterboards present, clock and time source are
meaningless. It's also possible that corresponding FPGA images are not
loaded, in which case trying to set those could crash the system. Unless
daughterboards are actually present, these settings won't get applied
any more.
2017-12-22 15:04:00 -08:00
Martin Braun
8ecb09be8b mpm: Overlay handling functions use dtoverlay module 2017-12-22 15:04:00 -08:00
Martin Braun
d711ad4c93 mpm: RPC methods now tell us if they need a claim
On the RPC server side, we keep track of which methods require a claim
token. MPM shell uses this info to automatically add claim tokens when
required.
2017-12-22 15:04:00 -08:00
Martin Braun
fa07fd53f0 mpm: n3xx: Fix TCA GPIO read function
Used to always return None, now returns the actual pin value.
2017-12-22 15:04:00 -08:00
Martin Braun
a2f0269a1e mpm: n3xx: Change default state for TCA GPIOs
This makes the GPS reset go high by default (i.e., takes it out of reset
by default) and the init survey pin go high (i.e., take it out of survey
mode).
2017-12-22 15:04:00 -08:00
Trung N Tran
c07af7edfe n310: enable CLK-MGT156MHz at init n310 call 2017-12-22 15:04:00 -08:00
Trung N Tran
e68cda3b75 n310: add init value for sysfs_gpio 2017-12-22 15:04:00 -08:00
Martin Braun
8063697d68 mpm: Check rpc server has matching lock release/acquires 2017-12-22 15:04:00 -08:00
Martin Braun
7cd6758336 n310/eiscat: Removed 20 MHz as a valid ref clock frequency 2017-12-22 15:04:00 -08:00
Derek Kozel
e5a7be4453 eiscat: Change sync pin configuration to switch to CD in case of error 2017-12-22 15:04:00 -08:00
Martin Braun
053e6b5aee n3xx mpm: Refactored peripheral init code 2017-12-22 15:04:00 -08:00
Martin Braun
90f608fa75 n3xx mpm: Enable more subcomponents through API calls 2017-12-22 15:04:00 -08:00
Martin Braun
eb2b11524b n3xx mpm: Set call for TCA6424 pins gets value arg 2017-12-22 15:04:00 -08:00
Martin Braun
e20c0adb05 mpm aurora: Fixed undeclared variable issue 2017-12-22 15:04:00 -08:00
Trung N Tran
a745877cc9 n310: gpio bist 2017-12-22 15:04:00 -08:00
Trung N Tran
1db37316eb n3xx: enable all pins on tca6424 2017-12-22 15:04:00 -08:00
Martin Braun
fad37e577d mpm: Clarified use of get_logger() call 2017-12-22 15:04:00 -08:00
Martin Braun
39bd5b1bad mpm: Minor fixes to aurora_control
- Slaves are properly initialized/deinitialized
- Return values from BISTs return more info
- Minor formatting fixes
2017-12-22 15:04:00 -08:00
Martin Braun
3ea3d8a338 mpm/n310: Added Aurora BIST code 2017-12-22 15:04:00 -08:00