flo: Fix up NFC config files.

- Set POWER_ON_DELAY to 0 ms, not needed for rev B5
- Set PRE_POWER_OFF_DELAY to 10 ms, allowing for safe SE shutdown
- Enable Kovio polling
- Disable B technology on eSE
- Set proper LPTD and PREINIT values for Flo
- Modified startup config to match Google builds and B5 config
- Moved Broadcom-specific config params to separate file

Bug: 8776949
Change-Id: I6d820a5f190a6ebda44f82bc7b470538c2eff966
This commit is contained in:
Martijn Coenen 2013-04-19 16:24:14 -07:00
parent 2ed9df5401
commit 2f3b6282ca
3 changed files with 103 additions and 94 deletions

View File

@ -271,7 +271,8 @@ PRODUCT_COPY_FILES += \
$(NFCEE_ACCESS_PATH):system/etc/nfcee_access.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
device/asus/flo/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf
device/asus/flo/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
device/asus/flo/nfc/libnfc-brcm-20791b05.conf:system/etc/libnfc-brcm-20791-b05.conf
PRODUCT_LOCALES := en_US es_US de_DE zh_CN

View File

@ -0,0 +1,67 @@
###############################################################################
# Firmware patch file
# If the value is not set then patch download is disabled.
FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd"
###############################################################################
# Firmware pre-patch file (sent before the above patch file)
# If the value is not set then pre-patch is not used.
FW_PRE_PATCH=""
###############################################################################
# LPTD mode configuration
# byte[0] is the length of the remaining bytes in this value
# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
# byte[1] is the param id it should be set to B9.
# byte[2] is the length of the LPTD parameters
# byte[3] indicates if LPTD is enabled
# if set to 0, LPTD will be disabled (parameters will still be sent).
# byte[4-n] are the LPTD parameters.
# By default, LPTD is enabled and default settings are used.
# See nfc_hal_dm_cfg.c for defaults
LPTD_CFG={38:B9:36:01:00:FF:FF:08:00:00:00:A0:0F:40:00:00:12:02:10:00:00:00:2D:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:D0:07:00:00:08:07:00:00:C8:00:00:00:00:00:00:00}
###############################################################################
# Startup Configuration (256 bytes maximum)
#
# This is applied at stack startup.
NFA_DM_START_UP_CFG={3E:CB:01:01:A5:01:01:CA:14:00:00:00:00:0E:C0:D4:01:00:0F:00:00:00:00:C0:C6:2D:00:14:0A:B5:03:01:03:FF:80:01:01:C9:03:03:0F:AB:5B:01:02:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12}
# If NFA_DM_PRE_DISCOVERY_CFG is not supported by the current software, then this value should be used.
#NFA_DM_START_UP_CFG={48:CB:01:01:A5:01:01:CA:14:00:00:00:00:0E:C0:D4:01:00:0F:00:00:00:00:C0:C6:2D:00:14:0A:B5:03:01:03:FF:80:01:01:C9:03:03:0F:AB:5B:01:02:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12:C2:08:01:08:00:04:80:C3:C9:01}
###############################################################################
# Pre-Discovery Startup Configuration (256 bytes maximum)
#
# This is applied before starting Discovery the first time.
NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:40:4B:4C:00}
###############################################################################
# Antenna Configuration - This data is used when setting 0xC8 config item
# at startup (before discovery is started). If not used, no value is sent.
#
# The settings for this value are documented here:
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
#
# The values marked as ?? should be tweaked per antenna or customer/app:
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
# array[0] = 0x20 is length of the payload from array[1] to the end
# array[1] = 0xC8 is PREINIT_DSP_CFG
PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4C:01:00:00:40:04}
###############################################################################
# Snooze Mode Settings
#
# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
# to disable.
#
# If SNOOZE_MODE_CFG is not provided, the default settings are used:
# They are as follows:
# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
# 0 Idle Threshold Host
# 0 Idle Threshold HC
# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
#
#SNOOZE_MODE_CFG={08:00:00:00:01}

View File

