Skip to content

Comments

Refactor support for Jupiter multi chip sync#713

Open
AlexandraTrifan wants to merge 10 commits intoanalogdevicesinc:mainfrom
AlexandraTrifan:jupiter_mcs
Open

Refactor support for Jupiter multi chip sync#713
AlexandraTrifan wants to merge 10 commits intoanalogdevicesinc:mainfrom
AlexandraTrifan:jupiter_mcs

Conversation

@AlexandraTrifan
Copy link

@AlexandraTrifan AlexandraTrifan commented Jan 28, 2026

Description

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

  • Hardware:
  • OS:

Documentation

If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have signed off all commits and they contain "Signed-off by: "
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

tfcollins and others added 10 commits January 28, 2026 18:01
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
The attribute "multi_chip_sync" will have to be set in a separate
thread for each device.
With the newer Linux drivers, setting the "multi_chip_sync" attribute,
will hold the iio_attr setting process until the device exits the MCS
state, or timeout occurs.
This is why it is needed to start each attr setting in a separate thread
and also check if the thread is alive, after the MCS process should be
complete to validate that the MCS was completed successfully.

Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Remove the need of moving all channels to calibrated state, before the
request for the device to enter in MCS state. The Linux driver will do
this automatically, furthermore, it will restore the previous state
of the channel before MCS.

Simplification for the internal/external sync logic.
The Internal sync will only be used when having to synchronize the
channels of one system. Because of this, the updated version of
the Linux driver, will automatically trigger the MCS procedure,
including the internal sync, after a profile is loaded.
The external sync will be required when dealing with multiple systems.
The information regarding the need to sync one or more systems is
defined in the devicetree.

The Linux driver exposes the "multi_chip_sync" attribute, which is a bit
more special.
To know that the MCS was done successfully, one has to wait for the
multi_chip_sync attribute setting process to end successfully.
The attribute setting of multi_chip_sync only ends after MCS procedure is
completed or timeout occurs.
For the MCS sync to end, the adrv9002 needs to receive the 6 MCS pulse train.
In other words, we need to configure(put in MCS state) each adrv9002
in a separate thread, send the 6 MCS pulse train and wait for all started
threads that have put the adrv9002 devices in MCS state to end in success.

Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
The updated system functionality will automatically change the sync
module functionality from MCS to data transfer sync. So, no need for
direct reg writes at the sync address.

Removed the loopback functionality which was used for debug purposes.

The data capture must be done on separate threads. This reasoning is that
after we arm the data paths the DMA's will not be able to transfer data
until a trigger event occurs and that in it's current form the capture
data mechanism waits until a buffer is captured.
So, in the new format we will, arm the ADC/DAC, request  a transfer, send
a trigger signal in the form of a sync request.

To ensure the sync between channels we used the MIMO mode(2RX2TX), more
exactly the RX channels will use only one DMA pack cores, rather than,
each channel with it's on pack and DMA.

Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Sometimes the profile load fails with IO error.
I assume the cause could come from the SPI interface. This error
arises even if the profile is loaded directly from the SD card on the system.

Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Signed-off-by: AlexandraTrifan <Alexandra.Trifan@analog.com>
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants