1. 04 5月, 2016 2 次提交
  2. 28 10月, 2015 1 次提交
  3. 27 10月, 2015 3 次提交
    • V
      NFC: NCI: allow spi driver to choose transfer clock · 2bd83245
      Vincent Cuissard 提交于
      In some cases low level drivers might want to update the
      SPI transfer clock (e.g. during firmware download).
      
      This patch adds this support. Without any modification the
      driver will use the default SPI clock (from pdata or device tree).
      Signed-off-by: NVincent Cuissard <cuissard@marvell.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      2bd83245
    • V
      NFC: NCI: export nci_send_frame and nci_send_cmd function · e5629d29
      Vincent Cuissard 提交于
      Export nci_send_frame and nci_send_cmd symbols to allow drivers
      to use it. This is needed for example if NCI is used during
      firmware download phase.
      Signed-off-by: NVincent Cuissard <cuissard@marvell.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      e5629d29
    • C
      NFC: st-nci: Add support for proprietary commands · b1fa4dc4
      Christophe Ricard 提交于
      Add support for proprietary commands useful mainly for
      factory testings. Here is a list:
      
      - FACTORY_MODE: Allow to set the driver into a mode where
        no secure element are activated. It does not consider any
        NFC_ATTR_VENDOR_DATA.
      - HCI_CLEAR_ALL_PIPES: Allow to execute a HCI clear all pipes
        command. It does not consider any NFC_ATTR_VENDOR_DATA.
      - HCI_DM_PUT_DATA: Allow to configure specific CLF registry
        like for example RF trimmings or low level drivers
        configurations (I2C, SPI, SWP).
      - HCI_DM_UPDATE_AID: Allow to configure an AID routing into the
        CLF routing table following RF technology, CLF mode or protocol.
      - HCI_DM_GET_INFO: Allow to retrieve CLF information.
      - HCI_DM_GET_DATA: Allow to retrieve CLF configurable data such as
        low level drivers configurations or RF trimmings.
      - HCI_DM_DIRECT_LOAD: Allow to load a firmware into the CLF.
        A complete packet can be more than 8KB.
      - HCI_DM_RESET: Allow to run a CLF reset in order to "commit" CLF
        configuration changes without CLF power off.
      - HCI_GET_PARAM: Allow to retrieve an HCI CLF parameter (for example
        the white list).
      - HCI_DM_FIELD_GENERATOR: Allow to generate different kind of RF
        technology. When using this command to anti-collision is done.
      - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF
        connectivity.
      - HCI_DM_VDC_MEASUREMENT_VALUE: Allow to measure the field applied
        on the CLF antenna. A value between 0 and 0x0f is returned. 0 is
        maximum.
      - HCI_DM_FWUPD_START: Allow to put CLF into firmware update mode.
        It is a specific CLF command as there is no GPIO for this.
      - HCI_DM_FWUPD_END:  Allow to complete firmware update.
      - HCI_DM_VDC_VALUE_COMPARISON: Allow to compare the field applied
        on the CLF antenna to a reference value.
      - MANUFACTURER_SPECIFIC: Allow to retrieve manufacturer specific data
        received during a NCI_CORE_INIT_CMD.
      Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      b1fa4dc4
  4. 26 10月, 2015 7 次提交
  5. 21 8月, 2015 2 次提交
  6. 12 6月, 2015 1 次提交
    • V
      NFC: nci: add generic uart support · 9961127d
      Vincent Cuissard 提交于
      Some NFC controller supports UART as host interface.
      As with SPI, a lot of code can be shared between vendor
      drivers. This patch add the generic support of UART and
      provides some extension API for vendor specific needs.
      
      This code is strongly inspired by the Bluetooth HCI ldisc
      implementation. NCI UART vendor drivers will have to register
      themselves to this layer via nci_uart_register.
      
      Underlying tty will have to be configured from user land
      thanks to an ioctl.
      Signed-off-by: NVincent Cuissard <cuissard@marvell.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      9961127d
  7. 09 6月, 2015 4 次提交
  8. 06 4月, 2015 1 次提交
  9. 26 3月, 2015 1 次提交
  10. 04 2月, 2015 3 次提交
  11. 03 2月, 2015 5 次提交
  12. 02 12月, 2014 4 次提交
  13. 28 11月, 2014 1 次提交
    • J
      NFC: NCI: Handle Target mode activation · a99903ec
      Julien Lefrique 提交于
      Changes:
      
       * Extract the Listen mode activation parameters from RF_INTF_ACTIVATED_NTF.
      
       * Store the General Bytes of ATR_REQ.
      
       * Signal that Target mode is activated in case of an activation in NFC-DEP.
      
       * Update the NCI state accordingly.
      
       * Use the various constants defined in nfc.h.
      
       * Fix the ATR_REQ and ATR_RES maximum size. As per NCI 1.0 and NCI 1.1, the
         Activation Parameters for both Poll and Listen mode contain all the bytes of
         ATR_REQ/ATR_RES starting and including Byte 3 as defined in [DIGITAL].
         In [DIGITAL], the maximum size of ATR_REQ/ATR_RES is 64 bytes and they are
         numbered starting from Byte 1.
      Signed-off-by: NJulien Lefrique <lefrique@marvell.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      a99903ec
  14. 24 9月, 2014 1 次提交
    • C
      NFC: nci: Add support for proprietary RF Protocols · 9e87f9a9
      Christophe Ricard 提交于
      In NFC Forum NCI specification, some RF Protocol values are
      reserved for proprietary use (from 0x80 to 0xfe).
      Some CLF vendor may need to use one value within this range
      for specific technology.
      Furthermore, some CLF may not becompliant with NFC Froum NCI
      specification 2.0 and therefore will not support RF Protocol
      value 0x06 for PROTOCOL_T5T as mention in a draft specification
      and in a recent push.
      
      Adding get_rf_protocol handle to the nci_ops structure will
      help to set the correct technology to target.
      Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      9e87f9a9
  15. 07 1月, 2014 2 次提交
  16. 07 12月, 2013 1 次提交
  17. 25 9月, 2013 1 次提交
    • E
      NFC: NCI: Modify NCI SPI to implement CS/INT handshake per the spec · 2bed2785
      Eric Lapuyade 提交于
      The NFC Forum NCI specification defines both a hardware and software
      protocol when using a SPI physical transport to connect an NFC NCI
      Chipset. The hardware requirement is that, after having raised the chip
      select line, the SPI driver must wait for an INT line from the NFC
      chipset to raise before it sends the data. The chip select must be
      raised first though, because this is the signal that the NFC chipset
      will detect to wake up and then raise its INT line. If the INT line
      doesn't raise in a timely fashion, the SPI driver should abort
      operation.
      
      When data is transferred from Device host (DH) to NFC Controller (NFCC),
      the signaling sequence is the following:
      
      Data Transfer from DH to NFCC
      • 1-Master asserts SPI_CSN
      • 2-Slave asserts SPI_INT
      • 3-Master sends NCI-over-SPI protocol header and payload data
      • 4-Slave deasserts SPI_INT
      • 5-Master deasserts SPI_CSN
      
      When data must be transferred from NFCC to DH, things are a little bit
      different.
      
      Data Transfer from NFCC to DH
      • 1-Slave asserts SPI_INT -> NFC chipset irq handler called -> process
      reading from SPI
      • 2-Master asserts SPI_CSN
      • 3-Master send 2-octet NCI-over-SPI protocol header
      • 4-Slave sends 2-octet NCI-over-SPI protocol payload length
      • 5-Slave sends NCI-over-SPI protocol payload
      • 6-Master deasserts SPI_CSN
      
      In this case, SPI driver should function normally as it does today. Note
      that the INT line can and will be lowered anytime between beginning of
      step 3 and end of step 5. A low INT is therefore valid after chip select
      has been raised.
      
      This would be easily implemented in a single driver. Unfortunately, we
      don't write the SPI driver and I had to imagine some workaround trick to
      get the SPI and NFC drivers to work in a synchronized fashion. The trick
      is the following:
      
      - send an empty spi message: this will raise the chip select line, and
      send nothing. We expect the /CS line will stay arisen because we asked
      for it in the spi_transfer cs_change field
      - wait for a completion, that will be completed by the NFC driver IRQ
      handler when it knows we are in the process of sending data (NFC spec
      says that we use SPI in a half duplex mode, so we are either sending or
      receiving).
      - when completed, proceed with the normal data send.
      
      This has been tested and verified to work very consistently on a Nexus
      10 (spi-s3c64xx driver). It may not work the same with other spi
      drivers.
      
      The previously defined nci_spi_ops{} whose intended purpose were to
      address this problem are not used anymore and therefore totally removed.
      
      The nci_spi_send() takes a new optional write_handshake_completion
      completion pointer. If non NULL, the nci spi layer will run the above
      trick when sending data to the NFC Chip. If NULL, the data is sent
      normally all at once and it is then the NFC driver responsibility to
      know what it's doing.
      Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      2bed2785