Skip to content

Commit

Permalink
R2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeslin committed May 9, 2016
1 parent 118ea11 commit 6631975
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if PN7120
config_DATA = conf/PN7120/libnfc-brcm.conf conf/PN7120/libnfc-nxp.conf
endif

if PN7150
config_DATA = conf/PN7150/libnfc-brcm.conf conf/PN7150/libnfc-nxp.conf
endif

LIBNFC_NCI_INCLUDE := \
src/libnfc-nci/include \
src/libnfc-nci/gki/ulinux \
Expand Down Expand Up @@ -215,6 +219,11 @@ libnfc_nci_linux_la_FLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2 -DNXP_CHIP_NAME=\"pn712
libnfc_nci_linux_la_FLAGS += -DPH_NCI_NXP_HAL_ENABLE_FW_DOWNLOAD=FALSE
endif

if PN7150
libnfc_nci_linux_la_FLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 -DNXP_CHIP_NAME=\"pn7150\"
libnfc_nci_linux_la_FLAGS += -DPH_NCI_NXP_HAL_ENABLE_FW_DOWNLOAD=FALSE
endif

libnfc_nci_linux_la_LIBADD = $(AC_LIBOBJS)
libnfc_nci_linux_la_LDFLAGS :=
libnfc_nci_linux_la_LDFLAGS +=-DPN547C2=1
Expand Down
54 changes: 54 additions & 0 deletions conf/PN7150/libnfc-brcm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
########################### PN7150 libnfc-brcm.conf ###########################

###############################################################################
# Log levels for libnfc-nci. Suggested value for debugging is 0xFF.
APPL_TRACE_LEVEL=0x00
PROTOCOL_TRACE_LEVEL=0x00

###############################################################################
# Force HOST listen feature enable or disable.
# 0: Disable
# 1: Enable
HOST_LISTEN_ENABLE=0x01

###############################################################################
# Force tag polling for 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 |
# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO |
# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE.
#
# Notable bits:
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
# NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
# NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */
# NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
# This flag when set to zero will disable Reader mode.
POLLING_TECH_MASK=0xEF

###############################################################################
# Force P2P to only listen for 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_F |
# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
#
# Notable bits:
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
# This flag when set to zero will disable P2P Listen mode.
P2P_LISTEN_TECH_MASK=0xC5

###############################################################################
# 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.
#
# For NXP PN7150 value must be fixed to 0x01
NFA_MAX_EE_SUPPORTED=0x01
104 changes: 104 additions & 0 deletions conf/PN7150/libnfc-nxp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
########################### PN7150 libnfc-nxp.conf ############################

###############################################################################
# Logging Levels. Suggested value for debugging is 0x03.
# NXPLOG_EXTNS_LOGLEVEL - Configuration for extns logging level
# NXPLOG_NCIX_LOGLEVEL - Configuration for enabling logging of NCI TX packets
# NXPLOG_NCIR_LOGLEVEL - Configuration for enabling logging of NCI RX packets
# NXPLOG_FWDNLD_LOGLEVEL - Configuration for enabling logging of FW download functionality
# NXPLOG_TML_LOGLEVEL - Configuration for enabling logging of TML
# NXPLOG_NCIHAL_LOGLEVEL - Configuration for enabling logging of HAL
NXPLOG_EXTNS_LOGLEVEL=0x00
NXPLOG_NCIX_LOGLEVEL=0x00
NXPLOG_NCIR_LOGLEVEL=0x00
NXPLOG_FWDNLD_LOGLEVEL=0x00
NXPLOG_TML_LOGLEVEL=0x00
NXPLOG_NCIHAL_LOGLEVEL=0x00

###############################################################################
# Extension for MIFARE reader enable
# Setting this parameter to 1 will enable the support of MIFARE Classic Reader.
MIFARE_READER_ENABLE=0x01

###############################################################################
# System clock source selection configuration
#define CLK_SRC_XTAL 0x01
#define CLK_SRC_PLL 0x02
NXP_SYS_CLK_SRC_SEL=0x01

###############################################################################
# System clock frequency selection configuration.
# Only valid in case of PLL clock source.
#define CLK_FREQ_13MHZ 1
#define CLK_FREQ_19_2MHZ 2
#define CLK_FREQ_24MHZ 3
#define CLK_FREQ_26MHZ 4
#define CLK_FREQ_38_4MHZ 5
#define CLK_FREQ_52MHZ 6
NXP_SYS_CLK_FREQ_SEL=0x00

