1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2018 MediaTek Inc.
7 #ifndef _MTK_HDMI_PHY_H
8 #define _MTK_HDMI_PHY_H
10 #include <linux/clk-provider.h>
11 #include <linux/delay.h>
13 #include <linux/mfd/syscon.h>
14 #include <linux/module.h>
15 #include <linux/of_device.h>
16 #include <linux/phy/phy.h>
17 #include <linux/platform_device.h>
18 #include <linux/types.h>
22 struct mtk_hdmi_phy_conf {
25 const struct clk_ops *hdmi_phy_clk_ops;
26 void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
27 void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
33 struct mtk_hdmi_phy_conf *conf;
36 unsigned long pll_rate;
37 unsigned char drv_imp_clk;
38 unsigned char drv_imp_d2;
39 unsigned char drv_imp_d1;
40 unsigned char drv_imp_d0;
42 unsigned int ibias_up;
45 void mtk_hdmi_phy_clear_bits(struct mtk_hdmi_phy *hdmi_phy, u32 offset,
47 void mtk_hdmi_phy_set_bits(struct mtk_hdmi_phy *hdmi_phy, u32 offset,
49 void mtk_hdmi_phy_mask(struct mtk_hdmi_phy *hdmi_phy, u32 offset,
51 struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw);
53 extern struct platform_driver mtk_hdmi_phy_driver;
54 extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf;
55 extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf;
57 #endif /* _MTK_HDMI_PHY_H */