Home | History | Annotate | Download | only in include
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2009-2013 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  *
     22  *  This file contains the NFA HCI related definitions from the
     23  *  specification.
     24  *
     25  ******************************************************************************/
     26 
     27 #ifndef NFA_HCI_DEFS_H
     28 #define NFA_HCI_DEFS_H
     29 
     30 /* Static gates */
     31 #define NFA_HCI_LOOP_BACK_GATE              0x04
     32 #define NFA_HCI_IDENTITY_MANAGEMENT_GATE    0x05
     33 
     34 #define NFA_HCI_FIRST_HOST_SPECIFIC_GENERIC_GATE    0x10
     35 #define NFA_HCI_LAST_HOST_SPECIFIC_GENERIC_GATE     0xEF
     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 
     83 /* NFA HCI responses */
     84 #define NFA_HCI_ANY_OK                      0x00
     85 #define NFA_HCI_ANY_E_NOT_CONNECTED         0x01
     86 #define NFA_HCI_ANY_E_CMD_PAR_UNKNOWN       0x02
     87 #define NFA_HCI_ANY_E_NOK                   0x03
     88 #define NFA_HCI_ADM_E_NO_PIPES_AVAILABLE    0x04
     89 #define NFA_HCI_ANY_E_REG_PAR_UNKNOWN       0x05
     90 #define NFA_HCI_ANY_E_PIPE_NOT_OPENED       0x06
     91 #define NFA_HCI_ANY_E_CMD_NOT_SUPPORTED     0x07
     92 #define NFA_HCI_ANY_E_INHIBITED             0x08
     93 #define NFA_HCI_ANY_E_TIMEOUT               0x09
     94 #define NFA_HCI_ANY_E_REG_ACCESS_DENIED     0x0A
     95 #define NFA_HCI_ANY_E_PIPE_ACCESS_DENIED    0x0B
     96 
     97 /* NFA HCI Events */
     98 #define NFA_HCI_EVT_HCI_END_OF_OPERATION    0x01
     99 #define NFA_HCI_EVT_POST_DATA               0x02
    100 #define NFA_HCI_EVT_HOT_PLUG                0x03
    101 
    102 
    103 /* NFA HCI Connectivity gate Events */
    104 #define NFA_HCI_EVT_CONNECTIVITY            0x10
    105 #define NFA_HCI_EVT_TRANSACTION             0x12
    106 #define NFA_HCI_EVT_OPERATION_ENDED         0x13
    107 
    108 /* Host controller Admin gate registry identifiers */
    109 #define NFA_HCI_SESSION_IDENTITY_INDEX      0x01
    110 #define NFA_HCI_MAX_PIPE_INDEX              0x02
    111 #define NFA_HCI_WHITELIST_INDEX             0x03
    112 #define NFA_HCI_HOST_LIST_INDEX             0x04
    113 
    114 /* Host controller and DH Link management gate registry identifier */
    115 #define NFA_HCI_REC_ERROR_INDEX             0x02
    116 
    117 /* DH Identity management gate registry identifier */
    118 #define NFA_HCI_VERSION_SW_INDEX            0x01
    119 #define NFA_HCI_VERSION_HW_INDEX            0x03
    120 #define NFA_HCI_VENDOR_NAME_INDEX           0x04
    121 #define NFA_HCI_MODEL_ID_INDEX              0x05
    122 #define NFA_HCI_HCI_VERSION_INDEX           0x02
    123 #define NFA_HCI_GATES_LIST_INDEX            0x06
    124 
    125 
    126 #endif /* NFA_HCI_DEFS_H */
    127