rffe.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _RFFE_H_
  13. #define _RFFE_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_RFFE_BASE (0x50038000)
  17. typedef volatile struct
  18. {
  19. uint32_t cmd_mipi0; // 0x00000000
  20. uint32_t cmd_mipi1; // 0x00000004
  21. uint32_t data_mipi0; // 0x00000008
  22. uint32_t data_mipi1; // 0x0000000c
  23. uint32_t data_out0; // 0x00000010
  24. uint32_t data_out1; // 0x00000014
  25. uint32_t data_valid; // 0x00000018
  26. uint32_t mipi_status; // 0x0000001c
  27. } HWP_RFFE_T;
  28. #define hwp_rffe ((HWP_RFFE_T *)REG_ACCESS_ADDRESS(REG_RFFE_BASE))
  29. // cmd_mipi0
  30. typedef union {
  31. uint32_t v;
  32. struct
  33. {
  34. uint32_t cmd_mipi_low : 16; // [15:0]
  35. uint32_t __31_16 : 16; // [31:16]
  36. } b;
  37. } REG_RFFE_CMD_MIPI0_T;
  38. // cmd_mipi1
  39. typedef union {
  40. uint32_t v;
  41. struct
  42. {
  43. uint32_t cmd_mipi_high : 16; // [15:0]
  44. uint32_t __31_16 : 16; // [31:16]
  45. } b;
  46. } REG_RFFE_CMD_MIPI1_T;
  47. // data_mipi0
  48. typedef union {
  49. uint32_t v;
  50. struct
  51. {
  52. uint32_t data_mipi_low : 16; // [15:0]
  53. uint32_t __31_16 : 16; // [31:16]
  54. } b;
  55. } REG_RFFE_DATA_MIPI0_T;
  56. // data_mipi1
  57. typedef union {
  58. uint32_t v;
  59. struct
  60. {
  61. uint32_t data_mipi_high : 16; // [15:0]
  62. uint32_t __31_16 : 16; // [31:16]
  63. } b;
  64. } REG_RFFE_DATA_MIPI1_T;
  65. // data_out0
  66. typedef union {
  67. uint32_t v;
  68. struct
  69. {
  70. uint32_t data_out_low : 16; // [15:0]
  71. uint32_t __31_16 : 16; // [31:16]
  72. } b;
  73. } REG_RFFE_DATA_OUT0_T;
  74. // data_out1
  75. typedef union {
  76. uint32_t v;
  77. struct
  78. {
  79. uint32_t data_out_high : 16; // [15:0]
  80. uint32_t __31_16 : 16; // [31:16]
  81. } b;
  82. } REG_RFFE_DATA_OUT1_T;
  83. // data_valid
  84. typedef union {
  85. uint32_t v;
  86. struct
  87. {
  88. uint32_t data_valid : 4; // [3:0], read only
  89. uint32_t __31_4 : 28; // [31:4]
  90. } b;
  91. } REG_RFFE_DATA_VALID_T;
  92. // mipi_status
  93. typedef union {
  94. uint32_t v;
  95. struct
  96. {
  97. uint32_t cmd_done_status : 1; // [0], read only
  98. uint32_t master_busy_mipi_dly : 1; // [1], read only
  99. uint32_t __31_2 : 30; // [31:2]
  100. } b;
  101. } REG_RFFE_MIPI_STATUS_T;
  102. // cmd_mipi0
  103. #define RFFE_CMD_MIPI_LOW(n) (((n)&0xffff) << 0)
  104. // cmd_mipi1
  105. #define RFFE_CMD_MIPI_HIGH(n) (((n)&0xffff) << 0)
  106. // data_mipi0
  107. #define RFFE_DATA_MIPI_LOW(n) (((n)&0xffff) << 0)
  108. // data_mipi1
  109. #define RFFE_DATA_MIPI_HIGH(n) (((n)&0xffff) << 0)
  110. // data_out0
  111. #define RFFE_DATA_OUT_LOW(n) (((n)&0xffff) << 0)
  112. // data_out1
  113. #define RFFE_DATA_OUT_HIGH(n) (((n)&0xffff) << 0)
  114. // data_valid
  115. #define RFFE_DATA_VALID(n) (((n)&0xf) << 0)
  116. // mipi_status
  117. #define RFFE_CMD_DONE_STATUS (1 << 0)
  118. #define RFFE_MASTER_BUSY_MIPI_DLY (1 << 1)
  119. #endif // _RFFE_H_