linux/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2019 MediaTek Inc.
 * Author: jitao.shi <[email protected]>
 */

#include "phy-mtk-io.h"
#include "phy-mtk-mipi-dsi.h"

#define MIPITX_DSI_CON
#define RG_DSI_LDOCORE_EN
#define RG_DSI_CKG_LDOOUT_EN
#define RG_DSI_BCLK_SEL
#define RG_DSI_LD_IDX_SEL
#define RG_DSI_PHYCLK_SEL
#define RG_DSI_DSICLK_FREQ_SEL
#define RG_DSI_LPTX_CLMP_EN

#define MIPITX_DSI_CLOCK_LANE
#define MIPITX_DSI_DATA_LANE0
#define MIPITX_DSI_DATA_LANE1
#define MIPITX_DSI_DATA_LANE2
#define MIPITX_DSI_DATA_LANE3
#define RG_DSI_LNTx_LDOOUT_EN
#define RG_DSI_LNTx_CKLANE_EN
#define RG_DSI_LNTx_LPTX_IPLUS1
#define RG_DSI_LNTx_LPTX_IPLUS2
#define RG_DSI_LNTx_LPTX_IMINUS
#define RG_DSI_LNTx_LPCD_IPLUS
#define RG_DSI_LNTx_LPCD_IMINUS
#define RG_DSI_LNTx_RT_CODE

#define MIPITX_DSI_TOP_CON
#define RG_DSI_LNT_INTR_EN
#define RG_DSI_LNT_HS_BIAS_EN
#define RG_DSI_LNT_IMP_CAL_EN
#define RG_DSI_LNT_TESTMODE_EN
#define RG_DSI_LNT_IMP_CAL_CODE
#define RG_DSI_LNT_AIO_SEL
#define RG_DSI_PAD_TIE_LOW_EN
#define RG_DSI_DEBUG_INPUT_EN
#define RG_DSI_PRESERVE

#define MIPITX_DSI_BG_CON
#define RG_DSI_BG_CORE_EN
#define RG_DSI_BG_CKEN
#define RG_DSI_BG_DIV
#define RG_DSI_BG_FAST_CHARGE

#define RG_DSI_V12_SEL
#define RG_DSI_V10_SEL
#define RG_DSI_V072_SEL
#define RG_DSI_V04_SEL
#define RG_DSI_V032_SEL
#define RG_DSI_V02_SEL
#define RG_DSI_VOUT_MSK
#define RG_DSI_BG_R1_TRIM
#define RG_DSI_BG_R2_TRIM

#define MIPITX_DSI_PLL_CON0
#define RG_DSI_MPPLL_PLL_EN
#define RG_DSI_MPPLL_PREDIV
#define RG_DSI_MPPLL_TXDIV0
#define RG_DSI_MPPLL_TXDIV1
#define RG_DSI_MPPLL_POSDIV
#define RG_DSI_MPPLL_DIV_MSK
#define RG_DSI_MPPLL_MONVC_EN
#define RG_DSI_MPPLL_MONREF_EN
#define RG_DSI_MPPLL_VOD_EN

#define MIPITX_DSI_PLL_CON1
#define RG_DSI_MPPLL_SDM_FRA_EN
#define RG_DSI_MPPLL_SDM_SSC_PH_INIT
#define RG_DSI_MPPLL_SDM_SSC_EN
#define RG_DSI_MPPLL_SDM_SSC_PRD

#define MIPITX_DSI_PLL_CON2

#define MIPITX_DSI_PLL_TOP
#define RG_DSI_MPPLL_PRESERVE

#define MIPITX_DSI_PLL_PWR
#define RG_DSI_MPPLL_SDM_PWR_ON
#define RG_DSI_MPPLL_SDM_ISO_EN
#define RG_DSI_MPPLL_SDM_PWR_ACK

#define MIPITX_DSI_SW_CTRL
#define SW_CTRL_EN

#define MIPITX_DSI_SW_CTRL_CON0
#define SW_LNTC_LPTX_PRE_OE
#define SW_LNTC_LPTX_OE
#define SW_LNTC_LPTX_P
#define SW_LNTC_LPTX_N
#define SW_LNTC_HSTX_PRE_OE
#define SW_LNTC_HSTX_OE
#define SW_LNTC_HSTX_ZEROCLK
#define SW_LNT0_LPTX_PRE_OE
#define SW_LNT0_LPTX_OE
#define SW_LNT0_LPTX_P
#define SW_LNT0_LPTX_N
#define SW_LNT0_HSTX_PRE_OE
#define SW_LNT0_HSTX_OE
#define SW_LNT0_LPRX_EN
#define SW_LNT1_LPTX_PRE_OE
#define SW_LNT1_LPTX_OE
#define SW_LNT1_LPTX_P
#define SW_LNT1_LPTX_N
#define SW_LNT1_HSTX_PRE_OE
#define SW_LNT1_HSTX_OE
#define SW_LNT2_LPTX_PRE_OE
#define SW_LNT2_LPTX_OE
#define SW_LNT2_LPTX_P
#define SW_LNT2_LPTX_N
#define SW_LNT2_HSTX_PRE_OE
#define SW_LNT2_HSTX_OE

static int mtk_mipi_tx_pll_prepare(struct clk_hw *hw)
{}

static void mtk_mipi_tx_pll_unprepare(struct clk_hw *hw)
{}

static long mtk_mipi_tx_pll_round_rate(struct clk_hw *hw, unsigned long rate,
				       unsigned long *prate)
{}

static const struct clk_ops mtk_mipi_tx_pll_ops =;

static void mtk_mipi_tx_power_on_signal(struct phy *phy)
{}

static void mtk_mipi_tx_power_off_signal(struct phy *phy)
{}

const struct mtk_mipitx_data mt2701_mipitx_data =;

const struct mtk_mipitx_data mt8173_mipitx_data =;