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 * 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_FIRST_PROP_GATE 0xF0 37#define NFA_HCI_LAST_PROP_GATE 0xFF 38 39/* Generic Gates */ 40#define NFA_HCI_CONNECTIVITY_GATE 0x41 41 42/* Static pipes */ 43#define NFA_HCI_LINK_MANAGEMENT_PIPE 0x00 44#define NFA_HCI_ADMIN_PIPE 0x01 45 46/* Dynamic pipe range */ 47#define NFA_HCI_FIRST_DYNAMIC_PIPE 0x02 48#define NFA_HCI_LAST_DYNAMIC_PIPE 0x6F 49 50/* host_table */ 51#define NFA_HCI_HOST_CONTROLLER 0x00 52#define NFA_HCI_DH_HOST 0x01 53#define NFA_HCI_UICC_HOST 0x02 54 55/* Type of instruction */ 56#define NFA_HCI_COMMAND_TYPE 0x00 57#define NFA_HCI_EVENT_TYPE 0x01 58#define NFA_HCI_RESPONSE_TYPE 0x02 59 60/* Chaining bit value */ 61#define NFA_HCI_MESSAGE_FRAGMENTATION 0x00 62#define NFA_HCI_NO_MESSAGE_FRAGMENTATION 0x01 63 64/* NFA HCI commands */ 65 66/* Commands for all gates */ 67#define NFA_HCI_ANY_SET_PARAMETER 0x01 68#define NFA_HCI_ANY_GET_PARAMETER 0x02 69#define NFA_HCI_ANY_OPEN_PIPE 0x03 70#define NFA_HCI_ANY_CLOSE_PIPE 0x04 71 72/* Admin gate commands */ 73#define NFA_HCI_ADM_CREATE_PIPE 0x10 74#define NFA_HCI_ADM_DELETE_PIPE 0x11 75#define NFA_HCI_ADM_NOTIFY_PIPE_CREATED 0x12 76#define NFA_HCI_ADM_NOTIFY_PIPE_DELETED 0x13 77#define NFA_HCI_ADM_CLEAR_ALL_PIPE 0x14 78#define NFA_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED 0x15 79 80/* Connectivity gate command */ 81#define NFA_HCI_CON_PRO_HOST_REQUEST 0x10 82 83 84/* NFA HCI responses */ 85#define NFA_HCI_ANY_OK 0x00 86#define NFA_HCI_ANY_E_NOT_CONNECTED 0x01 87#define NFA_HCI_ANY_E_CMD_PAR_UNKNOWN 0x02 88#define NFA_HCI_ANY_E_NOK 0x03 89#define NFA_HCI_ADM_E_NO_PIPES_AVAILABLE 0x04 90#define NFA_HCI_ANY_E_REG_PAR_UNKNOWN 0x05 91#define NFA_HCI_ANY_E_PIPE_NOT_OPENED 0x06 92#define NFA_HCI_ANY_E_CMD_NOT_SUPPORTED 0x07 93#define NFA_HCI_ANY_E_INHIBITED 0x08 94#define NFA_HCI_ANY_E_TIMEOUT 0x09 95#define NFA_HCI_ANY_E_REG_ACCESS_DENIED 0x0A 96#define NFA_HCI_ANY_E_PIPE_ACCESS_DENIED 0x0B 97 98/* NFA HCI Events */ 99#define NFA_HCI_EVT_HCI_END_OF_OPERATION 0x01 100#define NFA_HCI_EVT_POST_DATA 0x02 101#define NFA_HCI_EVT_HOT_PLUG 0x03 102 103 104/* NFA HCI Connectivity gate Events */ 105#define NFA_HCI_EVT_CONNECTIVITY 0x10 106#define NFA_HCI_EVT_TRANSACTION 0x12 107#define NFA_HCI_EVT_OPERATION_ENDED 0x13 108 109/* Host controller Admin gate registry identifiers */ 110#define NFA_HCI_SESSION_IDENTITY_INDEX 0x01 111#define NFA_HCI_MAX_PIPE_INDEX 0x02 112#define NFA_HCI_WHITELIST_INDEX 0x03 113#define NFA_HCI_HOST_LIST_INDEX 0x04 114 115/* Host controller and DH Link management gate registry identifier */ 116#define NFA_HCI_REC_ERROR_INDEX 0x02 117 118/* DH Identity management gate registry identifier */ 119#define NFA_HCI_VERSION_SW_INDEX 0x01 120#define NFA_HCI_VERSION_HW_INDEX 0x03 121#define NFA_HCI_VENDOR_NAME_INDEX 0x04 122#define NFA_HCI_MODEL_ID_INDEX 0x05 123#define NFA_HCI_HCI_VERSION_INDEX 0x02 124#define NFA_HCI_GATES_LIST_INDEX 0x06 125 126 127#endif /* NFA_HCI_DEFS_H */ 128