diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-12-31 14:37:16 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-12-31 14:37:16 +0000 |
commit | 0acb93debe8ce04c45bd35f0dd1ce1d3a5eb2b6e (patch) | |
tree | 9a9a70207cc391b68209b03b5d7707c82334d8d6 /sys | |
parent | 60a1da0f3a5c3a739ba447fee2848aa63796ff6a (diff) |
add initvals for the AR9271.
add initvals for the AR9485.
update initvals for the AR9380 2.2 (from ath9k):
"reduce the likelihood of false pulse detects in the hardware"
"improve carrier leak calibration/correction"
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ar9285reg.h | 396 | ||||
-rw-r--r-- | sys/dev/ic/ar9380reg.h | 595 |
2 files changed, 846 insertions, 145 deletions
diff --git a/sys/dev/ic/ar9285reg.h b/sys/dev/ic/ar9285reg.h index 6e2c674f4fa..a4880937327 100644 --- a/sys/dev/ic/ar9285reg.h +++ b/sys/dev/ic/ar9285reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9285reg.h,v 1.4 2010/07/15 19:07:43 damien Exp $ */ +/* $OpenBSD: ar9285reg.h,v 1.5 2010/12/31 14:37:15 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -586,6 +586,353 @@ static const struct athn_ini ar9285_1_2_ini = { }; /* + * AR9271 programming. + */ +static const uint16_t ar9271_regs[] = { + P(0x01030), P(0x01070), P(0x010b0), P(0x010f0), P(0x08014), + P(0x0801c), P(0x08318), P(0x09804), P(0x09820), P(0x09824), + P(0x09828), P(0x09834), P(0x09838), P(0x09840), P(0x09844), + P(0x09848), P(0x0a848), P(0x09850), P(0x09858), P(0x0985c), + P(0x09860), P(0x09864), P(0x09868), P(0x0986c), P(0x09910), + P(0x09914), P(0x09918), P(0x09924), P(0x09944), P(0x09960), + P(0x09964), P(0x099b8), P(0x099bc), P(0x099c0), P(0x099c4), + P(0x099c8), P(0x099cc), P(0x099d0), P(0x099d4), P(0x099d8), + P(0x09a00), P(0x09a04), P(0x09a08), P(0x09a0c), P(0x09a10), + P(0x09a14), P(0x09a18), P(0x09a1c), P(0x09a20), P(0x09a24), + P(0x09a28), P(0x09a2c), P(0x09a30), P(0x09a34), P(0x09a38), + P(0x09a3c), P(0x09a40), P(0x09a44), P(0x09a48), P(0x09a4c), + P(0x09a50), P(0x09a54), P(0x09a58), P(0x09a5c), P(0x09a60), + P(0x09a64), P(0x09a68), P(0x09a6c), P(0x09a70), P(0x09a74), + P(0x09a78), P(0x09a7c), P(0x09a80), P(0x09a84), P(0x09a88), + P(0x09a8c), P(0x09a90), P(0x09a94), P(0x09a98), P(0x09a9c), + P(0x09aa0), P(0x09aa4), P(0x09aa8), P(0x09aac), P(0x09ab0), + P(0x09ab4), P(0x09ab8), P(0x09abc), P(0x09ac0), P(0x09ac4), + P(0x09ac8), P(0x09acc), P(0x09ad0), P(0x09ad4), P(0x09ad8), + P(0x09adc), P(0x09ae0), P(0x09ae4), P(0x09ae8), P(0x09aec), + P(0x09af0), P(0x09af4), P(0x09af8), P(0x09afc), P(0x09b00), + P(0x09b04), P(0x09b08), P(0x09b0c), P(0x09b10), P(0x09b14), + P(0x09b18), P(0x09b1c), P(0x09b20), P(0x09b24), P(0x09b28), + P(0x09b2c), P(0x09b30), P(0x09b34), P(0x09b38), P(0x09b3c), + P(0x09b40), P(0x09b44), P(0x09b48), P(0x09b4c), P(0x09b50), + P(0x09b54), P(0x09b58), P(0x09b5c), P(0x09b60), P(0x09b64), + P(0x09b68), P(0x09b6c), P(0x09b70), P(0x09b74), P(0x09b78), + P(0x09b7c), P(0x09b80), P(0x09b84), P(0x09b88), P(0x09b8c), + P(0x09b90), P(0x09b94), P(0x09b98), P(0x09b9c), P(0x09ba0), + P(0x09ba4), P(0x09ba8), P(0x09bac), P(0x09bb0), P(0x09bb4), + P(0x09bb8), P(0x09bbc), P(0x09bc0), P(0x09bc4), P(0x09bc8), + P(0x09bcc), P(0x09bd0), P(0x09bd4), P(0x09bd8), P(0x09bdc), + P(0x09be0), P(0x09be4), P(0x09be8), P(0x09bec), P(0x09bf0), + P(0x09bf4), P(0x09bf8), P(0x09bfc), P(0x0aa00), P(0x0aa04), + P(0x0aa08), P(0x0aa0c), P(0x0aa10), P(0x0aa14), P(0x0aa18), + P(0x0aa1c), P(0x0aa20), P(0x0aa24), P(0x0aa28), P(0x0aa2c), + P(0x0aa30), P(0x0aa34), P(0x0aa38), P(0x0aa3c), P(0x0aa40), + P(0x0aa44), P(0x0aa48), P(0x0aa4c), P(0x0aa50), P(0x0aa54), + P(0x0aa58), P(0x0aa5c), P(0x0aa60), P(0x0aa64), P(0x0aa68), + P(0x0aa6c), P(0x0aa70), P(0x0aa74), P(0x0aa78), P(0x0aa7c), + P(0x0aa80), P(0x0aa84), P(0x0aa88), P(0x0aa8c), P(0x0aa90), + P(0x0aa94), P(0x0aa98), P(0x0aa9c), P(0x0aaa0), P(0x0aaa4), + P(0x0aaa8), P(0x0aaac), P(0x0aab0), P(0x0aab4), P(0x0aab8), + P(0x0aabc), P(0x0aac0), P(0x0aac4), P(0x0aac8), P(0x0aacc), + P(0x0aad0), P(0x0aad4), P(0x0aad8), P(0x0aadc), P(0x0aae0), + P(0x0aae4), P(0x0aae8), P(0x0aaec), P(0x0aaf0), P(0x0aaf4), + P(0x0aaf8), P(0x0aafc), P(0x0ab00), P(0x0ab04), P(0x0ab08), + P(0x0ab0c), P(0x0ab10), P(0x0ab14), P(0x0ab18), P(0x0ab1c), + P(0x0ab20), P(0x0ab24), P(0x0ab28), P(0x0ab2c), P(0x0ab30), + P(0x0ab34), P(0x0ab38), P(0x0ab3c), P(0x0ab40), P(0x0ab44), + P(0x0ab48), P(0x0ab4c), P(0x0ab50), P(0x0ab54), P(0x0ab58), + P(0x0ab5c), P(0x0ab60), P(0x0ab64), P(0x0ab68), P(0x0ab6c), + P(0x0ab70), P(0x0ab74), P(0x0ab78), P(0x0ab7c), P(0x0ab80), + P(0x0ab84), P(0x0ab88), P(0x0ab8c), P(0x0ab90), P(0x0ab94), + P(0x0ab98), P(0x0ab9c), P(0x0aba0), P(0x0aba4), P(0x0aba8), + P(0x0abac), P(0x0abb0), P(0x0abb4), P(0x0abb8), P(0x0abbc), + P(0x0abc0), P(0x0abc4), P(0x0abc8), P(0x0abcc), P(0x0abd0), + P(0x0abd4), P(0x0abd8), P(0x0abdc), P(0x0abe0), P(0x0abe4), + P(0x0abe8), P(0x0abec), P(0x0abf0), P(0x0abf4), P(0x0abf8), + P(0x0abfc), P(0x0a204), P(0x0a20c), P(0x0b20c), P(0x0a21c), + P(0x0a230), P(0x0a250), P(0x0a358) +}; + +#ifndef IEEE80211_NO_HT +static const uint32_t ar9271_vals_2g40[] = { + 0x000002c0, 0x00000318, 0x00007c70, 0x00000000, 0x10801600, + 0x12e00057, 0x00006880, 0x000003c4, 0x02020200, 0x01000e0e, + 0x3a020001, 0x00000e0e, 0x00000007, 0x206a012e, 0x03721620, + 0x00001053, 0x00001053, 0x6d4000e2, 0x7ec84d2e, 0x3137605e, + 0x00058d18, 0x0001ce00, 0x5ac640d0, 0x06903881, 0x30002310, + 0x00001130, 0x00000016, 0xd00a800d, 0xffbc1020, 0x00000000, + 0x00000000, 0x0000421c, 0x00000c00, 0x05eea6d4, 0x06336f77, + 0x6af6532f, 0x08f186c8, 0x00046384, 0x00000000, 0x00000000, + 0x00058084, 0x00058088, 0x0005808c, 0x00058100, 0x00058104, + 0x00058108, 0x0005810c, 0x00058110, 0x00058114, 0x00058180, + 0x00058184, 0x00058188, 0x0005818c, 0x00058190, 0x00058194, + 0x000581a0, 0x0005820c, 0x000581a8, 0x00058284, 0x00058288, + 0x00058224, 0x00058290, 0x00058300, 0x00058304, 0x00058308, + 0x0005830c, 0x00058380, 0x00058384, 0x00068700, 0x00068704, + 0x00068708, 0x0006870c, 0x00068780, 0x00068784, 0x00078b00, + 0x00078b04, 0x00078b08, 0x00078b0c, 0x00078b80, 0x00078b84, + 0x00078b88, 0x00078b8c, 0x00078b90, 0x000caf80, 0x000caf84, + 0x000caf88, 0x000caf8c, 0x000caf90, 0x000db30c, 0x000db310, + 0x000db384, 0x000db388, 0x000db324, 0x000eb704, 0x000eb6a4, + 0x000eb6a8, 0x000eb710, 0x000eb714, 0x000eb720, 0x000eb724, + 0x000eb728, 0x000eb72c, 0x000eb7a0, 0x000eb7a4, 0x000eb7a8, + 0x000eb7b0, 0x000eb7b4, 0x000eb7b8, 0x000eb7a5, 0x000eb7a9, + 0x000eb7ad, 0x000eb7b1, 0x000eb7b5, 0x000eb7b9, 0x000eb7c5, + 0x000eb7c9, 0x000eb7d1, 0x000eb7d5, 0x000eb7d9, 0x000eb7c6, + 0x000eb7ca, 0x000eb7ce, 0x000eb7d2, 0x000eb7d6, 0x000eb7c3, + 0x000eb7c7, 0x000eb7cb, 0x000eb7cf, 0x000eb7d7, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x00058084, 0x00058088, + 0x0005808c, 0x00058100, 0x00058104, 0x00058108, 0x0005810c, + 0x00058110, 0x00058114, 0x00058180, 0x00058184, 0x00058188, + 0x0005818c, 0x00058190, 0x00058194, 0x000581a0, 0x0005820c, + 0x000581a8, 0x00058284, 0x00058288, 0x00058224, 0x00058290, + 0x00058300, 0x00058304, 0x00058308, 0x0005830c, 0x00058380, + 0x00058384, 0x00068700, 0x00068704, 0x00068708, 0x0006870c, + 0x00068780, 0x00068784, 0x00078b00, 0x00078b04, 0x00078b08, + 0x00078b0c, 0x00078b80, 0x00078b84, 0x00078b88, 0x00078b8c, + 0x00078b90, 0x000caf80, 0x000caf84, 0x000caf88, 0x000caf8c, + 0x000caf90, 0x000db30c, 0x000db310, 0x000db384, 0x000db388, + 0x000db324, 0x000eb704, 0x000eb6a4, 0x000eb6a8, 0x000eb710, + 0x000eb714, 0x000eb720, 0x000eb724, 0x000eb728, 0x000eb72c, + 0x000eb7a0, 0x000eb7a4, 0x000eb7a8, 0x000eb7b0, 0x000eb7b4, + 0x000eb7b8, 0x000eb7a5, 0x000eb7a9, 0x000eb7ad, 0x000eb7b1, + 0x000eb7b5, 0x000eb7b9, 0x000eb7c5, 0x000eb7c9, 0x000eb7d1, + 0x000eb7d5, 0x000eb7d9, 0x000eb7c6, 0x000eb7ca, 0x000eb7ce, + 0x000eb7d2, 0x000eb7d6, 0x000eb7c3, 0x000eb7c7, 0x000eb7cb, + 0x000eb7cf, 0x000eb7d7, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x00000004, 0x0001f000, 0x0001f000, 0x1883800a, + 0x00000210, 0x0004a000, 0x7999aa0e +}; +#endif + +static const uint32_t ar9271_vals_2g20[] = { + 0x00000160, 0x0000018c, 0x00003e38, 0x00000000, 0x08400b00, + 0x12e0002b, 0x00003440, 0x00000300, 0x02020200, 0x01000e0e, + 0x3a020001, 0x00000e0e, 0x00000007, 0x206a012e, 0x03721620, + 0x00001053, 0x00001053, 0x6d4000e2, 0x7ec84d2e, 0x3137605e, + 0x00058d18, 0x0001ce00, 0x5ac640d0, 0x06903881, 0x30002310, + 0x00000898, 0x0000000b, 0xd00a800d, 0xffbc1020, 0x00000000, + 0x00000000, 0x0000421c, 0x00000c00, 0x05eea6d4, 0x06336f77, + 0x6af6532f, 0x08f186c8, 0x00046384, 0x00000000, 0x00000000, + 0x00058084, 0x00058088, 0x0005808c, 0x00058100, 0x00058104, + 0x00058108, 0x0005810c, 0x00058110, 0x00058114, 0x00058180, + 0x00058184, 0x00058188, 0x0005818c, 0x00058190, 0x00058194, + 0x000581a0, 0x0005820c, 0x000581a8, 0x00058284, 0x00058288, + 0x00058224, 0x00058290, 0x00058300, 0x00058304, 0x00058308, + 0x0005830c, 0x00058380, 0x00058384, 0x00068700, 0x00068704, + 0x00068708, 0x0006870c, 0x00068780, 0x00068784, 0x00078b00, + 0x00078b04, 0x00078b08, 0x00078b0c, 0x00078b80, 0x00078b84, + 0x00078b88, 0x00078b8c, 0x00078b90, 0x000caf80, 0x000caf84, + 0x000caf88, 0x000caf8c, 0x000caf90, 0x000db30c, 0x000db310, + 0x000db384, 0x000db388, 0x000db324, 0x000eb704, 0x000eb6a4, + 0x000eb6a8, 0x000eb710, 0x000eb714, 0x000eb720, 0x000eb724, + 0x000eb728, 0x000eb72c, 0x000eb7a0, 0x000eb7a4, 0x000eb7a8, + 0x000eb7b0, 0x000eb7b4, 0x000eb7b8, 0x000eb7a5, 0x000eb7a9, + 0x000eb7ad, 0x000eb7b1, 0x000eb7b5, 0x000eb7b9, 0x000eb7c5, + 0x000eb7c9, 0x000eb7d1, 0x000eb7d5, 0x000eb7d9, 0x000eb7c6, + 0x000eb7ca, 0x000eb7ce, 0x000eb7d2, 0x000eb7d6, 0x000eb7c3, + 0x000eb7c7, 0x000eb7cb, 0x000eb7cf, 0x000eb7d7, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x00058084, 0x00058088, + 0x0005808c, 0x00058100, 0x00058104, 0x00058108, 0x0005810c, + 0x00058110, 0x00058114, 0x00058180, 0x00058184, 0x00058188, + 0x0005818c, 0x00058190, 0x00058194, 0x000581a0, 0x0005820c, + 0x000581a8, 0x00058284, 0x00058288, 0x00058224, 0x00058290, + 0x00058300, 0x00058304, 0x00058308, 0x0005830c, 0x00058380, + 0x00058384, 0x00068700, 0x00068704, 0x00068708, 0x0006870c, + 0x00068780, 0x00068784, 0x00078b00, 0x00078b04, 0x00078b08, + 0x00078b0c, 0x00078b80, 0x00078b84, 0x00078b88, 0x00078b8c, + 0x00078b90, 0x000caf80, 0x000caf84, 0x000caf88, 0x000caf8c, + 0x000caf90, 0x000db30c, 0x000db310, 0x000db384, 0x000db388, + 0x000db324, 0x000eb704, 0x000eb6a4, 0x000eb6a8, 0x000eb710, + 0x000eb714, 0x000eb720, 0x000eb724, 0x000eb728, 0x000eb72c, + 0x000eb7a0, 0x000eb7a4, 0x000eb7a8, 0x000eb7b0, 0x000eb7b4, + 0x000eb7b8, 0x000eb7a5, 0x000eb7a9, 0x000eb7ad, 0x000eb7b1, + 0x000eb7b5, 0x000eb7b9, 0x000eb7c5, 0x000eb7c9, 0x000eb7d1, + 0x000eb7d5, 0x000eb7d9, 0x000eb7c6, 0x000eb7ca, 0x000eb7ce, + 0x000eb7d2, 0x000eb7d6, 0x000eb7c3, 0x000eb7c7, 0x000eb7cb, + 0x000eb7cf, 0x000eb7d7, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, 0x000eb7db, + 0x000eb7db, 0x00000004, 0x0001f000, 0x0001f000, 0x1883800a, + 0x00000108, 0x0004a000, 0x7999aa0e +}; + +static const uint16_t ar9271_cm_regs[] = { + P(0x0000c), P(0x00030), P(0x00034), P(0x00040), P(0x00044), + P(0x00048), P(0x0004c), P(0x00050), P(0x00054), P(0x00800), + P(0x00804), P(0x00808), P(0x0080c), P(0x00810), P(0x00814), + P(0x00818), P(0x0081c), P(0x00820), P(0x00824), P(0x01040), + P(0x01044), P(0x01048), P(0x0104c), P(0x01050), P(0x01054), + P(0x01058), P(0x0105c), P(0x01060), P(0x01064), P(0x01230), + P(0x01270), P(0x01038), P(0x01078), P(0x010b8), P(0x010f8), + P(0x01138), P(0x01178), P(0x011b8), P(0x011f8), P(0x01238), + P(0x01278), P(0x012b8), P(0x012f8), P(0x01338), P(0x01378), + P(0x013b8), P(0x013f8), P(0x01438), P(0x01478), P(0x014b8), + P(0x014f8), P(0x01538), P(0x01578), P(0x015b8), P(0x015f8), + P(0x01638), P(0x01678), P(0x016b8), P(0x016f8), P(0x01738), + P(0x01778), P(0x017b8), P(0x017f8), P(0x0103c), P(0x0107c), + P(0x010bc), P(0x010fc), P(0x0113c), P(0x0117c), P(0x011bc), + P(0x011fc), P(0x0123c), P(0x0127c), P(0x012bc), P(0x012fc), + P(0x0133c), P(0x0137c), P(0x013bc), P(0x013fc), P(0x0143c), + P(0x0147c), P(0x04030), P(0x0403c), P(0x04024), P(0x04060), + P(0x04064), P(0x08004), P(0x08008), P(0x0800c), P(0x08018), + P(0x08020), P(0x08038), P(0x0803c), P(0x08048), P(0x08054), + P(0x08058), P(0x0805c), P(0x08060), P(0x08064), P(0x08070), + P(0x080b0), P(0x080b4), P(0x080b8), P(0x080bc), P(0x080c0), + P(0x080c4), P(0x080c8), P(0x080cc), P(0x080d0), P(0x080d4), + P(0x080d8), P(0x080e0), P(0x080e4), P(0x080e8), P(0x080ec), + P(0x080f0), P(0x080f4), P(0x080f8), P(0x080fc), P(0x08100), + P(0x08104), P(0x08108), P(0x0810c), P(0x08110), P(0x08118), + P(0x0811c), P(0x08120), P(0x08124), P(0x08128), P(0x0812c), + P(0x08130), P(0x08134), P(0x08138), P(0x0813c), P(0x08144), + P(0x08168), P(0x0816c), P(0x08170), P(0x08174), P(0x08178), + P(0x0817c), P(0x081c0), P(0x081d0), P(0x081ec), P(0x081f0), + P(0x081f4), P(0x081f8), P(0x081fc), P(0x08200), P(0x08204), + P(0x08208), P(0x0820c), P(0x08210), P(0x08214), P(0x08218), + P(0x0821c), P(0x08220), P(0x08224), P(0x08228), P(0x0822c), + P(0x08230), P(0x08234), P(0x08238), P(0x0823c), P(0x08240), + P(0x08244), P(0x08248), P(0x0824c), P(0x08250), P(0x08254), + P(0x08258), P(0x0825c), P(0x08260), P(0x08264), P(0x08270), + P(0x08274), P(0x08278), P(0x0827c), P(0x08284), P(0x08288), + P(0x0828c), P(0x08294), P(0x08298), P(0x0829c), P(0x08300), + P(0x08314), P(0x08328), P(0x0832c), P(0x08330), P(0x08334), + P(0x08338), P(0x0833c), P(0x08340), P(0x08344), P(0x07010), + P(0x07034), P(0x07038), P(0x07800), P(0x07804), P(0x07808), + P(0x0780c), P(0x07810), P(0x07814), P(0x0781c), P(0x07828), + P(0x0782c), P(0x07830), P(0x07834), P(0x0783c), P(0x07840), + P(0x07844), P(0x07848), P(0x0784c), P(0x07850), P(0x07854), + P(0x07858), P(0x0785c), P(0x07860), P(0x07864), P(0x07868), + P(0x07870), P(0x09808), P(0x0980c), P(0x09810), P(0x09814), + P(0x0981c), P(0x0982c), P(0x09830), P(0x0983c), P(0x0984c), + P(0x09854), P(0x09900), P(0x09904), P(0x09908), P(0x0990c), + P(0x0991c), P(0x09920), P(0x09928), P(0x0992c), P(0x09934), + P(0x09938), P(0x0993c), P(0x09940), P(0x09948), P(0x0994c), + P(0x09954), P(0x09958), P(0x09968), P(0x09970), P(0x09974), + P(0x09978), P(0x0997c), P(0x09980), P(0x09984), P(0x09988), + P(0x0998c), P(0x09990), P(0x09994), P(0x09998), P(0x0999c), + P(0x099a0), P(0x099a4), P(0x099a8), P(0x099ac), P(0x099b0), + P(0x099b4), P(0x099dc), P(0x099e0), P(0x099e4), P(0x099e8), + P(0x099ec), P(0x099f0), P(0x0a208), P(0x0a210), P(0x0a214), + P(0x0a218), P(0x0a220), P(0x0a224), P(0x0a228), P(0x0a22c), + P(0x0a234), P(0x0a238), P(0x0a244), P(0x0a248), P(0x0a24c), + P(0x0a254), P(0x0a258), P(0x0a25c), P(0x0a260), P(0x0a268), + P(0x0a26c), P(0x0a388), P(0x0a38c), P(0x0a390), P(0x0a39c), + P(0x0a3a0), P(0x0a3a4), P(0x0a3a8), P(0x0a3ac), P(0x0a3b0), + P(0x0a3b4), P(0x0a3b8), P(0x0a3bc), P(0x0a3c0), P(0x0a3c4), + P(0x0a3cc), P(0x0a3d0), P(0x0a3d4), P(0x0a3e4), P(0x0a3e8), + P(0x0a3ec), P(0x0a3f0), P(0x0a3f4), P(0x0d270), P(0x0d35c), + P(0x0d360), P(0x0d364), P(0x0d368), P(0x0d36c), P(0x0d370), + P(0x0d374), P(0x0d378), P(0x0d37c), P(0x0d380), P(0x0d384) +}; + +static const uint32_t ar9271_cm_vals[] = { + 0x00000000, 0x00020045, 0x00000005, 0x00000000, 0x00000008, + 0x00000008, 0x00000010, 0x00000000, 0x0000001f, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002ffc0f, + 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, + 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000002, 0x0000001f, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000700, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x000fc78f, 0x0000000f, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2a80001a, + 0x05dc01e0, 0x1f402710, 0x01f40000, 0x00001e00, 0x00000000, + 0x00400000, 0xffffffff, 0x0000ffff, 0x003f3f3f, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00020000, 0x00020000, + 0x00000001, 0x00000052, 0x00000000, 0x00000168, 0x000100aa, + 0x00003210, 0x08f04810, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, + 0x00000000, 0x00000000, 0x32143320, 0xfaa4fa50, 0x00000100, + 0x00000000, 0x00000000, 0x0000320a, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00100000, + 0x0010f400, 0x00000100, 0x0001e800, 0x00000000, 0x00000000, + 0x00000000, 0x400000ff, 0x00080922, 0x88a00010, 0x00000000, + 0x40000000, 0x003e4180, 0x00000000, 0x0000002c, 0x0000002c, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, + 0x00000000, 0x00000000, 0x00000001, 0x00000302, 0x00000e00, + 0x00ff0000, 0x00000000, 0x00010380, 0x00581043, 0x00000030, + 0x00000002, 0x000004c2, 0x00140000, 0x0e4548d8, 0x54214514, + 0x02025820, 0x71c0d388, 0x924934a8, 0x00000000, 0x66964300, + 0x8db6d961, 0x8db6d96c, 0x6140008b, 0x72ee0a72, 0xbbfffffc, + 0x000c0db6, 0x6db6246f, 0x6d9b66db, 0x6d8c6dba, 0x00040000, + 0xdb003012, 0x04924914, 0x21084210, 0xf7d7ffde, 0xc2034080, + 0x10142c00, 0x00000000, 0xafe68e30, 0xfd14e000, 0x9c0a9f6b, + 0x00000000, 0x0000a000, 0x00000000, 0x00200400, 0x0040233c, + 0x00000044, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x10000fff, 0x04900000, 0x00000001, 0x00000004, 0x1e1f2022, + 0x0a0b0c0d, 0x00000000, 0x14750604, 0x9280c00a, 0x00020028, + 0x5f3ca3de, 0x0108ecff, 0x000003ce, 0x192bb514, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x201fff00, 0x2def0400, 0x03051000, + 0x00000820, 0x00000000, 0x00000000, 0xaaaaaaaa, 0x3c466478, + 0x0cc80caa, 0x00000000, 0x803e68c8, 0x4080a333, 0x00206c10, + 0x009c4060, 0x01834061, 0x00000400, 0x000003b5, 0x00000000, + 0x20202020, 0x20202020, 0x00000000, 0xfffffffc, 0x00000000, + 0x00000000, 0x0ccb5380, 0x15151501, 0xdfa90f01, 0x00000000, + 0x0ebae9e6, 0x0c000000, 0x20202020, 0x20202020, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x20202020, 0x20202020, 0x20202020, 0x00000000, 0x18c43433, + 0x00f70081, 0x01036a2f, 0x00000000, 0x0d820820, 0x07ffffef, + 0x0fffffe7, 0x17ffffe5, 0x1fffffe4, 0x37ffffe3, 0x3fffffe3, + 0x57ffffe3, 0x5fffffe2, 0x7fffffe2, 0x7f3c7bba, 0xf3307ff0 +}; + +static const struct athn_ini ar9271_ini = { + nitems(ar9271_regs), + ar9271_regs, + NULL, /* 2GHz only. */ +#ifndef IEEE80211_NO_HT + NULL, /* 2GHz only. */ + ar9271_vals_2g40, +#endif + ar9271_vals_2g20, + nitems(ar9271_cm_regs), + ar9271_cm_regs, + ar9271_cm_vals +}; + +/* * AR9285 1.2 Tx gains. */ static const uint16_t ar9285_1_2_tx_gain_regs[] = { @@ -673,3 +1020,50 @@ static const struct athn_gain ar9285_2_0_tx_gain_high_power = { NULL, /* 2GHz only. */ ar9285_2_0_tx_gain_high_power_vals_2g }; + +/* + * AR9271 Tx gains. + */ +static const uint16_t ar9271_tx_gain_regs[] = { + P(0x0a300), P(0x0a304), P(0x0a308), P(0x0a30c), P(0x0a310), + P(0x0a314), P(0x0a318), P(0x0a31c), P(0x0a320), P(0x0a324), + P(0x0a328), P(0x0a32c), P(0x0a330), P(0x0a334), P(0x0a338), + P(0x0a33c), P(0x0a340), P(0x0a344), P(0x0a348), P(0x0a34c), + P(0x0a350), P(0x0a354), P(0x07838), P(0x07824), P(0x0786c), + P(0x07820), P(0x0a274), P(0x0a278), P(0x0a27c), P(0x0a394), + P(0x0a398), P(0x0a3dc), P(0x0a3e0) +}; + +static const uint32_t ar9271_tx_gain_vals_2g[] = { + 0x00000000, 0x00009200, 0x00010208, 0x00019608, 0x0001e610, + 0x0002d6d0, 0x00039758, 0x0003b759, 0x0003d75a, 0x0004175c, + 0x0004575e, 0x0004979f, 0x0004d7df, 0x000368de, 0x0003891e, + 0x0003a95e, 0x0003e9df, 0x0003e9df, 0x0003e9df, 0x0003e9df, + 0x0003e9df, 0x0003e9df, 0x00000029, 0x00d8abff, 0x48609eb4, + 0x00000c04, 0x0a218652, 0x3bdef7bd, 0x050e83bd, 0x3bdef7bd, + 0x000003bd, 0x3bdef7bd, 0x000003bd +}; + +static const struct athn_gain ar9271_tx_gain = { + nitems(ar9271_tx_gain_regs), + ar9271_tx_gain_regs, + NULL, /* 2GHz only. */ + ar9271_tx_gain_vals_2g +}; + +static const uint32_t ar9271_tx_gain_high_power_vals_2g[] = { + 0x00010000, 0x00016200, 0x00018201, 0x0001b240, 0x0001d241, + 0x0001f600, 0x00022800, 0x00026802, 0x0002b805, 0x0002ea41, + 0x00038b00, 0x0003ab40, 0x0003cd80, 0x000368de, 0x0003891e, + 0x0003a95e, 0x0003e9df, 0x0003e9df, 0x0003e9df, 0x0003e9df, + 0x0003e9df, 0x0003e9df, 0x0000002b, 0x00d8a7ff, 0x08609eba, + 0x00000c00, 0x0a214652, 0x0e739ce7, 0x05018063, 0x06318c63, + 0x00000063, 0x06318c63, 0x00000063 +}; + +static const struct athn_gain ar9271_tx_gain_high_power = { + nitems(ar9271_tx_gain_regs), + ar9271_tx_gain_regs, + NULL, /* 2GHz only. */ + ar9271_tx_gain_high_power_vals_2g +}; diff --git a/sys/dev/ic/ar9380reg.h b/sys/dev/ic/ar9380reg.h index 747e07e8e57..0a4fb097456 100644 --- a/sys/dev/ic/ar9380reg.h +++ b/sys/dev/ic/ar9380reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9380reg.h,v 1.11 2010/11/10 21:06:44 damien Exp $ */ +/* $OpenBSD: ar9380reg.h,v 1.12 2010/12/31 14:37:15 damien Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -794,12 +794,12 @@ static const uint16_t ar9380_2_2_regs[] = { P(0x09e00), P(0x09e04), P(0x09e0c), P(0x09e10), P(0x09e14), P(0x09e18), P(0x09e1c), P(0x09e20), P(0x09e2c), P(0x09e3c), P(0x09e44), P(0x09e48), P(0x09fc8), P(0x0a204), P(0x0a208), - P(0x0a230), P(0x0a234), P(0x0a238), P(0x0a250), P(0x0a254), - P(0x0a258), P(0x0a25c), P(0x0a260), P(0x0a264), P(0x0a280), - P(0x0a284), P(0x0a288), P(0x0a28c), P(0x0a2c4), P(0x0a2d0), - P(0x0a2d8), P(0x0a358), P(0x0a830), P(0x0ae04), P(0x0ae18), - P(0x0ae1c), P(0x0ae20), P(0x0b284), P(0x0b830), P(0x0be04), - P(0x0be18), P(0x0be1c), P(0x0be20), P(0x0c284) + P(0x0a22c), P(0x0a230), P(0x0a234), P(0x0a238), P(0x0a250), + P(0x0a254), P(0x0a258), P(0x0a25c), P(0x0a260), P(0x0a264), + P(0x0a280), P(0x0a284), P(0x0a288), P(0x0a28c), P(0x0a2c4), + P(0x0a2d0), P(0x0a2d8), P(0x0a358), P(0x0a830), P(0x0ae04), + P(0x0ae18), P(0x0ae1c), P(0x0ae20), P(0x0b284), P(0x0b830), + P(0x0be04), P(0x0be18), P(0x0be1c), P(0x0be20), P(0x0c284) }; static const uint32_t ar9380_2_2_vals_5g20[] = { @@ -811,12 +811,12 @@ static const uint32_t ar9380_2_2_vals_5g20[] = { 0x0372111a, 0x001c2020, 0x6c4000e2, 0x7ec88d2e, 0x37b95d5e, 0x00000000, 0x0001cf9c, 0x000003b5, 0x0000001c, 0xcf946220, 0x02321e27, 0x5030201a, 0x0003f000, 0x000037c0, 0x00000104, - 0x0000000a, 0x00000fff, 0xffb81018, 0x00000000, 0x000007d0, - 0x02020002, 0x01000e0e, 0x0a021501, 0x00000e0e, 0x00000007, - 0x00000000, 0x00000110, 0x00022222, 0x00158d18, 0x00071981, - 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, 0x00000000, - 0x0000019c, 0x000001b5, 0x00000000, 0x0000019c, 0x001c0000, - 0x00000000, 0x0000019c, 0x000001b5, 0x00000000 + 0x01026a2f, 0x0000000a, 0x00000fff, 0xffb81018, 0x00000000, + 0x000007d0, 0x02020002, 0x01000e0e, 0x0a021501, 0x00000e0e, + 0x00000007, 0x00000000, 0x00000110, 0x00022222, 0x00158d18, + 0x00071981, 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, + 0x00000000, 0x0000019c, 0x000001b5, 0x00000000, 0x0000019c, + 0x001c0000, 0x00000000, 0x0000019c, 0x000001b5, 0x00000000 }; #ifndef IEEE80211_NO_HT @@ -829,12 +829,12 @@ static const uint32_t ar9380_2_2_vals_5g40[] = { 0x0372111a, 0x001c2020, 0x6d4000e2, 0x7ec88d2e, 0x37b9605e, 0x00000000, 0x0001cf9c, 0x000003b5, 0x0000001c, 0xcf946220, 0x02321e27, 0x5030201a, 0x0003f000, 0x000037c4, 0x00000104, - 0x00000014, 0x10000fff, 0xffb81018, 0x00000000, 0x00000fa0, - 0x02020002, 0x01000e0e, 0x0a021501, 0x00000e0e, 0x00000007, - 0x00000000, 0x00000110, 0x00022222, 0x00158d18, 0x00071981, - 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, 0x00000000, - 0x0000019c, 0x000001b5, 0x00000000, 0x0000019c, 0x001c0000, - 0x00000000, 0x0000019c, 0x000001b5, 0x00000000 + 0x01026a2f, 0x00000014, 0x10000fff, 0xffb81018, 0x00000000, + 0x00000fa0, 0x02020002, 0x01000e0e, 0x0a021501, 0x00000e0e, + 0x00000007, 0x00000000, 0x00000110, 0x00022222, 0x00158d18, + 0x00071981, 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, + 0x00000000, 0x0000019c, 0x000001b5, 0x00000000, 0x0000019c, + 0x001c0000, 0x00000000, 0x0000019c, 0x000001b5, 0x00000000 }; static const uint32_t ar9380_2_2_vals_2g40[] = { @@ -846,12 +846,12 @@ static const uint32_t ar9380_2_2_vals_2g40[] = { 0x037216a0, 0x001c2020, 0x6d4000e2, 0x7ec84d2e, 0x3379605e, 0x00000000, 0x00021f9c, 0x000003ce, 0x00000021, 0xcf946222, 0x02291e27, 0x50302012, 0x0001a000, 0x000037c4, 0x00000004, - 0x00000016, 0x10000fff, 0xffb81018, 0x00000210, 0x00001130, - 0x02020002, 0x01000e0e, 0x3a021501, 0x00000e0e, 0x0000000b, - 0x00000150, 0x00000110, 0x00022222, 0x00158d18, 0x00071981, - 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, 0x00000000, - 0x0000019c, 0x000001ce, 0x00000150, 0x0000019c, 0x001c0000, - 0x00000000, 0x0000019c, 0x000001ce, 0x00000150 + 0x01026a2f, 0x00000016, 0x10000fff, 0xffb81018, 0x00000210, + 0x00001130, 0x02020002, 0x01000e0e, 0x3a021501, 0x00000e0e, + 0x0000000b, 0x00000150, 0x00000110, 0x00022222, 0x00158d18, + 0x00071981, 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, + 0x00000000, 0x0000019c, 0x000001ce, 0x00000150, 0x0000019c, + 0x001c0000, 0x00000000, 0x0000019c, 0x000001ce, 0x00000150 }; #endif @@ -864,12 +864,12 @@ static const uint32_t ar9380_2_2_vals_2g20[] = { 0x037216a0, 0x001c2020, 0x6c4000e2, 0x7ec84d2e, 0x33795d5e, 0x00000000, 0x00021f9c, 0x000003ce, 0x00000021, 0xcf946222, 0x02291e27, 0x50302012, 0x0001a000, 0x000037c0, 0x00000004, - 0x0000000b, 0x00000fff, 0xffb81018, 0x00000108, 0x00000898, - 0x02020002, 0x01000e0e, 0x3a021501, 0x00000e0e, 0x0000000b, - 0x00000150, 0x00000110, 0x00022222, 0x00158d18, 0x00071982, - 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, 0x00000000, - 0x0000019c, 0x000001ce, 0x00000150, 0x0000019c, 0x001c0000, - 0x00000000, 0x0000019c, 0x000001ce, 0x00000150 + 0x01026a2f, 0x0000000b, 0x00000fff, 0xffb81018, 0x00000108, + 0x00000898, 0x02020002, 0x01000e0e, 0x3a021501, 0x00000e0e, + 0x0000000b, 0x00000150, 0x00000110, 0x00022222, 0x00158d18, + 0x00071982, 0x7999a83a, 0x00000000, 0x0000019c, 0x001c0000, + 0x00000000, 0x0000019c, 0x000001ce, 0x00000150, 0x0000019c, + 0x001c0000, 0x00000000, 0x0000019c, 0x000001ce, 0x00000150 }; static const uint16_t ar9380_2_2_cm_regs[] = { @@ -915,57 +915,56 @@ static const uint16_t ar9380_2_2_cm_regs[] = { P(0x09e24), P(0x09e28), P(0x09e30), P(0x09e34), P(0x09e38), P(0x09e40), P(0x09e4c), P(0x09e50), P(0x09e54), P(0x09fc0), P(0x09fc4), P(0x09fcc), P(0x09fd0), P(0x0a20c), P(0x0a220), - P(0x0a224), P(0x0a228), P(0x0a22c), P(0x0a23c), P(0x0a244), - P(0x0a2a0), P(0x0a2c0), P(0x0a2c8), P(0x0a2cc), P(0x0a2d4), - P(0x0a2ec), P(0x0a2f0), P(0x0a2f4), P(0x0a2f8), P(0x0a344), - P(0x0a34c), P(0x0a350), P(0x0a364), P(0x0a370), P(0x0a390), - P(0x0a394), P(0x0a398), P(0x0a39c), P(0x0a3a0), P(0x0a3a4), - P(0x0a3a8), P(0x0a3ac), P(0x0a3c0), P(0x0a3c4), P(0x0a3c8), - P(0x0a3cc), P(0x0a3d0), P(0x0a3d4), P(0x0a3d8), P(0x0a3dc), - P(0x0a3e0), P(0x0a3e4), P(0x0a3e8), P(0x0a3ec), P(0x0a3f0), - P(0x0a3f4), P(0x0a3f8), P(0x0a3fc), P(0x0a400), P(0x0a404), - P(0x0a408), P(0x0a40c), P(0x0a414), P(0x0a418), P(0x0a41c), - P(0x0a420), P(0x0a424), P(0x0a428), P(0x0a42c), P(0x0a430), - P(0x0a434), P(0x0a438), P(0x0a43c), P(0x0a440), P(0x0a444), - P(0x0a448), P(0x0a44c), P(0x0a450), P(0x0a458), P(0x0a640), - P(0x0a644), P(0x0a648), P(0x0a64c), P(0x0a670), P(0x0a674), - P(0x0a678), P(0x0a67c), P(0x0a680), P(0x0a684), P(0x0a688), - P(0x0a690), P(0x0a7c0), P(0x0a7c4), P(0x0a7c8), P(0x0a7cc), - P(0x0a7d0), P(0x0a7d4), P(0x0a7dc), P(0x0a8d0), P(0x0a8d4), - P(0x0a8dc), P(0x0a8f0), P(0x0a8f4), P(0x0b2d0), P(0x0b2d4), - P(0x0b2ec), P(0x0b2f0), P(0x0b2f4), P(0x0b2f8), P(0x0b408), - P(0x0b40c), P(0x0b420), P(0x0b8d0), P(0x0b8d4), P(0x0b8dc), - P(0x0b8f0), P(0x0b8f4), P(0x0c2d0), P(0x0c2d4), P(0x0c2ec), - P(0x0c2f0), P(0x0c2f4), P(0x0c2f8), P(0x0c408), P(0x0c40c), - P(0x0c420), P(0x16000), P(0x16004), P(0x16008), P(0x1600c), - P(0x16040), P(0x1604c), P(0x16050), P(0x16054), P(0x16058), - P(0x1605c), P(0x16060), P(0x16064), P(0x1606c), P(0x16080), - P(0x16084), P(0x16088), P(0x1608c), P(0x16090), P(0x16098), - P(0x160a0), P(0x160a4), P(0x160a8), P(0x160b4), P(0x160c0), - P(0x160c4), P(0x160c8), P(0x160cc), P(0x16100), P(0x16104), - P(0x16108), P(0x16144), P(0x16148), P(0x16280), P(0x16284), - P(0x16288), P(0x1628c), P(0x16290), P(0x16294), P(0x16380), - P(0x16384), P(0x16388), P(0x1638c), P(0x16390), P(0x16394), - P(0x16398), P(0x1639c), P(0x163a0), P(0x163a4), P(0x163a8), - P(0x163ac), P(0x163b0), P(0x163b4), P(0x163b8), P(0x163bc), - P(0x163c0), P(0x163c4), P(0x163c8), P(0x163cc), P(0x163d0), - P(0x163d4), P(0x16400), P(0x16404), P(0x16408), P(0x1640c), - P(0x16440), P(0x1644c), P(0x16450), P(0x16454), P(0x16458), - P(0x1645c), P(0x16460), P(0x16464), P(0x1646c), P(0x16500), - P(0x16504), P(0x16508), P(0x16544), P(0x16548), P(0x16780), - P(0x16784), P(0x16788), P(0x1678c), P(0x16790), P(0x16794), - P(0x16798), P(0x1679c), P(0x167a0), P(0x167a4), P(0x167a8), - P(0x167ac), P(0x167b0), P(0x167b4), P(0x167b8), P(0x167bc), - P(0x167c0), P(0x167c4), P(0x167c8), P(0x167cc), P(0x167d0), - P(0x167d4), P(0x16800), P(0x16804), P(0x16808), P(0x1680c), - P(0x16840), P(0x1684c), P(0x16850), P(0x16854), P(0x16858), - P(0x1685c), P(0x16860), P(0x16864), P(0x1686c), P(0x16900), - P(0x16904), P(0x16908), P(0x16944), P(0x16948), P(0x16b80), - P(0x16b84), P(0x16b88), P(0x16b8c), P(0x16b90), P(0x16b94), - P(0x16b98), P(0x16b9c), P(0x16ba0), P(0x16ba4), P(0x16ba8), - P(0x16bac), P(0x16bb0), P(0x16bb4), P(0x16bb8), P(0x16bbc), - P(0x16bc0), P(0x16bc4), P(0x16bc8), P(0x16bcc), P(0x16bd0), - P(0x16bd4) + P(0x0a224), P(0x0a228), P(0x0a23c), P(0x0a244), P(0x0a2a0), + P(0x0a2c0), P(0x0a2c8), P(0x0a2cc), P(0x0a2d4), P(0x0a2ec), + P(0x0a2f0), P(0x0a2f4), P(0x0a2f8), P(0x0a344), P(0x0a34c), + P(0x0a350), P(0x0a364), P(0x0a370), P(0x0a390), P(0x0a394), + P(0x0a398), P(0x0a39c), P(0x0a3a0), P(0x0a3a4), P(0x0a3a8), + P(0x0a3ac), P(0x0a3c0), P(0x0a3c4), P(0x0a3c8), P(0x0a3cc), + P(0x0a3d0), P(0x0a3d4), P(0x0a3d8), P(0x0a3dc), P(0x0a3e0), + P(0x0a3e4), P(0x0a3e8), P(0x0a3ec), P(0x0a3f0), P(0x0a3f4), + P(0x0a3f8), P(0x0a3fc), P(0x0a400), P(0x0a404), P(0x0a408), + P(0x0a40c), P(0x0a414), P(0x0a418), P(0x0a41c), P(0x0a420), + P(0x0a424), P(0x0a428), P(0x0a42c), P(0x0a430), P(0x0a434), + P(0x0a438), P(0x0a43c), P(0x0a440), P(0x0a444), P(0x0a448), + P(0x0a44c), P(0x0a450), P(0x0a458), P(0x0a640), P(0x0a644), + P(0x0a648), P(0x0a64c), P(0x0a670), P(0x0a674), P(0x0a678), + P(0x0a67c), P(0x0a680), P(0x0a684), P(0x0a688), P(0x0a690), + P(0x0a7c0), P(0x0a7c4), P(0x0a7c8), P(0x0a7cc), P(0x0a7d0), + P(0x0a7d4), P(0x0a7dc), P(0x0a8d0), P(0x0a8d4), P(0x0a8dc), + P(0x0a8f0), P(0x0a8f4), P(0x0b2d0), P(0x0b2d4), P(0x0b2ec), + P(0x0b2f0), P(0x0b2f4), P(0x0b2f8), P(0x0b408), P(0x0b40c), + P(0x0b420), P(0x0b8d0), P(0x0b8d4), P(0x0b8dc), P(0x0b8f0), + P(0x0b8f4), P(0x0c2d0), P(0x0c2d4), P(0x0c2ec), P(0x0c2f0), + P(0x0c2f4), P(0x0c2f8), P(0x0c408), P(0x0c40c), P(0x0c420), + P(0x16000), P(0x16004), P(0x16008), P(0x1600c), P(0x16040), + P(0x1604c), P(0x16050), P(0x16054), P(0x16058), P(0x1605c), + P(0x16060), P(0x16064), P(0x1606c), P(0x16080), P(0x16084), + P(0x16088), P(0x1608c), P(0x16090), P(0x16098), P(0x160a0), + P(0x160a4), P(0x160a8), P(0x160b4), P(0x160c0), P(0x160c4), + P(0x160c8), P(0x160cc), P(0x16100), P(0x16104), P(0x16108), + P(0x16144), P(0x16148), P(0x16280), P(0x16284), P(0x16288), + P(0x1628c), P(0x16290), P(0x16294), P(0x16380), P(0x16384), + P(0x16388), P(0x1638c), P(0x16390), P(0x16394), P(0x16398), + P(0x1639c), P(0x163a0), P(0x163a4), P(0x163a8), P(0x163ac), + P(0x163b0), P(0x163b4), P(0x163b8), P(0x163bc), P(0x163c0), + P(0x163c4), P(0x163c8), P(0x163cc), P(0x163d0), P(0x163d4), + P(0x16400), P(0x16404), P(0x16408), P(0x1640c), P(0x16440), + P(0x1644c), P(0x16450), P(0x16454), P(0x16458), P(0x1645c), + P(0x16460), P(0x16464), P(0x1646c), P(0x16500), P(0x16504), + P(0x16508), P(0x16544), P(0x16548), P(0x16780), P(0x16784), + P(0x16788), P(0x1678c), P(0x16790), P(0x16794), P(0x16798), + P(0x1679c), P(0x167a0), P(0x167a4), P(0x167a8), P(0x167ac), + P(0x167b0), P(0x167b4), P(0x167b8), P(0x167bc), P(0x167c0), + P(0x167c4), P(0x167c8), P(0x167cc), P(0x167d0), P(0x167d4), + P(0x16800), P(0x16804), P(0x16808), P(0x1680c), P(0x16840), + P(0x1684c), P(0x16850), P(0x16854), P(0x16858), P(0x1685c), + P(0x16860), P(0x16864), P(0x1686c), P(0x16900), P(0x16904), + P(0x16908), P(0x16944), P(0x16948), P(0x16b80), P(0x16b84), + P(0x16b88), P(0x16b8c), P(0x16b90), P(0x16b94), P(0x16b98), + P(0x16b9c), P(0x16ba0), P(0x16ba4), P(0x16ba8), P(0x16bac), + P(0x16bb0), P(0x16bb4), P(0x16bb8), P(0x16bbc), P(0x16bc0), + P(0x16bc4), P(0x16bc8), P(0x16bcc), P(0x16bd0), P(0x16bd4) }; static const uint32_t ar9380_2_2_cm_vals[] = { @@ -1003,7 +1002,7 @@ static const uint32_t ar9380_2_2_cm_vals[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000200, 0x000301ff, 0xafe68e30, 0xfd14e000, 0x9c0a9f6b, 0x04900000, 0x9280c00a, 0x00000000, 0x00020028, 0x6400a290, 0x0108ecff, - 0x14750600, 0x201fff00, 0x00001042, 0x00200400, 0x32840bbe, + 0x0d000600, 0x201fff00, 0x00001042, 0x00200400, 0x32840bbe, 0x004b6a8e, 0x00000820, 0x00000000, 0x00000000, 0x00000000, 0xff55ff55, 0x0320ff55, 0x00000000, 0x00000000, 0x00046384, 0x05b6b440, 0x00b6b440, 0xc080a333, 0x40206c10, 0x009c4060, @@ -1011,57 +1010,56 @@ static const uint32_t ar9380_2_2_cm_vals[] = { 0x990bb515, 0x0c6f0000, 0x06336f77, 0x6af6532f, 0x0cc80c00, 0x0d261820, 0x00001004, 0x00ff03f1, 0x00000000, 0x803e4788, 0x0001efb5, 0x40000014, 0x01193b93, 0x00000000, 0x00000000, - 0x00000000, 0x10002310, 0x01036a27, 0x00000000, 0x0c000000, - 0x00000001, 0x00000001, 0x00000000, 0x18c43433, 0x00000000, + 0x00000000, 0x10002310, 0x00000000, 0x0c000000, 0x00000001, + 0x00000001, 0x00000000, 0x18c43433, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x0000a000, 0x00000000, 0x00000000, 0x00000001, - 0x00000444, 0x001f0e0f, 0x0075393f, 0xb79f6427, 0x00000000, - 0xaaaaaaaa, 0x3c466478, 0x20202020, 0x22222220, 0x20200020, + 0x0000a000, 0x00000000, 0x00000000, 0x00000001, 0x00000444, + 0x001f0e0f, 0x0075393f, 0xb79f6427, 0x00000000, 0xaaaaaaaa, + 0x3c466478, 0x20202020, 0x22222220, 0x20200020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x00000000, - 0x00000246, 0x0cdbd380, 0x000f0f01, 0x8fa91f01, 0x00000000, - 0x0e79e5c6, 0x00820820, 0x1ce739ce, 0x2d001dce, 0x1ce739ce, - 0x000001ce, 0x1ce739ce, 0x000001ce, 0x1ce739ce, 0x1ce739ce, - 0x00000000, 0x00001801, 0x00100000, 0x00000000, 0x00000000, - 0x06000080, 0x00000001, 0x00010000, 0x00000000, 0x00000000, - 0x3fad9d74, 0x0048060a, 0x00003c37, 0x03020100, 0x09080504, - 0x0d0c0b0a, 0x13121110, 0x31301514, 0x35343332, 0x00000036, - 0x00000838, 0x00000000, 0xfffffffc, 0x00000000, 0x00000000, - 0x00000000, 0x00000004, 0x00000001, 0x004b6a8e, 0x00000820, - 0x00000000, 0x00000000, 0x00000000, 0x00000080, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0e79e5c0, - 0x00820820, 0x00000000, 0x004b6a8e, 0x00000820, 0x00000000, + 0x20202020, 0x20202020, 0x20202020, 0x00000000, 0x00000246, + 0x0cdbd380, 0x000f0f01, 0x8fa91f01, 0x00000000, 0x0e79e5c6, + 0x00820820, 0x1ce739ce, 0x2d001dce, 0x1ce739ce, 0x000001ce, + 0x1ce739ce, 0x000001ce, 0x1ce739ce, 0x1ce739ce, 0x00000000, + 0x00001801, 0x00100000, 0x00000000, 0x00000000, 0x06000080, + 0x00000001, 0x00010000, 0x00000000, 0x00000000, 0x3fad9d74, + 0x0048060a, 0x00003c37, 0x03020100, 0x09080504, 0x0d0c0b0a, + 0x13121110, 0x31301514, 0x35343332, 0x00000036, 0x00000838, + 0x00000000, 0xfffffffc, 0x00000000, 0x00000000, 0x00000000, + 0x00000004, 0x00000001, 0x004b6a8e, 0x00000820, 0x00000000, 0x00000000, 0x00000000, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0e79e5c0, 0x00820820, - 0x00000000, 0x36db6db6, 0x6db6db40, 0x73f00000, 0x00000000, - 0x7f80fff8, 0x76d005b5, 0x556cf031, 0x13449440, 0x0c51c92c, - 0x3db7fffc, 0xfffffffc, 0x000f0278, 0x6db60000, 0x00000000, - 0x0e48048c, 0x54214514, 0x119f481e, 0x24926490, 0xd2888888, - 0x0a108ffe, 0x812fc370, 0x423c8000, 0x92480080, 0x00adb6d0, - 0x6db6db60, 0x6db6db6c, 0x01e6c000, 0x3fffbe01, 0xfff80000, - 0x00080010, 0x02084080, 0x00000000, 0x058a0001, 0x3d840208, - 0x05a20408, 0x00038c07, 0x00000004, 0x458aa14f, 0x00000000, - 0x00000000, 0x00800700, 0x00800700, 0x00800700, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x000000a0, 0x000c0000, 0x14021402, 0x00001402, 0x00000000, - 0x00000000, 0x36db6db6, 0x6db6db40, 0x73f00000, 0x00000000, - 0x7f80fff8, 0x76d005b5, 0x556cf031, 0x13449440, 0x0c51c92c, - 0x3db7fffc, 0xfffffffc, 0x000f0278, 0x6db60000, 0x3fffbe01, - 0xfff80000, 0x00080010, 0x02084080, 0x00000000, 0x00000000, - 0x00000000, 0x00800700, 0x00800700, 0x00800700, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x000000a0, 0x000c0000, 0x14021402, 0x00001402, 0x00000000, - 0x00000000, 0x36db6db6, 0x6db6db40, 0x73f00000, 0x00000000, - 0x7f80fff8, 0x76d005b5, 0x556cf031, 0x13449440, 0x0c51c92c, - 0x3db7fffc, 0xfffffffc, 0x000f0278, 0x6db60000, 0x3fffbe01, - 0xfff80000, 0x00080010, 0x02084080, 0x00000000, 0x00000000, - 0x00000000, 0x00800700, 0x00800700, 0x00800700, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x000000a0, 0x000c0000, 0x14021402, 0x00001402, 0x00000000, - 0x00000000 + 0x00000000, 0x004b6a8e, 0x00000820, 0x00000000, 0x00000000, + 0x00000000, 0x00000080, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0e79e5c0, 0x00820820, 0x00000000, + 0x36db6db6, 0x6db6db40, 0x73f00000, 0x00000000, 0x7f80fff8, + 0x76d005b5, 0x556cf031, 0x13449440, 0x0c51c92c, 0x3db7fffc, + 0xfffffffc, 0x000f0278, 0x6db60000, 0x00000000, 0x0e48048c, + 0x54214514, 0x119f481e, 0x24926490, 0xd2888888, 0x0a108ffe, + 0x812fc370, 0x423c8000, 0x92480080, 0x00adb6d0, 0x6db6db60, + 0x6db6db6c, 0x01e6c000, 0x3fffbe01, 0xfff80000, 0x00080010, + 0x02084080, 0x00000000, 0x058a0001, 0x3d840208, 0x05a20408, + 0x00038c07, 0x00000004, 0x458aa14f, 0x00000000, 0x00000000, + 0x00800700, 0x00800700, 0x00800700, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000a0, + 0x000c0000, 0x14021402, 0x00001402, 0x00000000, 0x00000000, + 0x36db6db6, 0x6db6db40, 0x73f00000, 0x00000000, 0x7f80fff8, + 0x76d005b5, 0x556cf031, 0x13449440, 0x0c51c92c, 0x3db7fffc, + 0xfffffffc, 0x000f0278, 0x6db60000, 0x3fffbe01, 0xfff80000, + 0x00080010, 0x02084080, 0x00000000, 0x00000000, 0x00000000, + 0x00800700, 0x00800700, 0x00800700, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000a0, + 0x000c0000, 0x14021402, 0x00001402, 0x00000000, 0x00000000, + 0x36db6db6, 0x6db6db40, 0x73f00000, 0x00000000, 0x7f80fff8, + 0x76d005b5, 0x556cf031, 0x13449440, 0x0c51c92c, 0x3db7fffc, + 0xfffffffc, 0x000f0278, 0x6db60000, 0x3fffbe01, 0xfff80000, + 0x00080010, 0x02084080, 0x00000000, 0x00000000, 0x00000000, + 0x00800700, 0x00800700, 0x00800700, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000a0, + 0x000c0000, 0x14021402, 0x00001402, 0x00000000, 0x00000000 }; static const uint16_t ar9380_2_2_fast_clock_regs[] = { @@ -1102,6 +1100,217 @@ static const struct athn_ini ar9380_2_2_ini = { }; /* + * AR9485 1.0 programming. + */ +static const uint16_t ar9485_1_0_regs[] = { + P(0x01030), P(0x01070), P(0x010b0), P(0x08014), P(0x0801c), + P(0x08120), P(0x081d0), P(0x08318), P(0x1609c), P(0x160ac), + P(0x160b0), P(0x1610c), P(0x16140), P(0x09810), P(0x09820), + P(0x09824), P(0x09828), P(0x0982c), P(0x09830), P(0x09c00), + P(0x09e00), P(0x09e04), P(0x09e0c), P(0x09e10), P(0x09e14), + P(0x09e18), P(0x09e1c), P(0x09e20), P(0x09e2c), P(0x09e3c), + P(0x09e44), P(0x09e48), P(0x09fc8), P(0x0a204), P(0x0a208), + P(0x0a230), P(0x0a234), P(0x0a238), P(0x0a250), P(0x0a254), + P(0x0a258), P(0x0a25c), P(0x0a260), P(0x0a264), P(0x0a280), + P(0x0a284), P(0x0a288), P(0x0a28c), P(0x0a2c4), P(0x0a2d0), + P(0x0a2d8), P(0x0a358), P(0x0be04), P(0x0be18) +}; + +static const uint32_t ar9485_1_0_vals_2g40[] = { + 0x000002c0, 0x00000318, 0x00007c70, 0x10801600, 0x12e00057, + 0x08f04810, 0x0000320a, 0x00006880, 0x24611800, 0x03284f3e, + 0x00170000, 0x10804008, 0x00000000, 0xd00a8005, 0x206a002e, + 0x5ac640d0, 0x06903881, 0x05eea6d4, 0x0000059c, 0x00000044, + 0x037216a0, 0x00182020, 0x6d4000e2, 0x7ec80d2e, 0x3139605e, + 0x00000000, 0x00021f9c, 0x000003ce, 0x00000021, 0xcf946222, + 0x02282324, 0x50302010, 0x0001a000, 0x01303fc4, 0x00000004, + 0x00004016, 0x10000fff, 0xffb81018, 0x00000210, 0x00001130, + 0x02020002, 0x01000e0e, 0x3a021501, 0x00000e0e, 0x0000000b, + 0x000002a0, 0x00000000, 0x00000000, 0x00158d18, 0x00071981, + 0xf999a83a, 0x00000000, 0x00802020, 0x00000000 +}; + +static const uint32_t ar9485_1_0_vals_2g20[] = { + 0x00000160, 0x0000018c, 0x00003e38, 0x08400b00, 0x12e0002b, + 0x08f04810, 0x0000320a, 0x00003440, 0x000160b0, 0x0001610c, + 0x00016140, 0x00000000, 0x00000000, 0xd00a8005, 0x206a002e, + 0x5ac640d0, 0x06903881, 0x05eea6d4, 0x0000059c, 0x00000044, + 0x037216a0, 0x00182020, 0x6c4000e2, 0x7ec80d2e, 0x31395d5e, + 0x00000000, 0x00021f9c, 0x000003ce, 0x00000021, 0xcf946222, + 0x02282324, 0x50302010, 0x0001a000, 0x01303fc0, 0x00000004, + 0x0000400b, 0x10000fff, 0xffb81018, 0x00000108, 0x00000898, + 0x02020002, 0x01000e0e, 0x3a021501, 0x00000e0e, 0x0000000b, + 0x000002a0, 0x00000000, 0x00000000, 0x00158d18, 0x00071982, + 0xf999a83a, 0x00000000, 0x00802020, 0x00000000 +}; + +static const uint16_t ar9485_1_0_cm_regs[] = { + P(0x040a4), P(0x07048), P(0x00008), P(0x00030), P(0x00034), + P(0x00040), P(0x00044), P(0x00048), P(0x0004c), P(0x00050), + P(0x01040), P(0x01044), P(0x01048), P(0x0104c), P(0x01050), + P(0x01054), P(0x01058), P(0x0105c), P(0x01060), P(0x01064), + P(0x010f0), P(0x01270), P(0x012b0), P(0x012f0), P(0x0143c), + P(0x0147c), P(0x08000), P(0x08004), P(0x08008), P(0x0800c), + P(0x08018), P(0x08020), P(0x08038), P(0x0803c), P(0x08040), + P(0x08044), P(0x08048), P(0x0804c), P(0x08054), P(0x08058), + P(0x0805c), P(0x08060), P(0x08064), P(0x08070), P(0x08074), + P(0x08078), P(0x0809c), P(0x080a0), P(0x080a4), P(0x080a8), + P(0x080ac), P(0x080b0), P(0x080b4), P(0x080b8), P(0x080bc), + P(0x080c0), P(0x080c4), P(0x080c8), P(0x080cc), P(0x080d0), + P(0x080d4), P(0x080d8), P(0x080dc), P(0x080e0), P(0x080e4), + P(0x080e8), P(0x080ec), P(0x080f0), P(0x080f4), P(0x080fc), + P(0x08100), P(0x08108), P(0x0810c), P(0x08110), P(0x08114), + P(0x08118), P(0x0811c), P(0x08124), P(0x08128), P(0x0812c), + P(0x08130), P(0x08134), P(0x08138), P(0x0813c), P(0x08144), + P(0x08168), P(0x0816c), P(0x08170), P(0x08174), P(0x08178), + P(0x0817c), P(0x081c0), P(0x081c4), P(0x081c8), P(0x081cc), + P(0x081d4), P(0x081ec), P(0x081f0), P(0x081f4), P(0x081f8), + P(0x081fc), P(0x08240), P(0x08244), P(0x08248), P(0x0824c), + P(0x08250), P(0x08254), P(0x08258), P(0x0825c), P(0x08260), + P(0x08264), P(0x08268), P(0x0826c), P(0x08270), P(0x08274), + P(0x08278), P(0x0827c), P(0x08284), P(0x08288), P(0x0828c), + P(0x08294), P(0x08298), P(0x0829c), P(0x08300), P(0x08314), + P(0x0831c), P(0x08328), P(0x0832c), P(0x08330), P(0x08334), + P(0x08338), P(0x0833c), P(0x08340), P(0x08344), P(0x08348), + P(0x0835c), P(0x08360), P(0x08364), P(0x08368), P(0x08370), + P(0x08374), P(0x08378), P(0x0837c), P(0x08380), P(0x08384), + P(0x08390), P(0x08394), P(0x08398), P(0x0839c), P(0x083a0), + P(0x083a4), P(0x083a8), P(0x083ac), P(0x083b0), P(0x083b4), + P(0x083b8), P(0x083bc), P(0x083c0), P(0x083c4), P(0x083c8), + P(0x083cc), P(0x083d0), P(0x09800), P(0x09804), P(0x09808), + P(0x0980c), P(0x09814), P(0x09818), P(0x0981c), P(0x09834), + P(0x09838), P(0x0983c), P(0x09880), P(0x09884), P(0x098a4), + P(0x098b0), P(0x098bc), P(0x098d0), P(0x098d4), P(0x098dc), + P(0x098f0), P(0x098f4), P(0x09c04), P(0x09c08), P(0x09c0c), + P(0x09c10), P(0x09c14), P(0x09c18), P(0x09c1c), P(0x09d00), + P(0x09d04), P(0x09d08), P(0x09d0c), P(0x09d10), P(0x09d14), + P(0x09d18), P(0x09d1c), P(0x09e08), P(0x09e24), P(0x09e28), + P(0x09e30), P(0x09e34), P(0x09e38), P(0x09e40), P(0x09e4c), + P(0x09e50), P(0x09fc0), P(0x09fc4), P(0x09fcc), P(0x0a20c), + P(0x0a210), P(0x0a220), P(0x0a224), P(0x0a228), P(0x0a23c), + P(0x0a244), P(0x0a2a0), P(0x0a2c0), P(0x0a2c8), P(0x0a2cc), + P(0x0a2d4), P(0x0a2dc), P(0x0a2e0), P(0x0a2e4), P(0x0a2e8), + P(0x0a2ec), P(0x0a2f0), P(0x0a2f4), P(0x0a2f8), P(0x0a344), + P(0x0a34c), P(0x0a350), P(0x0a364), P(0x0a370), P(0x0a390), + P(0x0a394), P(0x0a398), P(0x0a39c), P(0x0a3a0), P(0x0a3a4), + P(0x0a3a8), P(0x0a3ac), P(0x0a3c0), P(0x0a3c4), P(0x0a3c8), + P(0x0a3cc), P(0x0a3d0), P(0x0a3d4), P(0x0a3d8), P(0x0a3dc), + P(0x0a3e0), P(0x0a3e4), P(0x0a3e8), P(0x0a3ec), P(0x0a3f0), + P(0x0a3f4), P(0x0a3f8), P(0x0a3fc), P(0x0a400), P(0x0a404), + P(0x0a408), P(0x0a40c), P(0x0a414), P(0x0a418), P(0x0a41c), + P(0x0a420), P(0x0a424), P(0x0a428), P(0x0a42c), P(0x0a430), + P(0x0a434), P(0x0a438), P(0x0a43c), P(0x0a440), P(0x0a444), + P(0x0a448), P(0x0a44c), P(0x0a450), P(0x0a458), P(0x0a5c4), + P(0x0a5c8), P(0x0a5cc), P(0x0a760), P(0x0a764), P(0x0a768), + P(0x0a76c), P(0x0a770), P(0x0a774), P(0x0a778), P(0x0a780), + P(0x0a7c0), P(0x0a7c4), P(0x0a7c8), P(0x0a7cc), P(0x0a7d0), + P(0x0a7d4), P(0x0a7dc), P(0x16000), P(0x16004), P(0x16008), + P(0x1600c), P(0x16040), P(0x16048), P(0x1604c), P(0x16050), + P(0x16054), P(0x16080), P(0x16084), P(0x16088), P(0x1608c), + P(0x16090), P(0x16098), P(0x160a0), P(0x160a4), P(0x160a8), + P(0x160b4), P(0x160c0), P(0x160c4), P(0x160c8), P(0x160cc), + P(0x160d0), P(0x16100), P(0x16104), P(0x16108), P(0x16144), + P(0x16148), P(0x16180), P(0x16184), P(0x16188), P(0x1618c), + P(0x16240), P(0x16244), P(0x16248), P(0x1624c), P(0x16280), + P(0x16284), P(0x16288), P(0x1628c), P(0x16290), P(0x16380), + P(0x16384), P(0x16388), P(0x1638c), P(0x16390), P(0x16394), + P(0x16398), P(0x1639c), P(0x163a0), P(0x163a4), P(0x163a8), + P(0x163ac), P(0x163b0), P(0x163b4), P(0x163b8), P(0x163bc), + P(0x163c0), P(0x163c4), P(0x163c8), P(0x163cc), P(0x163d0), + P(0x163d4), P(0x16c40), P(0x16c44) +}; + +static const uint32_t ar9485_1_0_cm_vals[] = { + 0x00a0c9c9, 0x00000004, 0x00000000, 0x00020085, 0x00000005, + 0x00000000, 0x00000000, 0x00000008, 0x00000010, 0x00000000, + 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, + 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, + 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, + 0x000fc78f, 0x0000000f, 0x00000000, 0x00000310, 0x00000020, + 0x00000000, 0x0000000f, 0x00000000, 0x02ff0000, 0x0e070605, + 0x0000000d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x2a800000, 0x06900168, 0x13881c20, 0x01f40000, 0x00252500, + 0x00a00000, 0x00400000, 0x00000000, 0xffffffff, 0x0000ffff, + 0x3f3f3f3f, 0x00000000, 0x00000000, 0x00000000, 0x00020000, + 0x00000000, 0x00000052, 0x00000000, 0x00000000, 0x000007ff, + 0x000000aa, 0x00003210, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, + 0x00000000, 0x00000000, 0x18486200, 0x33332210, 0x00000000, + 0x00020000, 0x00000000, 0x33332210, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00100000, 0x0010f400, 0x00000800, 0x0001e800, + 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00080922, + 0x9ca00010, 0xffffffff, 0x0000ffff, 0x00000000, 0x40000000, + 0x003e4180, 0x00000004, 0x0000002c, 0x0000002c, 0x000000ff, + 0x00000000, 0x00000000, 0x00000000, 0x00000140, 0x00000000, + 0x0000010d, 0x00000000, 0x00000007, 0x00000302, 0x00000700, + 0x00ff0000, 0x02400000, 0x000107ff, 0xa248105b, 0x008f0000, + 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, + 0x000000ff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, + 0x0000fa14, 0x000f0c00, 0x33332210, 0x33332210, 0x33332210, + 0x33332210, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000200, 0x000301ff, 0xafe68e30, 0xfd14e000, 0x9c0a8f6b, + 0x04800000, 0x9280c00a, 0x00000000, 0x00020028, 0x5f3ca3de, + 0x0108ecff, 0x14750600, 0x201fff00, 0x00001042, 0x00200400, + 0x52440bbe, 0x00000002, 0x004b6a8e, 0x00000820, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x03200000, 0x00000000, + 0x00000000, 0x00046384, 0x05b6b440, 0x00b6b440, 0xc080a333, + 0x40206c10, 0x009c4060, 0x1883800a, 0x01834061, 0x00c00400, + 0x00000000, 0x00000000, 0x0038233c, 0x990bb515, 0x0a6f0000, + 0x06336f77, 0x6af6532f, 0x0cc80c00, 0x0d261820, 0x00001004, + 0x00ff03f1, 0x80be4788, 0x0001efb5, 0x40000014, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x10002310, 0x00000000, + 0x0c000000, 0x00000001, 0x00000001, 0x00000000, 0x18c43433, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000a000, 0x00000000, 0x00000000, 0x00000001, + 0x00000444, 0x001f0e0f, 0x0075393f, 0xb79f6427, 0x00000000, + 0xaaaaaaaa, 0x3c466478, 0x20202020, 0x22222220, 0x20200020, + 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, + 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x00000000, + 0x00000006, 0x0cdbd380, 0x000f0f01, 0x8fa91f01, 0x00000000, + 0x0e79e5c6, 0x00820820, 0x1ce739ce, 0x2d0011ce, 0x1ce739ce, + 0x000001ce, 0x1ce739ce, 0x000001ce, 0x1ce739ce, 0x1ce739ce, + 0x00000000, 0x00001801, 0x00000000, 0x00000000, 0x00000000, + 0x04000000, 0x00000001, 0x00010000, 0x00000000, 0x3fad9d74, + 0x0048060a, 0x00000637, 0x03020100, 0x09080504, 0x0d0c0b0a, + 0x13121110, 0x31301514, 0x35343332, 0x00000036, 0x00000838, + 0x00000000, 0xfffffffc, 0x00000000, 0x00000000, 0x00000000, + 0x00000004, 0x00000001, 0x36db6db6, 0x6db6db40, 0x73800000, + 0x00000000, 0x7f80fff8, 0x6c92426e, 0x000f0278, 0x6db6db6c, + 0x6db60000, 0x00080000, 0x0e48048c, 0x14214514, 0x119f081e, + 0x24926490, 0xd28b3330, 0xc2108ffe, 0x812fc370, 0x423c8000, + 0x92480040, 0x006db6db, 0x0186db60, 0x6db6db6c, 0x6de6fbe0, + 0xf7dfcf3c, 0x04cb0001, 0xfff80015, 0x00080010, 0x01884080, + 0x00008040, 0x08453333, 0x18e82f01, 0x00000000, 0x00000000, + 0x08400000, 0x1bf90f00, 0x00000000, 0x00000000, 0x01000015, + 0x00d30000, 0x00318000, 0x50000000, 0x4b96210f, 0x00000000, + 0x00000000, 0x00800700, 0x00800700, 0x00800700, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x000000a0, 0x000c0000, 0x14021402, 0x00001402, 0x00000000, + 0x00000000, 0x1319c178, 0x10000000 +}; + +static const struct athn_ini ar9485_1_0_ini = { + nitems(ar9485_1_0_regs), + ar9485_1_0_regs, + NULL, /* 2GHz only. */ +#ifndef IEEE80211_NO_HT + NULL, /* 2GHz only. */ + ar9485_1_0_vals_2g40, +#endif + ar9485_1_0_vals_2g20, + nitems(ar9485_1_0_cm_regs), + ar9485_1_0_cm_regs, + ar9485_1_0_cm_vals +}; + +/* * AR9380 2.2 Tx gains. */ static const uint16_t ar9380_2_2_tx_gain_regs[] = { @@ -1129,25 +1338,25 @@ static const uint16_t ar9380_2_2_tx_gain_regs[] = { }; static const uint32_t ar9380_2_2_tx_gain_vals_5g[] = { - 0x0380c7fc, 0x0000f800, 0x03ff0000, 0x00000000, 0x000050d9, + 0x00033800, 0x0003c000, 0x03fc0000, 0x00000000, 0x000050d9, 0x00000000, 0x06000003, 0x0a000020, 0x10000023, 0x16000220, 0x1c000223, 0x21002220, 0x27002223, 0x2b022220, 0x2f022222, 0x34022225, 0x3a02222a, 0x3e02222c, 0x4202242a, 0x4702244a, - 0x4b02244c, 0x4e02246c, 0x5302266c, 0x5702286c, 0x5c02486b, - 0x61024a6c, 0x66026a6c, 0x6b026e6c, 0x7002708c, 0x7302b08a, - 0x7702b08c, 0x7702b08c, 0x7702b08c, 0x7702b08c, 0x7702b08c, - 0x7702b08c, 0x7702b08c, 0x00800000, 0x06800003, 0x0a800020, + 0x4b02244c, 0x4e02246c, 0x52022470, 0x55022490, 0x59022492, + 0x5d022692, 0x61022892, 0x65024890, 0x69024892, 0x6e024c92, + 0x74026e92, 0x74026e92, 0x74026e92, 0x74026e92, 0x74026e92, + 0x74026e92, 0x74026e92, 0x00800000, 0x06800003, 0x0a800020, 0x10800023, 0x16800220, 0x1c800223, 0x21802220, 0x27802223, 0x2b822220, 0x2f822222, 0x34822225, 0x3a82222a, 0x3e82222c, - 0x4282242a, 0x4782244a, 0x4b82244c, 0x4e82246c, 0x5382266c, - 0x5782286c, 0x5c82486b, 0x61824a6c, 0x66826a6c, 0x6b826e6c, - 0x7082708c, 0x7382b08a, 0x7782b08c, 0x7782b08c, 0x7782b08c, - 0x7782b08c, 0x7782b08c, 0x7782b08c, 0x7782b08c, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01404000, - 0x01404501, 0x02008802, 0x0300cc03, 0x0300cc03, 0x0300cc03, - 0x03810c03, 0x03810e04, 0x03810e04, 0x03810e04, 0x03810e04, - 0x0380c7fc, 0x0000f800, 0x03ff0000, 0x00000000, 0x0380c7fc, - 0x0000f800, 0x03ff0000, 0x00000000, 0x012492d4, 0x62480001, + 0x4282242a, 0x4782244a, 0x4b82244c, 0x4e82246c, 0x52822470, + 0x55822490, 0x59822492, 0x5d822692, 0x61822892, 0x65824890, + 0x69824892, 0x6e824c92, 0x74826e92, 0x74826e92, 0x74826e92, + 0x74826e92, 0x74826e92, 0x74826e92, 0x74826e92, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02004000, + 0x02004801, 0x02808a02, 0x0380ce03, 0x04411104, 0x04411104, + 0x04411104, 0x04411104, 0x04411104, 0x04411104, 0x04411104, + 0x00033800, 0x0003c000, 0x03fc0000, 0x00000000, 0x00033800, + 0x0003c000, 0x03fc0000, 0x00000000, 0x012492d4, 0x62480001, 0x6db6db6c, 0x012492d4, 0x62480001, 0x6db6db6c, 0x012492d4, 0x62480001, 0x6db6db6c }; @@ -1300,6 +1509,36 @@ static const struct athn_gain ar9380_2_2_tx_gain_low_ob_db = { }; /* + * AR9485 1.0 Tx gains. + */ +static const uint16_t ar9485_1_0_tx_gain_regs[] = { + P(0x0a410), P(0x0a500), P(0x0a504), P(0x0a508), P(0x0a50c), + P(0x0a510), P(0x0a514), P(0x0a518), P(0x0a51c), P(0x0a520), + P(0x0a524), P(0x0a528), P(0x0a52c), P(0x0a530), P(0x0a534), + P(0x0a538), P(0x0a53c), P(0x0a540), P(0x0a544), P(0x0a548), + P(0x0a54c), P(0x0a550), P(0x0a554), P(0x0a558), P(0x0a55c), + P(0x0a560), P(0x0a564), P(0x0a568), P(0x0a56c), P(0x0a570), + P(0x0a574), P(0x0a578), P(0x0a57c), P(0x16044) +}; + +static const uint32_t ar9485_1_0_tx_gain_vals_2g[] = { + 0x000050d8, 0x00000000, 0x04000002, 0x08000004, 0x0d000200, + 0x11000202, 0x15000400, 0x19000402, 0x1d000404, 0x21000603, + 0x25000605, 0x2a000a03, 0x2c000a04, 0x2e000a20, 0x34000e20, + 0x38000e22, 0x3c000e24, 0x40000e26, 0x43001640, 0x46001660, + 0x49001861, 0x4c001a81, 0x4f001a83, 0x54001c85, 0x58001ce5, + 0x5b001ce9, 0x60001eeb, 0x60001eeb, 0x60001eeb, 0x60001eeb, + 0x60001eeb, 0x60001eeb, 0x60001eeb, 0x05b6b2db +}; + +static const struct athn_gain ar9485_1_0_tx_gain = { + nitems(ar9485_1_0_tx_gain_regs), + ar9485_1_0_tx_gain_regs, + NULL, /* 2GHz only. */ + ar9485_1_0_tx_gain_vals_2g +}; + +/* * AR9380 2.2 Rx gains. */ static const uint16_t ar9380_2_2_rx_gain_regs[] = { @@ -1485,6 +1724,74 @@ static const struct athn_gain ar9380_2_2_rx_gain_wo_xlna = { }; /* + * AR9485 1.0 Rx gains. + */ +static const uint16_t ar9485_1_0_rx_gain_regs[] = { + P(0x0a000), P(0x0a004), P(0x0a008), P(0x0a00c), P(0x0a010), + P(0x0a014), P(0x0a018), P(0x0a01c), P(0x0a020), P(0x0a024), + P(0x0a028), P(0x0a02c), P(0x0a030), P(0x0a034), P(0x0a038), + P(0x0a03c), P(0x0a040), P(0x0a044), P(0x0a048), P(0x0a04c), + P(0x0a050), P(0x0a054), P(0x0a058), P(0x0a05c), P(0x0a060), + P(0x0a064), P(0x0a068), P(0x0a06c), P(0x0a070), P(0x0a074), + P(0x0a078), P(0x0a07c), P(0x0a080), P(0x0a084), P(0x0a088), + P(0x0a08c), P(0x0a090), P(0x0a094), P(0x0a098), P(0x0a09c), + P(0x0a0a0), P(0x0a0a4), P(0x0a0a8), P(0x0a0ac), P(0x0a0b0), + P(0x0a0b4), P(0x0a0b8), P(0x0a0bc), P(0x0a0c0), P(0x0a0c4), + P(0x0a0c8), P(0x0a0cc), P(0x0a0d0), P(0x0a0d4), P(0x0a0d8), + P(0x0a0dc), P(0x0a0e0), P(0x0a0e4), P(0x0a0e8), P(0x0a0ec), + P(0x0a0f0), P(0x0a0f4), P(0x0a0f8), P(0x0a0fc), P(0x0a100), + P(0x0a104), P(0x0a108), P(0x0a10c), P(0x0a110), P(0x0a114), + P(0x0a118), P(0x0a11c), P(0x0a120), P(0x0a124), P(0x0a128), + P(0x0a12c), P(0x0a130), P(0x0a134), P(0x0a138), P(0x0a13c), + P(0x0a140), P(0x0a144), P(0x0a148), P(0x0a14c), P(0x0a150), + P(0x0a154), P(0x0a158), P(0x0a15c), P(0x0a160), P(0x0a164), + P(0x0a168), P(0x0a16c), P(0x0a170), P(0x0a174), P(0x0a178), + P(0x0a17c), P(0x0a180), P(0x0a184), P(0x0a188), P(0x0a18c), + P(0x0a190), P(0x0a194), P(0x0a198), P(0x0a19c), P(0x0a1a0), + P(0x0a1a4), P(0x0a1a8), P(0x0a1ac), P(0x0a1b0), P(0x0a1b4), + P(0x0a1b8), P(0x0a1bc), P(0x0a1c0), P(0x0a1c4), P(0x0a1c8), + P(0x0a1cc), P(0x0a1d0), P(0x0a1d4), P(0x0a1d8), P(0x0a1dc), + P(0x0a1e0), P(0x0a1e4), P(0x0a1e8), P(0x0a1ec), P(0x0a1f0), + P(0x0a1f4), P(0x0a1f8), P(0x0a1fc) +}; + +static const uint32_t ar9485_1_0_rx_gain_vals[] = { + 0x00010000, 0x00030002, 0x00050004, 0x00810080, 0x01800082, + 0x01820181, 0x01840183, 0x01880185, 0x018a0189, 0x02850284, + 0x02890288, 0x03850384, 0x03890388, 0x038b038a, 0x038d038c, + 0x03910390, 0x03930392, 0x03950394, 0x00000396, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x28282828, 0x28282828, 0x28282828, + 0x28282828, 0x28282828, 0x21212128, 0x171c1c1c, 0x02020212, + 0x00000202, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x001f0000, 0x111f1100, + 0x111d111e, 0x111b111c, 0x22032204, 0x22012202, 0x221f2200, + 0x221d221e, 0x33013302, 0x331f3300, 0x4402331e, 0x44004401, + 0x441e441f, 0x55015502, 0x551f5500, 0x6602551e, 0x66006601, + 0x661e661f, 0x7703661d, 0x77017702, 0x00007700, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x001f0000, 0x111f1100, 0x111d111e, 0x111b111c, 0x22032204, + 0x22012202, 0x221f2200, 0x221d221e, 0x33013302, 0x331f3300, + 0x4402331e, 0x44004401, 0x441e441f, 0x55015502, 0x551f5500, + 0x6602551e, 0x66006601, 0x661e661f, 0x7703661d, 0x77017702, + 0x00007700, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000396, + 0x00000396, 0x00000396, 0x00000296 +}; + +static const struct athn_gain ar9485_1_0_rx_gain = { + nitems(ar9485_1_0_rx_gain_regs), + ar9485_1_0_rx_gain_regs, + NULL, /* 2GHz only. */ + ar9485_1_0_rx_gain_vals +}; + +/* * Serializer/Deserializer programming. */ static const uint32_t ar9380_2_2_serdes[] = { |