###############################################################################
# The timeout value to be used for clock request acknowledgment
# min value = 0x01 to max = 0x1A
# Only valid in case of PLL clock source.
NXP_SYS_CLOCK_TO_CFG=0x01

###############################################################################
# NXP proprietary settings to enable NXP Proprietary features
#
# For NXP NFC Controller value must be fixed to {2F, 02, 00}
NXP_ACT_PROP_EXTN={2F, 02, 00}

###############################################################################
# NFC forum profile settings.
# For more details refer to the POLL_PROFILE_SEL_ CFG parameter definition from NFC Controller User Manual
NXP_NFC_PROFILE_EXTN={20, 02, 05, 01, A0, 44, 01, 00}

###############################################################################
# Standby enable settings. (disable=2F 00 01 00, enable=2F 00 01 01)
NXP_CORE_STANDBY={2F, 00, 01, 01}

###############################################################################
# TVDD configurations settings
# Allow NFCC to configure External TVDD
# There are two possible configurations (0x01 or 0x02):
# CFG1: Vbat is used to generate the VDD(TX) through TXLDO
# CFG2: external 5V is used to generate the VDD(TX) through TXLDO
NXP_EXT_TVDD_CFG=0x02

# CFG1: 3.3V for both Reader and Card modes
NXP_EXT_TVDD_CFG_1={20, 02, 07, 01, A0, 0E, 03, 02, 09, 00}

# CFG2: VBAT2 to 5V and 4.7V for both Reader and Card modes
NXP_EXT_TVDD_CFG_2={20, 02, 07, 01, A0, 0E, 03, 06, 64, 00}

###############################################################################
# NXP Proprietary core configuration extensions
# For more details refer to the NFC Controller User Manual
NXP_CORE_CONF_EXTN={20, 02, 10, 03,
A0, 5E, 01, 01,
A0, 40, 01, 00,
A0, 0D, 04, 34, 44, 22, 00
}

###############################################################################
# To enable i2c fragmentation set i2c fragmentation enable 0x01 to disable set to 0x00
NXP_I2C_FRAGMENTATION_ENABLED=0x00

###############################################################################
# Core configuration settings
NXP_CORE_CONF={ 20, 02, 2B, 0D,
28, 01, 00,
21, 01, 00,
30, 01, 08,
31, 01, 03,
33, 04, 01, 02, 03, 04,
54, 01, 06,
50, 01, 02,
5B, 01, 00,
60, 01, 0E,
80, 01, 01,
81, 01, 01,
82, 01, 0E,
18, 01, 01
}
17 changes: 16 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ AC_CHECK_FUNCS([dlopen])

AC_CONFIG_FILES([Makefile])

AC_ARG_ENABLE([pn7150],
[ --enable-pn7150 set chip version to PN7150],
[case "${enableval}" in
yes) pn7150=true ;;
no) pn7150=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-pn7150]) ;;
esac],[pn7150=false])

AC_ARG_ENABLE([pn7120],
[ --enable-pn7120 set chip version to PN7120],
[case "${enableval}" in
Expand All @@ -66,6 +74,9 @@ esac],[llcp1_3=false])

AM_CONDITIONAL([CHIP_SEL_NOK], [
COUNT=0
if [ "$pn7150" = "true" ]; then
((COUNT++))
fi
if [ "$pn7120" = "true" ]; then
((COUNT++))
fi
Expand All @@ -84,7 +95,9 @@ else
AC_MSG_NOTICE([LLCP1.3 support is disabled (no secure P2P)])
fi])

AM_CONDITIONAL([CHIP_SEL_ONE], [if [$pn7120]; then
AM_CONDITIONAL([CHIP_SEL_ONE], [if [$pn7150]; then
AC_MSG_NOTICE([Selected chip type is PN7150])
elif [$pn7120]; then
AC_MSG_NOTICE([Selected chip type is PN7120])
else
AC_MSG_NOTICE([Selected chip type is PN7120])
Expand All @@ -93,6 +106,8 @@ fi])

AM_CONDITIONAL([LLCP1_3], [test x$llcp1_3 = xtrue])

AM_CONDITIONAL([PN7150], [test x$pn7150 = xtrue])

AM_CONDITIONAL([PN7120], [test x$pn7120 = xtrue])

AC_OUTPUT
Binary file not shown.

0 comments on commit 6631975

Please sign in to comment.