@ -16,22 +16,6 @@ PROTOCOL_TRACE_LEVEL=0x00000000
# File used for NFA storage
NFA_STORAGE="/data/nfc"
###############################################################################
# Snooze Mode Settings
#
# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
# to disable.
#
# If SNOOZE_MODE_CFG is not provided, the default settings are used:
# They are as follows:
# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
# 0 Idle Threshold Host
# 0 Idle Threshold HC
# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
#
#SNOOZE_MODE_CFG={08:00:00:00:01}
###############################################################################
# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
NFC_WAKE_DELAY=20
@ -45,34 +29,29 @@ NFC_WAKE_DELAY=20
# POST_POWER_OFF_DELAY
# Delay after turning off chip, before USERIAL_close returns (default 0)
#
#POWER_ON_DELAY=300
#PRE_POWER_OFF_DELAY=0
POWER_ON_DELAY=0
PRE_POWER_OFF_DELAY=10
#POST_POWER_OFF_DELAY=0
###############################################################################
# LPTD mode configuration
# byte[0] is the length of the remaining bytes in this value
# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
# byte[1] is the param id it should be set to B9.
# byte[2] is the length of the LPTD parameters
# byte[3] indicates if LPTD is enabled
# if set to 0, LPTD will be disabled (parameters will still be sent).
# byte[4-n] are the LPTD parameters.
# By default, LPTD is enabled and default settings are used.
# See nfc_hal_dm_cfg.c for defaults
LPTD_CFG={00:B9:21:01:02:FF:FF:04:A0:0F:40:00:80:02:02:10:00:00:00:31:0C:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
# Maximum time (ms) to wait for RESET NTF after setting REG_PU to high
# The default is 1000.
NFCC_ENABLE_TIMEOUT=1000
###############################################################################
# Startup Configuration (100 bytes maximum)
# Device Manager Config
#
# For the 0xCA parameter, byte[9] (marked by 'AA') is for UICC0, and byte[10] (marked by BB) is
# for UICC1. The values are defined as:
# 0 : UICCx only supports ISO_DEP in low power mode.
# 2 : UICCx only supports Mifare in low power mode.
# 3 : UICCx supports both ISO_DEP and Mifare in low power mode.
# If NFA_DM_CFG is not provided, stack default settings are
# used (see nfa_dm_cfg.c). They are as follows:
# 0 (FALSE) Automatic NDEF detection when background polling
# 0 (FALSE) Automatic NDEF read when background polling
#
# AA BB
NFA_DM_START_UP_CFG={1F:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00:00:00:00:00:00:00:00:00:00:80:01:01}
#NFA_DM_CFG={00:00}
###############################################################################
# Default poll duration (in ms)
# The defualt is 1000ms if not set (see nfc_target.h)
#NFA_DM_DISC_DURATION_POLL=1000
###############################################################################
# Startup Vendor Specific Configuration (100 bytes maximum);
@ -84,36 +63,18 @@ NFA_DM_START_UP_CFG={1F:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00
# byte[5] 0=turn off SWP frame logging; 1=turn on
# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
###############################################################################
# Antenna Configuration - This data is used when setting 0xC8 config item
# at startup (before discovery is started). If not used, no value is sent.
#
# The settings for this value are documented here:
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
# This document is maintained by Paul Forshaw.
#
# The values marked as ?? should be tweaked per antenna or customer/app:
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
# array[0] = 0x20 is length of the payload from array[1] to the end
# array[1] = 0xC8 is PREINIT_DSP_CFG
PREINIT_DSP_CFG={06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4C:01:00:00:40:04}
###############################################################################
# Configure crystal frequency when internal LPO can't detect the frequency.
#XTAL_FREQUENCY=0
###############################################################################
# Use Nexus S NXP RC work to allow our stack/firmware to work with a retail
# Nexus S that causes IOP issues. Note, this will not pass conformance and
# should be removed for production.
USE_NXP_P2P_RC_WORKAROUND=1
###############################################################################
# Configure the default Destination Gate used by HCI (the default is 4, which
# is the ETSI loopback gate.
#NFA_HCI_DEFAULT_DEST_GATE=0x04
###############################################################################
# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h.
# The value is set to 3 by default as it assumes we will discover 0xF2,
# 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced
# so that the stack will not wait any longer than necessary.
#NFA_MAX_EE_SUPPORTED=3
###############################################################################
# Configure the single default SE to use. The default is to use the first
# SE that is detected by the stack. This value might be used when the phone
@ -140,12 +101,7 @@ OBERTHUR_WARM_RESET_COMMAND=0x03
# Force UICC to only listen to the following technology(s).
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B.
UICC_LISTEN_TECH_MASK=0x03
###############################################################################
# Allow UICC to be powered off if there is no traffic.
# Timeout is in ms. If set to 0, then UICC will not be powered off.
#UICC_IDLE_TIMEOUT=30000
UICC_LISTEN_TECH_MASK=0x01
###############################################################################
# AID for Empty Select command
@ -165,7 +121,7 @@ AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
# NFA_TECHNOLOGY_MASK_KOVIO 0x20
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80
POLLING_TECH_MASK=0xDF
POLLING_TECH_MASK=0xFF
###############################################################################
# Force P2P to only listen for the following technology(s).
@ -194,22 +150,6 @@ P2P_LISTEN_TECH_MASK=0xC5
# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
#SCREEN_OFF_POWER_STATE=0
###############################################################################
# Firmware patch file
# If the value is not set then patch download is disabled.
FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd"
###############################################################################
# Firmware pre-patch file (sent before the above patch file)
# If the value is not set then pre-patch is not used.
#FW_PRE_PATCH="/vendor/firmware/bcm2079x_pre_firmware.ncd"
###############################################################################
# Firmware patch format
# 1 = HCD
# 2 = NCD (default)
#NFA_CONFIG_FORMAT=2
###############################################################################
# SPD Debug mode
# If set to 1, any failure of downloading a patch will trigger a hard-stop
@ -221,6 +161,14 @@ FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd"
# Note, this resets after a power-cycle.
#SPD_MAX_RETRY_COUNT=3
###############################################################################
# Patch RAM Version Checking
# By default the stack will reject any attempt to download a patch where major
# version is < the one that is in NVM. If this config item is set to 1 then
# this version check is skipped.
#
#SPD_IGNORE_VERSION=0
###############################################################################
# transport driver
#
@ -249,9 +197,7 @@ POWER_CONTROL_DRIVER="/dev/bcm2079x-i2c"
###############################################################################
# I2C transport driver options
# Mako does not support 10-bit I2C addresses
# Revert to 7-bit address
BCMI2CNFC_ADDRESS=0x77
# BCMI2CNFC_ADDRESS=0
###############################################################################
# I2C transport driver try to read multiple packets in read() if data is available
@ -284,8 +230,3 @@ BCMI2CNFC_ADDRESS=0x77
# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
NFC_WRITE_DELAY=20
###############################################################################
# Default poll duration (in ms)
# The defualt is 500ms if not set (see nfc_target.h)
#NFA_DM_DISC_DURATION_POLL=333