-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrfic_sw_cmdq.h
More file actions
75 lines (64 loc) · 1.46 KB
/
rfic_sw_cmdq.h
File metadata and controls
75 lines (64 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
* Copyright 2020, 2022 NXP
*
*/
#ifndef __RFIC_SW_CMDQ_H__
#define __RFIC_SW_CMDQ_H__
#pragma pack(push, 1)
#include "rfic_common.h"
#include "rf_sw_cmds.h"
#define RFIC_SWCMD_DATA_SIZE 68
#define MAX_REGS 32
#define RFIC_CMD_TIMEOUT 20
typedef enum rfic_sw_cmd {
RFIC_SWCMD_INVALID,
RFIC_SWCMD_READ_REG,
RFIC_SWCMD_WRITE_REG,
RFIC_SWCMD_MIXED_REG,
RFIC_SWCMD_SET_BB_INDEX_TX,
RFIC_SWCMD_SET_BB_INDEX_RX,
RFIC_SWCMD_WRITE_LIST_TO_PBK_MEMORY_TX,
RFIC_SWCMD_WRITE_LIST_TO_PBK_MEMORY_RX,
RFIC_SWCMD_SET_PBK_MODE_TX,
RFIC_SWCMD_SET_PBK_MODE_RX,
RFIC_SWCMD_PLL_CAP_CORRECTION,
RFIC_SWCMD_GET_PLL_LOCK_STATUS,
} rfic_sw_cmd_t;
typedef enum rfic_status {
RFIC_STS_NO_ISSUE = 0,
RFIC_STS_ERROR
} rfic_status_t;
typedef enum rfic_op {
RFIC_OP_READ_REG,
RFIC_OP_WRITE_REG,
RFIC_OP_POLL_REG,
RFIC_OP_READ_OR_WRITE_REG,
RFIC_OP_READ_AND_WRITE_REG,
RFIC_OP_WAIT_FOR_MASK
} rfic_op_t;
struct rfic_sw_cmdq_cmd {
uint32_t cmd;
uint32_t flags;
uint32_t status;
uint32_t data[RFIC_SWCMD_DATA_SIZE];
};
struct rfic_common_mdata {
struct rfic_sw_cmdq_cmd host_swcmd;
uint32_t state;
uint32_t host_swcmd_status;
};
struct sw_cmddata_reg_rw {
uint32_t count;
struct rfic_reg_rw rfic_reg_rw[MAX_REGS];
};
struct sw_cmddata_mixed_reg {
rfic_op_t op;
struct rfic_reg_rw rfic_reg_rw;
};
struct sw_cmddata_seq_reg {
uint32_t count;
struct sw_cmddata_mixed_reg sw_cmddata_mixed[MAX_MIX_REGS];
};
#pragma pack(pop)
#endif