MT6620: add the new driver JB2 V1.0
[firefly-linux-kernel-4.4.55.git] / drivers / mtk_wcn_combo / common / core / include / wmt_ic.h
1 /*! \file
2     \brief  Declaration of library functions
3
4     Any definitions in this file will be shared among GLUE Layer and internal Driver Stack.
5 */
6
7
8
9 #ifndef _WMT_IC_H_
10 #define _WMT_IC_H_
11
12 /*******************************************************************************
13 *                         C O M P I L E R   F L A G S
14 ********************************************************************************
15 */
16
17 /*******************************************************************************
18 *                    E X T E R N A L   R E F E R E N C E S
19 ********************************************************************************
20 */
21
22 #include "wmt_core.h"
23 #include "wmt_exp.h"
24
25 /*******************************************************************************
26 *                                 M A C R O S
27 ********************************************************************************
28 */
29
30 /*******************************************************************************
31 *                              C O N S T A N T S
32 ********************************************************************************
33 */
34
35 #define WMT_IC_NAME_MT6620 "MT6620"
36 #define WMT_IC_NAME_MT6628 "MT6628"
37
38
39 #define WMT_IC_VER_E1 "E1"
40 #define WMT_IC_VER_E2 "E2"
41 #define WMT_IC_VER_E3 "E3"
42 #define WMT_IC_VER_E4 "E4"
43 #define WMT_IC_VER_E5 "E5"
44 #define WMT_IC_VER_E6 "E6"
45 #define WMT_IC_VER_E7 "E7"
46
47 #define WMT_IC_PATCH_DUMMY_EXT "_ex"
48 #define WMT_IC_PATCH_NO_EXT ""
49 #define WMT_IC_PATCH_E1_EXT "_e1"
50 #define WMT_IC_PATCH_E2_EXT "_e2"
51 #define WMT_IC_PATCH_E3_EXT "_e3"
52 #define WMT_IC_PATCH_E4_EXT "_e4"
53 #define WMT_IC_PATCH_E5_EXT "_e5"
54 #define WMT_IC_PATCH_E6_EXT "_e6"
55
56 #define WMT_IC_PATCH_TAIL    "_hdr.bin"
57
58 #define WMT_IC_INVALID_CHIP_ID 0xFFFF
59
60 #define MAJORNUM(x) (x & 0x00F0)
61 #define MINORNUM(x) (x & 0x000F)
62
63 /*******************************************************************************
64 *                             R E G I S T E R   M A P
65 ********************************************************************************
66 */
67 /* General definition used for ALL/UNKNOWN CHIPS */
68 /* Now MT6620 uses these definitions */
69 #define GEN_CONFG_BASE (0x80000000UL)
70 #define GEN_HVR (GEN_CONFG_BASE + 0x0UL) /* HW_VER */
71 #define GEN_FVR (GEN_CONFG_BASE + 0x4UL) /* FW_VER */
72 #define GEN_VER_MASK (0x0000FFFFUL) /* HW_VER and FW_VER valid bits mask */
73 #define GEN_HCR (GEN_CONFG_BASE + 0x8UL) /* HW_CODE, chip id */
74 #define GEN_HCR_MASK (0x0000FFFFUL) /* HW_CODE valid bits mask */
75
76 /*******************************************************************************
77 *                             D A T A   T Y P E S
78 ********************************************************************************
79 */
80
81 typedef struct _WMT_IC_INFO_S
82 {
83     UINT32 u4HwVer; /* u4HwId */
84     PUINT8 cChipName;
85     PUINT8 cChipVersion;
86     PUINT8 cPatchNameExt;
87     MTK_WCN_BOOL bPsmSupport;
88     MTK_WCN_BOOL bWorkWithoutPatch;
89     ENUM_WMTHWVER_TYPE_T eWmtHwVer;
90 } WMT_IC_INFO_S, *P_WMT_IC_INFO_S;
91
92 /*******************************************************************************
93 *                            P U B L I C   D A T A
94 ********************************************************************************
95 */
96
97 /*******************************************************************************
98 *                           P R I V A T E   D A T A
99 ********************************************************************************
100 */
101
102 /*******************************************************************************
103 *                  F U N C T I O N   D E C L A R A T I O N S
104 ********************************************************************************
105 */
106
107 /*******************************************************************************
108 *                              F U N C T I O N S
109 ********************************************************************************
110 */
111
112 #endif /* _WMT_IC_H_ */
113