iio: adc: adrv902x: API update to 7.0.0.14

Update ADRV9025 API to version 7.0.0.14.
Include DPD.

Signed-off-by: George Mois <george.mois@analog.com>
This commit is contained in:
George Mois
2025-07-23 10:37:06 +03:00
committed by Nuno Sá
parent 4fa8ceaed4
commit 6b05e6a52a
112 changed files with 4800 additions and 1240 deletions

View File

@@ -16,6 +16,8 @@ SRCS = devices/adrv9025/private/src/adrv9025_bf_analog_orx_mem_map.c \
devices/adrv9025/private/src/adrv9025_cpu.c \
devices/adrv9025/private/src/adrv9025_crc32.c \
devices/adrv9025/private/src/adrv9025_data_interface.c \
devices/adrv9025/private/src/adrv9025_dfe.c \
devices/adrv9025/private/src/adrv9025_dynamic_slicer.c \
devices/adrv9025/private/src/adrv9025_gpio.c \
devices/adrv9025/private/src/adrv9025_init.c \
devices/adrv9025/private/src/adrv9025_radioctrl.c \
@@ -29,6 +31,8 @@ SRCS = devices/adrv9025/private/src/adrv9025_bf_analog_orx_mem_map.c \
devices/adrv9025/public/src/adi_adrv9025_cals.c \
devices/adrv9025/public/src/adi_adrv9025_cpu.c \
devices/adrv9025/public/src/adi_adrv9025_data_interface.c \
devices/adrv9025/public/src/adi_adrv9025_dfe.c \
devices/adrv9025/public/src/adi_adrv9025_dynamic_slicer.c \
devices/adrv9025/public/src/adi_adrv9025_gpio.c \
devices/adrv9025/public/src/adi_adrv9025_hal.c \
devices/adrv9025/public/src/adi_adrv9025_radioctrl.c \

View File

@@ -39,3 +39,4 @@ typedef uint32_t adi_iter_t;
}
#endif
#endif /* _ADI_COMMON_TYPES_H_ */

View File

