linux/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (c) 2018 Jernej Skrabec <[email protected]>
 */

#include <linux/delay.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>

#include "sun8i_dw_hdmi.h"

/*
 * Address can be actually any value. Here is set to same value as
 * it is set in BSP driver.
 */
#define I2C_ADDR

static const struct dw_hdmi_mpll_config sun50i_h6_mpll_cfg[] =;

static const struct dw_hdmi_curr_ctrl sun50i_h6_cur_ctr[] =;

static const struct dw_hdmi_phy_config sun50i_h6_phy_config[] =;

static void sun8i_hdmi_phy_set_polarity(struct sun8i_hdmi_phy *phy,
					const struct drm_display_mode *mode)
{
	u32 val = 0;

	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
		val |= SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC;

	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
		val |= SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC;

	regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_DBG_CTRL_REG,
			   SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK, val);
};

static int sun8i_a83t_hdmi_phy_config(struct dw_hdmi *hdmi, void *data,
				      const struct drm_display_info *display,
				      const struct drm_display_mode *mode)
{}

static void sun8i_a83t_hdmi_phy_disable(struct dw_hdmi *hdmi, void *data)
{}

static const struct dw_hdmi_phy_ops sun8i_a83t_hdmi_phy_ops =;

static int sun8i_h3_hdmi_phy_config(struct dw_hdmi *hdmi, void *data,
				    const struct drm_display_info *display,
				    const struct drm_display_mode *mode)
{}

static void sun8i_h3_hdmi_phy_disable(struct dw_hdmi *hdmi, void *data)
{}

static const struct dw_hdmi_phy_ops sun8i_h3_hdmi_phy_ops =;

static void sun8i_hdmi_phy_unlock(struct sun8i_hdmi_phy *phy)
{}

static void sun50i_hdmi_phy_init_h6(struct sun8i_hdmi_phy *phy)
{}

static void sun8i_hdmi_phy_init_a83t(struct sun8i_hdmi_phy *phy)
{}

static void sun8i_hdmi_phy_init_h3(struct sun8i_hdmi_phy *phy)
{}

int sun8i_hdmi_phy_init(struct sun8i_hdmi_phy *phy)
{}

void sun8i_hdmi_phy_deinit(struct sun8i_hdmi_phy *phy)
{}

void sun8i_hdmi_phy_set_ops(struct sun8i_hdmi_phy *phy,
			    struct dw_hdmi_plat_data *plat_data)
{}

static const struct regmap_config sun8i_hdmi_phy_regmap_config =;

static const struct sun8i_hdmi_phy_variant sun8i_a83t_hdmi_phy =;

static const struct sun8i_hdmi_phy_variant sun8i_h3_hdmi_phy =;

static const struct sun8i_hdmi_phy_variant sun8i_r40_hdmi_phy =;

static const struct sun8i_hdmi_phy_variant sun50i_a64_hdmi_phy =;

static const struct sun8i_hdmi_phy_variant sun50i_h6_hdmi_phy =;

static const struct of_device_id sun8i_hdmi_phy_of_table[] =;

int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
{}

static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
{}

struct platform_driver sun8i_hdmi_phy_driver =;