Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver
Browse files Browse the repository at this point in the history
Add a module to the NXP-NCI driver to support NFC controllers with an
I2C control interface, such as the NPC100.

Signed-off-by: Clément Perrochaud <clement.perrochaud@effinnov.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Clément Perrochaud authored and Samuel Ortiz committed Mar 26, 2015
1 parent dece458 commit 6be8867
Show file tree
Hide file tree
Showing 4 changed files with 464 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Documentation/devicetree/bindings/net/nfc/nxp-nci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
* NXP Semiconductors NXP NCI NFC Controllers

Required properties:
- compatible: Should be "nxp,nxp-nci-i2c".
- clock-frequency: I²C work frequency.
- reg: address on the bus
- interrupt-parent: phandle for the interrupt gpio controller
- interrupts: GPIO interrupt to which the chip is connected
- enable-gpios: Output GPIO pin used for enabling/disabling the chip
- firmware-gpios: Output GPIO pin used to enter firmware download mode

Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.

Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2):

&i2c2 {

status = "okay";

npc100: npc100@29 {

compatible = "nxp,nxp-nci-i2c";

reg = <0x29>;
clock-frequency = <100000>;

interrupt-parent = <&gpio1>;
interrupts = <29 GPIO_ACTIVE_HIGH>;

enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
};
};
12 changes: 12 additions & 0 deletions drivers/nfc/nxp-nci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ config NFC_NXP_NCI
To compile this driver as a module, choose m here. The module will
be called nxp_nci.
Say N if unsure.

config NFC_NXP_NCI_I2C
tristate "NXP-NCI I2C support"
depends on NFC_NXP_NCI && I2C
---help---
This module adds support for an I2C interface to the NXP NCI
chips.
Select this if your platform is using the I2C bus.

To compile this driver as a module, choose m here. The module will
be called nxp_nci_i2c.
Say Y if unsure.
2 changes: 2 additions & 0 deletions drivers/nfc/nxp-nci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#

nxp-nci-objs = core.o firmware.o
nxp-nci_i2c-objs = i2c.o

obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci.o
obj-$(CONFIG_NFC_NXP_NCI_I2C) += nxp-nci_i2c.o

ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG
Loading

0 comments on commit 6be8867

Please sign in to comment.