Skip to content

Commit

Permalink
nrf_wifi: Incorporate CSP related parameters in firmware
Browse files Browse the repository at this point in the history
[SHEL-2435/SHEL-2438]: Incorporate CSP related parameters in firmware.
[SHEL-2310]: Support for CSP package in Host driver.

Signed-off-by: Mahammadyunus Patil <[email protected]>
  • Loading branch information
imapa committed Feb 20, 2024
1 parent d80b51a commit 33fac6a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion nrf_wifi/fw_if/umac_if/src/fmac_api_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ int nrf_wifi_phy_rf_params_init(struct nrf_wifi_osal_priv *opriv,
0x0,
sizeof(prf->temp_volt_backoff.reserved));

if (package_info == 1) {
if (package_info == CSP_PACKAGE_INFO) {
prf->xo_offset.xo_freq_offset = CSP_XO_VAL;
/* TX power ceiling */
prf->max_pwr_ceil.max_dsss_pwr = CSP_MAX_TX_PWR_DSSS;
Expand Down
36 changes: 20 additions & 16 deletions nrf_wifi/hw_if/hal/inc/fw/phy_rf_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
#define NRF_WIFI_VBAT_LOW (12) /* Correspond to (2.5+12*0.07)=3.34V */
#define NRF_WIFI_VBAT_HIGH (14) /* Correspond to (2.5+14*0.07)=3.48V */

/** Package type information written to the OTP memory */
#define QFN_PACKAGE_INFO 0x5146
#define CSP_PACKAGE_INFO 0x4345

/* Package independent params */

/** Power detector adjustment value. */
Expand Down Expand Up @@ -148,23 +152,23 @@
#define CSP_XO_VAL 0x2A

/** Max TX power allowed for DSSS and OFDM in 2.4GHz band */
#define CSP_MAX_TX_PWR_DSSS 0x54
#define CSP_MAX_TX_PWR_LB_MCS7 0x40
#define CSP_MAX_TX_PWR_LB_MCS0 0x40
#define CSP_MAX_TX_PWR_DSSS 0x58
#define CSP_MAX_TX_PWR_LB_MCS7 0x48
#define CSP_MAX_TX_PWR_LB_MCS0 0x50

/** Max TX power allowed for MCS7 for channels in the range,
* 36 to 64, 96 to 132 and 136 to 177
*/
#define CSP_MAX_TX_PWR_HB_LOW_CHAN_MCS7 0x34
#define CSP_MAX_TX_PWR_HB_MID_CHAN_MCS7 0x34
#define CSP_MAX_TX_PWR_HB_HIGH_CHAN_MCS7 0x30
#define CSP_MAX_TX_PWR_HB_LOW_CHAN_MCS7 0x40
#define CSP_MAX_TX_PWR_HB_MID_CHAN_MCS7 0x40
#define CSP_MAX_TX_PWR_HB_HIGH_CHAN_MCS7 0x40

/** Max TX power allowed for MCS0 for channels in the range,
* 36 to 64, 96 to 132 and 136 to 177
*/
#define CSP_MAX_TX_PWR_HB_LOW_CHAN_MCS0 0x38
#define CSP_MAX_TX_PWR_HB_MID_CHAN_MCS0 0x34
#define CSP_MAX_TX_PWR_HB_HIGH_CHAN_MCS0 0x30
#define CSP_MAX_TX_PWR_HB_LOW_CHAN_MCS0 0x50
#define CSP_MAX_TX_PWR_HB_MID_CHAN_MCS0 0x50
#define CSP_MAX_TX_PWR_HB_HIGH_CHAN_MCS0 0x50

/** Max chip temperature at which the TX power backoff to be applied. */
#define CSP_MAX_CHIP_TEMP 0x43
Expand All @@ -176,22 +180,22 @@
* chip temperature crosses MAX_CHIP_TEMP. The resolution is in 0.25dB.
* To get 1 dB backoff configure -4(0xFC)
*/
#define CSP_LB_MAX_PWR_BKF_HI_TEMP 0xFC
#define CSP_LB_MAX_PWR_BKF_HI_TEMP 0xEC
#define CSP_LB_MAX_PWR_BKF_LOW_TEMP 0x00
#define CSP_HB_MAX_PWR_BKF_HI_TEMP 0xF8
#define CSP_HB_MAX_PWR_BKF_LOW_TEMP 0xFC
#define CSP_HB_MAX_PWR_BKF_HI_TEMP 0xFC
#define CSP_HB_MAX_PWR_BKF_LOW_TEMP 0xF4

/** TX power backoff values to be applied in 2.4GHz and 5GHz band when
* the voltage is less than NRF_WIFI_VBAT_VERYLOW
*/
#define CSP_LB_VBT_LT_VLOW 0xFC
#define CSP_HB_VBT_LT_VLOW 0xF8
#define CSP_LB_VBT_LT_VLOW 0xF8
#define CSP_HB_VBT_LT_VLOW 0xE8

/** TX power backoff values to be applied in 2.4GHz and 5GHz band when
* the voltage is less than NRF_WIFI_VBAT_LOW
*/
#define CSP_LB_VBT_LT_LOW 0x00
#define CSP_HB_VBT_LT_LOW 0xFC
#define CSP_LB_VBT_LT_LOW 0xFC
#define CSP_HB_VBT_LT_LOW 0xF4


/** XO adjustment value */
Expand Down

0 comments on commit 33fac6a

Please sign in to comment.