diff options
author | Govind Singh <govinds@codeaurora.org> | 2019-09-18 16:27:35 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-09-21 09:46:39 +0300 |
commit | 75f545e8574419a0f034e5a0b8b39fb8b8e88271 (patch) | |
tree | e2bb8bf77265404eb4252ac5e0463699d49835f8 /drivers/net/wireless/ath/ath10k/snoc.h | |
parent | 892022e108ddc9c315cd158869dbefac8759e5dc (diff) |
ath10k: Add xo calibration support for wifi rf clock
PMIC XO is the clock source for wifi rf clock in integrated wifi
chipset ex: WCN3990. Due to board layout errors XO frequency drifts
can cause wifi rf clock inaccuracy.
XO calibration test tree in Factory Test Mode is used to find the
best frequency offset(for example +/-2KHz )by programming XO trim
register. This ensure system clock stays within required 20 ppm
WLAN rf clock.
Retrieve the xo trim offset via system firmware (e.g., device tree),
especially in the case where the device doesn't have a useful EEPROM
on which to store the calibrated XO offset (e.g., for integrated Wifi).
Calibrated XO offset is sent to fw, which compensate the clock drift
by programing the XO trim register.
Signed-off-by: Govind Singh <govinds@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/snoc.h')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/snoc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h index d2449a3b4a8f..bc2b925b1d5a 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.h +++ b/drivers/net/wireless/ath/ath10k/snoc.h @@ -69,6 +69,8 @@ struct ath10k_snoc { size_t num_clks; struct ath10k_qmi *qmi; unsigned long flags; + bool xo_cal_supported; + u32 xo_cal_data; }; static inline struct ath10k_snoc *ath10k_snoc_priv(struct ath10k *ar) |