xref: /freebsd/sys/dev/ath/ath_hal/ar9002/ar9002phy.h (revision 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
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  * $FreeBSD$
28  */
29 #ifndef	__ATH_AR9002PHY_H__
30 #define	__ATH_AR9002PHY_H__
31 
32 #define	AR_PHY_TX_PWRCTRL4			0xa264
33 #define	AR_PHY_TX_PWRCTRL_PD_AVG_VALID		0x00000001
34 #define	AR_PHY_TX_PWRCTRL_PD_AVG_VALID_S	0
35 #define	AR_PHY_TX_PWRCTRL_PD_AVG_OUT		0x000001FE
36 #define	AR_PHY_TX_PWRCTRL_PD_AVG_OUT_S		1
37 
38 #define	AR_PHY_TX_PWRCTRL6_0			0xa270
39 #define	AR_PHY_TX_PWRCTRL6_1			0xb270
40 #define	AR_PHY_TX_PWRCTRL_ERR_EST_MODE		0x03000000
41 #define	AR_PHY_TX_PWRCTRL_ERR_EST_MODE_S	24
42 
43 #define	AR_PHY_TX_PWRCTRL7			0xa274
44 #define	AR_PHY_TX_PWRCTRL_INIT_TX_GAIN		0x01F80000
45 #define	AR_PHY_TX_PWRCTRL_INIT_TX_GAIN_S	19
46 
47 #define	AR_PHY_TX_PWRCTRL8			0xa278
48 #define	AR_PHY_TX_PWRCTRL10			0xa394
49 
50 #define	AR_PHY_TX_GAIN_TBL1			0xa300
51 #define	AR_PHY_TX_GAIN				0x0007F000
52 #define	AR_PHY_TX_GAIN_S			12
53 
54 #define	AR_PHY_CH0_TX_PWRCTRL11			0xa398
55 #define	AR_PHY_CH1_TX_PWRCTRL11			0xb398
56 #define	AR_PHY_CH0_TX_PWRCTRL12			0xa3dc
57 #define	AR_PHY_CH0_TX_PWRCTRL13			0xa3e0
58 
59 #endif
60