| /linux/drivers/mtd/nand/raw/ | 
| H A D | mxic_nand.c | 184 static int mxic_nfc_clk_enable(struct mxic_nand_ctlr *nfc)  in mxic_nfc_clk_enable()  argument188 	ret = clk_prepare_enable(nfc->ps_clk);  in mxic_nfc_clk_enable()
 192 	ret = clk_prepare_enable(nfc->send_clk);  in mxic_nfc_clk_enable()
 196 	ret = clk_prepare_enable(nfc->send_dly_clk);  in mxic_nfc_clk_enable()
 203 	clk_disable_unprepare(nfc->send_clk);  in mxic_nfc_clk_enable()
 205 	clk_disable_unprepare(nfc->ps_clk);  in mxic_nfc_clk_enable()
 210 static void mxic_nfc_clk_disable(struct mxic_nand_ctlr *nfc)  in mxic_nfc_clk_disable()  argument
 212 	clk_disable_unprepare(nfc->send_clk);  in mxic_nfc_clk_disable()
 213 	clk_disable_unprepare(nfc->send_dly_clk);  in mxic_nfc_clk_disable()
 214 	clk_disable_unprepare(nfc->ps_clk);  in mxic_nfc_clk_disable()
 [all …]
 
 | 
| H A D | stm32_fmc2_nand.c | 251 	int (*set_cdev)(struct stm32_fmc2_nfc *nfc);295 	struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller);  in stm32_fmc2_nfc_timings_init()  local
 301 	regmap_update_bits(nfc->regmap, FMC2_PCR,  in stm32_fmc2_nfc_timings_init()
 311 	regmap_write(nfc->regmap, FMC2_PMEM, pmem);  in stm32_fmc2_nfc_timings_init()
 318 	regmap_write(nfc->regmap, FMC2_PATT, patt);  in stm32_fmc2_nfc_timings_init()
 323 	struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller);  in stm32_fmc2_nfc_setup()  local
 345 	regmap_update_bits(nfc->regmap, FMC2_PCR, pcr_mask, pcr);  in stm32_fmc2_nfc_setup()
 350 	struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller);  in stm32_fmc2_nfc_select_chip()  local
 355 	if (nand->cs_used[chipnr] == nfc->cs_sel)  in stm32_fmc2_nfc_select_chip()
 358 	nfc->cs_sel = nand->cs_used[chipnr];  in stm32_fmc2_nfc_select_chip()
 [all …]
 
 | 
| H A D | mtk_nand.c | 216 	struct mtk_nfc *nfc = nand_get_controller_data(chip);  in mtk_data_ptr()  local218 	return nfc->buffer + i * mtk_data_len(chip);  in mtk_data_ptr()
 223 	struct mtk_nfc *nfc = nand_get_controller_data(chip);  in mtk_oob_ptr()  local
 225 	return nfc->buffer + i * mtk_data_len(chip) + chip->ecc.size;  in mtk_oob_ptr()
 228 static inline void nfi_writel(struct mtk_nfc *nfc, u32 val, u32 reg)  in nfi_writel()  argument
 230 	writel(val, nfc->regs + reg);  in nfi_writel()
 233 static inline void nfi_writew(struct mtk_nfc *nfc, u16 val, u32 reg)  in nfi_writew()  argument
 235 	writew(val, nfc->regs + reg);  in nfi_writew()
 238 static inline void nfi_writeb(struct mtk_nfc *nfc, u8 val, u32 reg)  in nfi_writeb()  argument
 240 	writeb(val, nfc->regs + reg);  in nfi_writeb()
 [all …]
 
 | 
