1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * NCI based driver for Samsung S3FWRN5 NFC chip 4 * 5 * Copyright (C) 2015 Samsung Electrnoics 6 * Robert Baldyga <r.baldyga@samsung.com> 7 */ 8 9 #ifndef __LOCAL_S3FWRN5_NCI_H_ 10 #define __LOCAL_S3FWRN5_NCI_H_ 11 12 #include "s3fwrn5.h" 13 14 #define NCI_PROP_AGAIN 0x01 15 16 #define NCI_PROP_GET_RFREG 0x21 17 #define NCI_PROP_SET_RFREG 0x22 18 19 struct nci_prop_set_rfreg_cmd { 20 __u8 index; 21 __u8 data[252]; 22 }; 23 24 struct nci_prop_set_rfreg_rsp { 25 __u8 status; 26 }; 27 28 #define NCI_PROP_GET_RFREG_VER 0x24 29 30 struct nci_prop_get_rfreg_ver_rsp { 31 __u8 status; 32 __u8 data[8]; 33 }; 34 35 #define NCI_PROP_SET_RFREG_VER 0x25 36 37 struct nci_prop_set_rfreg_ver_cmd { 38 __u8 data[8]; 39 }; 40 41 struct nci_prop_set_rfreg_ver_rsp { 42 __u8 status; 43 }; 44 45 #define NCI_PROP_START_RFREG 0x26 46 47 struct nci_prop_start_rfreg_rsp { 48 __u8 status; 49 }; 50 51 #define NCI_PROP_STOP_RFREG 0x27 52 53 struct nci_prop_stop_rfreg_cmd { 54 __u16 checksum; 55 }; 56 57 struct nci_prop_stop_rfreg_rsp { 58 __u8 status; 59 }; 60 61 #define NCI_PROP_FW_CFG 0x28 62 63 struct nci_prop_fw_cfg_cmd { 64 __u8 clk_type; 65 __u8 clk_speed; 66 __u8 clk_req; 67 }; 68 69 struct nci_prop_fw_cfg_rsp { 70 __u8 status; 71 }; 72 73 #define NCI_PROP_WR_RESET 0x2f 74 75 void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n); 76 int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name); 77 78 #endif /* __LOCAL_S3FWRN5_NCI_H_ */ 79