@@ -18,7 +18,8 @@
#ifndef _ADI_COMMON_USER_H_
#define _ADI_COMMON_USER_H_
#include <linux/kernel.h>
/* Includes that user can modify with their own libraries as long as the function prototypes matches */
#include "adi_platform_types.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_common_error.c
* \brief Contains common API error handling functions implementations
@@ -18,7 +18,6 @@
#include "adi_common_error.h"
#include "adi_common_log.h"
#include "adi_platform.h"
#include <linux/kernel.h>
void adrv9025_ErrorReport(adi_common_Device_t* commonDev,
adi_common_ErrSources_e errSrc,

View File

@@ -19,7 +19,7 @@
#ifndef _ADI_COMMON_ERROR_H_
#define _ADI_COMMON_ERROR_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#include "adi_common_error_types.h"
#include "adi_common_types.h"
#include "adi_common_macros.h"

View File

@@ -15,7 +15,7 @@
#ifndef _ADI_COMMON_ERROR_TYPES_H_
#define _ADI_COMMON_ERROR_TYPES_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_common_hal.c
* \brief Contains ADI Transceiver Hardware Abstraction functions

View File

@@ -16,7 +16,7 @@
#define _ADI_COMMON_HAL_H_
/* include standard types and definitions */
#include <linux/kernel.h>
#include "adi_common_user.h"
#include "adi_common_log.h"

View File

@@ -15,7 +15,6 @@
#ifndef _ADI_COMMON_HAL_TYPES_H_
#define _ADI_COMMON_HAL_TYPES_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#ifdef __cplusplus

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_common_log.c
* \brief Contains ADI Transceiver Logging functions
@@ -18,7 +18,6 @@
#include "adi_common_hal.h"
#include "adi_platform.h"
#include "adi_common_error_types.h"
#include <linux/kernel.h>
void adrv9025_LogWrite(adi_common_Device_t* commonDev,
adi_common_LogLevel_e logLevel,

View File

@@ -15,7 +15,7 @@
#ifndef _ADI_COMMON_LOG_H_
#define _ADI_COMMON_LOG_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#include "adi_common_log_types.h"
#include "adi_common_macros.h"
#include "adi_common_error.h"
@@ -51,7 +51,7 @@ extern "C" {
* \param commonDev pointer to adi_common_Device_t
* \param logLevel of type adi_common_LogLevel_e
* \param message const char pointer that represents the message to be logged
* \param ... variable argument passed to adi_common_Logwrite
* \param ... variable argument passed to adrv9025_LogWrite
*/
#define ADI_FUNCTION_ENTRY_VARIABLE_LOG(commonDev, logLevel, message, ...) \
adrv9025_LogWrite(commonDev, logLevel, message, __FUNCTION__, ##__VA_ARGS__)
@@ -135,7 +135,7 @@ void adi_common_LogLevelGet(adi_common_Device_t* commonDev,
* \param commonDev pointer to adi_common_Device_t
* \param logLevel of type adi_common_LogLevel_e
* \param comment const char pointer that represents the message to be logged
* \param ... variable argument passed to adi_common_Logwrite
* \param ... variable argument passed to adrv9025_LogWrite
*/
void adrv9025_LogWrite(adi_common_Device_t* commonDev,
adi_common_LogLevel_e logLevel,

View File

@@ -47,3 +47,4 @@ typedef enum adrv9025_BfDeserRxdivrateLcpllRs
#endif // __ADRV9025_BF_DESER_TYPES_H__
/* EOF: adrv9025_bf_deser_types.h */

View File

@@ -2,9 +2,6 @@
#ifndef ADRV9025_BF_HAL_H_
#define ADRV9025_BF_HAL_H_
#include <linux/kernel.h>
#include <linux/stddef.h>
#include "adi_adrv9025.h"
#include "adi_common_hal.h"
#include "./../../private/include/adrv9025_bf_hal_types.h"

View File

@@ -56,3 +56,4 @@ typedef enum adrv9025_BfOrxFpRoundMode
#endif /* __ADRV9025_BF_ORX_TYPES_H__ */
/* EOF: adrv9025_bf_orx_types.h */

View File

@@ -151,3 +151,4 @@ typedef enum adrv9025_BfPllMemMapVcoCalInitDel
#endif // __ADRV9025_BF_PLL_MEM_MAP_TYPES_H__
/* EOF: adrv9025_bf_pll_mem_map_types.h */

View File

@@ -58,3 +58,4 @@ typedef enum adrv9025_BfRxFpRoundMode
#endif /* __ADRV9025_BF_RX_TYPES_H__ */
/* EOF: adrv9025_bf_rx_types.h */

View File

@@ -398,3 +398,4 @@ typedef enum adrv9025_BfTxdacMemMapTxdacWalkPeriod
#endif // __ADRV9025_BF_TXDAC_MEM_MAP_TYPES_H__
/* EOF: adrv9025_bf_txdac_mem_map_types.h */

View File

@@ -2,7 +2,7 @@
/**
* \file adrv9025_cals.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -16,7 +16,7 @@
* \brief Contains ADRV9025 calibration related private function prototypes for
* adrv9025_cals.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -7,7 +7,6 @@
# ifndef _ADRV_9025_CPU_H_
#define _ADRV_9025_CPU_H_
#include <linux/kernel.h>
#include "adi_adrv9025_types.h"
#include "adi_adrv9025_cpu_types.h"
#include "../../private/include/adrv9025_cpu_macros.h"

View File

@@ -3,7 +3,7 @@
* \file adrv9025_cpu_macros.h
* \brief Contains ADRV9025 API miscellaneous macro definitions for CPU
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,8 +15,6 @@
#ifndef _ADRV_9025_CPU_MACROS_H_
#define _ADRV_9025_CPU_MACROS_H_
#include <linux/kernel.h>
#ifdef __cplusplus
extern "C"
{
@@ -96,6 +94,8 @@ extern "C"
#define ADRV9025_CPU_OBJECTID_RXGAINPHASECAL_INIT 0x1B
#define ADRV9025_CPU_OBJECTID_CFR_INIT 0x1D
#define ADRV9025_CPU_OBJECTID_CFR_INIT_NO_FLOAT 0x2F
#define ADRV9025_CPU_OBJECTID_RXQEC_TRACKING 0x30
#define ADRV9025_CPU_OBJECTID_ORXQEC_TRACKING 0x31
#define ADRV9025_CPU_OBJECTID_TXLOL_TRACKING 0x32
@@ -106,6 +106,9 @@ extern "C"
#define ADRV9025_CPU_OBJECTID_RXHD2_TRACKING 0x37
#define ADRV9025_CPU_OBJECTID_DES_TRACKING 0x38
#define ADRV9025_CPU_OBJECTID_DPD_TRACKING_NO_FLOAT 0x3E
#define ADRV9025_CPU_OBJECTID_CLGC_TRACKING_NO_FLOAT 0x3F
#define ADRV9025_CPU_OBJECTID_TEMP_SENSOR 0x40
#define ADRV9025_CPU_OBJECTID_RSSI 0x41
#define ADRV9025_CPU_OBJECTID_CAL_STATUS 0x42
@@ -171,29 +174,30 @@ extern "C"
#define ADRV9025_CPU_OBJECTID_SYSTEM_CONFIG 0xFF
/* CPU-C memory map */
#define ADRV9025_CPU_C_ADDR_PROG_START 0x01018000
#define ADRV9025_CPU_C_ADDR_PROG_START 0x01010000
#define ADRV9025_CPU_C_ADDR_PROG_END 0x0104FFFF
#define ADRV9025_CPU_C_ADDR_DATA_START 0x20028000
#define ADRV9025_CPU_C_ADDR_DATA_START 0x20024000
#define ADRV9025_CPU_C_ADDR_DATA_END 0x2004FFFF
#define ADRV9025_CPU_C_ADDR_VERSION 0x01018240
#define ADRV9025_CPU_C_ADDR_CFR_PULSE 0x010182A8
#define ADRV9025_CPU_C_ADDR_DEV_PROFILE 0x01018274
#define ADRV9025_CPU_C_ADDR_ADC_PROFILE 0x01018278
#define ADRV9025_CPU_C_ADDR_DEBUG_PTR 0x0101827C
#define ADRV9025_CPU_C_ADDR_BUILD_CHKSUM 0x01047FFC
#define ADRV9025_CPU_C_ADDR_CALC_CHKSUM_PTR 0x01018270
#define ADRV9025_CPU_C_ADDR_MAILBOX_SET 0x20028000
#define ADRV9025_CPU_C_ADDR_MAILBOX_GET 0x20028100
#define ADRV9025_CPU_C_ADDR_MAILBOX_RUN_INIT 0x20028200
#define ADRV9025_CPU_C_ADDR_MAILBOX_FHM 0x20028208
#define ADRV9025_CPU_C_ADDR_VERSION (ADRV9025_CPU_C_ADDR_PROG_START + 0x240)
#define ADRV9025_CPU_C_ADDR_CFR_PULSE (ADRV9025_CPU_C_ADDR_PROG_START + 0x2A8)
#define ADRV9025_CPU_C_ADDR_DEV_PROFILE (ADRV9025_CPU_C_ADDR_PROG_START + 0x274)
#define ADRV9025_CPU_C_ADDR_ADC_PROFILE (ADRV9025_CPU_C_ADDR_PROG_START + 0x278)
#define ADRV9025_CPU_C_ADDR_DEBUG_PTR (ADRV9025_CPU_C_ADDR_PROG_START + 0x27C)
#define ADRV9025_CPU_C_ADDR_BUILD_CHKSUM (ADRV9025_CPU_C_ADDR_PROG_END - 3)
#define ADRV9025_CPU_C_ADDR_CALC_CHKSUM_PTR (ADRV9025_CPU_C_ADDR_PROG_START + 0x270)
#define ADRV9025_CPU_C_ADDR_MAILBOX_SET (ADRV9025_CPU_C_ADDR_DATA_START)
#define ADRV9025_CPU_C_ADDR_MAILBOX_GET (ADRV9025_CPU_C_ADDR_DATA_START + 0x100)
#define ADRV9025_CPU_C_ADDR_MAILBOX_RUN_INIT (ADRV9025_CPU_C_ADDR_DATA_START + 0x200)
#define ADRV9025_CPU_C_ADDR_MAILBOX_FHM (ADRV9025_CPU_C_ADDR_DATA_START + 0x208)
#define ADRV9025_CPU_C_ADDR_EXCEPTION_FLAG (ADRV9025_CPU_C_ADDR_DATA_START + 0x210)
/* CPU-D memory map */
#define ADRV9025_CPU_D_INVALID_ADDRESS 0xFFFFFFFF
#define ADRV9025_CPU_D_ADDR_PROG_START 0x01000000
#define ADRV9025_CPU_D_ADDR_PROG_END 0x01017FFF
#define ADRV9025_CPU_D_ADDR_PROG_END (ADRV9025_CPU_C_ADDR_PROG_START - 1)
#define ADRV9025_CPU_D_ADDR_DATA_START 0x20000000
#define ADRV9025_CPU_D_ADDR_DATA_END 0x20027FFF
#define ADRV9025_CPU_D_ADDR_VERSION 0x01000240
#define ADRV9025_CPU_D_ADDR_DATA_END (ADRV9025_CPU_C_ADDR_DATA_START - 1)
#define ADRV9025_CPU_D_ADDR_VERSION (ADRV9025_CPU_D_ADDR_PROG_START + 0x240)
#define ADRV9025_CPU_D_ADDR_CFR_PULSE ADRV9025_CPU_D_INVALID_ADDRESS /* ARM-D doesn't have this address */
#define ADRV9025_CPU_D_ADDR_DEBUG_PTR ADRV9025_CPU_D_INVALID_ADDRESS /* ARM-D doesn't have this address */
#define ADRV9025_CPU_D_ADDR_BUILD_CHKSUM ADRV9025_CPU_D_INVALID_ADDRESS /* ARM-D doesn't have this address */
@@ -202,9 +206,11 @@ extern "C"
#define ADRV9025_CPU_D_ADDR_MAILBOX_GET ADRV9025_CPU_D_INVALID_ADDRESS /* ARM-D doesn't have this address */
#define ADRV9025_CPU_D_ADDR_MAILBOX_RUN_INIT ADRV9025_CPU_D_INVALID_ADDRESS /* ARM-D doesn't have this address */
#define ADRV9025_CPU_D_ADDR_MAILBOX_FHM ADRV9025_CPU_D_INVALID_ADDRESS /* ARM-D doesn't have this address */
#define ADRV9025_CPU_D_ADDR_EXCEPTION_FLAG (ADRV9025_CPU_D_ADDR_DATA_START)
#define ADRV9025_CPI_D_ADDR_CUSTOM_WAVEFORM_BUF 0x01005000
/* ARM average temperature measurement */
#define ADRV9025_CPU_ADDR_AVG_TEMP_ADDR 0x010002B0
#define ADRV9025_CPU_ADDR_AVG_TEMP_ADDR (ADRV9025_CPU_C_ADDR_PROG_START + 0x2B0)
/*StringVersion address in ARM*/
#define ADRV9025_CPU_ADDR_STREAM_VERSION 0x2004E808

View File

@@ -2,7 +2,7 @@
/**
* \file adrv9025_crc32.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -2,7 +2,7 @@
/**
* \file adrv9025_data_interface.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -16,7 +16,7 @@
* \brief Contains private ADRV9025 functions to aid the data interface public
* API functions.
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*
* Copyright 2015-2019 Analog Devices Inc.
* Released under the AD9378-AD9379 API license, for more information see the "LICENSE.pdf" file.

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 DFE related function prototypes for
* adrv9025_dfe.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -23,6 +23,7 @@
extern "C" {
#endif
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Performs range check on the DPD model config params
*
@@ -111,6 +112,96 @@ int32_t adrv9025_DpdStatusDeserialize(adi_adrv9025_Device_t* device,
adi_adrv9025_DpdStatus_t* dpdStatus,
uint8_t* buf,
uint8_t bufSize);
#endif
/**
* \brief Performs range check on the DPD model config params, without floats
*
* \pre This function is automatically called as part of adi_adrv9025_DpdModelConfigSet_v2
* if macro ADI_ADRV9025_DPD_RANGE_CHECK is set to 1
*
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param dpdModelConfig Pointer to the dpd model config structure consisting of the dpd model config settings.
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_DpdModelConfigSetRangeCheck_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_DpdModelConfig_v2_t* dpdModelConfig);
/**
* \brief Encodes the dpd model into config data format as expected by ADRV9025 firmware, without floats
*
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param dpdModelConfig Pointer to the dpd model config structure consisting of the dpd model config settings.
* \param armConfigData Array which will be updated with the encoded dpd model config data
* \param arraySize Size of the armConfigData array in bytes
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_DpdModelConfigEncode_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_DpdModelConfig_v2_t* dpdModelConfig,
uint8_t armConfigData[],
uint16_t arraySize);
/**
* \brief Decodes the dpd model config data received from ADRV9025 firmware and updates
* the dpd model config structure, without floats
*
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param armConfigData Array consisiting of the DPD model config data received from ADRV9025 firmware
* \param arraySize Size of the armConfigData array in bytes
* \param dpdModelConfig Pointer to the dpd model config structure which will be updated with
* the DPD model config settings retrieved from the ADRV9025 device.
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_DpdModelConfigDecode_v2(adi_adrv9025_Device_t* device,
uint8_t armConfigData[],
uint16_t arraySize,
adi_adrv9025_DpdModelConfig_v2_t* dpdModelConfig);
/**
* \brief Deserialize raw data of DPD status into the structure, without floats
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param dpdStatus Pointer to adi_adrv9025_DpdStatus_v2_t where it will be populated with data deserialized from buffer
* \param buf Pointer to buffer containing the raw data
* \param size size of buffer
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_DpdStatusDeserialize_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_DpdStatus_v2_t* dpdStatus,
uint8_t* buf,
uint8_t bufSize);
/**
* \brief Performs range check on the DPD gain monitor config
@@ -312,6 +403,7 @@ int32_t adrv9025_DpdRecoveryActionGet(adi_adrv9025_Device_t* de
adi_adrv9025_DpdErrorState_e dpdErrorState,
adi_adrv9025_DpdRecoveryActionConfig_t* recoveryActionConfig);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Performs range check on the CFR Hard clipper threshold
*
@@ -334,6 +426,30 @@ int32_t adrv9025_DpdRecoveryActionGet(adi_adrv9025_Device_t* de
int32_t adrv9025_CfrHardClipperConfigSetRangeCheck(adi_adrv9025_Device_t* device,
adi_adrv9025_CfrHardClipperConfig_t cfrHardClipperConfig[],
uint8_t cfrHardClipperCfgArraySize);
#endif
/**
* \brief Performs range check on the CFR Hard clipper threshold, without floats
*
* \pre This function is automatically called as part of adi_adrv9025_CfrHardClipperConfigSet_v2
* if macro ADI_ADRV9025_CFR_RANGE_CHECK is set to 1
*
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param cfrHardClipperConfig Pointer to the CFR hard clipper config structure consisting of the hard clipper config settings.
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_CfrHardClipperConfigSetRangeCheck_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_CfrHardClipperConfig_v2_t cfrHardClipperConfig[],
uint8_t cfrHardClipperCfgArraySize);
/**
* \brief Performs range check on the CFR correction pulse write parameters
@@ -361,6 +477,7 @@ int32_t adrv9025_CfrCorrectionPulseWriteRangeCheck(adi_adrv9025_Device_t*
adi_adrv9025_CfrCorrectionPulse_t cfrCorrectionPulses[],
uint8_t numCorrectionPulses);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Performs range check on the CFR core ctrl config params
*
@@ -384,6 +501,31 @@ int32_t adrv9025_CfrCorrectionPulseWriteRangeCheck(adi_adrv9025_Device_t*
int32_t adrv9025_CfrCtrlConfigSetRangeCheck(adi_adrv9025_Device_t* device,
adi_adrv9025_CfrCtrlConfig_t cfrCtrlConfig[],
uint8_t cfrCtrlCfgArraySize);
#endif
/**
* \brief Performs range check on the CFR core ctrl config params, without floats
*
* \pre This function is automatically called as part of adi_adrv9025_CfrCtrlConfigSet
* if macro ADI_ADRV9025_CFR_RANGE_CHECK is set to 1
*
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param cfrCtrlConfig Array of CFR core ctrl config structures
* \param cfrCtrlCfgArraySize No. of elements in the cfrCtrlConfig array
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_CfrCtrlConfigSetRangeCheck_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_CfrCtrlConfig_v2_t cfrCtrlConfig[],
uint8_t cfrCtrlCfgArraySize);
/**
* \brief Performs range check on the CFR core ctrl config params
@@ -542,6 +684,7 @@ int32_t adrv9025_CfrCorrectionPulsesConcatenate(adi_adrv9025_Device_t*
uint8_t numCorrectionPulses,
adi_adrv9025_CfrCorrectionPulse_t* cfrCorrPulseConcatenated);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Performs range check on the CLGC config parameters
*
@@ -587,6 +730,53 @@ int32_t adrv9025_ClgcConfigSetRangeCheck(adi_adrv9025_Device_t* device,
*/
int32_t adrv9025_ClgcConfigSet(adi_adrv9025_Device_t* device,
adi_adrv9025_ClgcConfig_t* clgcConfig);
#endif
/**
* \brief Performs range check on the CLGC config parameters, without floats
*
* This function is automatically called as part of adi_adrv9025_ClgcConfigSet_v2() API if ADI_ADRV9025_CLGC_RANGE_CHECK is set to 1
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization
*
* \param device Pointer to the device settings structure
* \param clgcConfig An array of CLGC control configurations to be applied to the requested Tx channels
* \param clgcConfigArraySize No. of configurations contained in clgcConfig array
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_ClgcConfigSetRangeCheck_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_ClgcConfig_v2_t clgcConfig[],
uint8_t clgcConfigArraySize);
/**
* \brief Configures the closed loop gain control(CLGC) DFE settings prior to enabling the CLGC tracking cal, without floats
*
* This function is automatically called as part of adi_adrv9025_ClgcConfigSet_v2() API to write the CLGC configuration to the ARM mailbox
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization
*
* \param device Pointer to the device settings structure
* \param clgcConfig Pointer to the CLGC config to be applied to the requested Tx channels
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_ClgcConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_ClgcConfig_v2_t* clgcConfig);
/**
* \brief This function can be used to program the complex co-efficients of the final CFR correction pulse. This function is intended to be
@@ -663,16 +853,14 @@ int32_t adrv9025_CfrCorrectionPulseRead(adi_adrv9025_Device_t* device,
uint16_t numCoeffs);
/**
* \brief This function is used to encapsulate the process of writing both the dpd and enhanced dpd tracking config structures to the fw
* \brief This function is used to encapsulate the process of writing the dpd tracking config structure to the fw
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param trackingConfig Target Tx channel whose correction pulse coefficients are requested
* \param enhancedTrackingConfig An array which will be updated with the Real part of the complex CFR correction pulse coefficients programmed in the device
* \param useEnhanced True or false flag indicating whether its enhanced dpd or not i.e. true for enhanced
* \param trackingConfig tracking config
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
@@ -681,11 +869,10 @@ int32_t adrv9025_CfrCorrectionPulseRead(adi_adrv9025_Device_t* device,
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_dpdTrackingConfigSet(adi_adrv9025_Device_t* device,
adi_adrv9025_DpdTrackingConfig_t* trackingConfig,
adi_adrv9025_EnhancedDpdTrackingConfig_t* enhancedTrackingConfig,
uint8_t useEnhanced);
adi_adrv9025_DpdTrackingConfig_t* trackingConfig);
/**
* \brief This function is used to encapsulate the process of read either the dpd or enhanced dpd tracking config structures from the fw
* \brief This function is used to encapsulate the process of reading the dpd tracking config structure from the fw
*
* \dep_begin
* \dep{device->halDevInfo}
@@ -693,9 +880,7 @@ int32_t adrv9025_dpdTrackingConfigSet(adi_adrv9025_Device_t*
*
* \param device Pointer to the device settings structure
* \param txChannel tx channel to set configuration on
* \param trackingConfig Target Tx channel whose correction pulse coefficients are requested
* \param enhancedTrackingConfig An array which will be updated with the Real part of the complex CFR correction pulse coefficients programmed in the device
* \param useEnhanced True or false flag indicating whether its enhanced dpd or not i.e. true for enhanced
* \param trackingConfig Target Tx channel whose tracking config is requested
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
@@ -705,9 +890,48 @@ int32_t adrv9025_dpdTrackingConfigSet(adi_adrv9025_Device_t*
*/
int32_t adrv9025_dpdTrackingConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdTrackingConfig_t* trackingConfig,
adi_adrv9025_EnhancedDpdTrackingConfig_t* enhancedTrackingConfig,
uint8_t useEnhanced);
adi_adrv9025_DpdTrackingConfig_t* trackingConfig);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief This function is used to encapsulate the process of writing the enhanced dpd tracking config structure to the fw
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param enhancedTrackingConfig enhanced tracking config
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_dpdEnhancedTrackingConfigSet(adi_adrv9025_Device_t* device,
adi_adrv9025_EnhancedDpdTrackingConfig_t* enhancedTrackingConfig);
/**
* \brief This function is used to encapsulate the process of read either the dpd or enhanced dpd tracking config structures from the fw
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param txChannel tx channel to set configuration on
* \param enhancedTrackingConfig Target Tx channel whose enhanced DPD tracking config is requested
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_dpdEnhancedTrackingConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_EnhancedDpdTrackingConfig_t* enhancedTrackingConfig);
/**
* \brief Performs range check on the DPD tracking config
*
@@ -728,6 +952,69 @@ int32_t adrv9025_dpdTrackingConfigGet(adi_adrv9025_Device_t*
*/
int32_t adrv9025_EnhancedDpdTrackingConfigRangeCheck(adi_adrv9025_Device_t* device,
adi_adrv9025_EnhancedDpdTrackingConfig_t* dpdTrackingConfig);
#endif
/**
* \brief This function is used to encapsulate the process of writing the enhanced dpd tracking config structure to the fw, without floats
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param enhancedTrackingConfig enhanced tracking config
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_dpdEnhancedTrackingConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_EnhancedDpdTrackingConfig_v2_t* enhancedTrackingConfig);
/**
* \brief This function is used to encapsulate the process of read either the dpd or enhanced dpd tracking config structures from the fw, without floats
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param txChannel tx channel to set configuration on
* \param enhancedTrackingConfig Target Tx channel whose enhanced DPD tracking config is requested
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_dpdEnhancedTrackingConfigGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_EnhancedDpdTrackingConfig_v2_t* enhancedTrackingConfig);
/**
* \brief Performs range check on the DPD tracking config, without floats
*
* \pre This function is automatically called as part of adrv9025_DpdTrackingConfigSet
* if macro ADI_ADRV9025_DPD_RANGE_CHECK is set to 1
*
* \dep_begin
* \dep{device->common.devHalInfo}
* \dep{device->devStateInfo}
* \dep_end
*
* \param device Pointer to the device settings structure
* \param dpdTrackingConfig Pointer to the Enhanced DPD tracking config structure consisting of the DPD tracking config settings.
*
* \retval ADI_COMMON_ERR_NULL_PARAM Recovery action for NULL parameter check
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adrv9025_EnhancedDpdTrackingConfigRangeCheck_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_EnhancedDpdTrackingConfig_v2_t* dpdTrackingConfig);
#ifdef __cplusplus
}
#endif

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 private function prototypes for
* adrv9025_dynamic_slicer.c that helps adi_adrv9025_dynamic_slicer.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 transmit related function prototypes for
* adrv9025_gpio.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*
* Copyright 2015-2019 Analog Devices Inc.
* Released under the AD9378-AD9379 API license, for more information see the "LICENSE.pdf" file.

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 init related private function prototypes for
* adrv9025_init.c that helps adi_adrv9025_init.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -18,21 +18,14 @@
#include "adi_adrv9025.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ADRV9025_BUGINFO(x)
#define ADRV9025_BUGINFO_NUM(x,n)
#define ADRV9025_DMAINFO(text, addr, count)
#define ADRV9025_SPIDMAINFO(s,a,b,c)
#define ADRV9025_SPIWRITEBYTESDMA(text, addr, addrArray, dataArray, count) \
{\
recoveryAction = adi_adrv9025_SpiBytesWrite(device, (addrArray), (dataArray), (count)); \
@@ -100,8 +93,6 @@ extern "C" {
ADI_ERROR_RETURN(device->common.error.newAction); \
ADRV9025_SPIDMAINFO("MESSAGE:READ STREAM: %30s: addr=0x%04x, count=0x%02x \n", (text), (addr), (byteCount)); \
}
#define ADRV9025_SPIWRITEBYTEDMA(text, addr, data) \
{\
recoveryAction = adi_adrv9025_SpiByteWrite(device, (addr), (data)); \
@@ -109,7 +100,6 @@ extern "C" {
ADI_ERROR_RETURN(device->common.error.newAction); \
ADRV9025_SPIDMAINFO("MESSAGE: WRITE: %30s: addr=0x%04x, data=0x%02x \n", (text), (addr), (data)); \
}
#define ADRV9025_SPIREADBYTEDMA(text, addr, data) \
{\
recoveryAction = adi_adrv9025_SpiByteRead(device, (addr), (data)); \
@@ -117,10 +107,8 @@ extern "C" {
ADI_ERROR_RETURN(device->common.error.newAction); \
ADRV9025_SPIDMAINFO("MESSAGE: READ: %30s: addr=0x%04x, data=0x%02x \n", (text), (addr), (*(uint8_t*)(data))); \
}
#define ADRV9025_SPIINFO(s,a,b,c)
#define ADRV9025_SPI_FIELD_INFO(s,a,b,c,d)
#define ADRV9025_SPIWRITEBYTE(text, addr, data) \
{\
int32_t recAct = 0; \
@@ -129,7 +117,6 @@ extern "C" {
ADI_ERROR_RETURN(device->common.error.newAction); \
ADRV9025_SPIINFO("MESSAGE: WRITE: %30s: addr=0x%04x, data=0x%02x \n", (text), (addr), (data)); \
}
#define ADRV9025_SPIREADBYTE(text, addr, data) \
{\
int32_t recAct = 0; \
@@ -138,7 +125,6 @@ extern "C" {
ADI_ERROR_REPORT(&device->common, ADI_COMMON_ERRSRC_API, ADI_COMMON_ERR_API_FAIL, recAct, NULL, "Error while reading byte from Spi"); \
ADRV9025_SPIINFO("MESSAGE: READ: %30s: addr=0x%04x, data=0x%02x \n", (text), (addr), (*(uint8_t*)(data))); \
}
#define ADRV9025_SPIFIELDWRITE(device, addr, fieldVal, mask, startBit, text) \
{ \
int32_t recAct = 0; \

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 radio control related private function prototypes for
* adrv9025_radioctrl.c that helps adi_adrv9025_radioctrl.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -5,7 +5,7 @@
* Use these register Address only for initialize and before MCS.
* Should use Bitfield function after MCS.
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 Rx related private function prototypes for
* adrv9025_rx.c which helsp adi_adrv9025_rx.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 shared resource related private function prototypes for
* adrv9025_shared_resource_manager.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 shared resource related private data prototypes for
* adrv9025_shared_resource_manager.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -16,7 +16,7 @@
#ifndef _ADRV9025_SHARED_RESOURCE_MANAGER_TYPES_H_
#define _ADRV9025_SHARED_RESOURCE_MANAGER_TYPES_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 transmit related function prototypes for
* adrv9025_tx.c which helps adi_adrv9025_tx.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adrv9025_utilities.h
* \brief Contains Utility features related private function definitions
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -16,7 +16,6 @@
#define _ADRV9025_UTILITIES_H_
#include "adi_adrv9025_utilities_types.h"
#include <linux/kernel.h>
#define ADRV9025_MAX_FILE_BUFFER 128

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_analog_orx_mem_map.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_analog_rx_mem_map.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_analog_tx_mem_map.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_core.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_deser.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_bf_hal.c
* \brief Contains ADI Transceiver Hardware Abstraction functions

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_jesd_common.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_jrx_link.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_jtx_link.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_orx.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_pll_mem_map.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_rx.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_tx.c
*

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file Automatically generated file: adrv9025_bf_txdac_mem_map.c
*

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_cals.c
* \brief Contains ADRV9025 calibration related private function implementation
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -23,8 +23,6 @@
#include "../../private/include/adrv9025_init.h"
#include "../../private/include/adrv9025_cpu.h"
#include <linux/kernel.h> /* needed for memset */
#ifdef _RELEASE_BUILD_
#line __LINE__ "adrv9025_cals.c"
#endif

View File

@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_cpu.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -16,9 +16,8 @@
* \brief Contains CPU private features related function implementation defined in
* adrv9025_cpu.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
#include <linux/kernel.h>
#include "adi_adrv9025_user.h"
#include "adi_adrv9025_hal.h"
@@ -1553,7 +1552,6 @@ const char* adrv9025_CpuErrMsgGet(
*mailboxErrCodeRet = mailboxErrCode;
}
errCode = ((errCode & (ADRV9025_CPU_OPCODE_MASK | ADRV9025_CPU_OBJ_ID_MASK)) | cpuErrorFlag);
if (cpuErrorFlag > 0)
@@ -2061,7 +2059,7 @@ int32_t adrv9025_CpuDmaMemWrite(
/* Streaming with custom hal layer function(adi_hal_CustomSpiStreamWrite) */
ADRV9025_SPIWRITEWORDDMASTREAMWITHCUSTOMHALFUNCTION("DMA_MEM_WRITE_STREAM", ADRV9025_CPU_ADDR_DMA_DATA3, data, byteCount);
#else
/* Streaming with standard hal layer function(adrv9025_hal_SpiWrite) */
/* Streaming with standard hal layer function */
ADRV9025_SPIWRITEWORDDMASTREAM("DMA_MEM_WRITE_STREAM",
ADRV9025_CPU_ADDR_DMA_DATA3,
data,
@@ -2273,7 +2271,7 @@ int32_t adrv9025_CpuDmaMemRead(
/* Streaming with custom hal layer function(adi_hal_CustomSpiStreamRead) */
ADRV9025_SPIREADWORDDMASTREAMWITHCUSTOMHALFUNCTION("DMA_MEM_READ_STREAM", ADRV9025_CPU_ADDR_DMA_DATA3, returnData, byteCount);
#else
/* Streaming with standard hal layer function(adrv9025_hal_SpiRead) */
/* Streaming with standard hal layer function */
ADRV9025_SPIREADWORDDMASTREAM("DMA_MEM_READ_STREAM",
ADRV9025_CPU_ADDR_DMA_DATA3,
returnData,
@@ -2531,7 +2529,7 @@ int32_t adrv9025_CpuAdcProfilesWrite(adi_adrv9025_Device_t* device,
uint32_t checksum = 0;
uint32_t start = 0;
static const uint32_t ADRV9025_ADDR_DEVICE_PROFILE = 0x20000000;
static const uint32_t ADRV9025_ADDR_DEVICE_PROFILE = ADRV9025_CPU_D_ADDR_DATA_START;
static const uint32_t ADRV9025_ADC_PROFILE_MAX = 684;
ADI_NULL_DEVICE_PTR_RETURN(device);
@@ -2782,7 +2780,7 @@ int32_t adrv9025_CpuProfileWrite(adi_adrv9025_Device_t* device,
uint32_t i = 0;
uint8_t cfgData[ADRV9025_PROFILE_CHUNK_MAX + 10] = {0};
static const uint32_t ADRV9025_ADDR_DEVICE_PROFILE = 0x20000000;
static const uint32_t ADRV9025_ADDR_DEVICE_PROFILE = ADRV9025_CPU_D_ADDR_DATA_START;
static const uint32_t ADRV9025_PROFILE_MAX = 1352;
static const uint32_t ADRV9025_PROFILE_TX = 40;

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_crc32.c
* \brief Contains ARM private features related function implementation defined in
* adrv9025_crc32.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_data_interface.c
* \brief Contains private helper functions to assist the ADRV9025 data interface
* API functions.
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_dynamic_slicer.c
* \brief Contains ADRV9025 dynamic slicer related private function implementation
* defined in adrv9025_dynamic_slicer.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
#include "adi_adrv9025_user.h"
#include "adi_adrv9025_gpio.h"
#include "adi_adrv9025_hal.h"

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_init.c
* \brief Contains ADRV9025 init related private function implementations
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -71,9 +71,7 @@ int32_t adrv9025_LdoEnable(adi_adrv9025_Device_t* device,
/* Allow time for internal LDOs to power up */
ADI_ERROR_RETURN(device->common.error.newAction);
}
else /* Report Error if LDO Select is not either 0 or 1 */
{
@@ -1537,7 +1535,7 @@ int32_t adrv9025_RxOverloadProtectionSet(adi_adrv9025_Device_t* device,
static const uint8_t AGC_ADC_HIGH_OVRG_EXCEEDED_CNTR_REG_VAL = 0x03;
static const uint16_t AGC_ADC_HIGH_OVRG_EXCEEDED_CNTR_REG_RX_OFFSET = 0x70;
static const uint16_t AGC_ADC_HIGH_OVRG_EXCEEDED_CNTR_REG_ORX_OFFSET = 0x8D;
static const uint64_t AGC_GAIN_UPDATE_CNTR_uS = 500;
/* static const uint32_t AGC_GAIN_UPDATE_CNTR_uS = 500; */
static const uint32_t MAX_AGC_GAIN_UPDATE_CNTR_REG_VAL = 0x03FFFFFF;
static const uint16_t AGC_GAIN_UPDATE_CNTR1_RX_OFFSET = 0x77;
static const uint16_t AGC_GAIN_UPDATE_CNTR2_RX_OFFSET = 0x78;
@@ -1575,7 +1573,7 @@ int32_t adrv9025_RxOverloadProtectionSet(adi_adrv9025_Device_t* device,
static const uint8_t TIA_VALID_OVERRIDE_SHIFT = 0x01;
uint32_t agcClkRate_kHz = (device->devStateInfo.hsDigClk_kHz >> device->devStateInfo.clkDivideRatios.agcClkDivideRatio);
uint64_t agcGainUpdateCounter = DIV_ROUND_DOWN_ULL((AGC_GAIN_UPDATE_CNTR_uS * agcClkRate_kHz), 1000);
uint32_t agcGainUpdateCounter = agcClkRate_kHz / 2u; /* ((AGC_GAIN_UPDATE_CNTR_uS * agcClkRate_kHz) / 1000) */
uint8_t agcGainUpdateCntr1RegVal = (uint8_t)(agcGainUpdateCounter & (uint32_t)0x000000FF);
uint8_t agcGainUpdateCntr2RegVal = (uint8_t)((uint32_t)(agcGainUpdateCounter & (uint32_t)0x0000FF00) >> 8);
uint8_t agcGainUpdateCntr3RegVal = (uint8_t)((uint32_t)(agcGainUpdateCounter & (uint32_t)0x00FF0000) >> 16);
@@ -1625,7 +1623,7 @@ int32_t adrv9025_RxOverloadProtectionSet(adi_adrv9025_Device_t* device,
ADI_COMMON_ERRSRC_API,
ADI_COMMON_ERR_INV_PARAM,
ADI_COMMON_ACT_ERR_CHECK_PARAM,
AGC_GAIN_UPDATE_CNTR_uS,
agcGainUpdateCounter,
"AGC Gain Update counter interval too large for the given agc clk rate. Max allowed value = 0x03FFFFFF.");
ADI_ERROR_RETURN(device->common.error.newAction);
}

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_radioctrl.c
* \brief Contains ADRV9025 radio control related private function implementations
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_rx.c
* \brief Contains ADRV9025 Rx related private function implementations
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_shared_resource_manager.c
* \brief Contains ADRV9025 shared resource related private function implementations
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_tx.c
* \brief Contains ADRV9025 transmit related function implementations
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adrv9025_utilities.c
* \brief Contains Utility features related private function implementations
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -14,9 +14,6 @@
#include "adi_adrv9025_user.h"
#include "../include/adrv9025_utilities.h"
#include <linux/kernel.h>
#include <linux/ctype.h>
//#include <ctype.h>
#include "adi_adrv9025_error.h"
#include "adi_adrv9025_hal.h"
#include "adi_adrv9025_cpu.h"

View File

@@ -4,7 +4,7 @@
* \brief Contains top level Adrv9025 related function prototypes for
* adi_adrv9025.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_agc.h
* \brief Contains ADRV9025 API AGC function prototypes for adi_adrv9025_agc.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_agc_types.h
* \brief Contains ADRV9025 API AGC data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -21,7 +21,7 @@ extern
{
#endif
#include <linux/kernel.h>
#include "adi_common_user.h"
/**
* \brief Data structure to hold AGC peak settings

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_arm.h
* \brief Contains ADRV9025 ARM related function prototypes for adi_adrv9025_arm.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -173,8 +173,8 @@ int32_t adi_adrv9025_AdcProfilesWrite(adi_adrv9025_Device_t* device,
/**
* \brief Read from the ADRV9025 ARM program or data memory
*
* Valid memory addresses are: Program Memory (0x01018000 - 0x0104FFFF),
* Data Memory (0x20028000 - 0x2004FFFF).
* Valid memory addresses are: Program Memory (0x01000000 - 0x0104FFFF),
* Data Memory (0x20000000 - 0x2004FFFF).
*
* \pre This function is private and is not called directly by the user.
*
@@ -202,8 +202,8 @@ int32_t adi_adrv9025_ArmMemRead(adi_adrv9025_Device_t* device,
/**
* \brief Write to the ADRV9025 ARM program or data memory
*
* Valid memory addresses are: Program Memory (0x01018000 - 0x0104FFFF),
* Data Memory (0x20028000 - 0x2004FFFF).
* Valid memory addresses are: Program Memory (0x01000000 - 0x0104FFFF),
* Data Memory (0x20000000 - 0x2004FFFF).
*
* \pre This function is private and is not called directly by the user.
*

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_arm_types.h
* \brief Contains ADRV9025 ARM data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,7 +15,7 @@
#ifndef _ADI_ADRV9025_ARM_TYPES_H_
#define _ADI_ADRV9025_ARM_TYPES_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#ifdef __cplusplus
extern

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 calibration related function prototypes for
* adi_adrv9025_cals.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -220,7 +220,7 @@ int32_t adi_adrv9025_InitCalsDetailedStatusGet(adi_adrv9025_Device_t* dev
*
* Example : To ENABLE TRACKING_CAL_RX1_QEC and TRACKING_CAL_TX1_QEC
* This API should be called with
* mask = 0x0101, enableDisableFlag = ADI_ADRV9025_TRACKING_CAL_ENABLE
* mask = 0x0101, enableDisableFlag = ADI_ADRV9025_TRACKING_CAL_ENABLE
* To DISABLE TRACKING_CAL_RX1_QEC and TRACKING_CAL_TX1_QEC
* This API should be called with
* mask = 0x0101, enableDisableFlag = ADI_ADRV9025_TRACKING_CAL_DISABLE

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_cals_types.h
* \brief Contains ADRV9025 API Calibration data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 processor function prototypes for
* adi_adrv9025_cpu.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -20,10 +20,6 @@
#include "adi_common_error_types.h"
#include "adi_adrv9025_cpu_types.h"
#ifndef ADRV9025_INIT_SPI_DEBUG
#define ADRV9025_INIT_SPI_DEBUG 0
#endif
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_cpu_types.h
* \brief Contains ADRV9025 data types for on board cpus feature
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,7 +15,7 @@
#ifndef _ADI_ADRV9025_CPU_TYPES_H_
#define _ADI_ADRV9025_CPU_TYPES_H_
#include <linux/kernel.h>
#include "adi_common_user.h"
#include "../../private/include/adrv9025_cpu_macros.h"
#ifdef __cplusplus

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 JESD204b data path related function prototypes for
* adi_adrv9025_jesd204.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -1283,7 +1283,7 @@ int32_t adi_adrv9025_DfrmPhaseDiffGet(adi_adrv9025_Device_t *device,
*
* This function uses the ARM firmware to generate information about the signal eye related to a particular profile
* This method produces a multi level eye, this eye is generated using information based on intersymbol interference post cursors
* ADRV9025 uses a Baud Rate Phase detection method to determine signal eye layout this is to account for higher lane rates which are possible in madura
* ADRV9025 uses a Baud Rate Phase detection method to determine signal eye layout this is to account for higher lane rates which are possible in ADRV9025
* This will produce eyediagram output which is reffered to as a 4 level eye.
*
* /pre Dependancies are as follows:

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_data_interface_types.h
* \brief Contains ADRV9025 API data interface types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -19,7 +19,7 @@
extern "C" {
#endif
#include <linux/kernel.h>
#include "adi_common_user.h"
#define ADI_ADRV9025_NUM_LANES 4
#define ADI_ADRV9025_FRMR_NUM_OF_CONVERTERS 24

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 DFE related function prototypes for
* adi_adrv9025_dfe.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -27,6 +27,7 @@ extern "C" {
* DPD Ctrl Functions
****************************************************************************
*/
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Configures the base DPD model for the requested Tx channel
*
@@ -83,6 +84,64 @@ int32_t adi_adrv9025_DpdModelConfigSet(adi_adrv9025_Device_t* device,
int32_t adi_adrv9025_DpdModelConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdModelConfig_t* dpdModelConfig);
#endif
/**
* \brief Configures the base DPD model for the requested Tx channel, without floats
*
* This function configures a basis model for the DPD adaptation engine
* in the ADRV9025 device. The basis model configuration includes the feature
* set consisting of i(memory term),j(cross term),k(power term) and the complex coefficient values.
* A maximum of 190 features can be configured for the DPD adaptation engine.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization and running
* the dpd and path delay init cals but before enabling the DPD tracking calibration.
*
* \note Currently, the same DPD model config is applied to all the Tx channels.
*
* \param device Pointer to the device settings structure
* \param dpdModelConfig Pointer to the dpd model config structure consisting of the dpd model config settings.
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_DpdModelConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_DpdModelConfig_v2_t* dpdModelConfig);
/**
* \brief Retrieves the DPD model feature set for the requested Tx channel from the device, without floats
*
* This function retrieves the DPD model config updated with the feature co-efficient values
* computed from the last DPD adaptation cycle.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization.
*
* \note Currently, the same DPD model config is applied to all the Tx channels.
*
* \param device Pointer to the device settings structure
* \param txChannel Reserved param
* \param dpdModelConfig Pointer to the dpd model config structure which will be updated with the updated DPD model config.
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_DpdModelConfigGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdModelConfig_v2_t* dpdModelConfig);
/**
* \brief Performs a full/partial reset of the DPD engine based on the reset mode selected
@@ -109,6 +168,7 @@ int32_t adi_adrv9025_DpdReset(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdResetMode_e dpdResetMode);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Reads the DPD status for the requested Tx channel
*
@@ -143,6 +203,42 @@ int32_t adi_adrv9025_DpdReset(adi_adrv9025_Device_t* device,
int32_t adi_adrv9025_DpdStatusGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdStatus_t* dpdStatus);
#endif
/**
* \brief Reads the DPD status for the requested Tx channel, without floats
*
* This function retrieves the DPD tracking calibration status and DPD
* stability metrics/statistics. Typically the DPD status is used to monitor
* the DPD tracking calibration performance, stability metrics/statistics,
* and completion status once the DPD tracking calibration has been enabled.
* It is suggested that the timeout value for this operation shound be in the
* range of 0.5s and 1s as this operation can take a while to finish. The timeout
* value can be found in adi_adrv9025_user.h as ADI_ADRV9025_GETTXDPDSTATUS_TIMEOUT_US
*
* The user can also monitor the DPD status to retrieve errors encountered
* during DPD adapatation. The DPD status returns a specific error code
* pertaining to an error.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization
*
* \param device Pointer to the device settings structure
* \param txChannel Enum to select the target Tx channel whose DPD status is requested.
* \param dpdStatus Pointer to the dpd status structure which will be updated with the status retrieved from the device.
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_DpdStatusGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdStatus_v2_t* dpdStatus);
/**
* \brief Sets the DPD gain monitor configuration
@@ -243,6 +339,8 @@ int32_t adi_adrv9025_DpdTrackingConfigSet(adi_adrv9025_Device_t* devi
int32_t adi_adrv9025_DpdTrackingConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_DpdTrackingConfig_t* dpdTrackingConfig);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Sets the Enhanced DPD tracking configuration
*
@@ -289,14 +387,64 @@ int32_t adi_adrv9025_EnhancedDpdTrackingConfigSet(adi_adrv9025_Device_t*
int32_t adi_adrv9025_EnhancedDpdTrackingConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_EnhancedDpdTrackingConfig_t* dpdTrackingConfig);
#endif
/**
* \brief Sets the Enhanced DPD tracking configuration, without floats
*
* This function sets the DPD tracking configuration in the FW
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called after device initialization when DPD tracking is not enabled
*
* \param device Pointer to the device settings structure
* \param dpdTrackingConfig Pointer to the DPD tracking config structure which contains the configuration to be set in FW
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_EnhancedDpdTrackingConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_EnhancedDpdTrackingConfig_v2_t* dpdTrackingConfig);
/**
* \brief Retrieves the Enhanced DPD tracking configuration, without floats
*
* This function gets the DPD tracking configuration from FW
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called after device initialization when DPD tracking is not enabled
*
* \param device Pointer to the device settings structure
* \param txChannel Tx Channel for which DPD tracking config is to be obtained
* \param dpdTrackingConfig Pointer to the DPD tracking config structure which will be updated with the configuration obtained from the FW
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_EnhancedDpdTrackingConfigGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_EnhancedDpdTrackingConfig_v2_t* dpdTrackingConfig);
/**
* \brief Configures criteria for DPD fault conditions
*
* This function configures the criteria for DPD fault conditions per Tx channel
* where each metric will have 2 different thresholds that will trigger 2 different
* fault conditions and 2 other fault conditions when the thresholds have been surpassed
* a certain number of times. The metrics values can be obtained using adi_adrv9025_DpdStatusGet
* in adi_adrv9025_DpdStatistics_t within adi_adrv9025_DpdStatus_t. When this function is called,
* a certain number of times. The metrics values can be obtained from the statistics
* fields within the DPD status structure. When this function is called,
* the persistent error status will be cleared.
*
* +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -425,6 +573,7 @@ int32_t adi_adrv9025_DpdRecoveryActionGet(adi_adrv9025_Device_t*
* CFR Ctrl Functions
****************************************************************************
*/
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Sets up the core control config parameters for the CFR engine.
*
@@ -445,7 +594,7 @@ int32_t adi_adrv9025_DpdRecoveryActionGet(adi_adrv9025_Device_t*
* before applying it to the 3 CFR engines.
*
* The recommended sequence to configure the CFR engine is
* 1) Program the CFR control config via adi_adrv9025_CfrControlConfigSet() API
* 1) Program the CFR control config via adi_adrv9025_CfrCtrlConfigSet() API
* 2) Program the CFR correction pulse using adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* 3) Enable the CFR engine via adi_adrv9025_CfrEnableSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet() API
@@ -499,14 +648,88 @@ int32_t adi_adrv9025_CfrCtrlConfigSet(adi_adrv9025_Device_t* device,
int32_t adi_adrv9025_CfrCtrlConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_CfrCtrlConfig_t* cfrCtrlConfig);
#endif
/**
* \brief Sets up the core control config parameters for the CFR engine, without floats.
*
* This function sets up the cfr mode, peak threshold, interpolation factor and the delay.
* This API is required to be called to setup CFR control config before executing the CFR init cal.
* Currently, ADI_ADRV9025_CFR_MODE1 is the only mode of operation supported by the CFR engine.
* The user is expected to provide the final correction pulse to be applied to the CFR input in this mode.
* The threshold is calculated as cfrPeakThreshold = 10^(Target PAR_dB / 20) * RMS_Input.
* The user can setup an interpolation of 1x, 2x or 4x to applied to the Tx data before peak detection.
* The user can setup the CFR engine delay between 129 and 511 which translates to n+1 cycles per engine.
* The delay will be applied to all enabled CFR engines. CFR latency will be (txDelay+1)*numCfrEnginesEnabled + 3,
* where the additional 3 cycles comes from the hard clipper. The sample rate for the cycles here are at the Tx JESD rate..
*
* Each Tx channel CFR consists of 3 cascaded CFR engines followed by a hard clipper to
* clip the few peaks that are skipped by all 3 CFR Engines. The hard clipper can be optionally
* enabled via adi_adrv9025_CfrHardClipperConfigSet_v2() API. The CFR control config is applied to
* all 3 CFR engines by this function. The threshold is adjusted internally by the ADRV9025 firmware
* before applying it to the 3 CFR engines.
*
* The recommended sequence to configure the CFR engine is
* 1) Program the CFR control config via adi_adrv9025_CfrCtrlConfigSet_v2() API
* 2) Program the CFR correction pulse using adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* 3) Enable the CFR engine via adi_adrv9025_CfrEnableSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet_v2() API
* 5) Execute the CFR init cal
* 6) Optionally set the active correction pulse to use in Mode 1 via adi_adrv9025_CfrActiveCorrectionPulseSet() API for
* carrier config hot-swapping
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called after device initialization and the ARM processor boot up is complete
* but before the CFR init cal is executed.
*
* \param device Pointer to the device settings structure
* \param cfrCtrlConfig An array of CFR control config structures
* \param cfrCtrlCfgArraySize No. of configs contained in cfrCtrlConfig array
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_CfrCtrlConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_CfrCtrlConfig_v2_t cfrCtrlConfig[],
uint8_t cfrCtrlCfgArraySize);
/**
* \brief Retrieves the core control config parameters for the CFR engine, without floats.
*
* This function retrieves the cfr mode, peak threshold, interpolation factor and the delay
* currently programmed in the device.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called after device initialization and the ARM processor boot up is complete.
*
* \param device Pointer to the device settings structure
* \param txChannel Target Tx channel whose CFR control config is required to be read back
* \param cfrCtrlConfig Pointer to CFR control config struct which will be updated with the CFR control settings from the device
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_CfrCtrlConfigGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_CfrCtrlConfig_v2_t* cfrCtrlConfig);
/**
* \brief This function Enables/Disables the CFR engine present before the DPD engine in the Tx datapath.
*
* Each Tx channel CFR consists of 3 cascaded CFR engines followed by a hard clipper to
* clip the few peaks that are skipped by all 3 CFR Engines. The hard clipper can be optionally
* enabled via adi_adrv9025_CfrHardClipperConfigSet() API. The CFR control config settings can
* be applied via adi_adrv9025_CfrCtrlConfigSet() API.
* clip the few peaks that are skipped by all 3 CFR Engines.
*
* To apply CFR correction to Tx data, the user can set adi_adrv9025_CfrEnable_t.cfrEngineXEnable to 1 and adi_adrv9025_CfrEnable_t.cfrEngineXBypassEnable to 0.
* To bypass CFR engine, the user can set adi_adrv9025_CfrEnable_t.cfrEngineXEnable to 1 and adi_adrv9025_CfrEnable_t.cfrEngineXBypassEnable to 1.
@@ -515,10 +738,10 @@ int32_t adi_adrv9025_CfrCtrlConfigGet(adi_adrv9025_Device_t* device,
* Please note that this is an init time function and the enabling/disabling of CFR engine cannot be performed during runtime
*
* The recommended order of sequence to configure the CFR engine is
* 1) Program the CFR control config via adi_adrv9025_CfrControlConfigSet() API
* 1) Program the CFR control config via adi_adrv9025_CfrCtrlConfigSet()/adi_adrv9025_CfrCtrlConfigSet_v2() API
* 2) Program the CFR correction pulse using adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* 3) Enable the CFR engine via adi_adrv9025_CfrEnableSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet()/adi_adrv9025_CfrHardClipperConfigSet_v2() API
* 5) Execute the CFR init cal
* 6) Optionally set the active correction pulse to use in Mode 1 via adi_adrv9025_CfrActiveCorrectionPulseSet() API for
* carrier config hot-swapping
@@ -596,10 +819,10 @@ int32_t adi_adrv9025_CfrEnableGet(adi_adrv9025_Device_t* device,
* half pulses are of the same length. The parameter adi_adrv9025_CfrCorrectionPulse_t.numCoeffs specifies the half pulse length
*
* The recommended sequence to configure the CFR engine is
* 1) Program the CFR control config via adi_adrv9025_CfrControlConfigSet() API
* 1) Program the CFR control config via adi_adrv9025_CfrCtrlConfigSet()/adi_adrv9025_CfrCtrlConfigSet_v2() API
* 2) Program the CFR correction pulse using adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* 3) Enable the CFR engine via adi_adrv9025_CfrEnableSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet()/adi_adrv9025_CfrHardClipperConfigSet_v2() API
* 5) Execute the CFR init cal
* 6) Optionally set the active correction pulse to use in Mode 1 via adi_adrv9025_CfrActiveCorrectionPulseSet() API for
* carrier config hot-swapping
@@ -671,7 +894,8 @@ int32_t adi_adrv9025_CfrCorrectionPulseRead_v2(adi_adrv9025_Device_t *device,
* \brief This function updates the CFR detection, correction and hard clipper (if enabled) thresholds while
* CFR is running. It's used to update these thresholds without running CFR init calibration.
* Before calling this function CFR engine thresholds and hard clipper (if enabled) thresholds
* should be updated with adi_adrv9025_CfrCtrlConfigSet and adi_adrv9025_CfrHardClipperConfigSet functions
* should be updated with adi_adrv9025_CfrCtrlConfigSet()/adi_adrv9025_CfrCtrlConfigSet_v2() and
* adi_adrv9025_CfrHardClipperConfigSet()/adi_adrv9025_CfrHardClipperConfigSet_v2() functions
* respectively.
*
* \dep_begin
@@ -711,6 +935,7 @@ int32_t adi_adrv9025_CfrThresholdsRunTimeUpdate(adi_adrv9025_Device_t* device,
*/
int32_t adi_adrv9025_CfrCoefficientsRunTimeUpdate(adi_adrv9025_Device_t *device, uint32_t txChannelMask);
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief This function enables/disables the CFR hard clipper and also configures the threshold for the hard clipper
*
@@ -721,7 +946,7 @@ int32_t adi_adrv9025_CfrCoefficientsRunTimeUpdate(adi_adrv9025_Device_t *device,
* ADI recommends not setting the hard clipper threshold to a value less than -7 dBFS in order to ensure optimum performance.
*
* The recommended sequence to configure the CFR engine is
* 1) Program the CFR control config via adi_adrv9025_CfrControlConfigSet() API
* 1) Program the CFR control config via adi_adrv9025_CfrCtrlConfigSet() API
* 2) Program the CFR correction pulse using adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* 3) Enable the CFR engine via adi_adrv9025_CfrEnableSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet() API
@@ -774,6 +999,71 @@ int32_t adi_adrv9025_CfrHardClipperConfigSet(adi_adrv9025_Device_t*
int32_t adi_adrv9025_CfrHardClipperConfigGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_CfrHardClipperConfig_t* cfrHardClipperConfig);
#endif
/**
* \brief This function enables/disables the CFR hard clipper and also configures the threshold for the hard clipper, without floats.
*
* The CFR hard clipper threshold is applied to an approximation of SQRT(I^2 + Q^2). The threshold
* is normalized to 1 and is relative to 0dBFS which means that a threshold of 1 corresponds to a
* threshold of 0dBFS.
*
* ADI recommends not setting the hard clipper threshold to a value less than -7 dBFS in order to ensure optimum performance.
*
* The recommended sequence to configure the CFR engine is
* 1) Program the CFR control config via adi_adrv9025_CfrCtrlConfigSet_v2() API
* 2) Program the CFR correction pulse using adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* 3) Enable the CFR engine via adi_adrv9025_CfrEnableSet() API
* 4) Optionally configure the hard clipper via adi_adrv9025_CfrHardClipperConfigSet_v2() API
* 5) Execute the CFR init cal
* 6) Optionally set the active correction pulse to use in Mode 1 via adi_adrv9025_CfrActiveCorrectionPulseSet() API for
* carrier config hot-swapping
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization and the ARM boot up is complete.
* The hard clipper setting is currently an init time setting and has to be setup before running the
* the CFR init cal. There is no support for dynamically changing the hard clipper threshold during runtime.
*
* \param device Pointer to the device settings structure
* \param cfrHardClipperConfig An array of CFR hard clipper config structures
* \param cfrHardClipperCfgArraySize No. of configs in cfrHardClipperConfig array
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_CfrHardClipperConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_CfrHardClipperConfig_v2_t cfrHardClipperConfig[],
uint8_t cfrHardClipperCfgArraySize);
/**
* \brief This function retrieves the CFR Hard clipper setting for the requested Tx channel, without floats.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization and the ARM boot up is complete
*
* \param device Pointer to the device settings structure
* \param txChannel Target Tx channel for which the CFR Hard clipper status is requested
* \param cfrHardClipperConfig Pointer to the CFR hard clipper config which will be updated with the device
* hard clipper config settings
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_CfrHardClipperConfigGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_CfrHardClipperConfig_v2_t* cfrHardClipperConfig);
/**
* \brief Switches the final correction pulse to be applied in the CFR engine in mode1(ADI_ADRV9025_CFR_MODE1) operation
@@ -803,7 +1093,8 @@ int32_t adi_adrv9025_CfrHardClipperConfigGet(adi_adrv9025_Device_t*
* \pre This runtime function may be called any time after device initialization and two correction pulses
* of length 512 or lesser(half pulse length of 256 or lesser) are programmed via adi_adrv9025_CfrCorrectionPulseWrite_v2() API
* and the CFR init cal has been executed. The CFR init cal can be executed via adi_adrv9025_InitCalsRun() API. It is also
* necessary that the mode of operation is set to ADI_ADRV9025_CFR_MODE1 via adi_adrv9025_CfrCtrlConfigSet() API.
* necessary that the mode of operation is set to ADI_ADRV9025_CFR_MODE1 via
* adi_adrv9025_CfrCtrlConfigSet()/adi_adrv9025_CfrCtrlConfigSet_v2() API.
*
* \pre It is also necessary that at the time of calling this function, the CFR engine is required to be enabled failing which
* the active correction pulse switching will not occur.
@@ -939,7 +1230,7 @@ int32_t adi_adrv9025_CfrStatisticsReset(adi_adrv9025_Device_t* device,
* CLGC Ctrl Functions
****************************************************************************
*/
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Configures the closed loop gain control(CLGC) DFE settings prior to enabling the CLGC tracking cal
*
@@ -971,7 +1262,7 @@ int32_t adi_adrv9025_CfrStatisticsReset(adi_adrv9025_Device_t* device,
*
* \note Please note that loop gain control is not enabled by default on enabling the CLGC tracking calibration. Enabling the CLGC
* tracking calibration only enables passive measurement of Tx-ORx RMS power. The user is required to explicitly
* enable loop gain control by calling this API with adi_adrv9025_ClgcConfig_t.clgcEnableGainControl set to 1.
* enable loop gain control by calling this API with clgcConfig->clgcEnableGainControl set to 1.
*
* \dep_begin
* \dep{device->halDevInfo}
@@ -1052,13 +1343,126 @@ int32_t adi_adrv9025_ClgcConfigGet(adi_adrv9025_Device_t* device,
int32_t adi_adrv9025_ClgcStatusGet(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_ClgcStatus_t* clgcStatus);
#endif
/**
* \brief Configures the closed loop gain control(CLGC) DFE settings prior to enabling the CLGC tracking cal, without floats.
*
* The CLGC is a tracking calibration that can be used to compensate for PA power fluctuations within a small range by controlling
* the Tx attenuation such that the overall Tx-ORx loop gain ratio is maintained.
*
* This function is intended to be called after enabling the CLGC tracking cal. On enabling the CLGC tracking cal or the DPD tracking cal
* the CLGC comes up with the following settings
* -> Expected loop gain = 0dB
* -> Tx signal qualifying threshold = -70dBFS
* -> Orx signal qualifying threshold = -70dBFS
* -> Minimum ORx signal to noise ratio = 28.6dB
* -> Damping factor = 0.8
*
* The CLGC tracking cal can be enabled via adi_adrv9025_TrackingCalsEnableSet() API. Please refer to adi_adrv9025_TrackingCalibrations_e
* enum for CLGC tracking calibration masks. This function can be used to setup CLGC measurement and control loop configurations
* prior to enabling the CLGC tracking. Following conditions need to be fulfilled before enabling the CLGC tracking cal :-
*
* 1) External Tx to ORx mapping information must be conveyed to the ADRV9025 device via adi_adrv9025_TxToOrxMappingSet() API in command mode
* OR through Tx-ORx mapping GPIOs in pin control mode.
* 2) Run the Tx to ORx external path delay init cal via adi_adrv9025_InitCalsRun() API with a mask value of 0x00200000 OR run a custom external
* path delay estimation and configure the Tx-ORx external path delay values via adi_adrv9025_ExternalPathDelaySet() API.
*
* Since the CLGC is expected to be used in conjunction with DPD, it is expected that the Tx and ORx channels are running off the same LO frequencies.
*
* The CLGC tracking calibration can also be used to passively measure the Tx and ORx power levels alongwith the loop gain which can be retrieved via
* adi_adrv9025_ClgcStatusGet_v2() API. To disable active loop gain control and enable power measurements only, the param adi_adrv9025_ClgcConfig_v2_t.clgcEnableGainControl
* has to be set to 0.
*
* \note Please note that loop gain control is not enabled by default on enabling the CLGC tracking calibration. Enabling the CLGC
* tracking calibration only enables passive measurement of Tx-ORx RMS power. The user is required to explicitly
* enable loop gain control by calling this API with clgcConfig->clgcEnableGainControl set to 1.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization and the following conditions are fulfilled
* 1) Tx-ORx mapping information is conveyed to the ADRV9025 device firmware via adi_adrv9025_TxToOrxMappingSet() API or through GPIOs and the target ORx
* channel for the Tx is disabled. Enabling the ORx channel pauses the CLGC tracking calibration.
* 2) The external Tx-ORx path delay estimation is complete either by executing the external path delay init cal (mask value ADI_ADRV9025_EXTERNAL_PATH_DELAY)
* OR estimating the Tx-ORx path delay through a custom algorithm and programming the path delay via int32_t adi_adrv9025_ExternalPathDelaySet() API
* 3) For a standalone CLGC tracking The DPD init cal (mask value ADI_ADRV9025_DPD) has to be executed. The CLGC tracking calibration is implicitly
* enabled if the DPD tracking cal is enabled (mask value ADI_ADRV9025_TRACK_TXn_DPD).
* 4) The CLGC tracking cal (mask value ADI_ADRV9025_TRACK_TXn_CLGC) or the DPD tracking cal(mask value ADI_ADRV9025_TRACK_TXn_DPD) has been enabled
*
* \param device Pointer to the device settings structure
* \param clgcConfig An array of CLGC control configurations to be applied to the requested Tx channels
* \param clgcConfigArraySize No. of configurations contained in clgcConfig array
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_ClgcConfigSet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_ClgcConfig_v2_t clgcConfig[],
uint8_t clgcConfigArraySize);
/**
* \brief Retrieves the active CLGC configuration in the device, without floats.
*
* This function can be used to read back the active CLGC control configuration in the device
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization
*
* \param device Pointer to the device settings structure
* \param txChannel Target Tx channel whose CLGC configuration is requested
* \param clgcConfig Pointer to the memory which will be updated with the current CLGC configuration
* for the requested Tx channel
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_ClgcConfigGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_ClgcConfig_v2_t* clgcConfig);
/**
* \brief Retrieves the Tx-ORx loop power measurements and the tracking cal status, without floats.
*
* This function can be used to read back tracking cal status and the Tx-ORx loop measurements including loop gain, rms power, tx atten index and orx gain index.
* The status of the CLGC tracking cal itself including error and completion status can be retrieved via adi_adrv9025_TrackingCalTxClgcStatusGet() API.
*
* \dep_begin
* \dep{device->halDevInfo}
* \dep_end
*
* \pre This function may be called any time after device initialization
*
* \param device Pointer to the device settings structure
* \param txChannel Target Tx channel whose CLGC status is requested
* \param clgcStatus Pointer to the memory which will be updated with the runtime CLGC status
* for the requested Tx channel
*
* \retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
* \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
* \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
* \retval ADI_ADI_COMMON_ACT_ERR_RESET_ARM Recovery action for ARM reset required
* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
*/
int32_t adi_adrv9025_ClgcStatusGet_v2(adi_adrv9025_Device_t* device,
adi_adrv9025_TxChannels_e txChannel,
adi_adrv9025_ClgcStatus_v2_t* clgcStatus);
/**
* \brief Config customer waveform data for enhanced DPD wideband regularization feature
*
* This function can be used to config waveform data I/Q into FW before enhanced DPD wideband regularization feature enable.
* This function should be called before adi_adrv9025_EnhancedDpdTrackingConfigSet() API. And then, could call adi_adrv9025_EnhancedDpdTrackingConfigSet()
* to enable wideband regularization feature.
* This function should be called before enabling wideband regularization feature.in enhanced DPD tracking config.
*
* \dep_begin
* \dep{device->halDevInfo}

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_dfe_types.h
* \brief Contains ADRV9025 API DFE data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,7 +15,6 @@
#ifndef _ADI_ADRV9025_DFE_TYPES_H_
#define _ADI_ADRV9025_DFE_TYPES_H_
#include <linux/kernel.h>
#include "adi_adrv9025_cals_types.h"
#include "adi_adrv9025_user.h"
@@ -301,11 +300,12 @@ typedef enum adi_adrv9025_ClgcCaptureStatus
*/
typedef enum adi_adrv9025_dpdSamplesPerCapture
{
ADI_ADRV9025_SAMPLES_PER_CAP_1024 = 1024, /*!< Captures 1024 samples per batch for eDPD adaptation and total number of smaples specified by adi_adrv9025_EnhancedDpdTrackingConfig_t.dpdSamples*/
ADI_ADRV9025_SAMPLES_PER_CAP_2048 = 2048, /*!< Captures 2048 samples per batch for eDPD adaptation and total number of smaples specified by adi_adrv9025_EnhancedDpdTrackingConfig_t.dpdSamples*/
ADI_ADRV9025_SAMPLES_PER_CAP_4096 = 4096 /*!< Captures 4096 samples per batch for eDPD adaptation and total number of smaples specified by adi_adrv9025_EnhancedDpdTrackingConfig_t.dpdSamples*/
ADI_ADRV9025_SAMPLES_PER_CAP_1024 = 1024, /*!< Captures 1024 samples per batch for eDPD adaptation and total number of samples specified by dpdSamples in enhanced DPD tracking config*/
ADI_ADRV9025_SAMPLES_PER_CAP_2048 = 2048, /*!< Captures 2048 samples per batch for eDPD adaptation and total number of samples specified by dpdSamples in enhanced DPD tracking config*/
ADI_ADRV9025_SAMPLES_PER_CAP_4096 = 4096 /*!< Captures 4096 samples per batch for eDPD adaptation and total number of samples specified by dpdSamples in enhanced DPD tracking config*/
} adi_adrv9025_dpdSamplesPerCapture_e;
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Data structure to hold Tx DPD Feature Row
* This structure holds the configuration details for every feature in the DPD model,
@@ -333,6 +333,35 @@ typedef struct adi_adrv9025_DpdModelConfig
uint8_t dpdNumFeatures; /*!< No. of features contained in the DPD model. Currently 190 features are supported */
adi_adrv9025_DpdFeature_t dpdFeatures[ADI_ADRV9025_MAX_DPD_FEATURES]; /*!< Array consisting of the set of basis features to be initialized for DPD adaptation */
} adi_adrv9025_DpdModelConfig_t;
#endif
/**
* \brief Data structure to hold Tx DPD Feature Row
* This structure holds the configuration details for every feature in the DPD model,
* where {i, j, k} represent the various delay and power terms associated with an "alpha" coefficient
* in the generalized memory polynomial(GMP).
* The structure also holds the LUT associated with a given feature, as well as the real and
* imaginary parts of any preloaded coefficients, represented using integers
*/
typedef struct adi_adrv9025_DpdFeature_v2
{
uint8_t i; /*!< Memory term of the DPD feature */
uint8_t j; /*!< Cross term of the DPD feature */
uint8_t k; /*!< Power term of the DPD feature */
adi_adrv9025_DpdLut_e lut; /*!< Target LUT index for this feature. Valid values are LUT0 - LUT30 */
int32_t coeffReal_xM; /*!< Real part of the complex co-efficient for this feature. Units = 0.000001 */
int32_t coeffImaginary_xM; /*!< Imaginary part of the complex co-efficient for this feature. Units = 0.000001 */
} adi_adrv9025_DpdFeature_v2_t;
/**
* \brief Data structure to hold Tx DPD Model initialization parameters, without floats
*/
typedef struct adi_adrv9025_DpdModelConfig_v2
{
uint32_t txChannelMask; /*!< Reserved Param. Currently Tx channel mask is not supported. Settings are applied to the channel for which DPD init cal was run */
uint8_t dpdNumFeatures; /*!< No. of features contained in the DPD model. Currently 190 features are supported */
adi_adrv9025_DpdFeature_v2_t dpdFeatures[ADI_ADRV9025_MAX_DPD_FEATURES]; /*!< Array consisting of the set of basis features to be initialized for DPD adaptation */
} adi_adrv9025_DpdModelConfig_v2_t;
/**
* \brief Data structure to hold Dpd metrics mask and recovery actions mask associated with it
@@ -361,6 +390,7 @@ typedef struct adi_adrv9025_DpdMetricActionPair
* ADI_ADRV9025_DPD_RECOVERY_ACTION_RESET_FIRST_DPD_FLAG = 0x0400 */
} adi_adrv9025_DpdMetricActionPair_t;
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Data structure to hold DPD Statistics
*/
@@ -399,6 +429,46 @@ typedef struct adi_adrv9025_DpdStatus
uint32_t reservedTP; /*!< Reserved for future use */
uint32_t reservedPR; /*!< Reserved for future use */
} adi_adrv9025_DpdStatus_t;
#endif
/**
* \brief Data structure to hold DPD Statistics, without floats
*/
typedef struct adi_adrv9025_DpdStatistics_v2
{
int32_t dpdMeanTuPower_mdB; /*!< Measured absolute pre-DPD Tx power averaged in one update duration, in milli dBFS */
int32_t dpdPeakTuPower_mdB; /*!< Measured absolute pre-DPD Tx power peaked in one update duration, in milli dBFS */
int32_t dpdMeanTxPower_mdB; /*!< Measured absolute post-DPD Tx power averaged in one update duration, in milli dBFS */
int32_t dpdPeakTxPower_mdB; /*!< Measured absolute post-DPD Tx power peaked in one update duration, in milli dBFS */
int32_t dpdMeanOrxPower_mdB; /*!< Measured absolute ORx power averaged in one update duration, in milli dBFS */
int32_t dpdPeakOrxPower_mdB; /*!< Measured absolute ORx power peaked in one update duration, in milli dBFS */
uint32_t dpdDirectEvm_xM; /*!< EVM error between pre-DPD actuator data and the ORx data in one update duration. Divide by 10,000 to get value in % */
uint32_t dpdIndirectEvm_xM; /*!< EVM error between post-DPD actuator data and the ORx data in one update duration. Divide by 10,000 to get value in % */
uint32_t dpdSelectError_xM; /*!< Select error is same as indirect error, but computed on samples with rms power greater than -30dBFS. Divide by 10,000 to get value in % */
uint32_t dpdIndirectError_xM; /*!< Indirect error indicates if the pre-distorted samples match the expected result after experiencing PA distortion. Divide by 10,000 to get value in % */
} adi_adrv9025_DpdStatistics_v2_t;
/**
* \brief Data structure to hold Tx DPD Status, without floats
*/
typedef struct adi_adrv9025_DpdStatus_v2
{
adi_adrv9025_DpdError_e dpdErrorCode; /*!< Error code from Tx DPD tracking calibration. If the DPD is functioning correctly, this parameter should return ADI_ADRV9025_DPD_NO_ERROR.*/
uint32_t dpdPercentComplete; /*!< Percentage completion of DPD adaptation. Range 0 to 100 */
uint32_t dpdIterCount; /*!< Running counter that increments each time the DPD adaptation is scheduled to run */
uint32_t dpdUpdateCount; /*!< Running counter that increments each time the cal updates the correction/actuator hardware successfully*/
adi_adrv9025_TrackingCalSyncStatus_e dpdSyncStatus; /*!< Enum to denote the status of CLGC and DPD synchronization. This member returns SYNC_OK if both DPD and CLGC are synchronized. If CLGC is not enabled, then this field can be ignored. */
adi_adrv9025_DpdModelTableSel_e dpdModelTable; /*!< DPD Model table currently active DPD model(M-Table/C-Table/U-Table) */
adi_adrv9025_DpdStatistics_v2_t dpdStatistics; /*!< DPD Statistics */
adi_adrv9025_DpdMetricActionPair_t dpdErrorStatus0; /*!< Error status containing error state and recovery actions taken based on threshold 0, specified in DPD stability config */
adi_adrv9025_DpdMetricActionPair_t dpdErrorStatus1; /*!< Error status containing error state and recovery actions taken based on threshold 1, specified in DPD stability config */
adi_adrv9025_DpdMetricActionPair_t dpdPersistentErrorStatus0; /*!< Persistent error status containing error state and recovery actions taken based on threshold 0 and persistent count specified in DPD stability config */
adi_adrv9025_DpdMetricActionPair_t dpdPersistentErrorStatus1; /*!< Persistent error status containing error state and recovery actions taken based on threshold 1 and persistent count specified in DPD stability config */
uint32_t dpdPerformanceMetric; /*!< Reserved for future use */
uint32_t reservedPM; /*!< Reserved for future use */
uint32_t reservedTP; /*!< Reserved for future use */
uint32_t reservedPR; /*!< Reserved for future use */
} adi_adrv9025_DpdStatus_v2_t;
/**
* \brief Data structure to hold Tx DPD Filter Coefficient Weight
@@ -426,10 +496,11 @@ typedef struct adi_adrv9025_DpdTrackingConfig
uint8_t dpdMu; /*!< DPD direct learning step size values range from 0 to 100 a value of 0 will stop the tracking of DPD in direct learning mode.Default value is 50 */
uint16_t minAvgSignalLevelOrx; /*!< DPD ORx low power threshold ORX in linear scale below which DPD stops tracking. The default value is -36dBFS. It can be converted to dBFS as 20log10(minAvgSignalLevel/FULL_SCALE) */
uint16_t dpdFilterSel; /*!< OBW filter select either 0.5*fs or 0.8*fs (valid values 0-1 respectively). This filter is only applicable in 983 MHz actuator rate profiles + direct learning cases. */
uint8_t enableDirectLearning; /*!< Option to enable direct learning (defaulte 0 which is off , set to 1 to enable direct learning If the no. of DPD coefficients in a DPD model specified by adi_adrv9025_DpdModelConfig_t.dpdNumFeatures exceeds 95 coefficients, DPD direct learning is automatically enforced regardless of the value configured for this parameter.*/
uint8_t enableDirectLearning; /*!< Option to enable direct learning (default 0 which is off , set to 1 to enable direct learning If the no. of DPD coefficients in a DPD model specified by dpdNumFeatures exceeds 95 coefficients, DPD direct learning is automatically enforced regardless of the value configured for this parameter.*/
uint16_t dpdIndirectRegularizationLowPowerValue; /*!< Indirect Learning Mode low power regularization value applied to C table, only valid when in DPD mode 2, Maximum value of 63 Default value is 20*/
} adi_adrv9025_DpdTrackingConfig_t;
#if (ADI_ADRV9025_RM_FLOATS == 0)
typedef struct adi_adrv9025_EnhancedDpdTrackingConfig
{
uint32_t txChannelMask; /*!< Tx channels to which DPD tracking config is applied. There is only 1 DPD tracking config shared across channels */
@@ -444,7 +515,7 @@ typedef struct adi_adrv9025_EnhancedDpdTrackingConfig
uint8_t dpdMu; /*!< DPD direct learning step size values range from 0 to 100 */
uint16_t minAvgSignalLevelOrx; /*!< DPD ORx low power threshold ORX in linear scale below which DPD stops tracking. The default value is -36dBFS. It can be converted to dBFS as 20log10(minAvgSignalLevel/FULL_SCALE) */
uint16_t dpdFilterSel; /*!< OBW filter select either 0.5*fs or 0.8*fs (valid values 0-1 respectively)*/
uint8_t enableDirectLearning; /*!< Option to enable direct learning (defaulte 0 which is off , set to 1 to enable direct learning If the no. of DPD coefficients in a DPD model specified by adi_adrv9025_DpdModelConfig_t.dpdNumFeatures exceeds 95 coefficients, DPD direct learning is automatically enforced regardless of the value configured for this parameter.*/
uint8_t enableDirectLearning; /*!< Option to enable direct learning (default 0 which is off , set to 1 to enable direct learning If the no. of DPD coefficients in a DPD model specified by dpdNumFeatures exceeds 95 coefficients, DPD direct learning is automatically enforced regardless of the value configured for this parameter.*/
uint16_t dpdIndirectRegularizationLowPowerValue; /*!< Indirect Learning Mode low power regularization value applied to C table, only valid when in DPD mode 2, Maximum value of 63 Default value is 20*/
uint16_t enhancedDpdPeakSearchSize; /*!< 0-65535 eDPD EVM search window size */
uint16_t enhancedDPDCaptures; /*!< 0-16 eDPD EVM captures (0: DPD, >= 1: eDPD) */
@@ -459,6 +530,38 @@ typedef struct adi_adrv9025_EnhancedDpdTrackingConfig
float widebandRegularizationFactorAlpha; /*!< Wideband regularization weighting factor alpha that defines how much wideband reg training signals to mix with the DPD capture samples, The wideband regularization training signal is programmed through the API adi_adrv9025_EnhancedDpdWidebandRegularizationConfigSet() , range from 0 to 1 default value is 0.0001, step: 0.00001 */
uint8_t widebandRegularizationDnSampleRate; /*!< Wideband regularization down sampling ratio for loop gain estimating */
} adi_adrv9025_EnhancedDpdTrackingConfig_t;
#endif
typedef struct adi_adrv9025_EnhancedDpdTrackingConfig_v2
{
uint32_t txChannelMask; /*!< Tx channels to which DPD tracking config is applied. There is only 1 DPD tracking config shared across channels */
uint8_t dpdIndirectRegularizationValue; /*!< Regularization value when DPD indirect learning mode is enabled. Increasing DPD regularization makes the DPD coefficient estimation less sensitive to missing data and prevent over-fitting at the cost of ACLR performance Maximum value of 63. Default value is 20 */
uint8_t dpdDirectRegularizationValue; /*!< Regularization value when DPD indirect learning mode is enabled. Increasing DPD regularization makes the DPD coefficient estimation less sensitive to missing data and prevent over-fitting at the cost of ACLR performance Maximum value of 63. Default value is 35 */
uint16_t dpdSamples; /*!< Number of samples to capture per adaptation */
uint32_t dpdMThreshold; /*!< M table threshold when ADI_ADRV9025_DPD_TRACKING_UPDATE_MODE_2 (hybrid) is used. Maximum value of 2147483648, This parameter takes a linear scale value squared. To convert the MThreshold value from dBFS to Linear scale use ((10^MThreshold_dBFS/20)*FULL_SCALE_CODE)^2 */
uint32_t dpdPeakSearchWindowSize; /*!< Number of samples at Tx IQ rate to search for a peak to perform DPD sample capture. Maximum value of 16777215 */
adi_adrv9025_DpdTrackingUpdateMode_e dpdUpdateMode; /*!< Update mode of DPD tracking. 0: simple, 1: simple + max, 2: hybrid */
adi_adrv9025_DpdFilterCoeffWeight_t dpdFilterCoeffWeight[ADI_ADRV9025_MAX_DPD_FILTER]; /*!< Reserved for future use Please use the default value returned by the API adi_adrv9025_DpdTrackingConfigGet().*/
uint16_t minAvgSignalLevel; /*!< DPD Tx low power threshold in linear scale below which DPD stops tracking. The default value is -36dBFS. It can be converted to dBFS as 20log10(minAvgSignalLevel/FULL_SCALE) */
uint8_t dpdMu; /*!< DPD direct learning step size values range from 0 to 100 */
uint16_t minAvgSignalLevelOrx; /*!< DPD ORx low power threshold ORX in linear scale below which DPD stops tracking. The default value is -36dBFS. It can be converted to dBFS as 20log10(minAvgSignalLevel/FULL_SCALE) */
uint16_t dpdFilterSel; /*!< OBW filter select either 0.5*fs or 0.8*fs (valid values 0-1 respectively)*/
uint8_t enableDirectLearning; /*!< Option to enable direct learning (default 0 which is off , set to 1 to enable direct learning If the no. of DPD coefficients in a DPD model specified by dpdNumFeatures exceeds 95 coefficients, DPD direct learning is automatically enforced regardless of the value configured for this parameter.*/
uint16_t dpdIndirectRegularizationLowPowerValue; /*!< Indirect Learning Mode low power regularization value applied to C table, only valid when in DPD mode 2, Maximum value of 63 Default value is 20*/
uint16_t enhancedDpdPeakSearchSize; /*!< 0-65535 eDPD EVM search window size */
uint16_t enhancedDPDCaptures; /*!< 0-16 eDPD EVM captures (0: DPD, >= 1: eDPD) */
uint16_t enhancedDPDMinRandCapDelay; /*!< 0-65535 eDPD minimum randomizer capture delay */
adi_adrv9025_dpdSamplesPerCapture_e samplesPerCap; /*!< eDPD number of samples per capture */
uint16_t enhancedDPDMaxRandCapDelay; /*!< 0-65535 eDPD maximum randomizer capture delay */
uint16_t tddLutSwitchModelADelay[ADI_ADRV9025_MAX_TDD_LUT_MODELA_DELAY]; /*!< TDD LUT switch Model A delay array, value unit: us */
uint16_t tddLutSwitchModelBDelay; /*!< TDD LUT switch Model B delay value, unit: us */
uint8_t enableTddLutSwitch; /*!< TDD LUT switch feature enable, (1: enable, 0: disable) */
uint8_t enableWidebandRegularization; /*!< Wideband regularization feature enable (1: enable, 0: disable) for maintaining channel gain flatness under dynamic signaling conditions*/
uint32_t widebandRegularizationFactor_xM; /*!< Wideband regularization weighting factor beta that defines how much wideband reg training signals to mix with the DPD capture samples, The wideband regularization training signal is programmed through the API adi_adrv9025_EnhancedDpdWidebandRegularizationConfigSet(). Divide by 1,000,000. Range from 0 to 1 default value is 0.0001, step: 0.00001 */
uint32_t widebandRegularizationFactorAlpha_xM; /*!< Wideband regularization weighting factor alpha that defines how much wideband reg training signals to mix with the DPD capture samples, The wideband regularization training signal is programmed through the API adi_adrv9025_EnhancedDpdWidebandRegularizationConfigSet(). Divide by 1,000,000. Range from 0 to 1 default value is 0.0001, step: 0.00001 */
uint8_t widebandRegularizationDnSampleRate; /*!< Wideband regularization down sampling ratio for loop gain estimating */
} adi_adrv9025_EnhancedDpdTrackingConfig_v2_t;
/**
* \brief Data structure to hold DPD fault condition settings
*/
@@ -468,7 +571,7 @@ typedef struct adi_adrv9025_DpdFaultCondition
adi_adrv9025_DpdComparator_e comparator;/*!< less than or greater than. Operation to be done between metric's value and threshold's value to cause fault condition. 0 = less than, 1 = greater than */
int16_t threshold0; /*!< One of two thresholds for fault condition to occur. Threshold 0 is intended to be a warning when metric's value crosses this threshold. For power, threshold will be in dBFS, for EVM, select and indirect error, threshold will be in % */
int16_t threshold1; /*!< One of two thresholds for fault condition to occur. Threshold 1 is intended to be an error when metric's value crosses this threshold. For power, threshold will be in dBFS, for EVM, select and indirect error, threshold will be in % */
uint16_t persistentCount; /*!< When threshold0/1 has been crossed this many times, dpdPersistentErrorStatus0/1 that can be found in adi_adrv9025_DpdStatus_t for that particular metric and threshold will be raised */
uint16_t persistentCount; /*!< When threshold0/1 has been crossed this many times, dpdPersistentErrorStatus0/1 that can be found in the DPD status structure for that particular metric and threshold will be raised */
} adi_adrv9025_DpdFaultCondition_t;
/**
@@ -521,6 +624,7 @@ typedef struct adi_adrv9025_DpdActGainMonitorConfig
adi_adrv9025_DpdActGainMonitorThresh_t dpdGainMonitorThresh; /*!< Sets up the gain monitoring threshold qualifying limit, upper gain threshold and the lower gain threshold */
} adi_adrv9025_DpdActGainMonitorConfig_t;
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Data structure to hold CFR Hard Clipper config
*/
@@ -552,6 +656,39 @@ typedef struct adi_adrv9025_CfrCtrlConfig
uint8_t cfrEngine2MaxNumOfPeaks; /*!< Sets the maximum number of peaks to remove in one group for CFR engine 2. Range [0-5]. Default value is 5. User needs to set this to 0 when engine is disabled. It's suggested to have descending order of max number of peaks where Engine1 has the highest value */
uint8_t cfrEngine3MaxNumOfPeaks; /*!< Sets the maximum number of peaks to remove in one group for CFR engine 3. Range [0-5]. Default value is 5. User needs to set this to 0 when engine is disabled. It's suggested to have descending order of max number of peaks where Engine1 has the highest value */
} adi_adrv9025_CfrCtrlConfig_t;
#endif
/**
* \brief Data structure to hold CFR Hard Clipper config, without floats
*/
typedef struct adi_adrv9025_CfrHardClipperConfig_v2
{
uint32_t txChannelMask; /*!< Mask consisting of 'OR'ed Tx channels for which the hard clipper config will be applied */
uint8_t cfrHardClipperEnable; /*!< 1- Enable hard clipper on the channels requested, 0 - Disable hard clipper */
uint32_t cfrHardClipperThreshold_xM; /*!< Normalized threshold for the hard clipper in the range 0 to 1 (divide by 1,000,000).
The threshold is relative to 0dBFS which means that a threshold value of 1 corresponds to 0dBFS.
The threshold is applied to an approximation of SQRT(I^2 + Q^2). The hard clipper threshold can
be calculated as cfrHardClipperThreshold = 10^(threshold_dBFS/20)*/
} adi_adrv9025_CfrHardClipperConfig_v2_t;
/**
* \brief Data structure to hold CFR Core control config settings, without floats
*/
typedef struct adi_adrv9025_CfrCtrlConfig_v2
{
uint32_t txChannelMask; /*!< Mask consisting of 'OR'ed Tx channels for which the CFR core config will be applied */
adi_adrv9025_CfrModeSel_e cfrMode; /*!< Selects the mode in which CFR is required to operate in. Currently, Mode 1 is the only mode supported */
uint16_t cfrTxDelay; /*!< Sets CFR delay per engine in units of samples at the CFR input rate (JESD 204b Tx rate) */
uint32_t cfrPeakThreshold_xM; /*!< Sets the target CFR peak detection and correction threshold. The threshold is calculated as cfrPeakThreshold = 10^(Target PAR_dB / 20) * RMS_Input. The peak threshold is set to 0.79 by default. Divide by 1,000,000 */
uint32_t cfrEngine1PeakThresholdScaler_xM; /*!< Threshold Scaler for engine CFR engine 1. Divide by 1,000,000 */
uint32_t cfrEngine2PeakThresholdScaler_xM; /*!< Threshold Scaler for engine CFR engine 2. Divide by 1,000,000 */
uint32_t cfrEngine3PeakThresholdScaler_xM; /*!< Threshold Scaler for engine CFR engine 3. Divide by 1,000,000 */
uint32_t cfrCorrectionThresholdScaler_xM; /*!< Threshold Scaler for CFR correction. Divide by 1,000,000 */
adi_adrv9025_CfrInterpolationSel_e cfrInterpolationFactor; /*!< Selects the interpolation factor to be applied to CFR input before peak detection. The CFR peak detectors can run at a higher (interpolated) rate to enable better peak detection */
uint8_t cfrEngine1MaxNumOfPeaks; /*!< Sets the maximum number of peaks to remove in one group for CFR engine 1. Range [0-5]. Default value is 5. User needs to set this to 0 when engine is disabled. It's suggested to have descending order of max number of peaks where Engine1 has the highest value */
uint8_t cfrEngine2MaxNumOfPeaks; /*!< Sets the maximum number of peaks to remove in one group for CFR engine 2. Range [0-5]. Default value is 5. User needs to set this to 0 when engine is disabled. It's suggested to have descending order of max number of peaks where Engine1 has the highest value */
uint8_t cfrEngine3MaxNumOfPeaks; /*!< Sets the maximum number of peaks to remove in one group for CFR engine 3. Range [0-5]. Default value is 5. User needs to set this to 0 when engine is disabled. It's suggested to have descending order of max number of peaks where Engine1 has the highest value */
} adi_adrv9025_CfrCtrlConfig_v2_t;
/**
* \brief Data structure to hold CFR engine enable/disable config for the 3 CFR engines
@@ -600,6 +737,7 @@ typedef struct adi_adrv9025_CfrCorrectionPulse
uint16_t numCoeffs; /*!< No. of coefficients contained in coeffReal and coeffImaginary arrays */
} adi_adrv9025_CfrCorrectionPulse_t;
#if (ADI_ADRV9025_RM_FLOATS == 0)
/**
* \brief Data structure to hold Closed Loop Gain Control(CLGC) configuration
*/
@@ -641,6 +779,46 @@ typedef struct adi_adrv9025_ClgcStatus
adi_adrv9025_TrackingCalSyncStatus_e clgcSyncStatus; /*!< Enum to denote the status of CLGC and DPD synchronization */
adi_adrv9025_ClgcRunState_e clgcState; /*!< Enum to denote the current CLGC runtime state */
} adi_adrv9025_ClgcStatus_t;
#endif
/**
* \brief Data structure to hold Closed Loop Gain Control(CLGC) configuration, without floats
*/
typedef struct adi_adrv9025_ClgcConfig_v2
{
uint32_t txChannelMask; /*!< Mask consisting of 'OR'ed Tx channels for which the CLGC config will be applied */
uint8_t clgcEnableGainControl; /*!< This parameter enables the tracking and adjustment of loop gain in CLGC.
If this is set to 0, the CLGC tracking cal only measures the power levels and does not
execute loop gain control */
uint16_t clgcMeasurementBatchTime_us; /*!< CLGC sampling period in microseconds */
uint32_t clgcMaxSampleBatchesPerClgcRun; /*!< Unused */
int32_t clgcExpectedLoopGain_mdB; /*!< Expected loop gain setting (ORx Power/Tx Power) for Closed Loop Gain Control */
int32_t clgcExpectedLoopGainRipple_mdB; /*!< Unused */
int32_t clgcTxQualifyingThreshold_mdB; /*!< Minimum threshold for the Tx signal required to run CLGC tracking */
int32_t clgcOrxQualifyingThreshold_mdB; /*!< Minimum threshold for the Orx signal required to run CLGC tracking */
int32_t clgcOrxMinimumSnr_mdB; /*!< Unused */
int32_t clgcMaxGainAdjustmentStepSize_mdB;/*!< Maximum loop gain adjustment step size(Range 0 to 6dB) for Tx Attenuation in dB */
int32_t clgcDampingParam_xM; /*!< Unused */
int32_t clgcMinTxAttenAdjust_mdB; /*!< Minimum Tx attenuation in dB allowed to adjust to */
int32_t clgcMaxTxAttenAdjust_mdB; /*!< Maximum Tx attenuation in dB allowed to adjust to */
} adi_adrv9025_ClgcConfig_v2_t;
/**
* \brief Data structure to hold Closed Loop Gain Control(CLGC) Tx and ORx power measurements and tracking cal status, without floats
*/
typedef struct adi_adrv9025_ClgcStatus_v2
{
int32_t clgcLoopGain_mdB; /*!< Represents the Tx - ORx loop gain equal to (ORx RMS Power)/(Tx RMS Power), in milli dBFS */
int32_t clgcTxRmsPower_mdB; /*!< Measured absolute Tx RMS power by the CLGC module during the previous measurement cycle, in milli dBFS */
int32_t clgcOrxRmsPower_mdB; /*!< Measured absolute Orx RMS power by the CLGC module during the previous measurement cycle, in milli dBFS */
uint16_t activeTxAttenIndex; /*!< Active Tx attenuation table index applied to the Tx path.
If using the default attenuation table, the attenuation applied to the Tx channel is equal to (activeTxAttenIndex x 0.05) dB */
uint8_t activeOrxGainIndex; /*!< Active gain index of the ORx channel mapped to the Tx channel for which measurements are requested */
adi_adrv9025_ClgcTrackingCalStatus_t clgcTrackingCalStatus; /*!< Contains the CLGC tracking cal status */
adi_adrv9025_ClgcCaptureStatus_e clgcCaptureStatus; /*!< Enum to denote the CLGC Tx-ORx data capture status for loop gain control/power measurement */
adi_adrv9025_TrackingCalSyncStatus_e clgcSyncStatus; /*!< Enum to denote the status of CLGC and DPD synchronization */
adi_adrv9025_ClgcRunState_e clgcState; /*!< Enum to denote the current CLGC runtime state */
} adi_adrv9025_ClgcStatus_v2_t;
#ifdef __cplusplus
}

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_dynamic_slicer.h
* \brief Contains ADRV9025 function prototypes for adi_adrv9025_dynamic_slicer.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_dynamic_slicer_types.h
* \brief Contains ADRV9025 dynamic slicer data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,7 +15,6 @@
#ifndef _ADI_ADRV9025_DYNAMIC_SLICER_TYPES_H_
#define _ADI_ADRV9025_DYNAMIC_SLICER_TYPES_H_
#include <stdint.h>
#include "adi_adrv9025_types.h"
#include "adi_adrv9025_rx_types.h"

