linux/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * DesignWare MIPI DSI Host Controller v1.02 driver
 *
 * Copyright (c) 2016 Linaro Limited.
 * Copyright (c) 2014-2016 HiSilicon Limited.
 *
 * Author:
 *	Xinliang Liu <[email protected]>
 *	Xinliang Liu <[email protected]>
 *	Xinwei Kong <[email protected]>
 */

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/delay.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_device.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_of.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>

#include "dw_dsi_reg.h"

#define MAX_TX_ESC_CLK
#define ROUND(x, y)
#define PHY_REF_CLK_RATE
#define PHY_REF_CLK_PERIOD_PS

#define encoder_to_dsi(encoder)
#define host_to_dsi(host)

struct mipi_phy_params {};

struct dsi_hw_ctx {};

struct dw_dsi {};

struct dsi_data {};

struct dsi_phy_range {};

static const struct dsi_phy_range dphy_range_info[] =;

static u32 dsi_calc_phy_rate(u32 req_kHz, struct mipi_phy_params *phy)
{}

static void dsi_get_phy_params(u32 phy_req_kHz,
			       struct mipi_phy_params *phy)
{}

static u32 dsi_get_dpi_color_coding(enum mipi_dsi_pixel_format format)
{}

/*
 * dsi phy reg write function
 */
static void dsi_phy_tst_set(void __iomem *base, u32 reg, u32 val)
{}

static void dsi_set_phy_timer(void __iomem *base,
			      struct mipi_phy_params *phy,
			      u32 lanes)
{}

static void dsi_set_mipi_phy(void __iomem *base,
			     struct mipi_phy_params *phy,
			     u32 lanes)
{}

static void dsi_set_mode_timing(void __iomem *base,
				u32 lane_byte_clk_kHz,
				struct drm_display_mode *mode,
				enum mipi_dsi_pixel_format format)
{}

static void dsi_set_video_mode(void __iomem *base, unsigned long flags)
{}

static void dsi_mipi_init(struct dw_dsi *dsi)
{}

static void dsi_encoder_disable(struct drm_encoder *encoder)
{}

static void dsi_encoder_enable(struct drm_encoder *encoder)
{}

static enum drm_mode_status dsi_encoder_phy_mode_valid(
					struct drm_encoder *encoder,
					const struct drm_display_mode *mode)
{}

static enum drm_mode_status dsi_encoder_mode_valid(struct drm_encoder *encoder,
					const struct drm_display_mode *mode)

{}

static void dsi_encoder_mode_set(struct drm_encoder *encoder,
				 struct drm_display_mode *mode,
				 struct drm_display_mode *adj_mode)
{}

static int dsi_encoder_atomic_check(struct drm_encoder *encoder,
				    struct drm_crtc_state *crtc_state,
				    struct drm_connector_state *conn_state)
{}

static const struct drm_encoder_helper_funcs dw_encoder_helper_funcs =;

static int dw_drm_encoder_init(struct device *dev,
			       struct drm_device *drm_dev,
			       struct drm_encoder *encoder)
{}

static const struct component_ops dsi_ops;
static int dsi_host_attach(struct mipi_dsi_host *host,
			   struct mipi_dsi_device *mdsi)
{}

static int dsi_host_detach(struct mipi_dsi_host *host,
			   struct mipi_dsi_device *mdsi)
{}

static const struct mipi_dsi_host_ops dsi_host_ops =;

static int dsi_host_init(struct device *dev, struct dw_dsi *dsi)
{}

static int dsi_bridge_init(struct drm_device *dev, struct dw_dsi *dsi)
{}

static int dsi_bind(struct device *dev, struct device *master, void *data)
{}

static void dsi_unbind(struct device *dev, struct device *master, void *data)
{}

static const struct component_ops dsi_ops =;

static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
{}

static int dsi_probe(struct platform_device *pdev)
{}

static void dsi_remove(struct platform_device *pdev)
{}

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

static struct platform_driver dsi_driver =;

module_platform_driver();

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