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