phy-mtk-hdmi.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2018 MediaTek Inc.
  4. * Author: Chunhui Dai <[email protected]>
  5. */
  6. #ifndef _MTK_HDMI_PHY_H
  7. #define _MTK_HDMI_PHY_H
  8. #include <linux/clk.h>
  9. #include <linux/clk-provider.h>
  10. #include <linux/delay.h>
  11. #include <linux/mfd/syscon.h>
  12. #include <linux/module.h>
  13. #include <linux/of_device.h>
  14. #include <linux/phy/phy.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/types.h>
  17. struct mtk_hdmi_phy;
  18. struct mtk_hdmi_phy_conf {
  19. unsigned long flags;
  20. bool pll_default_off;
  21. const struct clk_ops *hdmi_phy_clk_ops;
  22. void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
  23. void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
  24. };
  25. struct mtk_hdmi_phy {
  26. void __iomem *regs;
  27. struct device *dev;
  28. struct mtk_hdmi_phy_conf *conf;
  29. struct clk *pll;
  30. struct clk_hw pll_hw;
  31. unsigned long pll_rate;
  32. unsigned char drv_imp_clk;
  33. unsigned char drv_imp_d2;
  34. unsigned char drv_imp_d1;
  35. unsigned char drv_imp_d0;
  36. unsigned int ibias;
  37. unsigned int ibias_up;
  38. };
  39. struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw);
  40. extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf;
  41. extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf;
  42. #endif /* _MTK_HDMI_PHY_H */