#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/phy/phy-mipi-dphy.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define RK3399_GRF_SOC_CON9 …
#define RK3399_GRF_SOC_CON21 …
#define RK3399_GRF_SOC_CON22 …
#define RK3399_GRF_SOC_CON23 …
#define RK3399_GRF_SOC_CON24 …
#define RK3399_GRF_SOC_CON25 …
#define RK3399_GRF_SOC_STATUS1 …
#define CLOCK_LANE_HS_RX_CONTROL …
#define LANE0_HS_RX_CONTROL …
#define LANE1_HS_RX_CONTROL …
#define LANE2_HS_RX_CONTROL …
#define LANE3_HS_RX_CONTROL …
#define LANES_THS_SETTLE_CONTROL …
#define THS_SETTLE_COUNTER_THRESHOLD …
struct hsfreq_range { … };
static const struct hsfreq_range rk3399_mipidphy_hsfreq_ranges[] = …;
static const char * const rk3399_mipidphy_clks[] = …;
enum dphy_reg_id { … };
struct dphy_reg { … };
#define PHY_REG(_offset, _width, _shift) …
static const struct dphy_reg rk3399_grf_dphy_regs[] = …;
struct rk_dphy_drv_data { … };
struct rk_dphy { … };
static inline void rk_dphy_write_grf(struct rk_dphy *priv,
unsigned int index, u8 value)
{ … }
static void rk_dphy_write(struct rk_dphy *priv, u8 test_code, u8 test_data)
{ … }
static void rk_dphy_enable(struct rk_dphy *priv)
{ … }
static int rk_dphy_configure(struct phy *phy, union phy_configure_opts *opts)
{ … }
static int rk_dphy_power_on(struct phy *phy)
{ … }
static int rk_dphy_power_off(struct phy *phy)
{ … }
static int rk_dphy_init(struct phy *phy)
{ … }
static int rk_dphy_exit(struct phy *phy)
{ … }
static const struct phy_ops rk_dphy_ops = …;
static const struct rk_dphy_drv_data rk3399_mipidphy_drv_data = …;
static const struct of_device_id rk_dphy_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, rk_dphy_dt_ids);
static int rk_dphy_probe(struct platform_device *pdev)
{ … }
static struct platform_driver rk_dphy_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;