no-OS
Loading...
Searching...
No Matches
max96792_diag.h File Reference
#include "gmsl_common.h"
#include "max96792.h"
Include dependency graph for max96792_diag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  max96792_dev_diag_device_id_status
 Structure to hold the device ID status for the MAX96792 deserializer. More...
 
struct  max96792_dev_diag_dev_rev_status
 Structure to hold the device revision status of the MAX96792 deserializer. More...
 
struct  max96792_link_diag_link_lock_status
 Structure to hold the link lock status for MAX96792 deserializer. More...
 
struct  max96792_diag_link_decode_err
 Structure to hold the decoding error status and count for GMSL links. More...
 
struct  max96792_pipe_diag_decode_err_status
 Structure to hold the decoding error status for MAX96792 GMSL links. More...
 
struct  max96792_link_diag_line_fault_details
 Structure to hold the details of line fault diagnostics for MAX96792. More...
 
struct  max96792_pipe_diag_src_dst_dt_vc_map_status
 Structure to hold the source and destination data type and virtual channel mapping status for MAX96792 pipes. More...
 
struct  max96792_csi_diag_mipi_phy_lane_polarity_map
 Structure to represent the polarity map of MIPI PHY lanes for the MAX96792 deserializer. More...
 
struct  max96792_dev_diag_part_cfg_status
 Structure to hold diagnostic configuration status for MAX96792 device. More...
 
struct  max96792_pipe_diag_video_lock_status
 Structure to hold the video lock status for MAX96792 deserializer. More...
 
struct  max96792_csi_diag_stream_id_status
 Structure to hold the status of a CSI diagnostic stream ID for the MAX96792 deserializer. More...
 
struct  max96792_pipe_diag_idle_error_status
 Structure to hold the idle error status and count for each GMSL link. More...
 
struct  max96792_csi_mipi_status
 Structure to hold the status of the MIPI CSI output. More...
 
struct  max96792_link_max_retrans_data
 
struct  max96792_link_diag_max_retransmission_error_status
 
struct  max96792_pipe_diag_line_mem_ovrflw_status
 Structure to hold the line memory overflow status of Pipe Y for the max96792 deserializer. More...
 
struct  max96792_pipe_diag_video_block_length_status
 Structure to hold the video Rx block length error status of Pipe Y for the max96792 deserializer. More...
 
struct  max96792_link_diag_eom_status
 Structure to hold the Eye Opening Monitor error status of Link for the max96792 deserializer. More...
 
struct  max96792_dev_diag_rem_err_flg_status
 Structure to hold the Remote error flag status for the max96792 deserializer. More...
 
struct  max96792_pipe_diag_crc_err_status
 Structure to hold the Video Line CRC error status for the max96792 deserializer. More...
 
struct  max96792_link_enabled_status
 Structure to hold the link enabled status for all GMSL links. More...
 
struct  max96792_pipe_enabled_status
 Structure to hold the pipe enabled status for all video pipes. More...
 

Macros

#define NOT_APPLICABLE_FOR_MAX96792   (NULL)
 
#define MAX96792_NUM_OF_MIPI_PKT_READ   (4U)
 
#define MAX96792_NUM_OF_VIDEO_PIPES   (2U)
 
#define MAX96792_NUM_OF_GMSL_LINKS   (2U)
 
#define MAX96792_NUM_OF_CSI_CONTROLLERS   (2U)
 
#define MAX96792_NUM_OF_MIPI_PHY   (4U)
 
#define MAX96792_NUM_OF_LINE_FAULT_MONITORS   (4U)
 
#define MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP   (16U)
 
#define MAX96792A_DEV_ID   (0xBE)
 
#define MAX96792F_DEV_ID   (0xB8)
 
#define MAX96792_LINK_IDLE_REG_OFFSET_MULTIPLIER   (0x4FF6U)
 
#define MIPI_REG_OFFSET_MULT   (0x40U)
 
#define VIDEO_PIPE_REG_OFFSET_MULT   (0x12U)
 
#define MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_A   (0x09u)
 
#define MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_B   (0x13u)
 
#define MAX96792_PIPE_DIAG_CHECK_CRC_ERROR_OFFSET_MULT   (0x12U)
 
#define MAX96792_NUM_OF_PHY_PER_CSI   (2U)
 
#define MAX96792_BLK_LEN_ERR_OFFSET_MULT   (0x12U)
 
#define MAX96792_MAX_STREAM_ID   (3U)
 
