• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2017  Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 
26 #ifndef __PHYDMPSD_H__
27 #define __PHYDMPSD_H__
28 
29 /*@#define PSD_VERSION	"1.0"*/ /*@2016.09.22  Dino*/
30 /*@2016.10.07  Dino, Add Option for PSD Tone index Selection */
31 /*@2019.04.26  Early return & "IF0" for JGR3 ICs */
32 #define PSD_VERSION "1.2"
33 
34 #ifdef CONFIG_PSD_TOOL
35 
36 
37 struct psd_info {
38 	u8	psd_in_progress;
39 	u32	psd_reg;
40 	u32	psd_report_reg;
41 	u8	psd_pwr_common_offset;
42 	u16	sw_avg_time;
43 	u16	fft_smp_point;
44 	u32	rf_0x18_bkp;
45 	u32	rf_0x18_bkp_b;
46 	u16	psd_fc_channel;
47 	u32	psd_bw_rf_reg;
48 	u8	psd_result[128];
49 	u8	noise_k_en;
50 };
51 
52 u32 phydm_get_psd_data(void *dm_void, u32 psd_tone_idx, u32 igi);
53 
54 void phydm_psd_debug(void *dm_void, char input[][16], u32 *_used,
55 		     char *output, u32 *_out_len);
56 
57 u8 phydm_psd(void *dm_void, u32 igi, u16 start_point, u16 stop_point);
58 
59 void phydm_psd_para_setting(void *dm_void, u8 sw_avg_time, u8 hw_avg_time,
60 			    u8 i_q_setting, u16 fft_smp_point, u8 ant_sel,
61 			    u8 psd_input, u8 channel, u8 noise_k_en);
62 
63 void phydm_psd_init(void *dm_void);
64 
65 u8 phydm_get_psd_result_table(void *dm_void, int index);
66 
67 #endif
68 #endif
69