ath11k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
@ 2021-10-12  9:14 Baochen Qiang
  0 siblings, 0 replies; 5+ messages in thread
From: Baochen Qiang @ 2021-10-12  9:14 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 2021-10-11 14:30, Kalle Valo wrote:
> Baochen Qiang <bqiang@codeaurora.org> writes:
> 
>> 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

In some scenarios like rmmod/insmod, HW target needs to be completely 
reset. On ARM platforms we can rely on WL_EN pin and other power 
regulators to do this. However on x86 or some third party platforms, 
this has to be done by ath11k host by writing HW register 
PCIE_SOC_GLOBAL_RESET. But the problem is that some HW registers can not 
be cleared/restored. With this flag PLATFORM_CAP_PCIE_GLOBAL_RESET in 
QMI host_cap message, firmware can do some platform specific operations 
to fix this issue.

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
  2021-10-11  5:56 Baochen Qiang
  2021-10-11  6:30 ` Kalle Valo
  2022-03-21 13:18 ` Kalle Valo
@ 2022-03-23  9:06 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2022-03-23  9:06 UTC (permalink / raw)
  To: Baochen Qiang; +Cc: ath11k, linux-wireless

Baochen Qiang <bqiang@codeaurora.org> wrote:

> 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.
> 
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
> 
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

1e4ac7173c93 ath11k: enable PLATFORM_CAP_PCIE_GLOBAL_RESET QMI host capability

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211011055602.77342-1-bqiang@codeaurora.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
  2021-10-11  5:56 Baochen Qiang
  2021-10-11  6:30 ` Kalle Valo
@ 2022-03-21 13:18 ` Kalle Valo
  2022-03-23  9:06 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2022-03-21 13:18 UTC (permalink / raw)
  To: Baochen Qiang; +Cc: ath11k, linux-wireless

Baochen Qiang <bqiang@codeaurora.org> wrote:

> 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 <bqiang@codeaurora.org>

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.

---------------------------------------------------------------------

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211011055602.77342-1-bqiang@codeaurora.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
  2021-10-11  5:56 Baochen Qiang
@ 2021-10-11  6:30 ` Kalle Valo
  2022-03-21 13:18 ` Kalle Valo
  2022-03-23  9:06 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2021-10-11  6:30 UTC (permalink / raw)
  To: Baochen Qiang; +Cc: ath11k, linux-wireless

Baochen Qiang <bqiang@codeaurora.org> writes:

> 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

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg
@ 2021-10-11  5:56 Baochen Qiang
  2021-10-11  6:30 ` Kalle Valo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Baochen Qiang @ 2021-10-11  5:56 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless

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 <bqiang@codeaurora.org>
---
 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(+)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 969bf1a590d9..5601f758a0a6 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -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,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 62f5978b3005..82952ef9abec 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -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 {
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index b5e34d670715..16f2adb54d03 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -13,6 +13,7 @@
 
 #define SLEEP_CLOCK_SELECT_INTERNAL_BIT	0x02
 #define HOST_CSTATE_BIT			0x04
+#define PLATFORM_CAP_PCIE_GLOBAL_RESET	0x08
 
 bool 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,
-- 
2.25.1


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-23  9:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12  9:14 [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg Baochen Qiang
  -- strict thread matches above, loose matches on Subject: below --
2021-10-11  5:56 Baochen Qiang
2021-10-11  6:30 ` Kalle Valo
2022-03-21 13:18 ` Kalle Valo
2022-03-23  9:06 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).