#define MAX96792_STREAM_ID_EXTRACTION_MASK   (0x3U)
 

Enumerations

enum  max96792_link_diag_lmn_status {
  MAX96792_LINK_DIAG_LMN_SHORT_TO_BAT = 0u ,
  MAX96792_LINK_DIAG_LMN_SHORT_TO_GND = 1u ,
  MAX96792_LINK_DIAG_LMN_NORMAL = 2u ,
  MAX96792_LINK_DIAG_LMN_LINE_OPEN = 3u ,
  MAX96792_LINK_DIAG_LMN_LINE_TO_LINE_SHORT = 4u
}
 Enumeration for MAX96792 link diagnostic status. More...
 
enum  max96792_link_lmn {
  MAX96792_LINK_LMN_0 = 0u ,
  MAX96792_LINK_LMN_1 = 1u ,
  MAX96792_LINK_LMN_2 = 2u ,
  MAX96792_LINK_LMN_3 = 3u
}
 Enumeration for MAX96792 line fault monitors. More...
 
enum  max96792_dp_pclkdetlost_status {
  MAX96792_DP_PCLKDET_NOT_LOST = 0u ,
  MAX96792_DP_PCLKDET_LOST = 1u
}
 Enumeration for the PClk detect lost status in the MAX96792 deserializer. More...
 
enum  max96792_dp_pclkdetlost_assert_event {
  MAX96792_DP_PCLKDETLOST_NO_ASSERT_ON_RST = 0u ,
  MAX96792_DP_PCLKDETLOST_ASSERT = 1u
}
 Enumeration for PCLKDET lost assert event configuration. More...
 
enum  max96792_csi_packet_stream_id {
  MAX96792_CSI_STREAM_ID_0 = 0u ,
  MAX96792_CSI_STREAM_ID_1 = 1u ,
  MAX96792_CSI_STREAM_ID_2 = 2u ,
  MAX96792_CSI_STREAM_ID_3 = 3u
}
 Enumeration for MAX96792 CSI packet stream IDs. More...
 
enum  max96792_csi_mipi_phy {
  MAX96792_CSI_MIPI_PHY_0 = 0u ,
  MAX96792_CSI_MIPI_PHY_1 = 1u ,
  MAX96792_CSI_MIPI_PHY_2 = 2u ,
  MAX96792_CSI_MIPI_PHY_3 = 3u
}
 Enumeration for MAX96792 MIPI CSI PHY interfaces. More...
 
enum  max96792_dev_csi_mode {
  MAX96792_DEV_CSI_PIXEL_MODE = 0u ,
  MAX96792_DEV_CSI_TUNNEL_MODE = 1u
}
 Enumeration for MAX96792 device CSI modes. More...
 
enum  max96792_dev_lane_count {
  MAX96792_DEV_LANE_COUNT_1 = 0u ,
  MAX96792_DEV_LANE_COUNT_2 = 1u ,
  MAX96792_DEV_LANE_COUNT_3 = 2u ,
  MAX96792_DEV_LANE_COUNT_4 = 3u
}
 Enumeration for the number of lanes supported by the MAX96792 device. More...
 
