cslr_des_hdcp.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /********************************************************************
  2. * Copyright (C) 2013-2014 Texas Instruments Incorporated.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. *
  11. * Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the
  14. * distribution.
  15. *
  16. * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. */
  33. #ifndef CSLR_DESHDCP_H_
  34. #define CSLR_DESHDCP_H_
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. #include <ti/csl/cslr.h>
  40. #include <ti/csl/tistdtypes.h>
  41. /**************************************************************************
  42. * Register Overlay Structure for __ALL__
  43. **************************************************************************/
  44. typedef struct {
  45. volatile Uint8 RSVD0[32];
  46. volatile Uint32 CTRL;
  47. volatile Uint32 DATA_L;
  48. volatile Uint32 DATA_H;
  49. volatile Uint32 REV;
  50. volatile Uint32 MASK;
  51. volatile Uint32 SYSSTS;
  52. volatile Uint8 RSVD1[8];
  53. volatile Uint32 MEM[80];
  54. } CSL_DesHdcpRegs;
  55. /**************************************************************************
  56. * Register Macros
  57. **************************************************************************/
  58. /* deshdcp Control register. */
  59. #define CSL_DESHDCP_CTRL (0x20U)
  60. /* deshdcp data register to read/write encrypted/decrypted data. When
  61. * decryption, reading this registers returns 0. */
  62. #define CSL_DESHDCP_DATA_L (0x24U)
  63. /* deshdcp data register to read/write encrypted/decrypted data. When
  64. * decryption, reading this registers returns 0. */
  65. #define CSL_DESHDCP_DATA_H (0x28U)
  66. /* deshdcp Revision number register */
  67. #define CSL_DESHDCP_REV (0x2CU)
  68. /* deshdcp Mask register. */
  69. #define CSL_DESHDCP_MASK (0x30U)
  70. /* deshdcp System status register */
  71. #define CSL_DESHDCP_SYSSTS (0x34U)
  72. /* deshdcp registers to hold the data decrypted or any data written through
  73. * host interface. */
  74. #define CSL_DESHDCP_MEM(i) (0x40U + ((i) * (0x4U)))
  75. /**************************************************************************
  76. * Field Definition Macros
  77. **************************************************************************/
  78. #define CSL_DESHDCP_RESERVED_RESETVAL (0x00000000U)
  79. /* CTRL */
  80. #define CSL_DESHDCP_CTRL_DIRECTION_MASK (0x00000004U)
  81. #define CSL_DESHDCP_CTRL_DIRECTION_SHIFT (2U)
  82. #define CSL_DESHDCP_CTRL_DIRECTION_RESETVAL (0x00000000U)
  83. #define CSL_DESHDCP_CTRL_DIRECTION_DEC (0x00000000U)
  84. #define CSL_DESHDCP_CTRL_DIRECTION_ENC (0x00000001U)
  85. #define CSL_DESHDCP_CTRL_INPUT_READY_MASK (0x00000002U)
  86. #define CSL_DESHDCP_CTRL_INPUT_READY_SHIFT (1U)
  87. #define CSL_DESHDCP_CTRL_INPUT_READY_RESETVAL (0x00000001U)
  88. #define CSL_DESHDCP_CTRL_INPUT_READY_INPUTREADY (0x00000001U)
  89. #define CSL_DESHDCP_CTRL_INPUT_READY_NOINPUTREADY (0x00000000U)
  90. #define CSL_DESHDCP_CTRL_OUTPUT_READY_MASK (0x00000001U)
  91. #define CSL_DESHDCP_CTRL_OUTPUT_READY_SHIFT (0U)
  92. #define CSL_DESHDCP_CTRL_OUTPUT_READY_RESETVAL (0x00000000U)
  93. #define CSL_DESHDCP_CTRL_OUTPUT_READY_OUTPUTREADY (0x00000001U)
  94. #define CSL_DESHDCP_CTRL_OUTPUT_READY_NOUTOUTREADY (0x00000000U)
  95. #define CSL_DESHDCP_CTRL_RESETVAL (0x00000002U)
  96. /* DATA_L */
  97. #define CSL_DESHDCP_DATA_L_DHDCP_DATA_L_MASK (0xFFFFFFFFU)
  98. #define CSL_DESHDCP_DATA_L_DHDCP_DATA_L_SHIFT (0U)
  99. #define CSL_DESHDCP_DATA_L_DHDCP_DATA_L_RESETVAL (0x00000000U)
  100. #define CSL_DESHDCP_DATA_L_DHDCP_DATA_L_MAX (0xffffffffU)
  101. #define CSL_DESHDCP_DATA_L_RESETVAL (0x00000000U)
  102. /* DATA_H */
  103. #define CSL_DESHDCP_DATA_H_DHDCP_DATA_H_MASK (0xFFFFFFFFU)
  104. #define CSL_DESHDCP_DATA_H_DHDCP_DATA_H_SHIFT (0U)
  105. #define CSL_DESHDCP_DATA_H_DHDCP_DATA_H_RESETVAL (0x00000000U)
  106. #define CSL_DESHDCP_DATA_H_DHDCP_DATA_H_MAX (0xffffffffU)
  107. #define CSL_DESHDCP_DATA_H_RESETVAL (0x00000000U)
  108. /* REV */
  109. #define CSL_DESHDCP_REV_REV_NB_MASK (0x000000FFU)
  110. #define CSL_DESHDCP_REV_REV_NB_SHIFT (0U)
  111. #define CSL_DESHDCP_REV_REV_NB_RESETVAL (0x00000001U)
  112. #define CSL_DESHDCP_REV_REV_NB_MAX (0x000000ffU)
  113. #define CSL_DESHDCP_REV_RESETVAL (0x00000001U)
  114. /* MASK */
  115. #define CSL_DESHDCP_MASK_AUTOIDLE_MASK (0x00000001U)
  116. #define CSL_DESHDCP_MASK_AUTOIDLE_SHIFT (0U)
  117. #define CSL_DESHDCP_MASK_AUTOIDLE_RESETVAL (0x00000001U)
  118. #define CSL_DESHDCP_MASK_AUTOIDLE_AUTOIDE (0x00000001U)
  119. #define CSL_DESHDCP_MASK_AUTOIDLE_NOAUTOIDLE (0x00000000U)
  120. #define CSL_DESHDCP_MASK_SOFTRESET_MASK (0x00000002U)
  121. #define CSL_DESHDCP_MASK_SOFTRESET_SHIFT (1U)
  122. #define CSL_DESHDCP_MASK_SOFTRESET_RESETVAL (0x00000000U)
  123. #define CSL_DESHDCP_MASK_SOFTRESET_NOSOFTRESET (0x00000000U)
  124. #define CSL_DESHDCP_MASK_SOFTRESET_SOFTRESET (0x00000001U)
  125. #define CSL_DESHDCP_MASK_SIDLE_MASK (0x000000C0U)
  126. #define CSL_DESHDCP_MASK_SIDLE_SHIFT (6U)
  127. #define CSL_DESHDCP_MASK_SIDLE_RESETVAL (0x00000000U)
  128. #define CSL_DESHDCP_MASK_SIDLE_NOIDLE (0x00000001U)
  129. #define CSL_DESHDCP_MASK_SIDLE_RESERVED (0x00000003U)
  130. #define CSL_DESHDCP_MASK_SIDLE_FORCEIDLE (0x00000000U)
  131. #define CSL_DESHDCP_MASK_SIDLE_SMARTIDLE (0x00000002U)
  132. #define CSL_DESHDCP_MASK_RESETVAL (0x00000001U)
  133. /* SYSSTS */
  134. #define CSL_DESHDCP_SYSSTS_RESETDONE_MASK (0x00000001U)
  135. #define CSL_DESHDCP_SYSSTS_RESETDONE_SHIFT (0U)
  136. #define CSL_DESHDCP_SYSSTS_RESETDONE_RESETVAL (0x00000001U)
  137. #define CSL_DESHDCP_SYSSTS_RESETDONE_MAX (0x00000001U)
  138. #define CSL_DESHDCP_SYSSTS_RESETVAL (0x00000001U)
  139. #define CSL_DESHDCP_RESERVED1_RESETVAL (0x00000000U)
  140. /* MEM */
  141. #define CSL_DESHDCP_MEM_DATA_MASK (0xFFFFFFFFU)
  142. #define CSL_DESHDCP_MEM_DATA_SHIFT (0U)
  143. #define CSL_DESHDCP_MEM_DATA_RESETVAL (0x00000000U)
  144. #define CSL_DESHDCP_MEM_DATA_MAX (0xffffffffU)
  145. #define CSL_DESHDCP_MEM_RESETVAL (0x00000000U)
  146. #ifdef __cplusplus
  147. }
  148. #endif
  149. #endif