ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
PATCH 1/1 ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
Inform firmware that host is capable of triggering a global reset. This is requested by firmware team.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
--- drivers/net/wireless/ath/ath11k/core.c | 5 +++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/qmi.c | 4 ++++ 3 files changed, 10 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +5 -0
@@ -71,6 +71,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = false, .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .fix_l1ss = true, + .global_reset = false, }, { .hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -112,6 +113,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = false, .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .fix_l1ss = true, + .global_reset = false, }, { .name = "qca6390 hw2.0",
@@ -152,6 +154,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = true, .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .fix_l1ss = true, + .global_reset = true, }, { .name = "qcn9074 hw1.0",
@@ -190,6 +193,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = false, .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074), .fix_l1ss = true, + .global_reset = false, }, { .name = "wcn6855 hw2.0",
@@ -230,6 +234,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = true, .hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855), .fix_l1ss = false, + .global_reset = true, }, };
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -163,6 +163,7 @@ struct ath11k_hw_params {bool supports_suspend;u32 hal_desc_sz;bool fix_l1ss; +bool global_reset; };struct ath11k_hw_ops {
drivers/net/wireless/ath/ath11k/qmi.c +4 -0
@@ -13,6 +13,7 @@#define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02#define HOST_CSTATE_BIT 0x04 +#define PLATFORM_CAP_PCIE_GLOBAL_RESET 0x08bool ath11k_cold_boot_cal =1 ;EXPORT_SYMBOL (ath11k_cold_boot_cal);
@@ -1556,6 +1557,9 @@ static int ath11k_qmi_host_cap_send(struct ath11k_base *ab) req.nm_modem |=SLEEP_CLOCK_SELECT_INTERNAL_BIT ; } +if (ab->hw_params.global_reset) + req.nm_modem |=PLATFORM_CAP_PCIE_GLOBAL_RESET ; +ath11k_dbg (ab,ATH11K_DBG_QMI ,"qmi host cap request\n" ); ret = qmi_txn_init(&ab->qmi.handle, &txn,
Signature · 1 line
2.25.1
Quoted 2 lines · Baochen Qiang
Inform firmware that host is capable of triggering a global reset. This is requested by firmware team.
Why?
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#answer_to_why
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 6 lines · Baochen Qiang
Inform firmware that host is capable of triggering a global reset. This is requested by firmware team.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by Baochen Qiang <[email protected]>
In the pending branch I fixed the trivial conflicts and enabled this feature on both wcn6855 hw2.0 and hw2.1.
I also now have more information what this is about so changed the commit log to:
---------------------------------------------------------------------
ath11k: enable PLATFORM_CAP_PCIE_GLOBAL_RESET QMI host capability
In Qualcomm ARM platforms there is WL_EN pin and other power regulators which can be controlled at platform side to completely reset the chip. For most of x86 and other platforms, the chip is connected via PCIe M.2 interface, and there is no way to control WL_EN pin. Instead the host driver needs to reset the chip via PCIE_SOC_GLOBAL_RESET hardware register, just like ath11k does currently.
But when using PCIE_SOC_GLOBAL_RESET there are some hardware registers which are not cleared/restored. To handle those cases we can enable PLATFORM_CAP_PCIE_GLOBAL_RESET QMI host capability to tell the firmware to do some platform specific operations after firmware download.
This does not fix any known issues, but is recommended by the firmware team, so enable the capability on QCA6390 and WCN6855 PCI devices. It is currently unclear if this should be enabled also on QCN9074, so leave it disabled for now. On AHB devices this is not needed as they don't use PCIE_SOC_GLOBAL_RESET.
---------------------------------------------------------------------
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 18 lines · Baochen Qiang
In Qualcomm ARM platforms there is
WL_ENpin and other power regulators which can be controlled at platform side to completely reset the chip. For most of x86 and other platforms, the chip is connected via PCIe M.2 interface, and there is no way to controlWL_ENpin. Instead the host driver needs to reset the chip viaPCIE_SOC_GLOBAL_RESEThardware register, just like ath11k does currently.But when using
PCIE_SOC_GLOBAL_RESETthere are some hardware registers which are not cleared/restored. To handle those cases we can enablePLATFORM_CAP_PCIE_GLOBAL_RESETQMI host capability to tell the firmware to do some platform specific operations after firmware download.This does not fix any known issues, but is recommended by the firmware team, so enable the capability on QCA6390 and WCN6855 PCI devices. It is currently unclear if this should be enabled also on QCN9074, so leave it disabled for now. On AHB devices this is not needed as they don't use
PCIE_SOC_GLOBAL_RESET.
Quoted 4 lines
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by Baochen Qiang <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
1e4ac7173c93 ath11k: enable PLATFORM_CAP_PCIE_GLOBAL_RESET QMI host capability
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches