NFC: Changes to support NQ3XX chipsets

Changes done to support NQ3XX chip based on
NQ3XX_PRESENT flag
Default CLK Src changed and other required
changes made in example .conf files

Change-Id: I9f259d95452e8cb285fdce9d6a3c14d8e4024531
diff --git a/Android.mk b/Android.mk
index 1873a21..7e8512d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -55,7 +55,11 @@
 endif
 
 #### Select the CHIP ####
+ifeq ($(strip $(NQ3XX_PRESENT)),true)
+NXP_CHIP_TYPE := $(PN553)
+else
 NXP_CHIP_TYPE := $(PN548C2)
+endif
 
 ifeq ($(NXP_CHIP_TYPE),$(PN547C2))
 D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2
diff --git a/halimpl/pn54x/Android.mk b/halimpl/pn54x/Android.mk
index ca1d93f..f2f15d8 100644
--- a/halimpl/pn54x/Android.mk
+++ b/halimpl/pn54x/Android.mk
@@ -51,7 +51,11 @@
 endif
 
 #### Select the CHIP ####
+ifeq ($(strip $(NQ3XX_PRESENT)),true)
+NXP_CHIP_TYPE := $(PN553)
+else
 NXP_CHIP_TYPE := $(PN548C2)
+endif
 
 ifeq ($(NXP_CHIP_TYPE),$(PN547C2))
 D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2
@@ -115,7 +119,11 @@
 LOCAL_MODULE_TAGS  := optional
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_PATH  := $(TARGET_OUT_ETC)
+ifeq ($(strip $(NQ3XX_PRESENT)),true)
+LOCAL_SRC_FILES    := libnfc-nxp-PN80T_example.conf
+else
 LOCAL_SRC_FILES    := libnfc-nxp-PN66T_example.conf
+endif
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -123,5 +131,10 @@
 LOCAL_MODULE_TAGS  := optional
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_PATH  := $(TARGET_OUT_ETC)
+
+ifeq ($(strip $(NQ3XX_PRESENT)),true)
+LOCAL_SRC_FILES    := libnfc-nxp-PN80T_example.conf
+else
 LOCAL_SRC_FILES    := libnfc-nxp-PN66T_example.conf
+endif
 include $(BUILD_PREBUILT)
diff --git a/halimpl/pn54x/libnfc-nxp-PN551_example.conf b/halimpl/pn54x/libnfc-nxp-PN551_example.conf
index 9c4c68c..420d914 100644
--- a/halimpl/pn54x/libnfc-nxp-PN551_example.conf
+++ b/halimpl/pn54x/libnfc-nxp-PN551_example.conf
@@ -38,7 +38,7 @@
 #define CLK_SRC_XTAL       1
 #define CLK_SRC_PLL        2
 
-NXP_SYS_CLK_SRC_SEL=0x01
+NXP_SYS_CLK_SRC_SEL=0x02
 
 ###############################################################################
 # System clock frequency selection configuration
diff --git a/halimpl/pn54x/libnfc-nxp-PN553_example.conf b/halimpl/pn54x/libnfc-nxp-PN553_example.conf
index 619d59e..31369c4 100644
--- a/halimpl/pn54x/libnfc-nxp-PN553_example.conf
+++ b/halimpl/pn54x/libnfc-nxp-PN553_example.conf
@@ -38,7 +38,7 @@
 #define CLK_SRC_XTAL       1
 #define CLK_SRC_PLL        2
 
-NXP_SYS_CLK_SRC_SEL=0x01
+NXP_SYS_CLK_SRC_SEL=0x02
 
 ###############################################################################
 # System clock frequency selection configuration
@@ -147,7 +147,7 @@
 # Clock settings A002, A003
 # PbF settings A008
 # Clock timeout settings A004
-NXP_CORE_CONF_EXTN={20, 02, 25, 09,
+NXP_CORE_CONF_EXTN={20, 02, 29, 0A,
     A0, EC, 01, 01,
     A0, ED, 01, 01,
     A0, 5E, 01, 01,
@@ -156,7 +156,8 @@
     A0, DD, 01, 2D,
     A0, D1, 01, 02,
     A0, D4, 01, 01,
-    A0, 37, 01, 11
+    A0, 37, 01, 11,
+    A0, F2, 01, 01
    }
 #       A0, F2, 01, 01,
 #       A0, 40, 01, 01,
diff --git a/halimpl/pn54x/libnfc-nxp-PN80T_example.conf b/halimpl/pn54x/libnfc-nxp-PN80T_example.conf
index a0947d1..26d9923 100644
--- a/halimpl/pn54x/libnfc-nxp-PN80T_example.conf
+++ b/halimpl/pn54x/libnfc-nxp-PN80T_example.conf
@@ -38,7 +38,7 @@
 #define CLK_SRC_XTAL       1
 #define CLK_SRC_PLL        2
 
-NXP_SYS_CLK_SRC_SEL=0x01
+NXP_SYS_CLK_SRC_SEL=0x02
 
 ###############################################################################
 # System clock frequency selection configuration
@@ -147,7 +147,7 @@
 # Clock settings A002, A003
 # PbF settings A008
 # Clock timeout settings A004
-NXP_CORE_CONF_EXTN={20, 02, 25, 09,
+NXP_CORE_CONF_EXTN={20, 02, 29, 0A,
     A0, EC, 01, 01,
     A0, ED, 01, 01,
     A0, 5E, 01, 01,
@@ -156,7 +156,8 @@
     A0, DD, 01, 2D,
     A0, D1, 01, 02,
     A0, D4, 01, 01,
-    A0, 37, 01, 11
+    A0, 37, 01, 11,
+    A0, F2, 01, 01
    }
 #       A0, F2, 01, 01,
 #       A0, 40, 01, 01,