hdmi_pll.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __MDSS_HDMI_PLL_H
  6. #define __MDSS_HDMI_PLL_H
  7. struct hdmi_pll_cfg {
  8. unsigned long vco_rate;
  9. u32 reg;
  10. };
  11. struct hdmi_pll_vco_clk {
  12. struct clk_hw hw;
  13. unsigned long rate; /* current vco rate */
  14. unsigned long min_rate; /* min vco rate */
  15. unsigned long max_rate; /* max vco rate */
  16. bool rate_set;
  17. struct hdmi_pll_cfg *ip_seti;
  18. struct hdmi_pll_cfg *cp_seti;
  19. struct hdmi_pll_cfg *ip_setp;
  20. struct hdmi_pll_cfg *cp_setp;
  21. struct hdmi_pll_cfg *crctrl;
  22. void *priv;
  23. };
  24. static inline struct hdmi_pll_vco_clk *to_hdmi_vco_clk_hw(struct clk_hw *hw)
  25. {
  26. return container_of(hw, struct hdmi_pll_vco_clk, hw);
  27. }
  28. int hdmi_pll_clock_register_28lpm(struct platform_device *pdev,
  29. struct mdss_pll_resources *pll_res);
  30. int hdmi_pll_clock_register(struct platform_device *pdev,
  31. struct mdss_pll_resources *pll_res);
  32. int hdmi_20nm_pll_clock_register(struct platform_device *pdev,
  33. struct mdss_pll_resources *pll_res);
  34. int hdmi_8996_v1_pll_clock_register(struct platform_device *pdev,
  35. struct mdss_pll_resources *pll_res);
  36. int hdmi_8996_v2_pll_clock_register(struct platform_device *pdev,
  37. struct mdss_pll_resources *pll_res);
  38. int hdmi_8996_v3_pll_clock_register(struct platform_device *pdev,
  39. struct mdss_pll_resources *pll_res);
  40. int hdmi_8996_v3_1p8_pll_clock_register(struct platform_device *pdev,
  41. struct mdss_pll_resources *pll_res);
  42. int hdmi_8998_pll_clock_register(struct platform_device *pdev,
  43. struct mdss_pll_resources *pll_res);
  44. #endif