linux/drivers/phy/freescale/phy-fsl-samsung-hdmi.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2020 NXP
 * Copyright 2022 Pengutronix, Lucas Stach <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

#define PHY_REG_00
#define PHY_REG_01
#define PHY_REG_02
#define PHY_REG_08
#define PHY_REG_09
#define PHY_REG_10
#define PHY_REG_11

#define PHY_REG_12
#define REG12_CK_DIV_MASK

#define PHY_REG_13
#define REG13_TG_CODE_LOW_MASK

#define PHY_REG_14
#define REG14_TOL_MASK
#define REG14_RP_CODE_MASK
#define REG14_TG_CODE_HIGH_MASK

#define PHY_REG_15
#define PHY_REG_16
#define PHY_REG_17
#define PHY_REG_18
#define PHY_REG_19
#define PHY_REG_20

#define PHY_REG_21
#define REG21_SEL_TX_CK_INV
#define REG21_PMS_S_MASK

#define PHY_REG_22
#define PHY_REG_23
#define PHY_REG_24
#define PHY_REG_25
#define PHY_REG_26
#define PHY_REG_27
#define PHY_REG_28
#define PHY_REG_29
#define PHY_REG_30
#define PHY_REG_31
#define PHY_REG_32

/*
 * REG33 does not match the ref manual. According to Sandor Yu from NXP,
 * "There is a doc issue on the i.MX8MP latest RM"
 * REG33 is being used per guidance from Sandor
 */

#define PHY_REG_33
#define REG33_MODE_SET_DONE
#define REG33_FIX_DA

#define PHY_REG_34
#define REG34_PHY_READY
#define REG34_PLL_LOCK
#define REG34_PHY_CLK_READY

#define PHY_REG_35
#define PHY_REG_36
#define PHY_REG_37
#define PHY_REG_38
#define PHY_REG_39
#define PHY_REG_40
#define PHY_REG_41
#define PHY_REG_42
#define PHY_REG_43
#define PHY_REG_44
#define PHY_REG_45
#define PHY_REG_46
#define PHY_REG_47

#define PHY_PLL_DIV_REGS_NUM

struct phy_config {};

static const struct phy_config phy_pll_cfg[] =;

struct reg_settings {};

static const struct reg_settings common_phy_cfg[] =;

struct fsl_samsung_hdmi_phy {};

static inline struct fsl_samsung_hdmi_phy *
to_fsl_samsung_hdmi_phy(struct clk_hw *hw)
{}

static void
fsl_samsung_hdmi_phy_configure_pixclk(struct fsl_samsung_hdmi_phy *phy,
				      const struct phy_config *cfg)
{}

static void
fsl_samsung_hdmi_phy_configure_pll_lock_det(struct fsl_samsung_hdmi_phy *phy,
					    const struct phy_config *cfg)
{}

static int fsl_samsung_hdmi_phy_configure(struct fsl_samsung_hdmi_phy *phy,
					  const struct phy_config *cfg)
{}

static unsigned long phy_clk_recalc_rate(struct clk_hw *hw,
					 unsigned long parent_rate)
{}

static long phy_clk_round_rate(struct clk_hw *hw,
			       unsigned long rate, unsigned long *parent_rate)
{}

static int phy_clk_set_rate(struct clk_hw *hw,
			    unsigned long rate, unsigned long parent_rate)
{}

static const struct clk_ops phy_clk_ops =;

static int phy_clk_register(struct fsl_samsung_hdmi_phy *phy)
{}

static int fsl_samsung_hdmi_phy_probe(struct platform_device *pdev)
{}

static void fsl_samsung_hdmi_phy_remove(struct platform_device *pdev)
{}

static int __maybe_unused fsl_samsung_hdmi_phy_suspend(struct device *dev)
{}

static int __maybe_unused fsl_samsung_hdmi_phy_resume(struct device *dev)
{}

static DEFINE_RUNTIME_DEV_PM_OPS(fsl_samsung_hdmi_phy_pm_ops,
				 fsl_samsung_hdmi_phy_suspend,
				 fsl_samsung_hdmi_phy_resume, NULL);

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

static struct platform_driver fsl_samsung_hdmi_phy_driver =;
module_platform_driver();

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