diff options
Diffstat (limited to 'sys/dev/ic/ar9380reg.h')
-rw-r--r-- | sys/dev/ic/ar9380reg.h | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/sys/dev/ic/ar9380reg.h b/sys/dev/ic/ar9380reg.h index e7b99064335..5a60ce2e54d 100644 --- a/sys/dev/ic/ar9380reg.h +++ b/sys/dev/ic/ar9380reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9380reg.h,v 1.15 2011/01/01 10:48:31 damien Exp $ */ +/* $OpenBSD: ar9380reg.h,v 1.16 2011/01/01 13:44:42 damien Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -89,6 +89,7 @@ struct ar9380_base_eep_hdr { #define AR_EEP_DOUBLING_EN 0x08 #define AR_EEP_INTERNAL_REGULATOR 0x10 #define AR_EEP_PAPRD 0x20 +#define AR_EEP_TUNING_CAPS 0x40 uint8_t miscConfiguration; #define AR_EEP_DRIVE_STRENGTH 0x01 @@ -103,6 +104,7 @@ struct ar9380_base_eep_hdr { #define AR_EEP_TX_GAIN_S 4 #define AR_EEP_TX_GAIN_HIGH_OB_DB 1 #define AR_EEP_TX_GAIN_LOW_OB_DB 2 +#define AR_EEP_TX_GAIN_HIGH_POWER 3 #define AR_EEP_RX_GAIN_M 0x0f #define AR_EEP_RX_GAIN_S 0 #define AR_EEP_RX_GAIN_WO_XLNA 1 @@ -151,6 +153,11 @@ struct ar9380_cal_data_per_freq_op_loop { struct ar9380_base_extension_1 { uint8_t ant_div_control; +#define AR_EEP_ANT_DIV_CTRL_ALL_M 0x3f +#define AR_EEP_ANT_DIV_CTRL_ALL_S 0 +#define AR_EEP_ANT_DIV_CTRL_ANT_DIV 0x40 +#define AR_EEP_ANT_DIV_CTRL_FAST_DIV 0x80 + uint8_t future[13]; } __packed; @@ -1509,6 +1516,64 @@ static const struct athn_gain ar9380_2_2_tx_gain_low_ob_db = { }; /* + * AR9380 2.2 high power Tx gains. + */ +static const uint32_t ar9380_2_2_tx_gain_high_power_vals_5g[] = { + 0x0380c7fc, 0x0000f800, 0x03ff0000, 0x00000000, 0x000050d8, + 0x00002220, 0x04002222, 0x09002421, 0x0d002621, 0x13004620, + 0x19004a20, 0x1d004e20, 0x21005420, 0x26005e20, 0x2b005e40, + 0x2f005e42, 0x33005e44, 0x38005e65, 0x3c005e69, 0x40005e6b, + 0x44005e6d, 0x49005e72, 0x4e005eb2, 0x53005f12, 0x59025eb2, + 0x5e025f12, 0x61027f12, 0x6702bf12, 0x6b02bf14, 0x6f02bf16, + 0x6f02bf16, 0x6f02bf16, 0x6f02bf16, 0x6f02bf16, 0x6f02bf16, + 0x6f02bf16, 0x6f02bf16, 0x00802220, 0x04802222, 0x09802421, + 0x0d802621, 0x13804620, 0x19804a20, 0x1d804e20, 0x21805420, + 0x26805e20, 0x2b805e40, 0x2f805e42, 0x33805e44, 0x38805e65, + 0x3c805e69, 0x40805e6b, 0x44805e6d, 0x49805e72, 0x4e805eb2, + 0x53805f12, 0x59825eb2, 0x5e825f12, 0x61827f12, 0x6782bf12, + 0x6b82bf14, 0x6f82bf16, 0x6f82bf16, 0x6f82bf16, 0x6f82bf16, + 0x6f82bf16, 0x6f82bf16, 0x6f82bf16, 0x6f82bf16, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00804000, 0x00804201, + 0x0280c802, 0x0280ca03, 0x04c15104, 0x04c15305, 0x04c15305, + 0x04c15305, 0x04c15305, 0x04c15305, 0x04c15305, 0x04c15305, + 0x0380c7fc, 0x0000f800, 0x03ff0000, 0x00000000, 0x0380c7fc, + 0x0000f800, 0x03ff0000, 0x00000000, 0x056db2e6, 0xae480001, + 0x6eb6db6c, 0x056db2e6, 0xae480001, 0x6eb6db6c, 0x056db2e6, + 0xae480001, 0x6eb6db6c +}; + +static const uint32_t ar9380_2_2_tx_gain_high_power_vals_2g[] = { + 0x00637800, 0x03838000, 0x03fc0000, 0x00000000, 0x000050d9, + 0x00000000, 0x04000002, 0x08000004, 0x0b000200, 0x0f000202, + 0x11000400, 0x15000402, 0x19000404, 0x1b000603, 0x1f000a02, + 0x23000a04, 0x26000a20, 0x2a000e20, 0x2e000e22, 0x31000e24, + 0x34001640, 0x38001660, 0x3b001861, 0x3e001a81, 0x42001a83, + 0x44001c84, 0x48001ce3, 0x4c001ce5, 0x50001ce9, 0x54001ceb, + 0x56001eec, 0x56001eec, 0x56001eec, 0x56001eec, 0x56001eec, + 0x56001eec, 0x56001eec, 0x00800000, 0x04800002, 0x08800004, + 0x0b800200, 0x0f800202, 0x11800400, 0x15800402, 0x19800404, + 0x1b800603, 0x1f800a02, 0x23800a04, 0x26800a20, 0x2a800e20, + 0x2e800e22, 0x31800e24, 0x34801640, 0x38801660, 0x3b801861, + 0x3e801a81, 0x42801a83, 0x44801c84, 0x48801ce3, 0x4c801ce5, + 0x50801ce9, 0x54801ceb, 0x56801eec, 0x56801eec, 0x56801eec, + 0x56801eec, 0x56801eec, 0x56801eec, 0x56801eec, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01404000, + 0x01404501, 0x02008501, 0x0280ca03, 0x03010c04, 0x04014c04, + 0x04015005, 0x04015005, 0x04015005, 0x04015005, 0x04015005, + 0x00637800, 0x03838000, 0x03fc0000, 0x00000000, 0x00637800, + 0x03838000, 0x03fc0000, 0x00000000, 0x056db2e6, 0xae480001, + 0x6eb6db6c, 0x056db2e6, 0xae480001, 0x6eb6db6c, 0x056db2e6, + 0xae480001, 0x6eb6db6c +}; + +static const struct athn_gain ar9380_2_2_tx_gain_high_power = { + nitems(ar9380_2_2_tx_gain_regs), + ar9380_2_2_tx_gain_regs, + ar9380_2_2_tx_gain_high_power_vals_5g, + ar9380_2_2_tx_gain_high_power_vals_2g +}; + +/* * AR9485 1.0 Tx gains. */ static const uint16_t ar9485_1_0_tx_gain_regs[] = { |