1. 03 2月, 2015 1 次提交
    • C
      NFC: st21nfcb: Add support for secure element · 8ae01f79
      Christophe Ricard 提交于
      The st21nfcb chipset has 3 SWP (Single Wire Protocol) lines and
      supports up to 3 secure elements (UICC/eSE and µSD in the future).
      
      Some st21nfcb firmware does not support the nci command
      nci_nfcee_mode_set(NCI_NFCEE_DISABLE). For this reason, we assume
      2 secures elements are always present (UICC and eSE).
      They will be added to the SE list once successfully activated and
      they will be available only after running through enable_se
      handler or when the poll in listen mode is started.
      
      During initialization, the white_list will be always set assuming
      both UICC & eSE are present.
      
      On eSE activation, the ATR bytes are fetched to build the command
      exchange timeout.
      
      The se_io hook will allow to transfer data over SWP. 2 kind of
      events may appear data is sent over:
      - ST21NFCB_EVT_TRANSMIT_DATA when receiving an apdu answer
      - ST21NFCB_EVT_WTX_REQUEST when the secure element needs more time
        than expected to process a command. If this timeout expires, we
        send a software reset, and then a hardware one if it still fails.
      Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      8ae01f79
  2. 08 9月, 2014 1 次提交
  3. 23 7月, 2014 1 次提交
    • C
      NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip · 35630df6
      Christophe Ricard 提交于
      Add driver for STMicroelectronics ST21NFCB NFC controller.
      ST21NFCB is using NCI protocol and a proprietary low level transport
      protocol called NDLC used on top.
      
      NDLC:
      The protocol defines 2 types of frame:
      - One type carrying NCI data (referred as DATAFRAME frames).
      - One type carrying protocol information used for flow control and error
      control mechanisms (referred as SUPERVISOR frames).
      
      After each frame transmission to the NFC controller, the device host
      SHALL waitfor  an ACK (SUPERVISOR frame) reception before sending a
      new frame.
      The NFC controller MAY send a frame at anytime to the device host.
      The NFC controller MAY send a specific WAIT supervisor frame to indicate
      to device host that a NCI data packet has been received but that it could
      take significant time before the NFC controller sends an ACK and thus
      allows next data reception.
      Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      35630df6