unipro.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. * drivers/scsi/ufs/unipro.h
  3. *
  4. * Copyright (C) 2013 Samsung Electronics Co., Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef _UNIPRO_H_
  12. #define _UNIPRO_H_
  13. /*
  14. * PHY Adpater attributes
  15. */
  16. #define PA_ACTIVETXDATALANES 0x1560
  17. #define PA_ACTIVERXDATALANES 0x1580
  18. #define PA_TXTRAILINGCLOCKS 0x1564
  19. #define PA_PHY_TYPE 0x1500
  20. #define PA_AVAILTXDATALANES 0x1520
  21. #define PA_AVAILRXDATALANES 0x1540
  22. #define PA_MINRXTRAILINGCLOCKS 0x1543
  23. #define PA_TXPWRSTATUS 0x1567
  24. #define PA_RXPWRSTATUS 0x1582
  25. #define PA_TXFORCECLOCK 0x1562
  26. #define PA_TXPWRMODE 0x1563
  27. #define PA_LEGACYDPHYESCDL 0x1570
  28. #define PA_MAXTXSPEEDFAST 0x1521
  29. #define PA_MAXTXSPEEDSLOW 0x1522
  30. #define PA_MAXRXSPEEDFAST 0x1541
  31. #define PA_MAXRXSPEEDSLOW 0x1542
  32. #define PA_TXLINKSTARTUPHS 0x1544
  33. #define PA_TXSPEEDFAST 0x1565
  34. #define PA_TXSPEEDSLOW 0x1566
  35. #define PA_REMOTEVERINFO 0x15A0
  36. #define PA_TXGEAR 0x1568
  37. #define PA_TXTERMINATION 0x1569
  38. #define PA_HSSERIES 0x156A
  39. #define PA_PWRMODE 0x1571
  40. #define PA_RXGEAR 0x1583
  41. #define PA_RXTERMINATION 0x1584
  42. #define PA_MAXRXPWMGEAR 0x1586
  43. #define PA_MAXRXHSGEAR 0x1587
  44. #define PA_RXHSUNTERMCAP 0x15A5
  45. #define PA_RXLSTERMCAP 0x15A6
  46. #define PA_PACPREQTIMEOUT 0x1590
  47. #define PA_PACPREQEOBTIMEOUT 0x1591
  48. #define PA_HIBERN8TIME 0x15A7
  49. #define PA_LOCALVERINFO 0x15A9
  50. #define PA_TACTIVATE 0x15A8
  51. #define PA_PACPFRAMECOUNT 0x15C0
  52. #define PA_PACPERRORCOUNT 0x15C1
  53. #define PA_PHYTESTCONTROL 0x15C2
  54. #define PA_PWRMODEUSERDATA0 0x15B0
  55. #define PA_PWRMODEUSERDATA1 0x15B1
  56. #define PA_PWRMODEUSERDATA2 0x15B2
  57. #define PA_PWRMODEUSERDATA3 0x15B3
  58. #define PA_PWRMODEUSERDATA4 0x15B4
  59. #define PA_PWRMODEUSERDATA5 0x15B5
  60. #define PA_PWRMODEUSERDATA6 0x15B6
  61. #define PA_PWRMODEUSERDATA7 0x15B7
  62. #define PA_PWRMODEUSERDATA8 0x15B8
  63. #define PA_PWRMODEUSERDATA9 0x15B9
  64. #define PA_PWRMODEUSERDATA10 0x15BA
  65. #define PA_PWRMODEUSERDATA11 0x15BB
  66. #define PA_CONNECTEDTXDATALANES 0x1561
  67. #define PA_CONNECTEDRXDATALANES 0x1581
  68. #define PA_LOGICALLANEMAP 0x15A1
  69. #define PA_SLEEPNOCONFIGTIME 0x15A2
  70. #define PA_STALLNOCONFIGTIME 0x15A3
  71. #define PA_SAVECONFIGTIME 0x15A4
  72. /* PA power modes */
  73. enum {
  74. FAST_MODE = 1,
  75. SLOW_MODE = 2,
  76. FASTAUTO_MODE = 4,
  77. SLOWAUTO_MODE = 5,
  78. UNCHANGED = 7,
  79. };
  80. /* PA TX/RX Frequency Series */
  81. enum {
  82. PA_HS_MODE_A = 1,
  83. PA_HS_MODE_B = 2,
  84. };
  85. /*
  86. * Data Link Layer Attributes
  87. */
  88. #define DL_TC0TXFCTHRESHOLD 0x2040
  89. #define DL_FC0PROTTIMEOUTVAL 0x2041
  90. #define DL_TC0REPLAYTIMEOUTVAL 0x2042
  91. #define DL_AFC0REQTIMEOUTVAL 0x2043
  92. #define DL_AFC0CREDITTHRESHOLD 0x2044
  93. #define DL_TC0OUTACKTHRESHOLD 0x2045
  94. #define DL_TC1TXFCTHRESHOLD 0x2060
  95. #define DL_FC1PROTTIMEOUTVAL 0x2061
  96. #define DL_TC1REPLAYTIMEOUTVAL 0x2062
  97. #define DL_AFC1REQTIMEOUTVAL 0x2063
  98. #define DL_AFC1CREDITTHRESHOLD 0x2064
  99. #define DL_TC1OUTACKTHRESHOLD 0x2065
  100. #define DL_TXPREEMPTIONCAP 0x2000
  101. #define DL_TC0TXMAXSDUSIZE 0x2001
  102. #define DL_TC0RXINITCREDITVAL 0x2002
  103. #define DL_TC0TXBUFFERSIZE 0x2005
  104. #define DL_PEERTC0PRESENT 0x2046
  105. #define DL_PEERTC0RXINITCREVAL 0x2047
  106. #define DL_TC1TXMAXSDUSIZE 0x2003
  107. #define DL_TC1RXINITCREDITVAL 0x2004
  108. #define DL_TC1TXBUFFERSIZE 0x2006
  109. #define DL_PEERTC1PRESENT 0x2066
  110. #define DL_PEERTC1RXINITCREVAL 0x2067
  111. /*
  112. * Network Layer Attributes
  113. */
  114. #define N_DEVICEID 0x3000
  115. #define N_DEVICEID_VALID 0x3001
  116. #define N_TC0TXMAXSDUSIZE 0x3020
  117. #define N_TC1TXMAXSDUSIZE 0x3021
  118. /*
  119. * Transport Layer Attributes
  120. */
  121. #define T_NUMCPORTS 0x4000
  122. #define T_NUMTESTFEATURES 0x4001
  123. #define T_CONNECTIONSTATE 0x4020
  124. #define T_PEERDEVICEID 0x4021
  125. #define T_PEERCPORTID 0x4022
  126. #define T_TRAFFICCLASS 0x4023
  127. #define T_PROTOCOLID 0x4024
  128. #define T_CPORTFLAGS 0x4025
  129. #define T_TXTOKENVALUE 0x4026
  130. #define T_RXTOKENVALUE 0x4027
  131. #define T_LOCALBUFFERSPACE 0x4028
  132. #define T_PEERBUFFERSPACE 0x4029
  133. #define T_CREDITSTOSEND 0x402A
  134. #define T_CPORTMODE 0x402B
  135. #define T_TC0TXMAXSDUSIZE 0x4060
  136. #define T_TC1TXMAXSDUSIZE 0x4061
  137. /* Boolean attribute values */
  138. enum {
  139. FALSE = 0,
  140. TRUE,
  141. };
  142. #endif /* _UNIPRO_H_ */