34#ifndef MAX96792_DIAG_H
35#define MAX96792_DIAG_H
39#define NOT_APPLICABLE_FOR_MAX96792 (NULL)
40#define MAX96792_NUM_OF_MIPI_PKT_READ (4U)
41#define MAX96792_NUM_OF_VIDEO_PIPES (2U)
42#define MAX96792_NUM_OF_GMSL_LINKS (2U)
43#define MAX96792_NUM_OF_CSI_CONTROLLERS (2U)
44#define MAX96792_NUM_OF_MIPI_PHY (4U)
45#define MAX96792_NUM_OF_LINE_FAULT_MONITORS (4U)
46#define MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP (16U)
48#define MAX96792A_DEV_ID (0xBE)
49#define MAX96792F_DEV_ID (0xB8)
51#define MAX96792_LINK_IDLE_REG_OFFSET_MULTIPLIER (0x4FF6U)
52#define MIPI_REG_OFFSET_MULT (0x40U)
53#define VIDEO_PIPE_REG_OFFSET_MULT (0x12U)
54#define MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_A (0x09u)
55#define MAX96792_IDLE_ERROR_COUNT_REG_OFFSET_B (0x13u)
56#define MAX96792_PIPE_DIAG_CHECK_CRC_ERROR_OFFSET_MULT (0x12U)
57#define MAX96792_NUM_OF_PHY_PER_CSI (2U)
58#define MAX96792_BLK_LEN_ERR_OFFSET_MULT (0x12U)
59#define MAX96792_MAX_STREAM_ID (3U)
60#define MAX96792_STREAM_ID_EXTRACTION_MASK (0x3U)
401 void *video_lock_status,
bool *diag_err);
403 void *link_lock_status,
bool *diag_err);
405 void *dev_id_status,
bool *diag_err);
407 void *idle_err_status,
bool *diag_err);
409 uint8_t *line_fault_int);
411 struct gmsl_dev *dev, uint8_t *line_fault_enable_status);
416 void *line_fault_status,
bool *diag_err);
418 struct gmsl_dev *dev,
void *max_retransmission_status,
bool *diag_err);
420 void *vid_line_crc_status,
bool *diag_err);
422 void *stream_id_status,
bool *diag_err);
424 struct gmsl_dev *dev,
void *vid_block_length_status,
bool *diag_err);
426 void *line_mem_ovrflw_status,
bool *diag_err);
428 void *remote_err_status,
bool *diag_err);
430 void *eye_open_monitor_status,
bool *diag_err);
432 void *mipi_status,
bool *diag_err);
434 void *dev_revision_status,
bool *diag_err);
436 void *decode_err_status,
bool *diag_err);
438 void *part_config_status,
bool *diag_err);
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.
Definition max96792_diag.c:440
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.
Definition max96792_diag.c:717
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.
Definition max96792_diag.c:286
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.
Definition max96792_diag.c:313
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.
Definition max96792_diag.c:1241
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.
Definition max96792_diag.c:1418
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.
Definition max96792_diag.c:1360
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.
Definition max96792_diag.c:1556
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.
Definition max96792_diag.c:187
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.
Definition max96792_diag.c:638
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.
Definition max96792_diag.c:1093
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.
Definition max96792_diag.c:99
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.
Definition max96792_diag.c:590
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.
Definition max96792_diag.c:258
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.
Definition max96792_diag.c:1479
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.
Definition max96792_diag.c:1305
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.
Definition max96792_diag.c:573
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.
Definition max96792_diag.c:65
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.
Definition max96792_diag.c:558
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.
Definition max96792_diag.c:129
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.
Definition max96792_diag.c:374
max96792_link
Enumeration for MAX96792 GMSL links.
Definition max96792.h:50
max96792_link_diag_lmn_status
Enumeration for MAX96792 link diagnostic status.
Definition max96792_diag.h:112
@ MAX96792_LINK_DIAG_LMN_LINE_OPEN
Definition max96792_diag.h:116
@ MAX96792_LINK_DIAG_LMN_SHORT_TO_GND
Definition max96792_diag.h:114
@ MAX96792_LINK_DIAG_LMN_SHORT_TO_BAT
Definition max96792_diag.h:113
@ MAX96792_LINK_DIAG_LMN_LINE_TO_LINE_SHORT
Definition max96792_diag.h:117
@ MAX96792_LINK_DIAG_LMN_NORMAL
Definition max96792_diag.h:115
#define MAX96792_NUM_OF_GMSL_LINKS
Definition max96792_diag.h:42
max96792_dp_pclkdetlost_status
Enumeration for the PClk detect lost status in the MAX96792 deserializer.
Definition max96792_diag.h:145
@ MAX96792_DP_PCLKDET_LOST
Definition max96792_diag.h:147
@ MAX96792_DP_PCLKDET_NOT_LOST
Definition max96792_diag.h:146
#define MAX96792_NUM_OF_LINE_FAULT_MONITORS
Definition max96792_diag.h:45
max96792_csi_mipi_phy
Enumeration for MAX96792 MIPI CSI PHY interfaces.
Definition max96792_diag.h:174
@ MAX96792_CSI_MIPI_PHY_0
Definition max96792_diag.h:175
@ MAX96792_CSI_MIPI_PHY_1
Definition max96792_diag.h:176
@ MAX96792_CSI_MIPI_PHY_3
Definition max96792_diag.h:178
@ MAX96792_CSI_MIPI_PHY_2
Definition max96792_diag.h:177
#define MAX96792_NUM_OF_VIDEO_PIPES
Definition max96792_diag.h:41
#define MAX96792_NUM_OF_MIPI_PKT_READ
Definition max96792_diag.h:40
max96792_link_lmn
Enumeration for MAX96792 line fault monitors.
Definition max96792_diag.h:124
@ MAX96792_LINK_LMN_0
Definition max96792_diag.h:125
@ MAX96792_LINK_LMN_1
Definition max96792_diag.h:126
@ MAX96792_LINK_LMN_3
Definition max96792_diag.h:128
@ MAX96792_LINK_LMN_2
Definition max96792_diag.h:127
#define MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP
Definition max96792_diag.h:46
max96792_dev_csi_lane_frequency
Enumerates CSI PHY1 output frequency in multiples of 100Mbps/lane.
Definition max96792_diag.h:206
@ MAX96792_CSI_PER_LANE_FREQ_1100Mbps
Definition max96792_diag.h:218
@ MAX96792_CSI_PER_LANE_FREQ_800Mbps
Definition max96792_diag.h:215
@ MAX96792_CSI_PER_LANE_FREQ_2400Mbps
Definition max96792_diag.h:231
@ MAX96792_CSI_PER_LANE_FREQ_1000Mbps
Definition max96792_diag.h:217
@ MAX96792_CSI_PER_LANE_FREQ_2000Mbps
Definition max96792_diag.h:227
@ MAX96792_CSI_PER_LANE_FREQ_400Mbps
Definition max96792_diag.h:211
@ MAX96792_CSI_PER_LANE_FREQ_2300Mbps
Definition max96792_diag.h:230
@ MAX96792_CSI_PER_LANE_FREQ_600Mbps
Definition max96792_diag.h:213
@ MAX96792_CSI_PER_LANE_FREQ_700Mbps
Definition max96792_diag.h:214
@ MAX96792_CSI_PER_LANE_FREQ_80Mbps
Definition max96792_diag.h:207
@ MAX96792_CSI_PER_LANE_FREQ_1300Mbps
Definition max96792_diag.h:220
@ MAX96792_CSI_PER_LANE_FREQ_2100Mbps
Definition max96792_diag.h:228
@ MAX96792_CSI_PER_LANE_FREQ_1600Mbps
Definition max96792_diag.h:223
@ MAX96792_CSI_PER_LANE_FREQ_1900Mbps
Definition max96792_diag.h:226
@ MAX96792_CSI_PER_LANE_FREQ_200Mbps
Definition max96792_diag.h:209
@ MAX96792_CSI_PER_LANE_FREQ_2200Mbps
Definition max96792_diag.h:229
@ MAX96792_CSI_PER_LANE_FREQ_1500Mbps
Definition max96792_diag.h:222
@ MAX96792_CSI_PER_LANE_FREQ_300Mbps
Definition max96792_diag.h:210
@ MAX96792_CSI_PER_LANE_FREQ_500Mbps
Definition max96792_diag.h:212
@ MAX96792_CSI_PER_LANE_FREQ_1700Mbps
Definition max96792_diag.h:224
@ MAX96792_CSI_PER_LANE_FREQ_1400Mbps
Definition max96792_diag.h:221
@ MAX96792_CSI_PER_LANE_FREQ_1200Mbps
Definition max96792_diag.h:219
@ MAX96792_CSI_PER_LANE_FREQ_900Mbps
Definition max96792_diag.h:216
@ MAX96792_CSI_PER_LANE_FREQ_1800Mbps
Definition max96792_diag.h:225
@ MAX96792_CSI_PER_LANE_FREQ_100Mbps
Definition max96792_diag.h:208
@ MAX96792_CSI_PER_LANE_FREQ_2500Mbps
Definition max96792_diag.h:232
max96792_dp_pclkdetlost_assert_event
Enumeration for PCLKDET lost assert event configuration.
Definition max96792_diag.h:154
@ MAX96792_DP_PCLKDETLOST_ASSERT
Definition max96792_diag.h:156
@ MAX96792_DP_PCLKDETLOST_NO_ASSERT_ON_RST
Definition max96792_diag.h:155
max96792_dev_lane_count
Enumeration for the number of lanes supported by the MAX96792 device.
Definition max96792_diag.h:195
@ MAX96792_DEV_LANE_COUNT_2
Definition max96792_diag.h:197
@ MAX96792_DEV_LANE_COUNT_4
Definition max96792_diag.h:199
@ MAX96792_DEV_LANE_COUNT_1
Definition max96792_diag.h:196
@ MAX96792_DEV_LANE_COUNT_3
Definition max96792_diag.h:198
max96792_dev_csi_mode
Enumeration for MAX96792 device CSI modes.
Definition max96792_diag.h:186
@ MAX96792_DEV_CSI_PIXEL_MODE
Definition max96792_diag.h:187
@ MAX96792_DEV_CSI_TUNNEL_MODE
Definition max96792_diag.h:188
#define MAX96792_NUM_OF_CSI_CONTROLLERS
Definition max96792_diag.h:43
#define MAX96792_NUM_OF_MIPI_PHY
Definition max96792_diag.h:44
max96792_csi_packet_stream_id
Enumeration for MAX96792 CSI packet stream IDs.
Definition max96792_diag.h:163
@ MAX96792_CSI_STREAM_ID_3
Definition max96792_diag.h:167
@ MAX96792_CSI_STREAM_ID_0
Definition max96792_diag.h:164
@ MAX96792_CSI_STREAM_ID_1
Definition max96792_diag.h:165
@ MAX96792_CSI_STREAM_ID_2
Definition max96792_diag.h:166
Structure representing a GMSL device handle, containing configuration parameters and diagnostic opera...
Definition gmsl_common.h:159
Structure to represent the polarity map of MIPI PHY lanes for the MAX96792 deserializer.
Definition max96792_diag.h:250
bool clk_lane
Definition max96792_diag.h:253
bool lane_1
Definition max96792_diag.h:252
bool lane_0
Definition max96792_diag.h:251
Structure to hold the status of a CSI diagnostic stream ID for the MAX96792 deserializer.
Definition max96792_diag.h:293
enum max96792_csi_packet_stream_id stream_id[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:294
Structure to hold the status of the MIPI CSI output.
Definition max96792_diag.h:311
uint8_t phy_pkt_cnt[MAX96792_NUM_OF_MIPI_PHY][MAX96792_NUM_OF_MIPI_PKT_READ]
Definition max96792_diag.h:314
bool mipi_out_enabled
Definition max96792_diag.h:312
uint8_t csi2_pkt_cnt[MAX96792_NUM_OF_CSI_CONTROLLERS][MAX96792_NUM_OF_MIPI_PKT_READ]
Definition max96792_diag.h:313
Structure to hold the device revision status of the MAX96792 deserializer.
Definition max96792_diag.h:74
uint8_t dev_rev
Definition max96792_diag.h:75
Structure to hold the device ID status for the MAX96792 deserializer.
Definition max96792_diag.h:66
uint8_t dev_id
Definition max96792_diag.h:67
Structure to hold diagnostic configuration status for MAX96792 device.
Definition max96792_diag.h:260
uint8_t dphy_dst[MAX96792_NUM_OF_CSI_CONTROLLERS][MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP]
Definition max96792_diag.h:267
struct max96792_csi_diag_mipi_phy_lane_polarity_map lane_pol[MAX96792_NUM_OF_MIPI_PHY]
Definition max96792_diag.h:271
enum max96792_dev_lane_count lane_count[MAX96792_NUM_OF_MIPI_PHY]
Definition max96792_diag.h:268
uint8_t lane_map[MAX96792_NUM_OF_CSI_CONTROLLERS]
Definition max96792_diag.h:270
bool csi_lane_freq_sw_override[MAX96792_NUM_OF_MIPI_PHY]
Definition max96792_diag.h:276
bool pll_func_reset
Definition max96792_diag.h:277
enum max96792_csi_packet_stream_id stream_id[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:261
enum max96792_dev_csi_lane_frequency csi_lane_freq[MAX96792_NUM_OF_MIPI_PHY]
Definition max96792_diag.h:274
struct max96792_pipe_diag_src_dst_dt_vc_map_status src_dst_dt_vc_map[MAX96792_NUM_OF_VIDEO_PIPES][MAX96792_MAX_NUM_OF_SRC_DST_DT_VC_MAP]
Definition max96792_diag.h:265
enum max96792_dev_csi_mode mode[MAX96792_NUM_OF_CSI_CONTROLLERS]
Definition max96792_diag.h:263
bool mipi_out_enabled
Definition max96792_diag.h:273
Structure to hold the Remote error flag status for the max96792 deserializer.
Definition max96792_diag.h:370
bool rem_err_flg
Definition max96792_diag.h:372
bool rem_cc_en
Definition max96792_diag.h:371
Structure to hold the decoding error status and count for GMSL links.
Definition max96792_diag.h:91
enum max96792_link max96792_gmsl_link
Definition max96792_diag.h:92
bool decode_err_link_flag
Definition max96792_diag.h:93
uint8_t decode_err_cnt
Definition max96792_diag.h:94
Structure to hold the Eye Opening Monitor error status of Link for the max96792 deserializer.
Definition max96792_diag.h:362
bool eom_err[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:363
Structure to hold the details of line fault diagnostics for MAX96792.
Definition max96792_diag.h:135
bool lf_int
Definition max96792_diag.h:136
enum max96792_link_diag_lmn_status lmn_err_status[MAX96792_NUM_OF_LINE_FAULT_MONITORS]
Definition max96792_diag.h:137
Structure to hold the link lock status for MAX96792 deserializer.
Definition max96792_diag.h:82
bool link_lock_a
Definition max96792_diag.h:83
bool link_lock_b
Definition max96792_diag.h:84
Definition max96792_diag.h:336
bool max_retrans_err_detected[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:337
struct max96792_link_max_retrans_data max_retrans_data[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:338
Structure to hold the link enabled status for all GMSL links.
Definition max96792_diag.h:388
bool link_enabled[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:389
Definition max96792_diag.h:321
bool main_control_channel_err_detected
Definition max96792_diag.h:322
uint8_t gpio_chnl_retrans_count
Definition max96792_diag.h:325
bool pass_thru_chnl2_err_detected
Definition max96792_diag.h:328
bool gpio_chnl_err_detected
Definition max96792_diag.h:324
uint8_t main_ctrl_chnl_retrans_count
Definition max96792_diag.h:323
uint8_t pass_thru_chnl2_retrans_count
Definition max96792_diag.h:329
uint8_t pass_thru_chnl1_retrans_count
Definition max96792_diag.h:327
bool pass_thru_chnl1_err_detected
Definition max96792_diag.h:326
Structure to hold the Video Line CRC error status for the max96792 deserializer.
Definition max96792_diag.h:379
bool line_crc_en[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:380
bool line_crc_err[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:381
Structure to hold the decoding error status for MAX96792 GMSL links.
Definition max96792_diag.h:101
uint8_t decode_err_cnt[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:105
enum max96792_link max96792_gmsl_link[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:102
bool decode_err_link_flag[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:104
Structure to hold the idle error status and count for each GMSL link.
Definition max96792_diag.h:302
bool idle_error_detected[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:303
uint8_t idle_error_count[MAX96792_NUM_OF_GMSL_LINKS]
Definition max96792_diag.h:304
Structure to hold the line memory overflow status of Pipe Y for the max96792 deserializer.
Definition max96792_diag.h:346
bool line_mem_ovrflw_detected[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:347
Structure to hold the source and destination data type and virtual channel mapping status for MAX9679...
Definition max96792_diag.h:239
uint8_t dst_pipe_dt
Definition max96792_diag.h:242
uint8_t src_pipe_vc
Definition max96792_diag.h:241
uint8_t dst_pipe_vc
Definition max96792_diag.h:243
uint8_t src_pipe_dt
Definition max96792_diag.h:240
Structure to hold the video Rx block length error status of Pipe Y for the max96792 deserializer.
Definition max96792_diag.h:354
bool vid_blk_length_err[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:355
Structure to hold the video lock status for MAX96792 deserializer.
Definition max96792_diag.h:284
bool video_lock[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:286
bool video_lock_enabled[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:285
Structure to hold the pipe enabled status for all video pipes.
Definition max96792_diag.h:396
bool pipe_enabled[MAX96792_NUM_OF_VIDEO_PIPES]
Definition max96792_diag.h:397