Skip to content

Commit 6be8867

Browse files
Clément PerrochaudSamuel Ortiz
authored andcommitted
NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
1 parent dece458 commit 6be8867

File tree

4 files changed

+464
-0
lines changed

4 files changed

+464
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
* NXP Semiconductors NXP NCI NFC Controllers
2+
3+
Required properties:
4+
- compatible: Should be "nxp,nxp-nci-i2c".
5+
- clock-frequency: I²C work frequency.
6+
- reg: address on the bus
7+
- interrupt-parent: phandle for the interrupt gpio controller
8+
- interrupts: GPIO interrupt to which the chip is connected
9+
- enable-gpios: Output GPIO pin used for enabling/disabling the chip
10+
- firmware-gpios: Output GPIO pin used to enter firmware download mode
11+
12+
Optional SoC Specific Properties:
13+
- pinctrl-names: Contains only one value - "default".
14+
- pintctrl-0: Specifies the pin control groups used for this controller.
15+
16+
Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2):
17+
18+
&i2c2 {
19+
20+
status = "okay";
21+
22+
npc100: npc100@29 {
23+
24+
compatible = "nxp,nxp-nci-i2c";
25+
26+
reg = <0x29>;
27+
clock-frequency = <100000>;
28+
29+
interrupt-parent = <&gpio1>;
30+
interrupts = <29 GPIO_ACTIVE_HIGH>;
31+
32+
enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
33+
firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
34+
};
35+
};

drivers/nfc/nxp-nci/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@ config NFC_NXP_NCI
1111
To compile this driver as a module, choose m here. The module will
1212
be called nxp_nci.
1313
Say N if unsure.
14+
15+
config NFC_NXP_NCI_I2C
16+
tristate "NXP-NCI I2C support"
17+
depends on NFC_NXP_NCI && I2C
18+
---help---
19+
This module adds support for an I2C interface to the NXP NCI
20+
chips.
21+
Select this if your platform is using the I2C bus.
22+
23+
To compile this driver as a module, choose m here. The module will
24+
be called nxp_nci_i2c.
25+
Say Y if unsure.

drivers/nfc/nxp-nci/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
#
44

55
nxp-nci-objs = core.o firmware.o
6+
nxp-nci_i2c-objs = i2c.o
67

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

911
ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG

0 commit comments

Comments
 (0)