linux/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c

// SPDX-License-Identifier: GPL-2.0
/*
 * camss-csiphy-3ph-1-0.c
 *
 * Qualcomm MSM Camera Subsystem - CSIPHY Module 3phase v1.0
 *
 * Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
 * Copyright (C) 2016-2018 Linaro Ltd.
 */

#include "camss.h"
#include "camss-csiphy.h"

#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>

#define CSIPHY_3PH_LNn_CFG1(n)
#define CSIPHY_3PH_LNn_CFG1_SWI_REC_DLY_PRG
#define CSIPHY_3PH_LNn_CFG2(n)
#define CSIPHY_3PH_LNn_CFG2_LP_REC_EN_INT
#define CSIPHY_3PH_LNn_CFG3(n)
#define CSIPHY_3PH_LNn_CFG4(n)
#define CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS
#define CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS_660
#define CSIPHY_3PH_LNn_CFG5(n)
#define CSIPHY_3PH_LNn_CFG5_T_HS_DTERM
#define CSIPHY_3PH_LNn_CFG5_HS_REC_EQ_FQ_INT
#define CSIPHY_3PH_LNn_TEST_IMP(n)
#define CSIPHY_3PH_LNn_TEST_IMP_HS_TERM_IMP
#define CSIPHY_3PH_LNn_MISC1(n)
#define CSIPHY_3PH_LNn_MISC1_IS_CLKLANE
#define CSIPHY_3PH_LNn_CFG6(n)
#define CSIPHY_3PH_LNn_CFG6_SWI_FORCE_INIT_EXIT
#define CSIPHY_3PH_LNn_CFG7(n)
#define CSIPHY_3PH_LNn_CFG7_SWI_T_INIT
#define CSIPHY_3PH_LNn_CFG8(n)
#define CSIPHY_3PH_LNn_CFG8_SWI_SKIP_WAKEUP
#define CSIPHY_3PH_LNn_CFG8_SKEW_FILTER_ENABLE
#define CSIPHY_3PH_LNn_CFG9(n)
#define CSIPHY_3PH_LNn_CFG9_SWI_T_WAKEUP
#define CSIPHY_3PH_LNn_CSI_LANE_CTRL15(n)
#define CSIPHY_3PH_LNn_CSI_LANE_CTRL15_SWI_SOT_SYMBOL

#define CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(n)
#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL5_CLK_ENABLE
#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_COMMON_PWRDN_B
#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID
#define CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(n)

#define CSIPHY_DEFAULT_PARAMS
#define CSIPHY_LANE_ENABLE
#define CSIPHY_SETTLE_CNT_LOWER_BYTE
#define CSIPHY_SETTLE_CNT_HIGHER_BYTE
#define CSIPHY_DNP_PARAMS
#define CSIPHY_2PH_REGS
#define CSIPHY_3PH_REGS

struct csiphy_reg_t {};

/* GEN2 1.0 2PH */
static const struct
csiphy_reg_t lane_regs_sdm845[5][14] =;

/* GEN2 1.1 2PH */
static const struct
csiphy_reg_t lane_regs_sc8280xp[5][14] =;

/* GEN2 1.2.1 2PH */
static const struct
csiphy_reg_t lane_regs_sm8250[5][20] =;

static void csiphy_hw_version_read(struct csiphy_device *csiphy,
				   struct device *dev)
{}

/*
 * csiphy_reset - Perform software reset on CSIPHY module
 * @csiphy: CSIPHY device
 */
static void csiphy_reset(struct csiphy_device *csiphy)
{}

static irqreturn_t csiphy_isr(int irq, void *dev)
{}

/*
 * csiphy_settle_cnt_calc - Calculate settle count value
 *
 * Helper function to calculate settle count value. This is
 * based on the CSI2 T_hs_settle parameter which in turn
 * is calculated based on the CSI2 transmitter link frequency.
 *
 * Return settle count value or 0 if the CSI2 link frequency
 * is not available
 */
static u8 csiphy_settle_cnt_calc(s64 link_freq, u32 timer_clk_rate)
{}

static void csiphy_gen1_config_lanes(struct csiphy_device *csiphy,
				     struct csiphy_config *cfg,
				     u8 settle_cnt)
{}

static void csiphy_gen2_config_lanes(struct csiphy_device *csiphy,
				     u8 settle_cnt)
{}

static u8 csiphy_get_lane_mask(struct csiphy_lanes_cfg *lane_cfg)
{}

static bool csiphy_is_gen2(u32 version)
{}

static void csiphy_lanes_enable(struct csiphy_device *csiphy,
				struct csiphy_config *cfg,
				s64 link_freq, u8 lane_mask)
{}

static void csiphy_lanes_disable(struct csiphy_device *csiphy,
				 struct csiphy_config *cfg)
{}

const struct csiphy_hw_ops csiphy_ops_3ph_1_0 =;