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