wil6210: configure OTP HW vectors in SW reset flow
OTP HW vectors values are different for 40MHz and 330MHz AHB clocks. In SW reset flow, the host driver sets the clock frequency to 40MHz. In order to allow reading from the OTP, the host driver should configure the OTP HW vectors with the values that fits this clock frequency. Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
@@ -764,6 +764,21 @@ static int wil_target_reset(struct wil6210_priv *wil, int no_flash)
|
||||
wil_s(wil, RGF_DMA_OFUL_NID_0, BIT_DMA_OFUL_NID_0_RX_EXT_TR_EN |
|
||||
BIT_DMA_OFUL_NID_0_RX_EXT_A3_SRC);
|
||||
|
||||
if (no_flash) {
|
||||
/* Reset OTP HW vectors to fit 40MHz */
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME1, 0x60001);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME2, 0x20027);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME3, 0x1);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME4, 0x20027);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME5, 0x30003);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME6, 0x20002);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME7, 0x60001);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME8, 0x60001);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME9, 0x60001);
|
||||
wil_w(wil, RGF_USER_XPM_IFC_RD_TIME10, 0x60001);
|
||||
wil_w(wil, RGF_USER_XPM_RD_DOUT_SAMPLE_TIME, 0x57);
|
||||
}
|
||||
|
||||
wil_dbg_misc(wil, "Reset completed in %d ms\n", delay * RST_DELAY);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user