linux/drivers/phy/starfive/phy-jh7110-dphy-tx.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * DPHY TX driver for the StarFive JH7110 SoC
 *
 * Copyright (C) 2023 StarFive Technology Co., Ltd.
 * Author: Keith Zhao <[email protected]>
 * Author: Shengyang Chen <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/phy/phy.h>
#include <linux/phy/phy-mipi-dphy.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>

#define STF_DPHY_APBIFSAIF_SYSCFG(x)

#define STF_DPHY_AON_POWER_READY_N_ACTIVE
#define STF_DPHY_AON_POWER_READY_N
#define STF_DPHY_CFG_L0_SWAP_SEL
#define STF_DPHY_CFG_L1_SWAP_SEL
#define STF_DPHY_CFG_L2_SWAP_SEL
#define STF_DPHY_CFG_L3_SWAP_SEL
#define STF_DPHY_CFG_L4_SWAP_SEL
#define STF_DPHY_RGS_CDTX_PLL_UNLOCK
#define STF_DPHY_RG_CDTX_L0N_HSTX_RES
#define STF_DPHY_RG_CDTX_L0P_HSTX_RES

#define STF_DPHY_RG_CDTX_L1P_HSTX_RES
#define STF_DPHY_RG_CDTX_L2N_HSTX_RES
#define STF_DPHY_RG_CDTX_L2P_HSTX_RES
#define STF_DPHY_RG_CDTX_L3N_HSTX_RES
#define STF_DPHY_RG_CDTX_L3P_HSTX_RES

#define STF_DPHY_RG_CDTX_L4N_HSTX_RES
#define STF_DPHY_RG_CDTX_L4P_HSTX_RES
#define STF_DPHY_RG_CDTX_PLL_FBK_FRA

#define STF_DPHY_RG_CDTX_PLL_FBK_INT
#define STF_DPHY_RG_CDTX_PLL_FM_EN
#define STF_DPHY_RG_CDTX_PLL_LDO_STB_X2_EN
#define STF_DPHY_RG_CDTX_PLL_PRE_DIV

#define STF_DPHY_RG_CDTX_PLL_SSC_EN

#define STF_DPHY_RG_CLANE_HS_CLK_POST_TIME
#define STF_DPHY_RG_CLANE_HS_CLK_PRE_TIME
#define STF_DPHY_RG_CLANE_HS_PRE_TIME
#define STF_DPHY_RG_CLANE_HS_TRAIL_TIME

#define STF_DPHY_RG_CLANE_HS_ZERO_TIME
#define STF_DPHY_RG_DLANE_HS_PRE_TIME
#define STF_DPHY_RG_DLANE_HS_TRAIL_TIME
#define STF_DPHY_RG_DLANE_HS_ZERO_TIME

#define STF_DPHY_RG_EXTD_CYCLE_SEL
#define STF_DPHY_SCFG_C_HS_PRE_ZERO_TIME

#define STF_DPHY_SCFG_DSI_TXREADY_ESC_SEL
#define STF_DPHY_SCFG_PPI_C_READY_SEL

#define STF_DPHY_REFCLK_IN_SEL
#define STF_DPHY_RESETB

#define STF_DPHY_REFCLK_12M
#define STF_DPHY_BITRATE_ALIGN

#define STF_MAP_LANES_NUM

#define STF_DPHY_LSHIFT_16(x)
#define STF_DPHY_LSHIFT_8(x)

#define STF_DPHY_HW_DELAY_US
#define STF_DPHY_HW_TIMEOUT_US

struct stf_dphy_config {};

static const struct stf_dphy_config reg_configs[] =;

struct stf_dphy_info {};

struct stf_dphy {};

static u32 stf_dphy_get_config_index(u32 bitrate)
{}

static void stf_dphy_hw_reset(struct stf_dphy *dphy, int assert)
{}

static int stf_dphy_configure(struct phy *phy, union phy_configure_opts *opts)
{}

static int stf_dphy_init(struct phy *phy)
{}

static int stf_dphy_exit(struct phy *phy)
{}

static int stf_dphy_power_on(struct phy *phy)
{}

static int stf_dphy_validate(struct phy *phy, enum phy_mode mode, int submode,
			     union phy_configure_opts *opts)
{}

static int stf_dphy_power_off(struct phy *phy)
{}

static const struct phy_ops stf_dphy_ops =;

static int stf_dphy_probe(struct platform_device *pdev)
{}

static const struct stf_dphy_info starfive_dphy_info =;

static const struct of_device_id stf_dphy_dt_ids[] =;
MODULE_DEVICE_TABLE(of, stf_dphy_dt_ids);

static struct platform_driver stf_dphy_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();