| H A D | vf610_nfc.c | 53 /* Addresses for NFC MAIN RAM BUFFER areas */76 /* NFC ECC mode define */
 174 static inline u32 vf610_nfc_read(struct vf610_nfc *nfc, uint reg)  in vf610_nfc_read()  argument
 176 	return readl(nfc->regs + reg);  in vf610_nfc_read()
 179 static inline void vf610_nfc_write(struct vf610_nfc *nfc, uint reg, u32 val)  in vf610_nfc_write()  argument
 181 	writel(val, nfc->regs + reg);  in vf610_nfc_write()
 184 static inline void vf610_nfc_set(struct vf610_nfc *nfc, uint reg, u32 bits)  in vf610_nfc_set()  argument
 186 	vf610_nfc_write(nfc, reg, vf610_nfc_read(nfc, reg) | bits);  in vf610_nfc_set()
 189 static inline void vf610_nfc_clear(struct vf610_nfc *nfc, uint reg, u32 bits)  in vf610_nfc_clear()  argument
 191 	vf610_nfc_write(nfc, reg, vf610_nfc_read(nfc, reg) & ~bits);  in vf610_nfc_clear()
 [all …]
 
 | 
| H A D | meson_nand.c | 266 	struct meson_nfc *nfc = nand_get_controller_data(nand);  in meson_nfc_select_chip()  local272 	nfc->param.chip_select = meson_chip->sels[chip] ? NAND_CE1 : NAND_CE0;  in meson_nfc_select_chip()
 273 	nfc->param.rb_select = nfc->param.chip_select;  in meson_nfc_select_chip()
 274 	nfc->timing.twb = meson_chip->twb;  in meson_nfc_select_chip()
 275 	nfc->timing.tadl = meson_chip->tadl;  in meson_nfc_select_chip()
 276 	nfc->timing.tbers_max = meson_chip->tbers_max;  in meson_nfc_select_chip()
 278 	if (nfc->clk_rate != meson_chip->clk_rate) {  in meson_nfc_select_chip()
 279 		ret = clk_set_rate(nfc->nand_clk, meson_chip->clk_rate);  in meson_nfc_select_chip()
 281 			dev_err(nfc->dev, "failed to set clock rate\n");  in meson_nfc_select_chip()
 284 		nfc->clk_rate = meson_chip->clk_rate;  in meson_nfc_select_chip()
 [all …]
 
 | 
| H A D | arasan-nand-controller.c | 234 static int anfc_wait_for_event(struct arasan_nfc *nfc, unsigned int event)  in anfc_wait_for_event()  argument239 	ret = readl_relaxed_poll_timeout(nfc->base + INTR_STS_REG, val,  in anfc_wait_for_event()
 243 		dev_err(nfc->dev, "Timeout waiting for event 0x%x\n", event);  in anfc_wait_for_event()
 247 	writel_relaxed(event, nfc->base + INTR_STS_REG);  in anfc_wait_for_event()
 252 static int anfc_wait_for_rb(struct arasan_nfc *nfc, struct nand_chip *chip,  in anfc_wait_for_rb()  argument
 260 	ret = readl_relaxed_poll_timeout(nfc->base + READY_STS_REG, val,  in anfc_wait_for_rb()
 264 		dev_err(nfc->dev, "Timeout waiting for R/B 0x%x\n",  in anfc_wait_for_rb()
 265 			readl_relaxed(nfc->base + READY_STS_REG));  in anfc_wait_for_rb()
 272 static void anfc_trigger_op(struct arasan_nfc *nfc, struct anfc_op *nfc_op)  in anfc_trigger_op()  argument
 274 	writel_relaxed(nfc_op->pkt_reg, nfc->base + PKT_REG);  in anfc_trigger_op()
 [all …]
 
 | 
| H A D | marvell_nand.c | 98 /* NFC does not support transfers of larger chunks at a time */107 /* Latency in clock cycles between SoC pins and NFC logic */
 516 static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask)  in marvell_nfc_disable_int()  argument
 521 	reg = readl_relaxed(nfc->regs + NDCR);  in marvell_nfc_disable_int()
 522 	writel_relaxed(reg | int_mask, nfc->regs + NDCR);  in marvell_nfc_disable_int()
 525 static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)  in marvell_nfc_enable_int()  argument
 530 	reg = readl_relaxed(nfc->regs + NDCR);  in marvell_nfc_enable_int()
 531 	writel_relaxed(reg & ~int_mask, nfc->regs + NDCR);  in marvell_nfc_enable_int()
 534 static u32 marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask)  in marvell_nfc_clear_int()  argument
 538 	reg = readl_relaxed(nfc->regs + NDSR);  in marvell_nfc_clear_int()
 [all …]
 
 | 
| H A D | mpc5121_nfc.c | 31 /* Addresses for NFC MAIN RAM BUFFER areas */34 /* Addresses for NFC SPARE BUFFER areas */
 39 /* MPC5121 NFC registers */
 121 /* Read NFC register */
 130 /* Write NFC register */
 139 /* Set bits in NFC register */
 145 /* Clear bits in NFC register */
 167 /* Send data from NFC buffers to NAND flash */
 199 /* NFC interrupt handler */
 313 	 * NFC handles ready/busy signal internally. Therefore, this function  in mpc5121_nfc_dev_ready()
 [all …]
 
 | 
| /linux/Documentation/driver-api/mei/ | 
| H A D | nfc.rst | 3 MEI NFC6 Some Intel 8 and 9 Series chipsets support NFC devices connected behind
 8 MEI client bus exposes the NFC chips as NFC phy devices and enables
 9 binding with Microread and NXP PN544 NFC device driver from the Linux NFC
 13    :alt: MEI NFC digraph
 14    :caption: **MEI NFC** Stack
 16    digraph NFC {
 18     "drivers/nfc/mei_phy" -> cl_nfc [lhead=bus];
 19     "drivers/nfc/microread/mei" -> cl_nfc;
 20     "drivers/nfc/microread/mei" -> "drivers/nfc/mei_phy";
 [all …]
 
 | 
| /linux/drivers/nfc/ | 
| H A D | Kconfig | 3 # Near Field Communication (NFC) devices6 menu "Near Field Communication (NFC) devices"
 7 	depends on NFC
 10 	tristate "Texas Instruments TRF7970a NFC driver"
 13 	  This option enables the NFC driver for Texas Instruments' TRF7970a
 22 	tristate "MEI bus NFC device support"
 25 	  This adds support to use an mei bus nfc device. Select this if you
 26 	  will use an HCI NFC driver for an NFC chip connected behind an
 32 	tristate "NFC hardware simulator driver"
 35 	  This driver declares two virtual NFC devices supporting NFC-DEP
 [all …]
 
 | 
| /linux/drivers/nfc/nfcmrvl/ | 
| H A D | Kconfig | 5 	  The core driver to support Marvell NFC devices.8 	  Marvell NFC device 8897.
 11 	tristate "Marvell NFC-over-USB driver"
 15 	  Marvell NFC-over-USB driver.
 17 	  This driver provides support for Marvell NFC-over-USB devices:
 20 	  Say Y here to compile support for Marvell NFC-over-USB driver
 24 	tristate "Marvell NFC-over-UART driver"
 28 	  Marvell NFC-over-UART driver.
 30 	  This driver provides support for Marvell NFC-over-UART devices
 32 	  Say Y here to compile support for Marvell NFC-over-UART driver
 [all …]
 
 | 
| /linux/drivers/mtd/nand/raw/ingenic/ | 
| H A D | ingenic_nand_drv.c | 152 	struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller);  in ingenic_nand_ecc_calculate()  local166 	return ingenic_ecc_calculate(nfc->ecc, ¶ms, dat, ecc_code);  in ingenic_nand_ecc_calculate()
 173 	struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller);  in ingenic_nand_ecc_correct()  local
 180 	return ingenic_ecc_correct(nfc->ecc, ¶ms, dat, read_ecc);  in ingenic_nand_ecc_correct()
 186 	struct ingenic_nfc *nfc = to_ingenic_nfc(chip->controller);  in ingenic_nand_attach_chip()  local
 199 		if (!nfc->ecc) {  in ingenic_nand_attach_chip()
 200 			dev_err(nfc->dev, "HW ECC selected, but ECC controller not found\n");  in ingenic_nand_attach_chip()
 209 		dev_info(nfc->dev, "using %s (strength %d, size %d, bytes %d)\n",  in ingenic_nand_attach_chip()
 210 			 (nfc->ecc) ? "hardware ECC" : "software ECC",  in ingenic_nand_attach_chip()
 214 		dev_info(nfc->dev, "not using ECC\n");  in ingenic_nand_attach_chip()
 [all …]
 
 | 
| /linux/Documentation/devicetree/bindings/mtd/ | 
| H A D | rockchip,nand-controller.yaml | 7 title: Rockchip SoCs NAND FLASH Controller (NFC)18       - const: rockchip,px30-nfc
 19       - const: rockchip,rk2928-nfc
 20       - const: rockchip,rv1108-nfc
 23               - rockchip,rk3036-nfc
 24               - rockchip,rk3128-nfc
 25           - const: rockchip,rk2928-nfc
 27           - const: rockchip,rk3308-nfc
 28           - const: rockchip,rv1108-nfc
 46       - const: nfc
 [all …]
 
 | 
| H A D | atmel-nand.txt | 21 - atmel,nfc-io: phandle to the NFC IO block. Only required for sama5d323 - atmel,nfc-sram: phandle to the NFC SRAM block. Only required for sama5d3
 65 	nfc_io: nfc-io@70000000 {
 66 		compatible = "atmel,sama5d3-nfc-io", "syscon";
 91 			atmel,nfc-sram = <&nfc_sram>;
 92 			atmel,nfc-io = <&nfc_io>;
 151 Nand Flash Controller(NFC) is an optional sub-node
 153 - compatible : "atmel,sama5d3-nfc".
 154 - reg : should specify the address and size used for NFC command registers,
 155         NFC registers and NFC SRAM. NFC SRAM address and size can be absent
 [all …]
 
 | 
| H A D | mediatek,mtk-nfc.yaml | 4 $id: http://devicetree.org/schemas/mtd/mediatek,mtk-nfc.yaml#7 title: MediaTek(MTK) SoCs raw NAND FLASH controller (NFC)
 15       - mediatek,mt2701-nfc
 16       - mediatek,mt2712-nfc
 17       - mediatek,mt7622-nfc
 58             const: mediatek,mt2701-nfc
 73             const: mediatek,mt2712-nfc
 88             const: mediatek,mt7622-nfc
 119             compatible = "mediatek,mt2701-nfc";
 
 | 
| H A D | amlogic,meson-nand.yaml | 7 title: Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs18       - amlogic,meson-gxl-nfc
 19       - amlogic,meson-axg-nfc
 26       - const: nfc
 59             meson-gxl-nfc 8, 16, 24, 30, 40, 50, 60
 60             meson-axg-nfc 8
 106       compatible = "amlogic,meson-axg-nfc";
 108       reg-names = "nfc", "emmc";
 
 | 
| /linux/net/nfc/ | 
| H A D | Kconfig | 3 # NFC subsystem configuration6 menuconfig NFC  config
 8 	tristate "NFC subsystem support"
 11 	  Say Y here if you want to build support for NFC (Near field
 15 	  be called nfc.
 18 	depends on NFC
 21 	tristate "NFC Digital Protocol stack support"
 24 	  Say Y if you want to build NFC digital protocol stack support.
 25 	  This is needed by NFC chipsets whose firmware only implement
 26 	  the NFC analog layer.
 [all …]
 
 | 
| H A D | core.c | 17 #include <linux/nfc.h>21 #include "nfc.h"
 30 /* NFC device ID bitmap */
 69  * @dev: The nfc device to which firmware was downloaded
 83  * nfc_dev_up - turn on the NFC device
 85  * @dev: The nfc device to be turned on
 133  * nfc_dev_down - turn off the NFC device
 135  * @dev: The nfc device to be turned off
 189  * nfc_start_poll - start polling for nfc targets
 191  * @dev: The nfc device that must start polling
 [all …]
 
 | 
| /linux/Documentation/devicetree/bindings/net/nfc/ | 
| H A D | marvell,nci.yaml | 4 $id: http://devicetree.org/schemas/net/nfc/marvell,nci.yaml#7 title: Marvell International Ltd. NCI NFC controller
 15       - marvell,nfc-i2c
 16       - marvell,nfc-spi
 17       - marvell,nfc-uart
 70             const: marvell,nfc-i2c
 85             const: marvell,nfc-spi
 100             const: marvell,nfc-uart
 122         nfc@8 {
 123             compatible = "marvell,nfc-i2c";
 [all …]
 
 | 
| /linux/Documentation/networking/ | 
| H A D | nfc.rst | 2 Linux NFC subsystem5 The Near Field Communication (NFC) subsystem is required to standardize the
 6 NFC device drivers development and to create an unified userspace interface.
 14 The NFC subsystem is responsible for:
 15       - NFC adapters management;
 27 PF_NFC. The NFC_SOCKPROTO_RAW performs raw communication with NFC targets.
 58 When registering on the NFC subsystem, the device driver must inform the core
 59 of the set of supported NFC protocols and the set of ops callbacks. The ops
 84 * NFC_EVENT_DEVICE_ADDED - reports an NFC device addition
 85 * NFC_EVENT_DEVICE_REMOVED - reports an NFC device removal
 [all …]
 
 | 
| /linux/drivers/nfc/st95hf/ | 
| H A D | Kconfig | 3 	tristate "ST95HF NFC Transceiver driver"6 	This enables the ST NFC driver for ST95HF NFC transceiver.
 8 	and registered with NFC digital core to support Linux NFC framework.
 10 	Say Y here to compile support for ST NFC transceiver ST95HF
 
 | 
| /linux/include/net/nfc/ | 
| H A D | nfc.h | 14 #include <linux/nfc.h>18 #define nfc_dbg(dev, fmt, ...) dev_dbg((dev), "NFC: " fmt, ##__VA_ARGS__)
 19 #define nfc_info(dev, fmt, ...) dev_info((dev), "NFC: " fmt, ##__VA_ARGS__)
 20 #define nfc_err(dev, fmt, ...) dev_err((dev), "NFC: " fmt, ##__VA_ARGS__)
 83  * struct nfc_target - NFC target description
 87  *	as described by the NFC Forum digital specification (i.e. the platform
 115  * nfc_se - A structure for NFC accessible secure elements.
 132  * nfc_evt_transaction - A struct for NFC secure element event transaction.
 211  * nfc_free_device - free nfc device
 213  * @dev: The nfc device to free
 [all …]
 
 | 
| /linux/drivers/nfc/st-nci/ | 
| H A D | Kconfig | 5 	  STMicroelectronics NFC NCI chips core driver. It implements the chipset6 	  NCI logic and hooks into the NFC kernel APIs. Physical layers will
 10 	tristate "STMicroelectronics ST NCI NFC driver (I2C)"
 15 	  STMicroelectronics NFC NCI chips family.
 22 	tristate "STMicroelectronics ST NCI NFC driver (SPI)"
 27 	  STMicroelectronics NFC NCI chips family.
 
 | 
| /linux/Documentation/driver-api/nfc/ | 
| H A D | nfc-hci.rst | 2 HCI backend for NFC Core12 enables easy writing of HCI-based NFC drivers. The HCI layer runs as an NFC Core
 13 backend, implementing an abstract nfc device and translating NFC Core API
 19 HCI registers as an nfc device with NFC Core. Requests coming from userspace are
 20 routed through netlink sockets to NFC Core and then to HCI. From this point,
 26 and a translation will be forwarded to NFC Core as needed. There are hooks to
 100   to nfc core.
 102 - target_from_gate() is an optional entrypoint to return the nfc protocols
 181 The llc must be registered with nfc before it can be used. Do that by
 221   Any entrypoint in HCI called from NFC Core
 [all …]
 
 | 
| /linux/net/nfc/hci/ | 
| H A D | Kconfig | 3 	depends on NFC4 	tristate "NFC HCI implementation"
 7 	  Say Y here if you want to build support for a kernel NFC HCI
 14 	bool "SHDLC link layer for HCI based NFC drivers"
 17 	  Say yes if you use an NFC HCI driver that requires SHDLC link layer.
 
 |