View File

@@ -5,7 +5,7 @@
*
* Extension of adi_common_error
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_gpio.h
* \brief ADRV9025 GPIO header file
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_gpio_types.h
* \brief Contains functions to allow control of the General Purpose IO functions on the ADRV9025 device
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains prototypes and macro definitions for Private ADI HAL wrapper
* functions implemented in adi_adrv9025_hal.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -20,9 +20,6 @@
#include "adi_platform.h"
#include "adi_adrv9025.h"
#include <linux/kernel.h>
#include <linux/stddef.h>
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -4,7 +4,7 @@
* \brief Contains prototypes and macro definitions for ADI HAL wrapper
* functions implemented in adi_adrv9025_hal.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -16,9 +16,6 @@
#ifndef ADRV9025_HAL_TYPES_H_
#define ADRV9025_HAL_TYPES_H_
#include <linux/kernel.h>
#include <linux/stddef.h>
#include "adi_adrv9025.h"
#include "adi_common_hal.h"

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_radioctrl.h
* \brief Contains ADRV9025 related function prototypes for adi_adrv9025_radioctrl.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_radioctrl_types.h
* \brief Contains ADRV9025 API Radio Control data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 receive related function prototypes for
* adi_adrv9025_rx.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -1226,10 +1226,6 @@ int32_t adi_adrv9025_RxAgcClkModeSet(adi_adrv9025_Device_t *device,
int32_t adi_adrv9025_RxAgcClkModeGet(adi_adrv9025_Device_t *device,
adi_adrv9025_RxChannels_e rxChannel,
uint8_t *agcMode);
/**
* \brief This function maps Rx channels to a GPIO to enable
* the gain counter sync pulse feature, as such the Gain Update Counter

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_rx_types.h
* \brief Contains ADRV9025 API Rx datapath data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 transmit related function prototypes for
* adi_adrv9025_tx.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_tx_types.h
* \brief Contains ADRV9025 API Tx datapath data types
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -296,9 +296,9 @@ typedef struct adi_adrv9025_TxPaProtectCfg
uint8_t avgDuration; /*!< PA Protection Average Power Measurement Duration. */
uint8_t peakDuration; /*!< PA Protection Peak Power Measurement Duration */
uint8_t txAttenStep;
/*!< PA Protection Attenuation gain step. Gain step down is not allowed for Tokelau device. This field is not being used actively. */
/*!< PA Protection Attenuation gain step. Gain step down is not allowed for ADRV9010 device. This field is not being used actively. */
uint8_t gainStepDownEn;
/*!< PA Protection Gain Step Down Enable. Gain step down is not allowed for Tokelau device. This field is not being used actively.*/
/*!< PA Protection Gain Step Down Enable. Gain step down is not allowed for ADRV9010 device. This field is not being used actively.*/
uint16_t powerThreshold; /*!< PA Protection Average Power Threshold. */
uint8_t peakCount; /*!< Peak Count Causing PA Error. */
uint16_t peakThreshold; /*!< PA Protection Peak Power Threshold. Max value for Silicon A: 255 Max Value for Silicon B: 8191 */

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_types.h
* \brief Contains ADRV9025 API configuration and run-time type definitions
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,7 +15,7 @@
#ifndef _ADI_ADRV9025_TYPES_H_
#define _ADI_ADRV9025_TYPES_H_
#include <linux/kernel.h>
#include "adi_platform_types.h"
#include "adi_adrv9025_tx_types.h"
#include "adi_adrv9025_rx_types.h"
#include "adi_adrv9025_cpu_types.h"

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_user.h
* \brief Contains ADRV9025 API macro definitions and global structure declarations for adi_adrv9025_user.c
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -692,9 +692,7 @@ extern
* Streaming speeds up the memory access when there is large number of bytes to be written.
*/
#ifndef ADI_ADRV9025_SPI_WRITE_STREAMING_ENABLE
#define ADI_ADRV9025_SPI_WRITE_STREAMING_ENABLE 1
#endif
@@ -754,11 +752,18 @@ extern
#endif
#ifndef ADI_ADRV9025_HW_RMW_ENABLE
#define ADI_ADRV9025_HW_RMW_ENABLE 1 /* Enable/Disable HW_RMW for ADRV9025 */
#endif
/**
* Set to 1 to disable any code that uses floating point types
*/
#ifndef ADI_ADRV9025_RM_FLOATS
#define ADI_ADRV9025_RM_FLOATS 0
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -4,7 +4,7 @@
* \brief Contains ADRV9025 utility functions to load ARM binaries
* load stream binaries, load Rx Gain Table, load Tx Atten Table.
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_utilities_types.h
* \brief Contains ADRV9025 API utility initialization type definitions
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -15,7 +15,6 @@
#ifndef _ADI_ADRV9025_UTILITIES_TYPES_H_
#define _ADI_ADRV9025_UTILITIES_TYPES_H_
#include <linux/kernel.h>
#include "adi_adrv9025_types.h"
#include "adi_adrv9025_tx_types.h"
#include "adi_adrv9025_rx_types.h"

View File

@@ -3,7 +3,7 @@
* \file adi_adrv9025_version.h
* \brief Contains the version number for the ADRV9025 API
*
* ADRV9025 API version: 6.4.0.14
* ADRV9025 API version: 7.0.0.14
*/
/**
@@ -19,8 +19,8 @@
extern "C" {
#endif
#define ADI_ADRV9025_CURRENT_MAJOR_VERSION 6
#define ADI_ADRV9025_CURRENT_MINOR_VERSION 4
#define ADI_ADRV9025_CURRENT_MAJOR_VERSION 7
#define ADI_ADRV9025_CURRENT_MINOR_VERSION 0
#define ADI_ADRV9025_CURRENT_MAINTENANCE_VERSION 0
#define ADI_ADRV9025_CURRENT_BUILD_VERSION 14

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025.c
* \brief Contains Adrv9025 features related function implementation defined in
* adi_adrv9025.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -61,11 +61,8 @@ int32_t adi_adrv9025_HwOpen(adi_adrv9025_Device_t* device,
adi_common_LogLevelSet(&device->common,
ADI_ADRV9025_LOGGING);
recoveryAction = adi_common_hal_HwOpen(&device->common);
if (recoveryAction != ADI_COMMON_ACT_NO_ACTION)
{
switch (recoveryAction)
@@ -78,7 +75,7 @@ int32_t adi_adrv9025_HwOpen(adi_adrv9025_Device_t* device,
NULL,
"SPI error");
ADI_ERROR_RETURN(device->common.error.newAction);
break;
break;
case ADI_COMMON_HAL_GPIO_FAIL:
ADI_ERROR_REPORT(&device->common,
ADI_COMMON_ERRSRC_ADI_HAL,
@@ -87,7 +84,7 @@ int32_t adi_adrv9025_HwOpen(adi_adrv9025_Device_t* device,
NULL,
"GPIO error");
ADI_ERROR_RETURN(device->common.error.newAction);
break;
break;
case ADI_COMMON_HAL_TIMER_FAIL:
ADI_ERROR_REPORT(&device->common,
ADI_COMMON_ERRSRC_ADI_HAL,
@@ -96,7 +93,7 @@ int32_t adi_adrv9025_HwOpen(adi_adrv9025_Device_t* device,
NULL,
"Timer error");
ADI_ERROR_RETURN(device->common.error.newAction);
break;
break;
case ADI_COMMON_HAL_GEN_SW: /* fall through */
default:
ADI_ERROR_REPORT(&device->common,
@@ -117,7 +114,6 @@ int32_t adi_adrv9025_HwOpen(adi_adrv9025_Device_t* device,
device->spiSettings.msbFirst = spiSettings->msbFirst;
/* Toggle RESETB pin, Configure and Verify SPI */
recoveryAction = adi_adrv9025_HwReset(device);
ADI_ERROR_REPORT(&device->common,
ADI_COMMON_ERRSRC_API,
@@ -126,7 +122,6 @@ int32_t adi_adrv9025_HwOpen(adi_adrv9025_Device_t* device,
NULL,
"Failed to reset device and set SPI Config");
ADI_ERROR_RETURN(device->common.error.newAction);
return (device->common.error.newAction);
}
@@ -142,8 +137,6 @@ int32_t adi_adrv9025_HwClose(adi_adrv9025_Device_t* device)
ADRV9025_BUGINFO(__FUNCTION__);
recoveryAction = adi_common_hal_HwClose(&device->common);
if (recoveryAction != ADI_COMMON_ACT_NO_ACTION)
{
switch (recoveryAction)
@@ -156,7 +149,7 @@ int32_t adi_adrv9025_HwClose(adi_adrv9025_Device_t* device)
NULL,
"SPI error");
ADI_ERROR_RETURN(device->common.error.newAction);
break;
break;
case ADI_COMMON_HAL_GPIO_FAIL:
ADI_ERROR_REPORT(&device->common,
ADI_COMMON_ERRSRC_ADI_HAL,
@@ -165,7 +158,7 @@ int32_t adi_adrv9025_HwClose(adi_adrv9025_Device_t* device)
NULL,
"GPIO error");
ADI_ERROR_RETURN(device->common.error.newAction);
break;
break;
case ADI_COMMON_HAL_TIMER_FAIL:
ADI_ERROR_REPORT(&device->common,
ADI_COMMON_ERRSRC_ADI_HAL,
@@ -174,7 +167,7 @@ int32_t adi_adrv9025_HwClose(adi_adrv9025_Device_t* device)
NULL,
"Timer error");
ADI_ERROR_RETURN(device->common.error.newAction);
break;
break;
case ADI_COMMON_HAL_GEN_SW: /* fall through */
default:
ADI_ERROR_REPORT(&device->common,
@@ -224,13 +217,9 @@ int32_t adi_adrv9025_HwReset(adi_adrv9025_Device_t* device)
"GPIO Reset error");
ADI_ERROR_RETURN(device->common.error.newAction);
}
recoveryAction = adi_common_hal_Wait_ms(&device->common,
RESETB_WAIT_MS);
if (recoveryAction != ADI_COMMON_ACT_NO_ACTION)
{
ADI_ERROR_REPORT(&device->common,
@@ -538,8 +527,6 @@ int32_t adi_adrv9025_Initialize(adi_adrv9025_Device_t* device,
adrv9025_CpuInitialize(device);
adrv9025_MasterBiasSet(device);
ADI_ERROR_RETURN(device->common.error.newAction);
@@ -765,8 +752,6 @@ int32_t adi_adrv9025_MultichipSyncSet(adi_adrv9025_Device_t* device,
ADI_ADRV9025_SETCPUBOOTUPMCS_TIMEOUT_US,
ADI_ADRV9025_SETCPUBOOTUPMCS_INTERVAL_US);
ADI_ERROR_RETURN(device->common.error.newAction);
if ((cmdStatusByte & ARM_ERR_MASK) > 0)
@@ -1106,7 +1091,6 @@ int32_t adi_adrv9025_SpiVerify(adi_adrv9025_Device_t* device)
ADRV9025_SPIREADBYTE("VENDOR_ID_0",
ADRV9025_ADDR_VENDOR_ID_0,
&spiReg);
if (spiReg != VENDOR_ID_0)
{
ADI_ERROR_REPORT(&device->common,
@@ -1124,8 +1108,6 @@ int32_t adi_adrv9025_SpiVerify(adi_adrv9025_Device_t* device)
ADRV9025_ADDR_VENDOR_ID_1,
&spiReg);
if (spiReg != VENDOR_ID_1)
{
ADI_ERROR_REPORT(&device->common,
@@ -1147,8 +1129,6 @@ int32_t adi_adrv9025_SpiVerify(adi_adrv9025_Device_t* device)
ADRV9025_ADDR_SCRATCH_PAD,
&spiReg);
if (spiReg != SCRATCH_PAD_1)
{
ADI_ERROR_REPORT(&device->common,
@@ -1170,8 +1150,6 @@ int32_t adi_adrv9025_SpiVerify(adi_adrv9025_Device_t* device)
ADRV9025_ADDR_SCRATCH_PAD,
&spiReg);
if (spiReg != SCRATCH_PAD_2)
{
ADI_ERROR_REPORT(&device->common,
@@ -1193,8 +1171,6 @@ int32_t adi_adrv9025_SpiVerify(adi_adrv9025_Device_t* device)
ADRV9025_ADDR_SCRATCH_PAD_UPPER_ADDRESS_SPACE,
&spiReg);
if (spiReg != SCRATCH_PAD_1)
{
ADI_ERROR_REPORT(&device->common,
@@ -1216,8 +1192,6 @@ int32_t adi_adrv9025_SpiVerify(adi_adrv9025_Device_t* device)
ADRV9025_ADDR_SCRATCH_PAD_UPPER_ADDRESS_SPACE,
&spiReg);
if (spiReg != SCRATCH_PAD_2)
{
ADI_ERROR_REPORT(&device->common,

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025_agc.c
* \brief Contains AGC features related function implementation defined in
* adi_adrv9025_agc.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025_arm.c
* \brief Contains ARM features related function implementation defined in
* adi_adrv9025_arm.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025_cals.c
* \brief Contains Calibration features related function implementation defined in
* adi_adrv9025_cals.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -119,8 +119,6 @@ int32_t adi_adrv9025_InitCalsWait(adi_adrv9025_Device_t* device,
ADI_ADRV9025_INITCALSWAIT_INTERVAL_US);
errFlag = (cmdStatusByte >> 1);
/* Don't update errorFlag if SPI error because errorFlag could be a random */
/* value but update error flag for other recovery action types */
if (recoveryAction == ADI_COMMON_ACT_ERR_RESET_INTERFACE)
@@ -173,8 +171,6 @@ int32_t adi_adrv9025_InitCalsCheckCompleteGet(adi_adrv9025_Device_t* device,
&cmdStatusByte);
/* don't check cmdStatusByte until return parameters are updated */
armErrorFlag = (cmdStatusByte >> ARM_ERR_SHIFT);
if (recoveryAction == ADI_COMMON_ACT_ERR_RESET_INTERFACE)
@@ -247,8 +243,6 @@ int32_t adi_adrv9025_InitCalsAbort(adi_adrv9025_Device_t* device,
ADI_ADRV9025_INITCALSABORT_TIMEOUT_US,
ADI_ADRV9025_INITCALSABORT_INTERVAL_US);
if ((cmdStatusByte >> ARM_ERR_SHIFT) > 0)
{
adrv9025_CpuCmdErrorHandler(device,
@@ -281,8 +275,6 @@ int32_t adi_adrv9025_InitCalsAbort(adi_adrv9025_Device_t* device,
&cmdStatusByte,
ADI_ADRV9025_INITCALSABORT_TIMEOUT_US,
ADI_ADRV9025_INITCALSABORT_INTERVAL_US);
if ((cmdStatusByte >> ARM_ERR_SHIFT) > 0)
{
adrv9025_CpuCmdErrorHandler(device,
@@ -352,8 +344,6 @@ int32_t adi_adrv9025_InitCalsDetailedStatusGet(adi_adrv9025_Device_t* dev
ADI_ADRV9025_INITCALSTATUSGET_TIMEOUT_US,
ADI_ADRV9025_INITCALSTATUSGET_INTERVAL_US);
if ((cmdStatusByte >> 1) > 0)
{
adrv9025_CpuCmdErrorHandler(device,
@@ -406,8 +396,6 @@ int32_t adi_adrv9025_InitCalsDetailedStatusGet(adi_adrv9025_Device_t* dev
+ 1]) << 8) | (((uint32_t)calBitField[offset + 0]));
}
if (initStatus->initErrCode > 0)
{
ADI_ERROR_REPORT(&device->common,
@@ -446,8 +434,6 @@ int32_t adi_adrv9025_TrackingCalsEnableSet(adi_adrv9025_Device_t*
ADI_ERROR_RETURN(device->common.error.newAction);
fwStatus = (uint32_t)status;
/* throw error if not in READY state */
if (fwStatus != ADRV9025_CPU_FW_STATUS_READY)
{

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025_cpu.c
* \brief Contains Adrv9025's processor features related function
* implementation declared in adi_adrv9025.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**
@@ -420,8 +420,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
ADI_ERROR_RETURN(device->common.error.newAction);
}
/* get the particular processor's address map */
cpuAddr = adrv9025_CpuAddrGet(&device->devStateInfo.cpu,
cpuType);
@@ -448,8 +446,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
ADI_ERROR_RETURN(device->common.error.newAction);
checkAddr = ((((uint32_t)checkData[3]) << 24) | (((uint32_t)checkData[2]) << 16) | (((uint32_t)checkData[1]) << 8) | ((uint32_t)checkData[0]));
waitInterval_us = (waitInterval_us > timeout_us) ? timeout_us : waitInterval_us;
numEventChecks = (waitInterval_us == 0) ? 1 : (timeout_us / waitInterval_us);
@@ -465,14 +461,11 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
buildTimeChecksum = ((((uint32_t)checkData[3]) << 24) | (((uint32_t)checkData[2]) << 16) | (((uint32_t)checkData[1]) << 8) | ((uint32_t)checkData[0]));
calculatedChecksum = ((((uint32_t)checkData[7]) << 24) | (((uint32_t)checkData[6]) << 16) | (((uint32_t)checkData[5]) << 8) | ((uint32_t)checkData[4]));
if ((calculatedChecksum == 0) && (eventCheck < numEventChecks))
{
/* wait */
halError = adrv9025_hal_Wait_us(&device->common,
timeout_us);
ADI_ERROR_REPORT(&device->common,
ADI_COMMON_ERRSRC_ADI_HAL,
halError,
@@ -487,8 +480,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
}
}
/* CPU completed calculating checksum */
if ((calculatedChecksum > 0) && (buildTimeChecksum > 0))
{
@@ -496,8 +487,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
checksum->fwCheckSums.buildChecksum = buildTimeChecksum;
checksum->fwCheckSums.runChecksum = calculatedChecksum;
/* performing checksum check, skip if checksum was not calculated (CPU DEBUG_MODE)*/
if ((cpuDebugLoaded == 0) && (buildTimeChecksum != calculatedChecksum))
{
@@ -517,8 +506,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
checkData[i + 0]));
calculatedChecksum = ((((uint32_t)checkData[i + 7]) << 24) | (((uint32_t)checkData[i + 6]) << 16) | (((uint32_t)checkData[i + 5]) << 8) | ((uint32_t
)checkData[i + 4]));
checksum->streamsCheckSum[j].buildChecksum = buildTimeChecksum;
checksum->streamsCheckSum[j].runChecksum = calculatedChecksum;
@@ -545,8 +532,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
checkData[i + 0]));
calculatedChecksum = ((((uint32_t)checkData[i + 7]) << 24) | (((uint32_t)checkData[i + 6]) << 16) | (((uint32_t)checkData[i + 5]) << 8) | ((uint32_t)
checkData[i + 4]));
checksum->deviceProfileCheckSum.buildChecksum = buildTimeChecksum;
checksum->deviceProfileCheckSum.runChecksum = calculatedChecksum;
@@ -569,8 +554,6 @@ int32_t adi_adrv9025_CpuChecksumTableGet(
checkData[i + 0]));
calculatedChecksum = ((((uint32_t)checkData[i + 7]) << 24) | (((uint32_t)checkData[i + 6]) << 16) | (((uint32_t)checkData[i + 5]) << 8) | ((uint32_t)
checkData[i + 4]));
checksum->adcProfilefwCheckSum.buildChecksum = buildTimeChecksum;
checksum->adcProfilefwCheckSum.runChecksum = calculatedChecksum;
@@ -652,7 +635,6 @@ int32_t adi_adrv9025_CpuCmdStatusGet(adi_adrv9025_Device_t *device,
ADRV9025_SPIREADBYTE("", cpuAddr->cmdStatusAddr + i, &bytes[i]);
#endif
/* assigning each pending bit from every opcode to a weighted position in statusWord */
status = (bytes[i] & CPU_PENDING_HI) >> STATUS_WORD_SHIFT_HI;
status |= (bytes[i] & CPU_PENDING_LO);
@@ -760,8 +742,6 @@ int32_t adi_adrv9025_CpuConfigWrite(
ADI_ADRV9025_WRITECPUCFG_TIMEOUT_US,
ADI_ADRV9025_WRITECPUCFG_INTERVAL_US);
if ((cmdStatusByte & CPU_ERR_MASK) > 0)
{
adrv9025_CpuCmdErrorHandler(device,
@@ -1043,8 +1023,6 @@ int32_t adi_adrv9025_CpuCmdStatusWait(
NULL,
"Failed to get CPU command status");
ADI_ERROR_RETURN(device->common.error.newAction);
/* If error code is non zero in [3:1], - return error */
if ((*cmdStatusByte & CPU_ERR_MASK) > 0)
{
@@ -1097,7 +1075,7 @@ int32_t adi_adrv9025_CpuCmdStatusWait(
{
if (exceptionValue == 0xFFFFFFFF)
{
exceptionValue = ADI_COMMON_ERR_CPU_EXCEPTION;
exceptionValue = ADI_COMMON_ERR_CPU_EXCEPTION;
}
/* Return the ARM Exception in Err code */
@@ -1250,8 +1228,6 @@ int32_t adi_adrv9025_CpuCmdWrite(
NULL,
"Invalid Get for adi_adrv9025_CpuMailboxBusyGet()");
ADI_ERROR_RETURN(device->common.error.newAction);
if (cpuCommandBusy == ADI_TRUE)
{
halError = adrv9025_hal_Wait_us(&device->common,
@@ -1465,8 +1441,6 @@ int32_t adi_adrv9025_CpuConfigRead(
ADI_ADRV9025_READCPUCFG_TIMEOUT_US,
ADI_ADRV9025_READCPUCFG_INTERVAL_US);
if ((cmdStatusByte & CPU_ERR_MASK) > 0)
{
adrv9025_CpuCmdErrorHandler(device,
@@ -1547,8 +1521,6 @@ int32_t adi_adrv9025_CpuFwVersionGet(
ADI_ERROR_RETURN(device->common.error.newAction);
fullVersion = (((uint32_t)ver[0]) | (((uint32_t)ver[1]) << 8) | (((uint32_t)ver[2]) << 16) | (((uint32_t)ver[3]) << 24));
if (ver[5] & CPU_FW_BUILD_USES_FOUR_DIGIT_VERSION)
{
fwVersion->majorVer = (uint8_t)(fullVersion >> 28) & 0x0F;
@@ -1835,11 +1807,11 @@ int32_t adi_adrv9025_CpuExceptionGet(
if (cpuType == ADI_ADRV9025_CPU_TYPE_C)
{
armExceptionAddr = 0x20028210;
armExceptionAddr = ADRV9025_CPU_C_ADDR_EXCEPTION_FLAG;
}
else if (cpuType == ADI_ADRV9025_CPU_TYPE_D)
{
armExceptionAddr = 0x20000000;
armExceptionAddr = ADRV9025_CPU_D_ADDR_EXCEPTION_FLAG;
}
else
{

View File

@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025_data_interface.c
* \brief Contains Data interface features related function implementation defined in
* adi_adrv9025_data_interface.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file adi_adrv9025_dynamic_slicer.c
* \brief Contains dynamic slicer function implementation defined in adi_adrv9025_dynamic_slicer.h
*
* ADRV9025 API Version: 6.4.0.14
* ADRV9025 API Version: 7.0.0.14
*/
/**

Some files were not shown because too many files have changed in this diff Show More