nfa_hci_defs.h revision e9df6ba5a8fcccf306a80b1670b423be8fe7746a
1/******************************************************************************
2 *
3 *  Copyright (C) 2009-2012 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_LAST_PROP_GATE                      0xFF
36
37/* Generic Gates */
38#define NFA_HCI_CONNECTIVITY_GATE           0x41
39
40/* Static pipes */
41#define NFA_HCI_LINK_MANAGEMENT_PIPE        0x00
42#define NFA_HCI_ADMIN_PIPE                  0x01
43
44/* Dynamic pipe range */
45#define NFA_HCI_FIRST_DYNAMIC_PIPE          0x02
46#define NFA_HCI_LAST_DYNAMIC_PIPE           0x6F
47
48/* host_table */
49#define NFA_HCI_HOST_CONTROLLER             0x00
50#define NFA_HCI_DH_HOST                     0x01
51#define NFA_HCI_UICC_HOST                   0x02
52
53/* Type of instruction */
54#define NFA_HCI_COMMAND_TYPE                0x00
55#define NFA_HCI_EVENT_TYPE                  0x01
56#define NFA_HCI_RESPONSE_TYPE               0x02
57
58/* Chaining bit value */
59#define NFA_HCI_MESSAGE_FRAGMENTATION       0x00
60#define NFA_HCI_NO_MESSAGE_FRAGMENTATION    0x01
61
62/* NFA HCI commands */
63
64/* Commands for all gates */
65#define NFA_HCI_ANY_SET_PARAMETER           0x01
66#define NFA_HCI_ANY_GET_PARAMETER           0x02
67#define NFA_HCI_ANY_OPEN_PIPE               0x03
68#define NFA_HCI_ANY_CLOSE_PIPE              0x04
69
70/* Admin gate commands */
71#define NFA_HCI_ADM_CREATE_PIPE             0x10
72#define NFA_HCI_ADM_DELETE_PIPE             0x11
73#define NFA_HCI_ADM_NOTIFY_PIPE_CREATED     0x12
74#define NFA_HCI_ADM_NOTIFY_PIPE_DELETED     0x13
75#define NFA_HCI_ADM_CLEAR_ALL_PIPE          0x14
76#define NFA_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED 0x15
77
78/* Connectivity gate command */
79#define NFA_HCI_CON_PRO_HOST_REQUEST        0x10
80
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
102/* NFA HCI Connectivity gate Events */
103#define NFA_HCI_EVT_CONNECTIVITY            0x10
104#define NFA_HCI_EVT_TRANSACTION             0x12
105#define NFA_HCI_EVT_OPERATION_ENDED         0x13
106
107/* Host controller Admin gate registry identifiers */
108#define NFA_HCI_SESSION_IDENTITY_INDEX      0x01
109#define NFA_HCI_MAX_PIPE_INDEX              0x02
110#define NFA_HCI_WHITELIST_INDEX             0x03
111#define NFA_HCI_HOST_LIST_INDEX             0x04
112
113/* Host controller and DH Link management gate registry identifier */
114#define NFA_HCI_REC_ERROR_INDEX             0x02
115
116/* DH Identity management gate registry identifier */
117#define NFA_HCI_VERSION_SW_INDEX            0x01
118#define NFA_HCI_VERSION_HW_INDEX            0x03
119#define NFA_HCI_VENDOR_NAME_INDEX           0x04
120#define NFA_HCI_MODEL_ID_INDEX              0x05
121#define NFA_HCI_HCI_VERSION_INDEX           0x02
122#define NFA_HCI_GATES_LIST_INDEX            0x06
123
124
125#endif /* NFA_HCI_DEFS_H */
126