tvp514x.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * drivers/media/video/tvp514x.h
  4. *
  5. * Copyright (C) 2008 Texas Instruments Inc
  6. * Author: Vaibhav Hiremath <hvaibhav@ti.com>
  7. *
  8. * Contributors:
  9. * Sivaraj R <sivaraj@ti.com>
  10. * Brijesh R Jadav <brijesh.j@ti.com>
  11. * Hardik Shah <hardik.shah@ti.com>
  12. * Manjunath Hadli <mrh@ti.com>
  13. * Karicheri Muralidharan <m-karicheri2@ti.com>
  14. */
  15. #ifndef _TVP514X_H
  16. #define _TVP514X_H
  17. /*
  18. * Other macros
  19. */
  20. #define TVP514X_MODULE_NAME "tvp514x"
  21. #define TVP514X_XCLK_BT656 (27000000)
  22. /* Number of pixels and number of lines per frame for different standards */
  23. #define NTSC_NUM_ACTIVE_PIXELS (720)
  24. #define NTSC_NUM_ACTIVE_LINES (480)
  25. #define PAL_NUM_ACTIVE_PIXELS (720)
  26. #define PAL_NUM_ACTIVE_LINES (576)
  27. /* enum for different decoder input pin configuration */
  28. enum tvp514x_input {
  29. /*
  30. * CVBS input selection
  31. */
  32. INPUT_CVBS_VI1A = 0x0,
  33. INPUT_CVBS_VI1B,
  34. INPUT_CVBS_VI1C,
  35. INPUT_CVBS_VI2A = 0x04,
  36. INPUT_CVBS_VI2B,
  37. INPUT_CVBS_VI2C,
  38. INPUT_CVBS_VI3A = 0x08,
  39. INPUT_CVBS_VI3B,
  40. INPUT_CVBS_VI3C,
  41. INPUT_CVBS_VI4A = 0x0C,
  42. /*
  43. * S-Video input selection
  44. */
  45. INPUT_SVIDEO_VI2A_VI1A = 0x44,
  46. INPUT_SVIDEO_VI2B_VI1B,
  47. INPUT_SVIDEO_VI2C_VI1C,
  48. INPUT_SVIDEO_VI2A_VI3A = 0x54,
  49. INPUT_SVIDEO_VI2B_VI3B,
  50. INPUT_SVIDEO_VI2C_VI3C,
  51. INPUT_SVIDEO_VI4A_VI1A = 0x4C,
  52. INPUT_SVIDEO_VI4A_VI1B,
  53. INPUT_SVIDEO_VI4A_VI1C,
  54. INPUT_SVIDEO_VI4A_VI3A = 0x5C,
  55. INPUT_SVIDEO_VI4A_VI3B,
  56. INPUT_SVIDEO_VI4A_VI3C,
  57. /* Need to add entries for
  58. * RGB, YPbPr and SCART.
  59. */
  60. INPUT_INVALID
  61. };
  62. /* enum for output format supported. */
  63. enum tvp514x_output {
  64. OUTPUT_10BIT_422_EMBEDDED_SYNC = 0,
  65. OUTPUT_20BIT_422_SEPERATE_SYNC,
  66. OUTPUT_10BIT_422_SEPERATE_SYNC = 3,
  67. OUTPUT_INVALID
  68. };
  69. /**
  70. * struct tvp514x_platform_data - Platform data values and access functions.
  71. * @clk_polarity: Clock polarity of the current interface.
  72. * @hs_polarity: HSYNC Polarity configuration for current interface.
  73. * @vs_polarity: VSYNC Polarity configuration for current interface.
  74. */
  75. struct tvp514x_platform_data {
  76. /* Interface control params */
  77. bool clk_polarity;
  78. bool hs_polarity;
  79. bool vs_polarity;
  80. };
  81. #endif /* ifndef _TVP514X_H */