enum  max96792_dev_csi_lane_frequency {
  MAX96792_CSI_PER_LANE_FREQ_80Mbps = 0x0u ,
  MAX96792_CSI_PER_LANE_FREQ_100Mbps = 0x1u ,
  MAX96792_CSI_PER_LANE_FREQ_200Mbps = 0x2u ,
  MAX96792_CSI_PER_LANE_FREQ_300Mbps = 0x3u ,
  MAX96792_CSI_PER_LANE_FREQ_400Mbps = 0x4u ,
  MAX96792_CSI_PER_LANE_FREQ_500Mbps = 0x5u ,
  MAX96792_CSI_PER_LANE_FREQ_600Mbps = 0x6u ,
  MAX96792_CSI_PER_LANE_FREQ_700Mbps = 0x7u ,
  MAX96792_CSI_PER_LANE_FREQ_800Mbps = 0x8u ,
  MAX96792_CSI_PER_LANE_FREQ_900Mbps = 0x9u ,
  MAX96792_CSI_PER_LANE_FREQ_1000Mbps = 0xAu ,
  MAX96792_CSI_PER_LANE_FREQ_1100Mbps = 0xBu ,
  MAX96792_CSI_PER_LANE_FREQ_1200Mbps = 0xCu ,
  MAX96792_CSI_PER_LANE_FREQ_1300Mbps = 0xDu ,
  MAX96792_CSI_PER_LANE_FREQ_1400Mbps = 0xEu ,
  MAX96792_CSI_PER_LANE_FREQ_1500Mbps = 0xFu ,
  MAX96792_CSI_PER_LANE_FREQ_1600Mbps = 0x10u ,
  MAX96792_CSI_PER_LANE_FREQ_1700Mbps = 0x11u ,
  MAX96792_CSI_PER_LANE_FREQ_1800Mbps = 0x12u ,
  MAX96792_CSI_PER_LANE_FREQ_1900Mbps = 0x13u ,
  MAX96792_CSI_PER_LANE_FREQ_2000Mbps = 0x14u ,
  MAX96792_CSI_PER_LANE_FREQ_2100Mbps = 0x15u ,
  MAX96792_CSI_PER_LANE_FREQ_2200Mbps = 0x16u ,
  MAX96792_CSI_PER_LANE_FREQ_2300Mbps = 0x17u ,
  MAX96792_CSI_PER_LANE_FREQ_2400Mbps = 0x18u ,
  MAX96792_CSI_PER_LANE_FREQ_2500Mbps = 0x19u
}
 Enumerates CSI PHY1 output frequency in multiples of 100Mbps/lane. More...
 

Functions

int max96792_pipe_diag_check_video_lock_status (struct gmsl_dev *dev, void *video_lock_status, bool *diag_err)
 Check the video lock status of the max96792 deserializer.
 
int max96792_link_diag_check_link_lock_status (struct gmsl_dev *dev, void *link_lock_status, bool *diag_err)
 Check the link lock status of the max96792 deserializer.
 
int max96792_dev_diag_get_device_id (struct gmsl_dev *dev, void *dev_id_status, bool *diag_err)
 Retrieve the device ID of the max96792 deserializer and check for diagnostic errors.
 
int max96792_link_diag_check_idle_error_status (struct gmsl_dev *dev, void *idle_err_status, bool *diag_err)
 Check the idle error status of the max96792 link.
 
int max96792_link_diag_get_line_fault_int_status (struct gmsl_dev *dev, uint8_t *line_fault_int)
 Get the line fault interrupt status for the max96792 deserializer.
 
int max96792_link_diag_get_line_fault_enabled_status (struct gmsl_dev *dev, uint8_t *line_fault_enable_status)
 Get the enabled status of line fault detection for the max96792 deserializer.
 
int max96792_link_diag_get_lmn_status (struct gmsl_dev *dev, enum max96792_link_lmn lmn, enum max96792_link_diag_lmn_status *line_fault_status)
 Get the link diagnostic status for a specified LMN.
 
int max96792_link_diag_check_line_fault_status (struct gmsl_dev *dev, void *line_fault_status, bool *diag_err)
 Check the line fault status of the max96792 deserializer.
 
int max96792_link_diag_check_max_retransmission_error_status (struct gmsl_dev *dev, void *max_retransmission_status, bool *diag_err)
 Get the link lock status of the MAX96792 deserializer.
 
int max96792_pipe_diag_check_crc_error (struct gmsl_dev *dev, void *vid_line_crc_status, bool *diag_err)
 Check for CRC errors in the video pipes of the MAX96792 deserializer.
 
int max96792_pipe_diag_check_stream_id (struct gmsl_dev *dev, void *stream_id_status, bool *diag_err)
 Check the stream ID for each video pipe and log diagnostic information.
 
int max96792_pipe_diag_check_video_block_length_error (struct gmsl_dev *dev, void *vid_block_length_status, bool *diag_err)
 Check for video block length errors in the MAX96792 deserializer.
 
int max96792_pipe_diag_check_line_memory_overflow (struct gmsl_dev *dev, void *line_mem_ovrflw_status, bool *diag_err)
 Check for Line Memory Overflow errors in the video pipes of the MAX96792 deserializer.
 
int max96792_dev_diag_check_remote_err_flg (struct gmsl_dev *dev, void *remote_err_status, bool *diag_err)
 Check for Remote Error Flag status in the MAX96792 deserializer.
 
int max96792_link_diag_check_eye_open_monitor_error (struct gmsl_dev *dev, void *eye_open_monitor_status, bool *diag_err)
 Check for Eye Open Monitor errors in the MAX96792 deserializer.
 
