Skip to content

Commit

Permalink
Merge tag 'nfc-next-4.4-2' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/sameo/nfc-next

Samuel Ortiz says:

====================
NFC 4.4 pull request

This is the NFC pull request for 4.4.

It's a bit bigger than usual, the 3 main culprits being:

- A new driver for Intel's Fields Peak NCI chipset. In order to
  support this chipset we had to export a few NCI routines and
  extend the driver NCI ops to not only support proprietary
  commands but also core ones.

- Support for vendor commands for both STM drivers, st-nci
  and st21nfca. Those vendor commands allow to run factory tests
  through the NFC netlink interface.

- New i2c and SPI support for the Marvell driver, together with
  firmware download support for this driver's core.

Besides that we also have:

- A few file renames in the STM drivers, to keep the naming
  consistent between drivers.

- Some improvements and fixes on the NCI HCI layer, mostly to
  properly reach a secure element over a legacy HCI link.

- A few fixes for the s3fwrn5 and trf7970a drivers.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 30, 2015
2 parents 5bf8921 + f116317 commit 740215d
Show file tree
Hide file tree
Showing 74 changed files with 4,380 additions and 481 deletions.
61 changes: 59 additions & 2 deletions Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
* Marvell International Ltd. NCI NFC Controller

Required properties:
- compatible: Should be "mrvl,nfc-uart".
- compatible: Should be:
- "marvell,nfc-uart" or "mrvl,nfc-uart" for UART devices
- "marvell,nfc-i2c" for I2C devices
- "marvell,nfc-spi" for SPI devices

Optional SoC specific properties:
- pinctrl-names: Contains only one value - "default".
Expand All @@ -13,17 +16,71 @@ Optional UART-based chip specific properties:
- flow-control: Specifies that the chip is using RTS/CTS.
- break-control: Specifies that the chip needs specific break management.

Optional I2C-based chip specific properties:
- i2c-int-falling: Specifies that the chip read event shall be trigged on
falling edge.
- i2c-int-rising: Specifies that the chip read event shall be trigged on
rising edge.

Example (for ARM-based BeagleBoard Black with 88W8887 on UART5):

&uart5 {
status = "okay";

nfcmrvluart: nfcmrvluart@5 {
compatible = "mrvl,nfc-uart";
compatible = "marvell,nfc-uart";

reset-n-io = <&gpio3 16 0>;

hci-muxed;
flow-control;
}
};


Example (for ARM-based BeagleBoard Black with 88W8887 on I2C1):

&i2c1 {
status = "okay";
clock-frequency = <400000>;

nfcmrvli2c0: i2c@1 {
compatible = "marvell,nfc-i2c";

reg = <0x8>;

/* I2C INT configuration */
interrupt-parent = <&gpio3>;
interrupts = <21 0>;

/* I2C INT trigger configuration */
i2c-int-rising;

/* Reset IO */
reset-n-io = <&gpio3 19 0>;
};
};


Example (for ARM-based BeagleBoard Black on SPI0):

&spi0 {

mrvlnfcspi0: spi@0 {
compatible = "marvell,nfc-spi";

reg = <0>;

/* SPI Bus configuration */
spi-max-frequency = <3000000>;
spi-cpha;
spi-cpol;

/* SPI INT configuration */
interrupt-parent = <&gpio1>;
interrupts = <17 0>;

/* Reset IO */
reset-n-io = <&gpio3 19 0>;
};
};
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Required properties:
Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.
- ese-present: Specifies that an ese is physically connected to the nfc
controller.
- uicc-present: Specifies that the uicc swp signal can be physically
connected to the nfc controller.

Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2):

Expand All @@ -29,5 +33,8 @@ Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2):
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;

reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;

ese-present;
uicc-present;
};
};
9 changes: 8 additions & 1 deletion Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

Required properties:
- compatible: Should be "st,st21nfcb-spi"
- spi-max-frequency: Maximum SPI frequency (<= 10000000).
- spi-max-frequency: Maximum SPI frequency (<= 4000000).
- interrupt-parent: phandle for the interrupt gpio controller
- interrupts: GPIO interrupt to which the chip is connected
- reset-gpios: Output GPIO pin used to reset the ST21NFCB

Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.
- ese-present: Specifies that an ese is physically connected to the nfc
controller.
- uicc-present: Specifies that the uicc swp signal can be physically
connected to the nfc controller.

Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4):

Expand All @@ -27,5 +31,8 @@ Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4):
interrupts = <2 IRQ_TYPE_EDGE_RISING>;

reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;

ese-present;
uicc-present;
};
};
1 change: 1 addition & 0 deletions drivers/nfc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ config NFC_PORT100

If unsure, say N.

source "drivers/nfc/fdp/Kconfig"
source "drivers/nfc/pn544/Kconfig"
source "drivers/nfc/microread/Kconfig"
source "drivers/nfc/nfcmrvl/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/nfc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Makefile for nfc devices
#

obj-$(CONFIG_NFC_FDP) += fdp/
obj-$(CONFIG_NFC_PN544) += pn544/
obj-$(CONFIG_NFC_MICROREAD) += microread/
obj-$(CONFIG_NFC_PN533) += pn533.o
Expand Down
23 changes: 23 additions & 0 deletions drivers/nfc/fdp/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
config NFC_FDP
tristate "Intel FDP NFC driver"
depends on NFC_NCI
select CRC_CCITT
default n
---help---
Intel Fields Peak NFC controller core driver.
This is a driver based on the NCI NFC kernel layers.

To compile this driver as a module, choose m here. The module will
be called fdp.
Say N if unsure.

config NFC_FDP_I2C
tristate "NFC FDP i2c support"
depends on NFC_FDP && I2C
---help---
This module adds support for the Intel Fields Peak NFC controller
i2c interface.
Select this if your platform is using the i2c bus.

If you choose to build a module, it'll be called fdp_i2c.
Say N if unsure.
9 changes: 9 additions & 0 deletions drivers/nfc/fdp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Makefile for FDP NCI based NFC driver
#

obj-$(CONFIG_NFC_FDP) += fdp.o
obj-$(CONFIG_NFC_FDP_I2C) += fdp_i2c.o

fdp_i2c-objs = i2c.o

Loading

0 comments on commit 740215d

Please sign in to comment.