[NFC] Add overlay and update configuration settings

Bug: 278155583
Test: manual
Change-Id: I76f48c597504fa36cf65df5384079baeefb94812
This commit is contained in:
George 2023-04-18 21:39:46 +08:00
parent 625cc7cb5a
commit e54ac5dc1a
6 changed files with 31 additions and 156 deletions

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<bool name="nfcc_always_on_allowed">false</bool>
<bool name="polling_disable_allowed">false</bool>
<string-array name="config_skuSupportsSecureNfc" translatable="false">
<item>GGH2X</item>
<item>GC15S</item>
</string-array>
<bool name="tag_intent_app_pref_supported">true</bool>
</resources>

View file

@ -4,6 +4,11 @@ import /vendor/etc/init/hw/init.zuma.rc
on init && property:ro.vendor.factory=1 on init && property:ro.vendor.factory=1
import /vendor/etc/init/hw/init.factory.rc import /vendor/etc/init/hw/init.factory.rc
on init
# NFC streset tool name
setprop persist.vendor.nfc.streset libstreset23
setprop persist.vendor.se.streset libstreset23
on early-boot on early-boot
# Wait for insmod_sh to finish all common modules # Wait for insmod_sh to finish all common modules
wait_for_prop vendor.common.modules.ready 1 wait_for_prop vendor.common.modules.ready 1

View file

@ -1,152 +0,0 @@
########################### Start of libnf-hal-st_aosp.conf ###########################
###############################################################################
###############################################################################
# ST HAL trace log level
STNFC_HAL_LOGLEVEL=4
NFC_DEBUG_ENABLED=1
###############################################################################
# Vendor specific mode to enable FW (RF & SWP) traces.
STNFC_FW_DEBUG_ENABLED=0
###############################################################################
# File used for NFA storage
NFA_STORAGE="/data/nfc"
###############################################################################
# Dev Node used for ST HAL
ST_NFC_DEV_NODE="/dev/st_no_such_device"
###############################################################################
# Keep the nfa storage file.
PRESERVE_STORAGE=1
###############################################################################
# In Switch OFF mode (phone switched-off), specify the desired CE mode to
# the controller.
# 0: No card-emulation; DEFAULT
# 1: Switch-off card-emulation enabled
CE_ON_SWITCH_OFF_STATE=1
###############################################################################
# Vendor specific mode to support the USB charging mode if VPSIO=1 in switch off.
STNFC_USB_CHARGING_MODE=1
###############################################################################
# Vendor Specific Proprietary Protocol & Discovery Configuration
# Set to 0xFF if unsupported
# byte[0] NCI_PROTOCOL_18092_ACTIVE
# byte[1] NCI_PROTOCOL_B_PRIME
# byte[2] NCI_PROTOCOL_DUAL
# byte[3] NCI_PROTOCOL_15693
# byte[4] NCI_PROTOCOL_KOVIO
# byte[5] NCI_PROTOCOL_MIFARE
# byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO
# byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME
# byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
NFA_PROPRIETARY_CFG={05:FF:FF:06:8A:90:77:FF:FF}
###############################################################################
# Choose the presence-check algorithm for type-4 tag. If not defined,
# the default value is 1.
# 0 NFA_RW_PRES_CHK_DEFAULT; Let stack selects an algorithm
# 1 NFA_RW_PRES_CHK_I_BLOCK; ISO-DEP protocol's empty I-block
# 2 NFA_RW_PRES_CHK_RESET; Deactivate to Sleep, then re-activate
# 3 NFA_RW_PRES_CHK_RB_CH0; Type-4 tag protocol's ReadBinary command on channel 0
# 4 NFA_RW_PRES_CHK_RB_CH3; Type-4 tag protocol's ReadBinary command on channel 3
# 5 NFA_RW_PRES_CHK_ISO_DEP_NAK; presence check command ISO-DEP NAK as per NCI2.0
PRESENCE_CHECK_ALGORITHM=5
###############################################################################
# Name of the NCI HAL module to use
# If unset, falls back to nfc_nci.bcm2079x
NCI_HAL_MODULE="nfc_nci.st21nfc.default"
###############################################################################
# Allow list to be set at startup.
DEVICE_HOST_ALLOW_LIST={02:C0}
###############################################################################
# BAIL OUT value for P2P
# Implements algorithm for NFC-DEP protocol priority over ISO-DEP protocol.
POLL_BAIL_OUT_MODE=1
###############################################################################
# Extended APDU length for ISO_DEP
ISO_DEP_MAX_TRANSCEIVE=0xFEFF
###############################################################################
# Configure the NFC Extras to open and use a static pipe. If the value is
# not set or set to 0, then the default is use a dynamic pipe based on a
# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
# for each EE (ESE/SIM)
OFF_HOST_ESE_PIPE_ID=0x5E
OFF_HOST_SIM_PIPE_ID=0x3E
###############################################################################
#Set the default Felica T3T System Code OffHost route Location :
#This settings will be used when application does not set this parameter
# host 0x00
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
DEFAULT_SYS_CODE_ROUTE=0x86
###############################################################################
#Set the Felica T3T System Code supported power state:
DEFAULT_SYS_CODE_PWR_STATE=0x3B
###############################################################################
# Path and Files used for FW update binaries storage
STNFC_FW_PATH_STORAGE="/vendor/firmware"
STNFC_FW_BIN_NAME="/st54l_fw.bin"
STNFC_FW_CONF_NAME="/st54l_conf.bin"
###############################################################################
# Default off-host route for Felica.
# This settings will be used when application does not set this parameter
# host 0x00
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
DEFAULT_NFCF_ROUTE=0x86
###############################################################################
# Configure the default off-host route.
# used for technology A and B routing
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
DEFAULT_OFFHOST_ROUTE=0x81
###############################################################################
# Configure the default AID route.
# host 0x00
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
DEFAULT_ROUTE=0x00
###############################################################################
# Configure the NFCEEIDs of offhost UICC.
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
OFFHOST_ROUTE_UICC={81}
###############################################################################
# Configure the NFCEEIDs of offhost eSEs.
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
OFFHOST_ROUTE_ESE={86}
###############################################################################
# Configure the list of NFCEE for the ISO-DEP routing.
# host 0x00
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
DEFAULT_ISODEP_ROUTE=0x81
###############################################################################
# Core configuration settings
CORE_CONF_PROP={ 20, 02, 0a, 03,
a1, 01, 1e,
a2, 01, 19,
80, 01, 01
}

View file

@ -145,7 +145,7 @@ DEFAULT_ISODEP_ROUTE=0x81
# Configure the HAL Clock control # Configure the HAL Clock control
# enable 0x01 # enable 0x01
# disable 0x00 default value # disable 0x00 default value
STNFC_CONTROL_CLK=0x01 STNFC_CONTROL_CLK=0x00
############################################################################### ###############################################################################
# Configure the ACTIVE_RW timer # Configure the ACTIVE_RW timer

View file

@ -118,4 +118,4 @@ RECOVERY_OPTION=1
# NFCEE Power Supply and Communication Link Control Configuration # NFCEE Power Supply and Communication Link Control Configuration
# Set when SetAlwaysOn enabled # Set when SetAlwaysOn enabled
# Default 0x00 when SetAlways on disabled # Default 0x00 when SetAlways on disabled
ALWAYS_ON_SET_EE_POWER_AND_LINK_CONF=0x03 ALWAYS_ON_SET_EE_POWER_AND_LINK_CONF=0x00

View file

@ -1,2 +0,0 @@
#Gemalto SPI devnode
GTO_DEV=/dev/nothing;