no-OS
Loading...
Searching...
No Matches
max96792_csi.h
Go to the documentation of this file.
1/*******************************************************************************
2 * @file max96792_csi.h
3 * @brief Header file of CSI Driver Implementation of MAX96792 Deserializer.
4 * @author Automotive Software and Systems team, Bangalore, India
5********************************************************************************
6 * Copyright 2025(c) Analog Devices, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 *
18 * 3. Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from this
20 * software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. "AS IS" AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
25 * EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
28 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
31 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32******************************************************************************/
33
34#ifndef MAX96792_CSI_H
35#define MAX96792_CSI_H
36
37#include "gmsl_common.h"
38#include "gmsl_cam_des.h"
39#include "gmsl_dbg.h"
40#include "gmsl_reg_access.h"
41#include "no_os_delay.h"
42#include "no_os_error.h"
43#include "max96792.h"
44
45extern int max96792_csi_update_pipe_remaps(struct gmsl_dev *dev,
46 struct gmsl_pipe_des_pipe_cfg *pipe);
47extern int max96792_csi_select_links(struct gmsl_dev *dev, unsigned int mask);
49 enum gmsl_link link, bool enable);
50extern int max96792_csi_enable_mipi_out(struct gmsl_dev *dev, bool enable);
51extern int max96792_csi_init_pipe(struct gmsl_dev *dev,
52 bool pipe_stream_autoselect, struct gmsl_pipe_des_pipe_cfg *pipe);
53extern int max96792_csi_init_phy(struct gmsl_dev *dev,
54 struct gmsl_link_des_phy_cfg *phy);
55extern int max96792_csi_init(struct gmsl_dev *dev);
56extern int max96792_csi_set_cphy_config(struct gmsl_dev *dev,
57 struct gmsl_link_des_phy_cfg *phy);
58extern int max96792_csi_set_dphy_config(struct gmsl_dev *dev,
59 struct gmsl_link_des_phy_cfg *phy);
60extern int max96792_csi_set_rx_link_rate(struct gmsl_dev *dev,
61 struct gmsl_dev_csi_des_init_param *init_param, unsigned int mask);
62extern int max96792_mipi_tunnel_pipe_cntrl(struct gmsl_dev *dev,
63 struct gmsl_pipe_des_pipe_cfg *pipe,
64 enum gmsl_link_mipi_csi_controller dst_cntroller);
65extern int max96792_pipe_set_tx_mode(struct gmsl_dev *dev,
66 struct gmsl_pipe_des_pipe_cfg *pipe);
67extern int max96792_csi_copy0_phy_cfg(struct gmsl_dev *dev, bool copy_en,
68 enum gmsl_link_mipi_csi_controller *src_cont,
69 enum gmsl_link_mipi_csi_controller *dest_cont);
70extern int max96792_csi_copy1_phy_cfg(struct gmsl_dev *dev, bool copy_en,
71 enum gmsl_link_mipi_csi_controller *src_cont,
72 enum gmsl_link_mipi_csi_controller *dest_cont);
73extern int max96792_csi_update_link_config(struct gmsl_dev *dev,
74 unsigned int mask);
75#endif
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
gmsl_link_mipi_csi_controller
Enumerates the CSI controllers for the GMSL device.
Definition gmsl_common.h:114
gmsl_link
Enumerates GMSL Camera Deserializer Phy/Link.
Definition gmsl_common.h:80
int max96792_csi_init(struct gmsl_dev *dev)
Initializes the MAX96792 CSI Deserializer.
Definition max96792_csi.c:956
int max96792_csi_set_rx_link_rate(struct gmsl_dev *dev, struct gmsl_dev_csi_des_init_param *init_param, unsigned int mask)
This API sets the RX link rate for the MAX96792 deserializer.
Definition max96792_csi.c:926
int max96792_csi_enable_mipi_out(struct gmsl_dev *dev, bool enable)
This API enables the MIPI CSI OUT from the Deserializer.
Definition max96792_csi.c:751
int max96792_csi_init_phy(struct gmsl_dev *dev, struct gmsl_link_des_phy_cfg *phy)
This API initializes the PHY for the MAX96792 deserializer.
Definition max96792_csi.c:817
int max96792_csi_select_links(struct gmsl_dev *dev, unsigned int mask)
This API selects/enables the Deserializer LINKs.
Definition max96792_csi.c:692
int max96792_csi_set_cphy_config(struct gmsl_dev *dev, struct gmsl_link_des_phy_cfg *phy)
This API sets the C-PHY configuration for the MAX96792 deserializer.
Definition max96792_csi.c:839
int max96792_cc_enable_remote_control_chnl(struct gmsl_dev *dev, enum gmsl_link link, bool enable)
This API enables Remote control channels of Deserializer device.
Definition max96792_csi.c:715
int max96792_csi_update_link_config(struct gmsl_dev *dev, unsigned int mask)
This API updates the link confguration on MAX96792 Deserializer.
Definition max96792_csi.c:1111
int max96792_csi_update_pipe_remaps(struct gmsl_dev *dev, struct gmsl_pipe_des_pipe_cfg *pipe)
This API updates the Deserializer PIPE remaps.
Definition max96792_csi.c:665
int max96792_mipi_tunnel_pipe_cntrl(struct gmsl_dev *dev, struct gmsl_pipe_des_pipe_cfg *pipe, enum gmsl_link_mipi_csi_controller dst_cntroller)
This API controls the MIPI tunnel pipe for a given pipe.
Definition max96792_csi.c:986
int max96792_pipe_set_tx_mode(struct gmsl_dev *dev, struct gmsl_pipe_des_pipe_cfg *pipe)
This API sets the PHY TX mode for a given pipe.
Definition max96792_csi.c:1010
int max96792_csi_init_pipe(struct gmsl_dev *dev, bool pipe_stream_autoselect, struct gmsl_pipe_des_pipe_cfg *pipe)
Initializes the CSI pipe for the MAX96792 deserializer.
Definition max96792_csi.c:775
int max96792_csi_set_dphy_config(struct gmsl_dev *dev, struct gmsl_link_des_phy_cfg *phy)
This API sets the D-PHY configuration for the MAX96792 deserializer.
Definition max96792_csi.c:883
int max96792_csi_copy0_phy_cfg(struct gmsl_dev *dev, bool copy_en, enum gmsl_link_mipi_csi_controller *src_cont, enum gmsl_link_mipi_csi_controller *dest_cont)
This API copies the PHY configuration from source controller to destination controller.
Definition max96792_csi.c:1038
int max96792_csi_copy1_phy_cfg(struct gmsl_dev *dev, bool copy_en, enum gmsl_link_mipi_csi_controller *src_cont, enum gmsl_link_mipi_csi_controller *dest_cont)
This API copies the PHY configuration from source controller to destination controller.
Definition max96792_csi.c:1075
Header file of Delay functions.
Error codes definition.
GMSL Deserializer driver initailization structure.
Definition gmsl_cam_des.h:188
Structure representing a GMSL device handle, containing configuration parameters and diagnostic opera...
Definition gmsl_common.h:159
A structure that contains video pipe configurations for Deserializer.
Definition gmsl_cam_des.h:132