Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef B43_TABLES_LPPHY_H_
0003 #define B43_TABLES_LPPHY_H_
0004 
0005 
0006 #define B43_LPTAB_TYPEMASK      0xF0000000
0007 #define B43_LPTAB_8BIT          0x10000000
0008 #define B43_LPTAB_16BIT         0x20000000
0009 #define B43_LPTAB_32BIT         0x30000000
0010 #define B43_LPTAB8(table, offset)   (((table) << 10) | (offset) | B43_LPTAB_8BIT)
0011 #define B43_LPTAB16(table, offset)  (((table) << 10) | (offset) | B43_LPTAB_16BIT)
0012 #define B43_LPTAB32(table, offset)  (((table) << 10) | (offset) | B43_LPTAB_32BIT)
0013 
0014 /* Table definitions */
0015 #define B43_LPTAB_TXPWR_R2PLUS      B43_LPTAB32(0x07, 0) /* TX power lookup table (rev >= 2) */
0016 #define B43_LPTAB_TXPWR_R0_1        B43_LPTAB32(0xA0, 0) /* TX power lookup table (rev < 2) */
0017 
0018 u32 b43_lptab_read(struct b43_wldev *dev, u32 offset);
0019 void b43_lptab_write(struct b43_wldev *dev, u32 offset, u32 value);
0020 
0021 /* Bulk table access. Note that these functions return the bulk data in
0022  * host endianness! The returned data is _not_ a bytearray, but an array
0023  * consisting of nr_elements of the data type. */
0024 void b43_lptab_read_bulk(struct b43_wldev *dev, u32 offset,
0025              unsigned int nr_elements, void *data);
0026 void b43_lptab_write_bulk(struct b43_wldev *dev, u32 offset,
0027               unsigned int nr_elements, const void *data);
0028 
0029 void b2062_upload_init_table(struct b43_wldev *dev);
0030 void b2063_upload_init_table(struct b43_wldev *dev);
0031 
0032 struct lpphy_tx_gain_table_entry {
0033     u8 gm,  pga,  pad,  dac,  bb_mult;
0034 };
0035 
0036 void lpphy_write_gain_table(struct b43_wldev *dev, int offset,
0037                 struct lpphy_tx_gain_table_entry data);
0038 void lpphy_write_gain_table_bulk(struct b43_wldev *dev, int offset, int count,
0039                  struct lpphy_tx_gain_table_entry *table);
0040 
0041 void lpphy_rev0_1_table_init(struct b43_wldev *dev);
0042 void lpphy_rev2plus_table_init(struct b43_wldev *dev);
0043 void lpphy_init_tx_gain_table(struct b43_wldev *dev);
0044 
0045 #endif /* B43_TABLES_LPPHY_H_ */