QCN RF驱动

Avoid modem rest due to MIPI read-back failure at boot up


During the modem boot up process, the RF driver checks if the Assigned USID of each MIPI RFFE device is properly programed by performing MIPI read-back. If the respond from the MIPI RFFE device is NULL or not aligned with the programmed ID, the RF driver will force modem reset.However, in some cases, mainly for testing purpose, we need to avoid this modem reset and move forward even with no respond or erroneous respond from the MIPI RFFE device.




You can bypass this modem reset due to MIPI read-back failure by combining “RFC_SKIP_RFFE_DETECT_BIT_IND” bit with “Product Revision” field as shown in below example.




Example: Bypassing modem reset due to HCPA MIPI read-back failure in WTR1605_APAC11_APT RF card




File location: modem_proc\rfa\rfc\dime\rf_card\rfc_wtr1605_apac11_apt\common\src


File name: rfc_wtr1605_apac11_apt_cmn_ag.cpp


Code change:


rfc_device_cfg_info_type rfc_wtr1605_apac11_apt_cmn_devices_list[] =


//Sinff


  { /*Device: HCPA */


    RFDEVICE_PA, /* DEVICE_TYPE */


    GEN_PA /* HCPA */, /* DEVICE_NAME */


    0, /* DEVICE_TYPE_INSTANCE */


    RFDEVICE_COMM_PROTO_RFFE, /* DEVICE_COMM_PROTOCOL */


    {    0, 0 /* 0 not specified */}, /* DEVICE_COMM_BUS */


    0x01A5, /* MANUFACTURER_ID */


    0x09, /* PRODUCT_ID */


    ( 0 | RFC_SKIP_RFFE_DETECT_BIT_IND ), /* PRODUCT_REV, <<---- Bypassing read-back */


    0xF, /* DEFAULT USID RANGE START */


    0xF, /* DEFAULT USID RANGE END */


    0x6, /* ASSIGNED_USID */


    0x6, /* RFFE_GROUP_ID */


    FALSE, /* INIT */


    RFC_INVALID_PARAM, /* ASSOCIATED_DAC */


    RFDEVICE_TYPE_INVALID, /* ASSOCIATED_DEVICE_TYPE */


    0 /*Warning: Not specified*/, /* ASSOCIATED_DEVICE_TYPE_INSTANCE */


  }, /* END - Device: HCPA */


 


How to identify if the Assigned USID is programmed correctly or not:


One drawback of bypassing this modem reset is that it becomes difficult to identify whether or not Assigned USID of MIPI RFFE device programmed correctly. One way to identify that from the log would be to check if rfc_prd_id = hw_prd_id and rfc_mfg_id = hw_mfg_id in below log message. If they are, then the Assigned USID of the MIPI RFFE device is programmed correctly


"RFFE Scan : rffe_bus=%d rfc_usid=%d hw_usid=%d, rfc_prd_id=0x%X, hw_prd_id=0x%X  rfc_mfg_id=0x%X hw_mfg_id=0x%X"




Caution: It is recommended to remove alternative (not used) RFFE devices from the rfc_device_cfg_info_type rfc_wtr1605_apac11_apt_cmn_devices_list[] when introducing this bypass feature.








==========================================
How to map NV_WCDMA_<band>_PA_RANGE_MAP_I with MIPI PA power mode


For GRFC PA, NV_WCDMA_<band>_PA_RANGE_MAP_I directly imply the PA_R0 and PA_R1 control logic for each PA_state
For MIPI PA, no PA_R0 and PA_R1 logic is used to control PA power mode, but MIPI control word. Two examples are listed below, and it shows how NV_WCDMA_<band>_PA_RANGE_MAP_I maps with PA power mode.


