Reading and writing tables
- Follow the procedure below for reading and writing PHY tables
Table Address Register is 0x455
Table Data Low Register is 0x456
Table Data High Register is 0x457
Table Listing
Table ID |
Name |
Availability |
Notes |
0x07 |
TX Power Lookup Table |
>= 2 |
|
0x0a |
TX Power Lookup Table |
< 2 |
LP PHY Write Table (struct lpphytbl *tbl_info)
- struct lpphytbl {void *tbl_ptr; u32len; u32 id; u32 offset; u32 width; u32 phywidth}
Set u8 *u8_ptr to tbl_info->ptr
- Do the same for u16 and u32 versions
Write PHY Register 0x455 with tbl_info->id | tbl_info->offset
Loop for idx from 0 to tbl_info->len - 1 (inclusive) in steps of 1
If tbl_info->width is 32
- Set temp to u32_ptr[idx]
Else if tbl_info->width is 16
- Set temp to u16_ptr[idx]
- Otherwise
- Set temp to u8_ptr[idx]
If tbl_info->phywidth is 32
Write PHY Register 0x457 with (temp >> 16) & 0xFFFF
Write PHY Register 0x456 with temp & 0xFFFF