phy-dp.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2019 Cadence Design Systems Inc.
  4. */
  5. #ifndef __PHY_DP_H_
  6. #define __PHY_DP_H_
  7. #include <linux/types.h>
  8. /**
  9. * struct phy_configure_opts_dp - DisplayPort PHY configuration set
  10. *
  11. * This structure is used to represent the configuration state of a
  12. * DisplayPort phy.
  13. */
  14. struct phy_configure_opts_dp {
  15. /**
  16. * @link_rate:
  17. *
  18. * Link Rate, in Mb/s, of the main link.
  19. *
  20. * Allowed values: 1620, 2160, 2430, 2700, 3240, 4320, 5400, 8100 Mb/s
  21. */
  22. unsigned int link_rate;
  23. /**
  24. * @lanes:
  25. *
  26. * Number of active, consecutive, data lanes, starting from
  27. * lane 0, used for the transmissions on main link.
  28. *
  29. * Allowed values: 1, 2, 4
  30. */
  31. unsigned int lanes;
  32. /**
  33. * @voltage:
  34. *
  35. * Voltage swing levels, as specified by DisplayPort specification,
  36. * to be used by particular lanes. One value per lane.
  37. * voltage[0] is for lane 0, voltage[1] is for lane 1, etc.
  38. *
  39. * Maximum value: 3
  40. */
  41. unsigned int voltage[4];
  42. /**
  43. * @pre:
  44. *
  45. * Pre-emphasis levels, as specified by DisplayPort specification, to be
  46. * used by particular lanes. One value per lane.
  47. *
  48. * Maximum value: 3
  49. */
  50. unsigned int pre[4];
  51. /**
  52. * @ssc:
  53. *
  54. * Flag indicating, whether or not to enable spread-spectrum clocking.
  55. *
  56. */
  57. u8 ssc : 1;
  58. /**
  59. * @set_rate:
  60. *
  61. * Flag indicating, whether or not reconfigure link rate and SSC to
  62. * requested values.
  63. *
  64. */
  65. u8 set_rate : 1;
  66. /**
  67. * @set_lanes:
  68. *
  69. * Flag indicating, whether or not reconfigure lane count to
  70. * requested value.
  71. *
  72. */
  73. u8 set_lanes : 1;
  74. /**
  75. * @set_voltages:
  76. *
  77. * Flag indicating, whether or not reconfigure voltage swing
  78. * and pre-emphasis to requested values. Only lanes specified
  79. * by "lanes" parameter will be affected.
  80. *
  81. */
  82. u8 set_voltages : 1;
  83. };
  84. #endif /* __PHY_DP_H_ */