All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: ath12k: Not pull PCIe PERST pin for WCN7850
@ 2023-04-04  3:20 ` Carl Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Carl Huang @ 2023-04-04  3:20 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_cjhuang

Notify WCN7850 firmware not to pull PCIe PERST pin so WCN7850 hardware
consumes less power.   

Carl Huang (2):
  wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
  wifi: ath12k: set PERST pin no pull request for WCN7850

 drivers/net/wireless/ath/ath12k/hw.c  | 6 ++++++
 drivers/net/wireless/ath/ath12k/hw.h  | 2 ++
 drivers/net/wireless/ath/ath12k/qmi.c | 6 ++++--
 drivers/net/wireless/ath/ath12k/qmi.h | 1 +
 4 files changed, 13 insertions(+), 2 deletions(-)


base-commit: bea046575a2e6d7d1cf63cc7ab032647a3585de5
-- 
2.25.1


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

* [PATCH 0/2] wifi: ath12k: Not pull PCIe PERST pin for WCN7850
@ 2023-04-04  3:20 ` Carl Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Carl Huang @ 2023-04-04  3:20 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_cjhuang

Notify WCN7850 firmware not to pull PCIe PERST pin so WCN7850 hardware
consumes less power.   

Carl Huang (2):
  wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
  wifi: ath12k: set PERST pin no pull request for WCN7850

 drivers/net/wireless/ath/ath12k/hw.c  | 6 ++++++
 drivers/net/wireless/ath/ath12k/hw.h  | 2 ++
 drivers/net/wireless/ath/ath12k/qmi.c | 6 ++++--
 drivers/net/wireless/ath/ath12k/qmi.h | 1 +
 4 files changed, 13 insertions(+), 2 deletions(-)


base-commit: bea046575a2e6d7d1cf63cc7ab032647a3585de5
-- 
2.25.1


-- 
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k

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

* [PATCH 1/2] wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
  2023-04-04  3:20 ` Carl Huang
@ 2023-04-04  3:20   ` Carl Huang
  -1 siblings, 0 replies; 8+ messages in thread
From: Carl Huang @ 2023-04-04  3:20 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_cjhuang

Currently CNSS(Connectivity Subsystem) feature is assigned to
qmi_wlanfw_host_cap_req_msg_v01 request directly, this prevents
chip-specific CNSS features from being added easily.

