dp_pll_7nm.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __MDSS_DP_PLL_7NM_H
  6. #define __MDSS_DP_PLL_7NM_H
  7. #define DP_VCO_HSCLK_RATE_1620MHZDIV1000 1620000UL
  8. #define DP_VCO_HSCLK_RATE_2700MHZDIV1000 2700000UL
  9. #define DP_VCO_HSCLK_RATE_5400MHZDIV1000 5400000UL
  10. #define DP_VCO_HSCLK_RATE_8100MHZDIV1000 8100000UL
  11. struct dp_pll_db_7nm {
  12. struct mdss_pll_resources *pll;
  13. /* lane and orientation settings */
  14. u8 lane_cnt;
  15. u8 orientation;
  16. /* COM PHY settings */
  17. u32 hsclk_sel;
  18. u32 dec_start_mode0;
  19. u32 div_frac_start1_mode0;
  20. u32 div_frac_start2_mode0;
  21. u32 div_frac_start3_mode0;
  22. u32 integloop_gain0_mode0;
  23. u32 integloop_gain1_mode0;
  24. u32 vco_tune_map;
  25. u32 lock_cmp1_mode0;
  26. u32 lock_cmp2_mode0;
  27. u32 lock_cmp_en;
  28. u32 cmn_config;
  29. u32 txn_tran_drv_emp_en;
  30. /* PHY vco divider */
  31. u32 phy_vco_div;
  32. };
  33. int dp_vco_set_rate_7nm(struct clk_hw *hw, unsigned long rate,
  34. unsigned long parent_rate);
  35. unsigned long dp_vco_recalc_rate_7nm(struct clk_hw *hw,
  36. unsigned long parent_rate);
  37. long dp_vco_round_rate_7nm(struct clk_hw *hw, unsigned long rate,
  38. unsigned long *parent_rate);
  39. int dp_vco_prepare_7nm(struct clk_hw *hw);
  40. void dp_vco_unprepare_7nm(struct clk_hw *hw);
  41. int dp_mux_set_parent_7nm(void *context,
  42. unsigned int reg, unsigned int val);
  43. int dp_mux_get_parent_7nm(void *context,
  44. unsigned int reg, unsigned int *val);
  45. #endif /* __MDSS_DP_PLL_7NM_H */