xref: /freebsd/sys/dev/ath/ath_hal/ar9002/ar9002phy.h (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2010-2011 Adrian Chadd, Xenion Pty Ltd.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  */
27 #ifndef	__ATH_AR9002PHY_H__
28 #define	__ATH_AR9002PHY_H__
29 
30 #define	AR_PHY_TX_PWRCTRL4			0xa264
31 #define	AR_PHY_TX_PWRCTRL_PD_AVG_VALID		0x00000001
32 #define	AR_PHY_TX_PWRCTRL_PD_AVG_VALID_S	0
33 #define	AR_PHY_TX_PWRCTRL_PD_AVG_OUT		0x000001FE
34 #define	AR_PHY_TX_PWRCTRL_PD_AVG_OUT_S		1
35 
36 #define	AR_PHY_TX_PWRCTRL6_0			0xa270
37 #define	AR_PHY_TX_PWRCTRL6_1			0xb270
38 #define	AR_PHY_TX_PWRCTRL_ERR_EST_MODE		0x03000000
39 #define	AR_PHY_TX_PWRCTRL_ERR_EST_MODE_S	24
40 
41 #define	AR_PHY_TX_PWRCTRL7			0xa274
42 #define	AR_PHY_TX_PWRCTRL_INIT_TX_GAIN		0x01F80000
43 #define	AR_PHY_TX_PWRCTRL_INIT_TX_GAIN_S	19
44 
45 #define	AR_PHY_TX_PWRCTRL8			0xa278
46 #define	AR_PHY_TX_PWRCTRL10			0xa394
47 
48 #define	AR_PHY_TX_GAIN_TBL1			0xa300
49 #define	AR_PHY_TX_GAIN				0x0007F000
50 #define	AR_PHY_TX_GAIN_S			12
51 
52 #define	AR_PHY_CH0_TX_PWRCTRL11			0xa398
53 #define	AR_PHY_CH1_TX_PWRCTRL11			0xb398
54 #define	AR_PHY_CH0_TX_PWRCTRL12			0xa3dc
55 #define	AR_PHY_CH0_TX_PWRCTRL13			0xa3e0
56 
57 #endif
58