int max96792_csi_diag_check_mipi_status (struct gmsl_dev *dev, void *mipi_status, bool *diag_err)
 Check the MIPI status of the max96792 deserializer.
 
int max96792_dev_diag_get_device_revision (struct gmsl_dev *dev, void *dev_revision_status, bool *diag_err)
 Retrieve the device revision status of the max96792 deserializer.
 
int max96792_link_diag_check_decode_error_status (struct gmsl_dev *dev, void *decode_err_status, bool *diag_err)
 Check decode error status for max96792 link diagnostics.
 
int max96792_dev_diag_check_part_config (struct gmsl_dev *dev, void *part_config_status, bool *diag_err)
 Check the part configuration of the max96792 device.
 
int max96792_check_gmsl_link_enable (struct gmsl_dev *dev, struct max96792_link_enabled_status *link_en)
 Check if the GMSL links are enabled for the MAX96792 device.
 
int max96792_check_video_pipe_enable (struct gmsl_dev *dev, struct max96792_pipe_enabled_status *pipe_en)
 Check if the video pipes are enabled for the MAX96792 device.
 

Macro Definition Documentation

◆ MAX96792_BLK_LEN_ERR_OFFSET_MULT

#define MAX96792_BLK_LEN_ERR_OFFSET_MULT   (0x12U)

Block Length Error Offset Multiplier

◆ MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_A

#define MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_A   (0x09u)

Idle Error Count Register Offset for Link A

◆ MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_B

#define MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_B   (0x13u)

Idle Error Count Register Offset for Link B

◆ MAX96792_LINK_IDLE_REG_OFFSET_MULTIPLIER

#define MAX96792_LINK_IDLE_REG_OFFSET_MULTIPLIER   (0x4FF6U)

Link Idle Register Offset Multiplier

◆ MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP

#define MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP   (16U)

Maximum number of source-destination data type virtual channel map

◆ MAX96792_MAX_STREAM_ID

#define MAX96792_MAX_STREAM_ID   (3U)

Maximum Stream ID

◆ MAX96792_NUM_OF_CSI_CONTROLLERS

#define MAX96792_NUM_OF_CSI_CONTROLLERS   (2U)

Number of MIPI CSI controllers

◆ MAX96792_NUM_OF_GMSL_LINKS

#define MAX96792_NUM_OF_GMSL_LINKS   (2U)

Number of GMSL links

◆ MAX96792_NUM_OF_LINE_FAULT_MONITORS

#define MAX96792_NUM_OF_LINE_FAULT_MONITORS   (4U)

Number of Line Fault Monitors

◆ MAX96792_NUM_OF_MIPI_PHY

#define MAX96792_NUM_OF_MIPI_PHY   (4U)

Number of MIPI PHYs

◆ MAX96792_NUM_OF_MIPI_PKT_READ

#define MAX96792_NUM_OF_MIPI_PKT_READ   (4U)

Number of MIPI packets read

◆ MAX96792_NUM_OF_PHY_PER_CSI

#define MAX96792_NUM_OF_PHY_PER_CSI   (2U)

Number of PHY per CSI controller

◆ MAX96792_NUM_OF_VIDEO_PIPES

#define MAX96792_NUM_OF_VIDEO_PIPES   (2U)

Number of video pipes

◆ MAX96792_PIPE_DIAG_CHECK_CRC_ERROR_OFFSET_MULT

#define MAX96792_PIPE_DIAG_CHECK_CRC_ERROR_OFFSET_MULT   (0x12U)

Pipe Diagnostic Check CRC Error Offset Multiplier

◆ MAX96792_STREAM_ID_EXTRACTION_MASK

#define MAX96792_STREAM_ID_EXTRACTION_MASK   (0x3U)

Stream ID Extraction Mask

◆ MAX96792A_DEV_ID

#define MAX96792A_DEV_ID   (0xBE)

◆ MAX96792F_DEV_ID

#define MAX96792F_DEV_ID   (0xB8)

◆ MIPI_REG_OFFSET_MULT

#define MIPI_REG_OFFSET_MULT   (0x40U)

MIPI Register Offset Multiplier

◆ NOT_APPLICABLE_FOR_MAX96792

#define NOT_APPLICABLE_FOR_MAX96792   (NULL)

Not Applicable for max96792

◆ VIDEO_PIPE_REG_OFFSET_MULT

#define VIDEO_PIPE_REG_OFFSET_MULT   (0x12U)

