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