Ex1:
<WTR1605_NA1_APT_WCDMA_B1_TX0.xml> 
<NvItem id="2029" name="NV_WCDMA_PA_RANGE_MAP_I" mapping="direct" encoding="dec">3,2,2,2</NvItem> 
<NvItem id="538" name="NV_WCDMA_R1_FALL_I" mapping="direct" encoding="dec">208</NvItem> 
<NvItem id="537" name="NV_WCDMA_R1_RISE_I" mapping="direct" encoding="dec">238</NvItem> 
<NvItem id="2018" name="NV_WCDMA_R2_FALL_I" mapping="direct" encoding="dec">32767</NvItem> 
<NvItem id="2017" name="NV_WCDMA_R2_RISE_I" mapping="direct" encoding="dec">32767</NvItem> 
<NvItem id="2020" name="NV_WCDMA_R3_FALL_I" mapping="direct" encoding="dec">32767</NvItem> 
<NvItem id="2019" name="NV_WCDMA_R3_RISE_I" mapping="direct" encoding="dec">32767</NvItem> 


From the switch point setting, PA_state 0 and PA_state_1 will be used. 
PA_state 0 configures PA_range to 3. PA_state 1 configures PA_range to 2. 


WTR1605_NA1_APT uses sky_77629, so we check rfdevice_pa_sky_77629_data_ag.cpp to know what register value for PA_ragne 2 and PA_range 3 respectively. 


static int16 rfdevice_pa_sky_77629_pa_set_range_data[RFDEVICE_PA_SKY_77629_NUM_PORTS][4][RFDEVICE_PA_SKY_77629_PA_SET_RANGE_NUM_REGS] = 

{ /* PORT NUM: 0 */ 
{ 0x0C, }, /* PA Range: 0 */ //[bit1 bit0]=[0 0], HPM - ET 
{ 0x0C, }, /* PA Range: 1 */ //[bit1 bit0]=[0 0], HPM - ET 
{ 0x0D, }, /* PA Range: 2 */ //[bit1 bit0]=[0 1], HPM - APT 
{ 0x0E, }, /* PA Range: 3 */ //[bit1 bit0]=[1 0], LPM 
}, 
... 



Refer to the data sheet of PA, the bit0 and bit1 control the PA power mode. And we can know how [bit1 bit0] maps to power mode from the PA data sheet.
Finally, we conclude that PA_range 3 refers to LPM and PA_range 2 refers to HPM - APT.


Ex2:


<WTR1605_NA1_ET121_WCDMA_B1_TX0.xml> 
<NvItem id="2029" name="NV_WCDMA_PA_RANGE_MAP_I" mapping="direct" encoding="dec">3,2,1,0</NvItem> 
<NvItem id="538" name="NV_WCDMA_R1_FALL_I" mapping="direct" encoding="dec">208</NvItem> 
<NvItem id="537" name="NV_WCDMA_R1_RISE_I" mapping="direct" encoding="dec">238</NvItem> 
<NvItem id="2018" name="NV_WCDMA_R2_FALL_I" mapping="direct" encoding="dec">329</NvItem> 
<NvItem id="2017" name="NV_WCDMA_R2_RISE_I" mapping="direct" encoding="dec">359</NvItem> 
<NvItem id="2020" name="NV_WCDMA_R3_FALL_I" mapping="direct" encoding="dec">329</NvItem> 
<NvItem id="2019" name="NV_WCDMA_R3_RISE_I" mapping="direct" encoding="dec">359</NvItem> 


From the switch point setting, PA_state 0, PA_state 1 and PA_state 3 will be used. 
PA_state 0 configures PA_range to 3, PA_state 1 configures PA_range to 2 and PA_state 3 configures PA_range to 0. 


WTR1605_NA1_ET121 also uses sky_77629. 
We can conclude PA_range 3/2/0 refers to LPM/HPM - APT/HPM - ET respectively.
======================================




//  ---- NV ----- code sync -----
./qcril/qcril_qmi/qcril_qmi_nas.c:        if ( property_set( QMI_RIL_SYS_PROP_NAME_MULTI_SIM, prop_val ) != E_SUCCESS )



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值