forked from wissanu49/RDA5991_BT_patchram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrda5991e.h
144 lines (118 loc) · 4.63 KB
/
rda5991e.h
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
static const __u32 RDA5991e_PSK_rf[][2] =
{
{ 0x40240000, 0x2004f39c }, //PCLK_SPI2_EN
{ 0x40220304, 0x00004003 }, //41H,16'h4003;swch_clk_ad=1
{ 0x40220308, 0x000025FD }, //42H,16'h25FD;
{ 0x4022030C, 0x00008074 }, //43H,16'h8074;tx_gain_DPSK[7:0]=10000000
{ 0x40220310, 0x00000208 }, //44H,16'h035C;tx_gain_gfsk[7:0]=01011100
{ 0x4022032c, 0x0000a004 }, //4bH,16'ha004;20150521
{ 0x40220330, 0x00000010 }, //4cH,16'h0010;20150521
{ 0x402202fc, 0x00000001 }, //3fh=1;page 1
{ 0x40220314, 0x00003000 }, //c5H,16'h3000;set agc to max
{ 0x4022031c, 0x00005931 }, //c7H=5931;BT_TX_IQ_SWAP
{ 0x40220324, 0x00000008 }, //c9H=0008;
{ 0x402202fc, 0x00000000 }, //3fh=1;page 0
};
static const __u32 RDA5991e_NO_TXRX_PATCH[][2] =
{
{0x40180000, 0x0000feff},
};
static const __u32 RDA5991e_PATCH[][2] =
{
{0x40180004,0x00011e30},//edr
{0x40180024,0x00000014},
{0x40180008,0x0000f8e0},//esco dequeue packet
{0x40180028,0x0000fd38},
{0x4018000c,0x0000fa04},
{0x4018002c,0x0000fd38},
{0x40180010,0x0002a718},
{0x40180030,0x000073dc},//default link policy
{0x40180018,0x0001131c}, //for sniff
{0x40180038,0x00000014}, //for sniff
// add for pta
//trx patch
{0x80000060,0xe3a0f102},//
{0x80000000,0xea000017},//
{0x80000064,0xe5850014},// .... STR r0,[r5,#0x14] //cowifi status
{0x80000068,0xe3500000},// cmp r0,0
{0x8000006c,0x05971058},// ldreq r1,[r7,0x58]
{0x80000070,0x02011001},// andeq r1,r1,0x1
{0x80000074,0x03510001},// cmpeq r1,1
{0x80000078,0xe5972020},// ldr r2,[r7,0x20]
{0x8000007c,0x03822001},// orreq r2,r2,0x1
{0x80000080,0x05872020},// streq r2,[r7,0x20]
{0x80000084,0x08bd87f0},// LDMFDeq r13!,(r4-r10,pc)
{0x80000088,0xe59f3008},// ldr r3=0xfffffffe
{0x8000008c,0xe0032002},// and r2,r3,r2
{0x80000090,0xe5872020},// str r2,[r7,0x20]
{0x80000094,0xe8bd87f0},// .... LDMFD r13!,(r4-r10,pc)
{0x80000098,0xfffffffe},//
{0x40180014,0x00000df8},
{0x40180034,0x80000060},
// add for pta
{0x4018001c,0x00010814},//sniff
{0x4018003c,0x000232fc},
//{0x40180020,0x0002f024},//pkt_table
//{0x40180040,0x00000014},
{0x40180020,0x00000f84},//0xBC no write
{0x40180040,0x00001034},
{0x800003b0,0xe3d440ff},
{0x40180104,0x00000c04},
{0x40180124,0x800003b0},
{0x40180108,0x00000f8c},
{0x40180128,0x0000289c},
{0x4018010c,0x0000a044},//auto rate disable
{0x4018012c,0x00000014},
{0x8000026c,0xe59f6018},
{0x80000270,0xe5966000},
{0x80000274,0xe3560000},
{0x80000278,0x159ff004},
{0x8000027c,0xe3500001},
{0x80000280,0xe59ff000},
{0x80000284,0x0001135c},
{0x80000288,0x0001134c},
{0x8000028c,0x8000078e},
{0x80000290,0xe3a0f142},
{0x80000010,0xea000095},
{0x40180110,0x00011348},
{0x40180130,0x80000290},
{0x40180000,0x0000ffff},
};
static const __u32 RDA5991e_PSKEY_MISC[][2] =
{
{0x80002374,0x00010a02}, //enable sleep
{0x80000520,0x00040fba},//power control min level default :15
{0x80000524,0x00000001},
{0x80000470,0xf88dffff},//featuresfe8d<--->f88d(disable edr)
{0x80000474,0x83793998},//0x83793b98--->0x83713b98 ssp disable, 0x83791998 //disable subsniff
{0x40200030,0x000012e9},//lu added
{0x800004c8,0x000a12e9},
{0x800004cc,0x040412e9},
{0x800004d0,0x00b40150},
{0x800004d4,0x00080006},
{0x40200010,0x00007f7f}, //for gpio7 io mux
{0x40200004,0x00007f7c}, //for gpio7 io mux
{0x4024002c,0x00b81000}, // no need wakeup event send up to avoid unsleep
// add for pta
{0x40200044,0x0000007F}, // for io
{0x40200050,0xFFAFFCAA},
{0x40200058,0x00ac0011}, //
{0x40240004,0xc0020201}, //
//{0x40200000,0x7e194aaf}, // for tports
{0x800033CC,0x00200001}, // //ce-slot_high_for_connect_idle 0xe0
{0x800033D0,0x00A000C0}, // //d0-slot_high_for_connect_data=0xe0 d2-slot_low_for_connect_idle =0x80
{0x800033D4,0x00100060}, // //slot_low_for_connect_data 0x80 wifi_acl_in_sco_high_length to 0x3
{0x800033D8,0x00000030}, // sco ->low for wifi
// add for pta
};
static const __u8 rda_flow_ctl[][14] =
{
//{0x01,0x02,0xfd,0x0a,0x00,0x01,0x44,0x00,0x20,0x40,0x7c,0x00,0x00,0x00},
{0x01,0x02,0xfd,0x0a,0x00,0x01,0x44,0x00,0x20,0x40,0x7F,0x00,0x00,0x00}, // add fot pta
{0x01,0x02,0xfd,0x0a,0x00,0x01,0x10,0x00,0x00,0x50,0x22,0x01,0x00,0x00},// flow control
};
static const __u8 uart_setting_change_baud_rate[13] = { 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x10, 0x0e, 0x00, 0x00, 0x10, 0x0e, 0x00 };
static const __u8 rdabt_pskey_hostwake[] = { 0xc0, 0xfc, 0xc1, 0xfc, 0x8a, 0x00, 0xa0, 0x00, 0xa0, 0x00 };//default hostwake by interrupt auto clear
static const __u8 rdabt_pskey_sys_config[] = { 0x10, 0x20, 0x08, 0x00 };
static const __u8 rdabt_pskey_rf_setting[] = {0x00,0x0a,0x00,0x0c,0x40,0x30,0xb5,0x30,0xb5,0x30,0xba,0xba};
static const __u8 rdabt_pskey_sleep[] = {0xa5, 0x10, 0x50, 0x01, 0xa, 0x8};