Koror ram capture support - #3448
Conversation
Add a debugfs interface for triggering single-shot RX/ORx data captures from the ADRV904x capture RAM. This provides a simple mechanism for debugging and signal analysis without requiring full IIO buffer setup. The rx_data_capture debugfs file accepts channel and capture length: echo "<channel> <length>" > rx_data_capture cat rx_data_capture Channel mapping: 0-7 for RX0-RX7, 8-9 for ORX0-ORX1. Capture length must be a hardware-supported size (32 to 32768 samples). ORX channels are limited to 12288 samples maximum. The captured data is stored as raw 32-bit values (one per line) and contains interleaved I/Q samples in hardware format. Memory allocation is performed before taking the device mutex to avoid sleeping with locks held. Signed-off-by: Stefan Popa <stefan.popa@analog.com>
LLM reviewThis series adds a debugfs interface and a dedicated IIO device ( run: 29838719279
|
Add a dedicated IIO device (adrv904x-ramc) for RX/ORx data capture with proper I/Q channel representation and standard IIO buffer interface. Features: - 10 channel pairs (RX0-7, ORX0-1) with I/Q modifiers - Channels appear as voltage0_i/voltage0_q through voltage9_i/voltage9_q - Hardware constraint enforced via available_scan_masks: only one I/Q pair can be captured at a time - Single-shot capture: enabling the buffer triggers one capture that fills the buffer, then stops. This matches the hardware behavior (capture RAM is a snapshot mechanism, not continuous streaming) - Configurable capture size via sample_count attribute (32-32768) - 28-bit two's complement data using sign_extend32() - Bank interleaving and Q negation per hardware specification The single-shot behavior is intentional: continuous RX data is available through the JESD streaming interface (axi-adrv904x-rx-hpc). RAM capture is designed for debugging, calibration verification, and signal analysis where point-in-time snapshots are needed. Usage with iio_readdev: iio_readdev -s 1024 adrv904x-ramc voltage0_i voltage0_q > capture.bin Signed-off-by: Stefan Popa <stefan.popa@analog.com>
dff7523 to
2b7e61a
Compare
PR Description
PR Type
PR Checklist