Fix it by adding a new field qmi_cnss_feature_bitmap to hw_params
so chip-specific CNSS features can be assigned to this field and
later assigned to qmi_wlanfw_host_cap_req_msg_v01 request.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/hw.c  | 5 +++++
 drivers/net/wireless/ath/ath12k/hw.h  | 2 ++
 drivers/net/wireless/ath/ath12k/qmi.c | 6 ++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index 1ffac7e3deaa..cc47cbf93f6b 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -906,6 +906,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 
 		.hal_ops = &hal_qcn9274_ops,
 
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
 	},
 	{
 		.name = "wcn7850 hw2.0",
@@ -960,6 +961,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.wmi_init = ath12k_wmi_init_wcn7850,
 
 		.hal_ops = &hal_wcn7850_ops,
+
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
 	},
 	{
 		.name = "qcn9274 hw2.0",
@@ -1013,6 +1016,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.wmi_init = ath12k_wmi_init_qcn9274,
 
 		.hal_ops = &hal_qcn9274_ops,
+
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h
index e3461004188b..e6c4223c283c 100644
--- a/drivers/net/wireless/ath/ath12k/hw.h
+++ b/drivers/net/wireless/ath/ath12k/hw.h
@@ -184,6 +184,8 @@ struct ath12k_hw_params {
 			 struct ath12k_wmi_resource_config_arg *config);
 
 	const struct hal_ops *hal_ops;
+
+	u64 qmi_cnss_feature_bitmap;
 };
 
 struct ath12k_hw_ops {
diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index 03ba245fbee9..4afba76b90fe 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -1942,8 +1942,10 @@ static int ath12k_qmi_host_cap_send(struct ath12k_base *ab)
 	req.cal_done_valid = 1;
 	req.cal_done = ab->qmi.cal_done;
 
-	req.feature_list_valid = 1;
-	req.feature_list = BIT(CNSS_QDSS_CFG_MISS_V01);
+	if (ab->hw_params->qmi_cnss_feature_bitmap) {
+		req.feature_list_valid = 1;
+		req.feature_list = ab->hw_params->qmi_cnss_feature_bitmap;
+	}
 
 	/* BRINGUP: here we are piggybacking a lot of stuff using
 	 * internal_sleep_clock, should it be split?
-- 
2.25.1


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

* [PATCH 1/2] wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
@ 2023-04-04  3:20   ` Carl Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Carl Huang @ 2023-04-04  3:20 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_cjhuang

Currently CNSS(Connectivity Subsystem) feature is assigned to
qmi_wlanfw_host_cap_req_msg_v01 request directly, this prevents
chip-specific CNSS features from being added easily.

Fix it by adding a new field qmi_cnss_feature_bitmap to hw_params
so chip-specific CNSS features can be assigned to this field and
later assigned to qmi_wlanfw_host_cap_req_msg_v01 request.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/hw.c  | 5 +++++
 drivers/net/wireless/ath/ath12k/hw.h  | 2 ++
 drivers/net/wireless/ath/ath12k/qmi.c | 6 ++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index 1ffac7e3deaa..cc47cbf93f6b 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -906,6 +906,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 
 		.hal_ops = &hal_qcn9274_ops,
 
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
 	},
 	{
 		.name = "wcn7850 hw2.0",
@@ -960,6 +961,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.wmi_init = ath12k_wmi_init_wcn7850,
 
 		.hal_ops = &hal_wcn7850_ops,
+
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
 	},
 	{
 		.name = "qcn9274 hw2.0",
@@ -1013,6 +1016,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 		.wmi_init = ath12k_wmi_init_qcn9274,
 
 		.hal_ops = &hal_qcn9274_ops,
+
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h
index e3461004188b..e6c4223c283c 100644
--- a/drivers/net/wireless/ath/ath12k/hw.h
+++ b/drivers/net/wireless/ath/ath12k/hw.h
@@ -184,6 +184,8 @@ struct ath12k_hw_params {
 			 struct ath12k_wmi_resource_config_arg *config);
 
 	const struct hal_ops *hal_ops;
+
+	u64 qmi_cnss_feature_bitmap;
 };
 
 struct ath12k_hw_ops {
diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index 03ba245fbee9..4afba76b90fe 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -1942,8 +1942,10 @@ static int ath12k_qmi_host_cap_send(struct ath12k_base *ab)
 	req.cal_done_valid = 1;
 	req.cal_done = ab->qmi.cal_done;
 
-	req.feature_list_valid = 1;
-	req.feature_list = BIT(CNSS_QDSS_CFG_MISS_V01);
+	if (ab->hw_params->qmi_cnss_feature_bitmap) {
+		req.feature_list_valid = 1;
+		req.feature_list = ab->hw_params->qmi_cnss_feature_bitmap;
+	}
 
 	/* BRINGUP: here we are piggybacking a lot of stuff using
 	 * internal_sleep_clock, should it be split?
-- 
2.25.1


-- 
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k

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

* [PATCH 2/2] wifi: ath12k: set PERST pin no pull request for WCN7850
  2023-04-04  3:20 ` Carl Huang
@ 2023-04-04  3:20   ` Carl Huang
  -1 siblings, 0 replies; 8+ messages in thread
From: Carl Huang @ 2023-04-04  3:20 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_cjhuang

The PCIe PERST pin is currently pulled down on WCN7850 and it causes
some power leakage.

Fix it by notifying firmware not to pull down PCIe PERST pin in QMI
message for WCN7850.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/hw.c  | 3 ++-
 drivers/net/wireless/ath/ath12k/qmi.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index cc47cbf93f6b..5991cc91cd00 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -962,7 +962,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 
 		.hal_ops = &hal_wcn7850_ops,
 
-		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01) |
+					   BIT(CNSS_PCIE_PERST_NO_PULL_V01),
 	},
 	{
 		.name = "qcn9274 hw2.0",
diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h
index ad87f19903db..df76149c49f5 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.h
+++ b/drivers/net/wireless/ath/ath12k/qmi.h
@@ -189,6 +189,7 @@ struct wlfw_host_mlo_chip_info_s_v01 {
 enum ath12k_qmi_cnss_feature {
 	CNSS_FEATURE_MIN_ENUM_VAL_V01 = INT_MIN,
 	CNSS_QDSS_CFG_MISS_V01 = 3,
+	CNSS_PCIE_PERST_NO_PULL_V01 = 4,
 	CNSS_MAX_FEATURE_V01 = 64,
 	CNSS_FEATURE_MAX_ENUM_VAL_V01 = INT_MAX,
 };
-- 
2.25.1


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

* [PATCH 2/2] wifi: ath12k: set PERST pin no pull request for WCN7850
@ 2023-04-04  3:20   ` Carl Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Carl Huang @ 2023-04-04  3:20 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_cjhuang

The PCIe PERST pin is currently pulled down on WCN7850 and it causes
some power leakage.

Fix it by notifying firmware not to pull down PCIe PERST pin in QMI
message for WCN7850.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/hw.c  | 3 ++-
 drivers/net/wireless/ath/ath12k/qmi.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index cc47cbf93f6b..5991cc91cd00 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -962,7 +962,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
 
 		.hal_ops = &hal_wcn7850_ops,
 
-		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
+		.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01) |
+					   BIT(CNSS_PCIE_PERST_NO_PULL_V01),
 	},
 	{
 		.name = "qcn9274 hw2.0",
diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h
index ad87f19903db..df76149c49f5 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.h
+++ b/drivers/net/wireless/ath/ath12k/qmi.h
@@ -189,6 +189,7 @@ struct wlfw_host_mlo_chip_info_s_v01 {
 enum ath12k_qmi_cnss_feature {
 	CNSS_FEATURE_MIN_ENUM_VAL_V01 = INT_MIN,
 	CNSS_QDSS_CFG_MISS_V01 = 3,
+	CNSS_PCIE_PERST_NO_PULL_V01 = 4,
 	CNSS_MAX_FEATURE_V01 = 64,
 	CNSS_FEATURE_MAX_ENUM_VAL_V01 = INT_MAX,
 };
-- 
2.25.1


-- 
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k

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

* Re: [PATCH 1/2] wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
  2023-04-04  3:20   ` Carl Huang
@ 2023-04-26 14:30     ` Kalle Valo
  -1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2023-04-26 14:30 UTC (permalink / raw)
  To: Carl Huang; +Cc: ath12k, linux-wireless, quic_cjhuang

Carl Huang <quic_cjhuang@quicinc.com> wrote:

> Currently the CNSS (Connectivity Subsystem) QMI feature is assigned to
> qmi_wlanfw_host_cap_req_msg_v01 request directly, this prevents chip-specific
> CNSS features from being added easily.
> 
> Solve this by adding a new field qmi_cnss_feature_bitmap to hw_params so
> chip-specific CNSS features can be assigned to this field and later assigned to
> qmi_wlanfw_host_cap_req_msg_v01 request.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

2 patches applied to ath-next branch of ath.git, thanks.

9981a3ac5887 wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
34c5625a459a wifi: ath12k: set PERST pin no pull request for WCN7850

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230404032057.3236122-2-quic_cjhuang@quicinc.com/

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


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

* Re: [PATCH 1/2] wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
@ 2023-04-26 14:30     ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2023-04-26 14:30 UTC (permalink / raw)
  To: Carl Huang; +Cc: ath12k, linux-wireless, quic_cjhuang

Carl Huang <quic_cjhuang@quicinc.com> wrote:

> Currently the CNSS (Connectivity Subsystem) QMI feature is assigned to
> qmi_wlanfw_host_cap_req_msg_v01 request directly, this prevents chip-specific
> CNSS features from being added easily.
> 
> Solve this by adding a new field qmi_cnss_feature_bitmap to hw_params so
> chip-specific CNSS features can be assigned to this field and later assigned to
> qmi_wlanfw_host_cap_req_msg_v01 request.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

2 patches applied to ath-next branch of ath.git, thanks.

9981a3ac5887 wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters
34c5625a459a wifi: ath12k: set PERST pin no pull request for WCN7850

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230404032057.3236122-2-quic_cjhuang@quicinc.com/

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


-- 
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k

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

end of thread, other threads:[~2023-04-26 14:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04  3:20 [PATCH 0/2] wifi: ath12k: Not pull PCIe PERST pin for WCN7850 Carl Huang
2023-04-04  3:20 ` Carl Huang
2023-04-04  3:20 ` [PATCH 1/2] wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters Carl Huang
2023-04-04  3:20   ` Carl Huang
2023-04-26 14:30   ` Kalle Valo
2023-04-26 14:30     ` Kalle Valo
2023-04-04  3:20 ` [PATCH 2/2] wifi: ath12k: set PERST pin no pull request for WCN7850 Carl Huang
2023-04-04  3:20   ` Carl Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.