Video Pipe Register Offset Multiplier

Enumeration Type Documentation

◆ max96792_csi_mipi_phy

Enumeration for MAX96792 MIPI CSI PHY interfaces.

Enumerator
MAX96792_CSI_MIPI_PHY_0 

MIPI CSI Phy 0

MAX96792_CSI_MIPI_PHY_1 

MIPI CSI Phy 1

MAX96792_CSI_MIPI_PHY_2 

MIPI CSI Phy 2

MAX96792_CSI_MIPI_PHY_3 

MIPI CSI Phy 3

◆ max96792_csi_packet_stream_id

Enumeration for MAX96792 CSI packet stream IDs.

Enumerator
MAX96792_CSI_STREAM_ID_0 

Packet Stream ID 0

MAX96792_CSI_STREAM_ID_1 

Packet Stream ID 1

MAX96792_CSI_STREAM_ID_2 

Packet Stream ID 2

MAX96792_CSI_STREAM_ID_3 

Packet Stream ID 3

◆ max96792_dev_csi_lane_frequency

Enumerates CSI PHY1 output frequency in multiples of 100Mbps/lane.

Enumerator
MAX96792_CSI_PER_LANE_FREQ_80Mbps 

80Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_100Mbps 

100Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_200Mbps 

200Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_300Mbps 

300Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_400Mbps 

400Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_500Mbps 

500Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_600Mbps 

600Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_700Mbps 

700Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_800Mbps 

800Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_900Mbps 

900Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1000Mbps 

1000Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1100Mbps 

1100Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1200Mbps 

1200Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1300Mbps 

1300Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1400Mbps 

1400Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1500Mbps 

1500Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1600Mbps 

1600Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1700Mbps 

1700Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1800Mbps 

1800Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_1900Mbps 

1900Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_2000Mbps 

2000Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_2100Mbps 

2100Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_2200Mbps 

2200Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_2300Mbps 

2300Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_2400Mbps 

2400Mbps per lane

MAX96792_CSI_PER_LANE_FREQ_2500Mbps 

2500Mbps per lane

◆ max96792_dev_csi_mode

Enumeration for MAX96792 device CSI modes.

Enumerator
MAX96792_DEV_CSI_PIXEL_MODE 

Pixel Mode

MAX96792_DEV_CSI_TUNNEL_MODE 

Tunnel Mode

◆ max96792_dev_lane_count

Enumeration for the number of lanes supported by the MAX96792 device.

Enumerator
MAX96792_DEV_LANE_COUNT_1 

1 lane supported (lane 0 )

MAX96792_DEV_LANE_COUNT_2 

2 lane supported (lane 0,1 )

MAX96792_DEV_LANE_COUNT_3 

3 lane supported (lane 0,1,2 )

MAX96792_DEV_LANE_COUNT_4 

4 lane supported (lane 0,1,2,3 )

◆ max96792_dp_pclkdetlost_assert_event

Enumeration for PCLKDET lost assert event configuration.

Enumerator
MAX96792_DP_PCLKDETLOST_NO_ASSERT_ON_RST 

Check if video is reset or not and do not assert if it is reset

MAX96792_DP_PCLKDETLOST_ASSERT 

Do not check if video is reset or not and assert everytime if pclkdet is lost.

◆ max96792_dp_pclkdetlost_status

Enumeration for the PClk detect lost status in the MAX96792 deserializer.

Enumerator
MAX96792_DP_PCLKDET_NOT_LOST 

PClk Detect not lost

MAX96792_DP_PCLKDET_LOST 

PClk Detect lost

◆ max96792_link_diag_lmn_status

Enumeration for MAX96792 link diagnostic status.

Enumerator
MAX96792_LINK_DIAG_LMN_SHORT_TO_BAT 

Short to battery

MAX96792_LINK_DIAG_LMN_SHORT_TO_GND 

Short to GND

MAX96792_LINK_DIAG_LMN_NORMAL 

Normal operation

MAX96792_LINK_DIAG_LMN_LINE_OPEN 

Line open

MAX96792_LINK_DIAG_LMN_LINE_TO_LINE_SHORT 

Line to line short

◆ max96792_link_lmn

Enumeration for MAX96792 line fault monitors.

Enumerator
MAX96792_LINK_LMN_0 

Line fault monitor 0

MAX96792_LINK_LMN_1 

Line fault monitor 1

MAX96792_LINK_LMN_2 

Line fault monitor 2

MAX96792_LINK_LMN_3 

Line fault monitor 3