Home
last modified time | relevance | path

Searched full:nfc (Results 1 – 25 of 285) sorted by relevance

12345678910>>...12

/Linux-v5.10/drivers/mtd/nand/raw/
Dmxic_nand.c184 static int mxic_nfc_clk_enable(struct mxic_nand_ctlr *nfc) in mxic_nfc_clk_enable() argument
188 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 …]
Dvf610_nfc.c52 /* Addresses for NFC MAIN RAM BUFFER areas */
75 /* NFC ECC mode define */
173 static inline u32 vf610_nfc_read(struct vf610_nfc *nfc, uint reg) in vf610_nfc_read() argument
175 return readl(nfc->regs + reg); in vf610_nfc_read()
178 static inline void vf610_nfc_write(struct vf610_nfc *nfc, uint reg, u32 val) in vf610_nfc_write() argument
180 writel(val, nfc->regs + reg); in vf610_nfc_write()
183 static inline void vf610_nfc_set(struct vf610_nfc *nfc, uint reg, u32 bits) in vf610_nfc_set() argument
185 vf610_nfc_write(nfc, reg, vf610_nfc_read(nfc, reg) | bits); in vf610_nfc_set()
188 static inline void vf610_nfc_clear(struct vf610_nfc *nfc, uint reg, u32 bits) in vf610_nfc_clear() argument
190 vf610_nfc_write(nfc, reg, vf610_nfc_read(nfc, reg) & ~bits); in vf610_nfc_clear()
[all …]
Dmeson_nand.c225 struct meson_nfc *nfc = nand_get_controller_data(nand); in meson_nfc_select_chip() local
231 nfc->param.chip_select = meson_chip->sels[chip] ? NAND_CE1 : NAND_CE0; in meson_nfc_select_chip()
232 nfc->param.rb_select = nfc->param.chip_select; in meson_nfc_select_chip()
233 nfc->timing.twb = meson_chip->twb; in meson_nfc_select_chip()
234 nfc->timing.tadl = meson_chip->tadl; in meson_nfc_select_chip()
235 nfc->timing.tbers_max = meson_chip->tbers_max; in meson_nfc_select_chip()
237 if (nfc->clk_rate != meson_chip->clk_rate) { in meson_nfc_select_chip()
238 ret = clk_set_rate(nfc->device_clk, meson_chip->clk_rate); in meson_nfc_select_chip()
240 dev_err(nfc->dev, "failed to set clock rate\n"); in meson_nfc_select_chip()
243 nfc->clk_rate = meson_chip->clk_rate; in meson_nfc_select_chip()
[all …]
Dmtk_nand.c217 struct mtk_nfc *nfc = nand_get_controller_data(chip); in mtk_data_ptr() local
219 return nfc->buffer + i * mtk_data_len(chip); in mtk_data_ptr()
224 struct mtk_nfc *nfc = nand_get_controller_data(chip); in mtk_oob_ptr() local
226 return nfc->buffer + i * mtk_data_len(chip) + chip->ecc.size; in mtk_oob_ptr()
229 static inline void nfi_writel(struct mtk_nfc *nfc, u32 val, u32 reg) in nfi_writel() argument
231 writel(val, nfc->regs + reg); in nfi_writel()
234 static inline void nfi_writew(struct mtk_nfc *nfc, u16 val, u32 reg) in nfi_writew() argument
236 writew(val, nfc->regs + reg); in nfi_writew()
239 static inline void nfi_writeb(struct mtk_nfc *nfc, u8 val, u32 reg) in nfi_writeb() argument
241 writeb(val, nfc->regs + reg); in nfi_writeb()
[all …]
Dstm32_fmc2_nand.c281 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_timings_init() local
287 regmap_update_bits(nfc->regmap, FMC2_PCR, in stm32_fmc2_nfc_timings_init()
297 regmap_write(nfc->regmap, FMC2_PMEM, pmem); in stm32_fmc2_nfc_timings_init()
304 regmap_write(nfc->regmap, FMC2_PATT, patt); in stm32_fmc2_nfc_timings_init()
309 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_setup() local
331 regmap_update_bits(nfc->regmap, FMC2_PCR, pcr_mask, pcr); in stm32_fmc2_nfc_setup()
336 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_select_chip() local
341 if (nand->cs_used[chipnr] == nfc->cs_sel) in stm32_fmc2_nfc_select_chip()
344 nfc->cs_sel = nand->cs_used[chipnr]; in stm32_fmc2_nfc_select_chip()
348 if (nfc->dma_tx_ch && nfc->dma_rx_ch) { in stm32_fmc2_nfc_select_chip()
[all …]
Darasan-nand-controller.c205 static int anfc_wait_for_event(struct arasan_nfc *nfc, unsigned int event) in anfc_wait_for_event() argument
210 ret = readl_relaxed_poll_timeout(nfc->base + INTR_STS_REG, val, in anfc_wait_for_event()
214 dev_err(nfc->dev, "Timeout waiting for event 0x%x\n", event); in anfc_wait_for_event()
218 writel_relaxed(event, nfc->base + INTR_STS_REG); in anfc_wait_for_event()
223 static int anfc_wait_for_rb(struct arasan_nfc *nfc, struct nand_chip *chip, in anfc_wait_for_rb() argument
231 ret = readl_relaxed_poll_timeout(nfc->base + READY_STS_REG, val, in anfc_wait_for_rb()
235 dev_err(nfc->dev, "Timeout waiting for R/B 0x%x\n", in anfc_wait_for_rb()
236 readl_relaxed(nfc->base + READY_STS_REG)); in anfc_wait_for_rb()
243 static void anfc_trigger_op(struct arasan_nfc *nfc, struct anfc_op *nfc_op) in anfc_trigger_op() argument
245 writel_relaxed(nfc_op->pkt_reg, nfc->base + PKT_REG); in anfc_trigger_op()
[all …]
Dmarvell_nand.c97 /* NFC does not support transfers of larger chunks at a time */
106 /* Latency in clock cycles between SoC pins and NFC logic */
508 static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask) in marvell_nfc_disable_int() argument
513 reg = readl_relaxed(nfc->regs + NDCR); in marvell_nfc_disable_int()
514 writel_relaxed(reg | int_mask, nfc->regs + NDCR); in marvell_nfc_disable_int()
517 static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask) in marvell_nfc_enable_int() argument
522 reg = readl_relaxed(nfc->regs + NDCR); in marvell_nfc_enable_int()
523 writel_relaxed(reg & ~int_mask, nfc->regs + NDCR); in marvell_nfc_enable_int()
526 static u32 marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask) in marvell_nfc_clear_int() argument
530 reg = readl_relaxed(nfc->regs + NDSR); in marvell_nfc_clear_int()
[all …]
Dsunxi_nand.c6 * https://github.com/yuq/sunxi-nfc-mtd
164 * @rb: the Ready/Busy pin ID. -1 means no R/B pin connected to the NFC
259 struct sunxi_nfc *nfc = dev_id; in sunxi_nfc_interrupt() local
260 u32 st = readl(nfc->regs + NFC_REG_ST); in sunxi_nfc_interrupt()
261 u32 ien = readl(nfc->regs + NFC_REG_INT); in sunxi_nfc_interrupt()
267 complete(&nfc->complete); in sunxi_nfc_interrupt()
269 writel(st & NFC_INT_MASK, nfc->regs + NFC_REG_ST); in sunxi_nfc_interrupt()
270 writel(~st & ien & NFC_INT_MASK, nfc->regs + NFC_REG_INT); in sunxi_nfc_interrupt()
275 static int sunxi_nfc_wait_events(struct sunxi_nfc *nfc, u32 events, in sunxi_nfc_wait_events() argument
287 init_completion(&nfc->complete); in sunxi_nfc_wait_events()
[all …]
Dtango_nand.c70 * In NFC mode, the NAND Flash controller manages the communication.
71 * We use NFC mode for read and write; raw mode for everything else.
118 struct tango_nfc *nfc = to_tango_nfc(chip->controller); in tango_select_target() local
121 writel_relaxed(tchip->timing1, nfc->reg_base + NFC_TIMING1); in tango_select_target()
122 writel_relaxed(tchip->timing2, nfc->reg_base + NFC_TIMING2); in tango_select_target()
123 writel_relaxed(tchip->xfer_cfg, nfc->reg_base + NFC_XFER_CFG); in tango_select_target()
124 writel_relaxed(tchip->pkt_0_cfg, nfc->reg_base + NFC_PKT_0_CFG); in tango_select_target()
125 writel_relaxed(tchip->pkt_n_cfg, nfc->reg_base + NFC_PKT_N_CFG); in tango_select_target()
126 writel_relaxed(tchip->bb_cfg, nfc->reg_base + NFC_BB_CFG); in tango_select_target()
131 struct tango_nfc *nfc = to_tango_nfc(chip->controller); in tango_waitrdy() local
[all …]
Dmpc5121_nfc.c31 /* 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 */
314 * NFC handles ready/busy signal internally. Therefore, this function in mpc5121_nfc_dev_ready()
[all …]
/Linux-v5.10/Documentation/driver-api/mei/
Dnfc.rst3 MEI NFC
6 Some Intel 8 and 9 Serieses chipsets supports 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-v5.10/drivers/nfc/
DKconfig3 # Near Field Communication (NFC) devices
6 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-v5.10/drivers/nfc/nfcmrvl/
DKconfig5 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-v5.10/drivers/mtd/nand/raw/ingenic/
Dingenic_nand_drv.c152 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_calculate() local
166 return ingenic_ecc_calculate(nfc->ecc, &params, 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, &params, 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-v5.10/net/nfc/
DKconfig3 # NFC sybsystem configuration
6 menuconfig NFC config
9 tristate "NFC subsystem support"
12 Say Y here if you want to build support for NFC (Near field
16 be called nfc.
19 depends on NFC
22 tristate "NFC Digital Protocol stack support"
25 Say Y if you want to build NFC digital protocol stack support.
26 This is needed by NFC chipsets whose firmware only implement
27 the NFC analog layer.
[all …]
Dcore.c17 #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-v5.10/include/uapi/linux/
Dnfc.h27 #define NFC_GENL_NAME "nfc"
33 * enum nfc_commands - supported nfc commands
38 * %NFC_ATTR_DEVICE_INDEX) or dump request to get a list of all nfc devices
39 * @NFC_CMD_DEV_UP: turn on the nfc device
41 * @NFC_CMD_DEV_DOWN: turn off the nfc device
75 * This typically will be sent whenever a new NFC controller with either
78 * the system, as a consequence of e.g. an NFC controller being unplugged.
87 * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller.
89 * @NFC_CMD_ACTIVATE_TARGET: Request NFC controller to reactivate target.
92 * @NFC_CMD_DEACTIVATE_TARGET: Request NFC controller to deactivate target.
[all …]
/Linux-v5.10/Documentation/networking/
Dnfc.rst2 Linux NFC subsystem
5 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-v5.10/Documentation/devicetree/bindings/mtd/
Datmel-nand.txt21 - atmel,nfc-io: phandle to the NFC IO block. Only required for sama5d3
23 - atmel,nfc-sram: phandle to the NFC SRAM block. Only required for sama5d3
64 * SAMA5 NFC I/O bindings:
70 - compatible: should be "atmel,sama5d3-nfc-io", "syscon".
71 - reg: should contain the I/O range used to interact with the NFC logic.
75 nfc_io: nfc-io@70000000 {
76 compatible = "atmel,sama5d3-nfc-io", "syscon";
101 atmel,nfc-sram = <&nfc_sram>;
102 atmel,nfc-io = <&nfc_io>;
161 Nand Flash Controller(NFC) is an optional sub-node
[all …]
Dvf610-nfc.txt1 Freescale's NAND flash controller (NFC)
3 This variant of the Freescale NAND flash controller (NFC) can be found on
7 - compatible: Should be set to "fsl,vf610-nfc".
8 - reg: address range of the NFC.
9 - interrupts: interrupt of the NFC.
27 - compatible: Should be set to "fsl,vf610-nfc-cs".
39 nfc: nand@400e0000 {
40 compatible = "fsl,vf610-nfc";
46 clock-names = "nfc";
51 compatible = "fsl,vf610-nfc-nandcs";
/Linux-v5.10/drivers/nfc/st95hf/
DKconfig3 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-v5.10/Documentation/devicetree/bindings/net/nfc/
Dnfcmrvl.txt1 * Marvell International Ltd. NCI NFC Controller
5 - "marvell,nfc-uart" or "mrvl,nfc-uart" for UART devices
6 - "marvell,nfc-i2c" for I2C devices
7 - "marvell,nfc-spi" for SPI devices
30 compatible = "marvell,nfc-uart";
46 compatible = "marvell,nfc-i2c";
68 compatible = "marvell,nfc-spi";
/Linux-v5.10/drivers/nfc/st-nci/
DKconfig5 STMicroelectronics NFC NCI chips core driver. It implements the chipset
6 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-v5.10/include/net/nfc/
Dnfc.h14 #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 descriptiom
87 * as described by the NFC Forum digital specification (i.e. the platform
111 * nfc_se - A structure for NFC accessible secure elements.
128 * nfc_evt_transaction - A struct for NFC secure element event transaction.
207 * nfc_free_device - free nfc device
209 * @dev: The nfc device to free
[all …]
/Linux-v5.10/Documentation/driver-api/nfc/
Dnfc-hci.rst2 HCI backend for NFC Core
12 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 …]

12345678910>>...12