ar5210phy.h revision 1.1.1.1.8.2 1 1.1.1.1.8.2 yamt /*
2 1.1.1.1.8.2 yamt * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 1.1.1.1.8.2 yamt * Copyright (c) 2002-2004 Atheros Communications, Inc.
4 1.1.1.1.8.2 yamt *
5 1.1.1.1.8.2 yamt * Permission to use, copy, modify, and/or distribute this software for any
6 1.1.1.1.8.2 yamt * purpose with or without fee is hereby granted, provided that the above
7 1.1.1.1.8.2 yamt * copyright notice and this permission notice appear in all copies.
8 1.1.1.1.8.2 yamt *
9 1.1.1.1.8.2 yamt * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 1.1.1.1.8.2 yamt * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 1.1.1.1.8.2 yamt * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 1.1.1.1.8.2 yamt * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 1.1.1.1.8.2 yamt * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 1.1.1.1.8.2 yamt * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 1.1.1.1.8.2 yamt * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 1.1.1.1.8.2 yamt *
17 1.1.1.1.8.2 yamt * $Id: ar5210phy.h,v 1.1.1.1.8.2 2009/05/04 08:13:38 yamt Exp $
18 1.1.1.1.8.2 yamt */
19 1.1.1.1.8.2 yamt #ifndef _DEV_ATH_AR5210PHY_H
20 1.1.1.1.8.2 yamt #define _DEV_ATH_AR5210PHY_H
21 1.1.1.1.8.2 yamt
22 1.1.1.1.8.2 yamt /*
23 1.1.1.1.8.2 yamt * Definitions for the PHY on the Atheros AR5210 parts.
24 1.1.1.1.8.2 yamt */
25 1.1.1.1.8.2 yamt
26 1.1.1.1.8.2 yamt /* PHY Registers */
27 1.1.1.1.8.2 yamt #define AR_PHY_BASE 0x9800 /* PHY register base */
28 1.1.1.1.8.2 yamt #define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2))
29 1.1.1.1.8.2 yamt
30 1.1.1.1.8.2 yamt #define AR_PHY_FRCTL 0x9804 /* PHY frame control */
31 1.1.1.1.8.2 yamt #define AR_PHY_TURBO_MODE 0x00000001 /* PHY turbo mode */
32 1.1.1.1.8.2 yamt #define AR_PHY_TURBO_SHORT 0x00000002 /* PHY turbo short symbol */
33 1.1.1.1.8.2 yamt #define AR_PHY_TIMING_ERR 0x01000000 /* Detect PHY timing error */
34 1.1.1.1.8.2 yamt #define AR_PHY_PARITY_ERR 0x02000000 /* Detect signal parity err */
35 1.1.1.1.8.2 yamt #define AR_PHY_ILLRATE_ERR 0x04000000 /* Detect PHY illegal rate */
36 1.1.1.1.8.2 yamt #define AR_PHY_ILLLEN_ERR 0x08000000 /* Detect PHY illegal length */
37 1.1.1.1.8.2 yamt #define AR_PHY_SERVICE_ERR 0x20000000 /* Detect PHY nonzero service */
38 1.1.1.1.8.2 yamt #define AR_PHY_TXURN_ERR 0x40000000 /* DetectPHY TX underrun */
39 1.1.1.1.8.2 yamt #define AR_PHY_FRCTL_BITS \
40 1.1.1.1.8.2 yamt "\20\1TURBO_MODE\2TURBO_SHORT\30TIMING_ERR\31PARITY_ERR\32ILLRATE_ERR"\
41 1.1.1.1.8.2 yamt "\33ILLEN_ERR\35SERVICE_ERR\36TXURN_ERR"
42 1.1.1.1.8.2 yamt
43 1.1.1.1.8.2 yamt #define AR_PHY_AGC 0x9808 /* PHY AGC command */
44 1.1.1.1.8.2 yamt #define AR_PHY_AGC_DISABLE 0x08000000 /* Disable PHY AGC */
45 1.1.1.1.8.2 yamt #define AR_PHY_AGC_BITS "\20\33DISABLE"
46 1.1.1.1.8.2 yamt
47 1.1.1.1.8.2 yamt #define AR_PHY_CHIPID 0x9818 /* PHY chip revision */
48 1.1.1.1.8.2 yamt
49 1.1.1.1.8.2 yamt #define AR_PHY_ACTIVE 0x981c /* PHY activation */
50 1.1.1.1.8.2 yamt #define AR_PHY_ENABLE 0x00000001 /* activate PHY */
51 1.1.1.1.8.2 yamt #define AR_PHY_DISABLE 0x00000002 /* deactivate PHY */
52 1.1.1.1.8.2 yamt #define AR_PHY_ACTIVE_BITS "\20\1ENABLE\2DISABLE"
53 1.1.1.1.8.2 yamt
54 1.1.1.1.8.2 yamt #define AR_PHY_AGCCTL 0x9860 /* PHY calibration and noise floor */
55 1.1.1.1.8.2 yamt #define AR_PHY_AGC_CAL 0x00000001 /* PHY internal calibration */
56 1.1.1.1.8.2 yamt #define AR_PHY_AGC_NF 0x00000002 /* calc PHY noise-floor */
57 1.1.1.1.8.2 yamt #define AR_PHY_AGCCTL_BITS "\20\1CAL\2NF"
58 1.1.1.1.8.2 yamt
59 1.1.1.1.8.2 yamt #endif /* _DEV_ATH_AR5210PHY_H */
60