• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  *  Copyright (C) 2009-2014 Broadcom Corporation
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  ******************************************************************************/
18 
19 /******************************************************************************
20  *
21  *  This file contains the NFA HCI related definitions from the
22  *  specification.
23  *
24  ******************************************************************************/
25 
26 #ifndef NFA_HCI_DEFS_H
27 #define NFA_HCI_DEFS_H
28 
29 /* Static gates */
30 #define NFA_HCI_LOOP_BACK_GATE 0x04
31 #define NFA_HCI_IDENTITY_MANAGEMENT_GATE 0x05
32 
33 #define NFA_HCI_FIRST_HOST_SPECIFIC_GENERIC_GATE 0x10
34 #define NFA_HCI_LAST_HOST_SPECIFIC_GENERIC_GATE 0xEF
35 #define NFA_HCI_FIRST_PROP_GATE 0xF0
36 #define NFA_HCI_LAST_PROP_GATE 0xFF
37 
38 /* Generic Gates */
39 #define NFA_HCI_CONNECTIVITY_GATE 0x41
40 
41 /* Static pipes */
42 #define NFA_HCI_LINK_MANAGEMENT_PIPE 0x00
43 #define NFA_HCI_ADMIN_PIPE 0x01
44 
45 /* Dynamic pipe range */
46 #define NFA_HCI_FIRST_DYNAMIC_PIPE 0x02
47 #define NFA_HCI_LAST_DYNAMIC_PIPE 0x6F
48 
49 /* host_table */
50 #define NFA_HCI_HOST_CONTROLLER 0x00
51 #define NFA_HCI_DH_HOST 0x01
52 #define NFA_HCI_UICC_HOST 0x02
53 
54 /* Type of instruction */
55 #define NFA_HCI_COMMAND_TYPE 0x00
56 #define NFA_HCI_EVENT_TYPE 0x01
57 #define NFA_HCI_RESPONSE_TYPE 0x02
58 
59 /* Chaining bit value */
60 #define NFA_HCI_MESSAGE_FRAGMENTATION 0x00
61 #define NFA_HCI_NO_MESSAGE_FRAGMENTATION 0x01
62 
63 /* NFA HCI commands */
64 
65 /* Commands for all gates */
66 #define NFA_HCI_ANY_SET_PARAMETER 0x01
67 #define NFA_HCI_ANY_GET_PARAMETER 0x02
68 #define NFA_HCI_ANY_OPEN_PIPE 0x03
69 #define NFA_HCI_ANY_CLOSE_PIPE 0x04
70 
71 /* Admin gate commands */
72 #define NFA_HCI_ADM_CREATE_PIPE 0x10
73 #define NFA_HCI_ADM_DELETE_PIPE 0x11
74 #define NFA_HCI_ADM_NOTIFY_PIPE_CREATED 0x12
75 #define NFA_HCI_ADM_NOTIFY_PIPE_DELETED 0x13
76 #define NFA_HCI_ADM_CLEAR_ALL_PIPE 0x14
77 #define NFA_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED 0x15
78 
79 /* Connectivity gate command */
80 #define NFA_HCI_CON_PRO_HOST_REQUEST 0x10
81 
82 /* NFA HCI responses */
83 #define NFA_HCI_ANY_OK 0x00
84 #define NFA_HCI_ANY_E_NOT_CONNECTED 0x01
85 #define NFA_HCI_ANY_E_CMD_PAR_UNKNOWN 0x02
86 #define NFA_HCI_ANY_E_NOK 0x03
87 #define NFA_HCI_ADM_E_NO_PIPES_AVAILABLE 0x04
88 #define NFA_HCI_ANY_E_REG_PAR_UNKNOWN 0x05
89 #define NFA_HCI_ANY_E_PIPE_NOT_OPENED 0x06
90 #define NFA_HCI_ANY_E_CMD_NOT_SUPPORTED 0x07
91 #define NFA_HCI_ANY_E_INHIBITED 0x08
92 #define NFA_HCI_ANY_E_TIMEOUT 0x09
93 #define NFA_HCI_ANY_E_REG_ACCESS_DENIED 0x0A
94 #define NFA_HCI_ANY_E_PIPE_ACCESS_DENIED 0x0B
95 
96 /* NFA HCI Events */
97 #define NFA_HCI_EVT_HCI_END_OF_OPERATION 0x01
98 #define NFA_HCI_EVT_POST_DATA 0x02
99 #define NFA_HCI_EVT_HOT_PLUG 0x03
100 
101 /* NFA HCI Connectivity gate Events */
102 #define NFA_HCI_EVT_CONNECTIVITY 0x10
103 #define NFA_HCI_EVT_TRANSACTION 0x12
104 #define NFA_HCI_EVT_OPERATION_ENDED 0x13
105 
106 /* Host controller Admin gate registry identifiers */
107 #define NFA_HCI_SESSION_IDENTITY_INDEX 0x01
108 #define NFA_HCI_MAX_PIPE_INDEX 0x02
109 #define NFA_HCI_WHITELIST_INDEX 0x03
110 #define NFA_HCI_HOST_LIST_INDEX 0x04
111 
112 /* Host controller and DH Link management gate registry identifier */
113 #define NFA_HCI_REC_ERROR_INDEX 0x02
114 
115 /* DH Identity management gate registry identifier */
116 #define NFA_HCI_VERSION_SW_INDEX 0x01
117 #define NFA_HCI_VERSION_HW_INDEX 0x03
118 #define NFA_HCI_VENDOR_NAME_INDEX 0x04
119 #define NFA_HCI_MODEL_ID_INDEX 0x05
120 #define NFA_HCI_HCI_VERSION_INDEX 0x02
121 #define NFA_HCI_GATES_LIST_INDEX 0x06
122 
123 #endif /* NFA_HCI_DEFS_H */
124