public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device
@ 2026-03-10 23:02 Dmitry Baryshkov
  2026-03-10 23:02 ` [PATCH v4 1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips Dmitry Baryshkov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2026-03-10 23:02 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio,
	Marcel Holtmann, Luiz Augusto von Dentz, Matthias Kaehlcke,
	Balakrishna Godavarthi, Harish Bandi
  Cc: linux-arm-msm, linux-bluetooth, linux-pm, linux-kernel,
	Bartosz Golaszewski

Qualcomm WCN3950, WCN3988 and WCN399x families of WiFi/BT chips preceed
the later WCN / QCA devices, but they still incorporate a very simple
PMU on die. It controls internal on-chip power networks, but, most
importantly, it also requires a certain start-up procedure (first bring
up VDD_IO, then bring up other voltages). In order to further unify code
supporting different families of QCA / WCN chips and in order to
maintain the required power up sequence, properly represent these chips
in DTs and modify drivers to use power sequencing for these chips.

Backwards compatibility with the existing DTs is retained by keeping the
regulator&clock code in the drivers as a fallback.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v4:
- Rebased on linux-next, fixing the merge conflict.
- Dropped arm64 patches for now, retaining only Bluetooth patches.
- Reordered patches, putting fix in front of the feature patch.
- Link to v3: https://lore.kernel.org/r/20260119-wcn3990-pwrctl-v3-0-948df19f5ec2@oss.qualcomm.com

Changes in v3:
- Dropped patches accepted by maintainers
- Changed ath10k to call pwrseq_power_on() unconditionally (Jeff)
- Added copyright headers to the changed ath10k files (Jeff)
- Link to v2: https://lore.kernel.org/r/20260106-wcn3990-pwrctl-v2-0-0386204328be@oss.qualcomm.com

Changes in v2:
- Split the WCN39xx PMU schema from the qcom,qca6390-pmu.yaml
  (Krzysztof)
- Expanded the comment in the WiFi driver (Bartosz)
- Changed vddrfa1p3-supply to vddrf-supply.
- Link to v1: https://lore.kernel.org/r/20251231-wcn3990-pwrctl-v1-0-1ff4d6028ad5@oss.qualcomm.com

---
Dmitry Baryshkov (2):
      Bluetooth: qca: fix ROM version reading on WCN3998 chips
      Bluetooth: qca: enable pwrseq support for WCN39xx devices

 drivers/bluetooth/btqca.c   |  2 ++
 drivers/bluetooth/hci_qca.c | 26 ++++++++++++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)
---
base-commit: a0ae2a256046c0c5d3778d1a194ff2e171f16e5f
change-id: 20251229-wcn3990-pwrctl-cfa64f9d8167

Best regards,
-- 
With best wishes
Dmitry


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

* [PATCH v4 1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips
  2026-03-10 23:02 [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device Dmitry Baryshkov
@ 2026-03-10 23:02 ` Dmitry Baryshkov
  2026-03-10 23:45   ` Bluetooth: extend WCN driver to support WCN399x device bluez.test.bot
  2026-03-10 23:02 ` [PATCH v4 2/2] Bluetooth: qca: enable pwrseq support for WCN39xx devices Dmitry Baryshkov
  2026-03-12 17:50 ` [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device patchwork-bot+bluetooth
  2 siblings, 1 reply; 5+ messages in thread
From: Dmitry Baryshkov @ 2026-03-10 23:02 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio,
	Marcel Holtmann, Luiz Augusto von Dentz, Matthias Kaehlcke,
	Balakrishna Godavarthi, Harish Bandi
  Cc: linux-arm-msm, linux-bluetooth, linux-pm, linux-kernel,
	Bartosz Golaszewski

WCN3998 uses a bit different format for rom version:

[    5.479978] Bluetooth: hci0: setting up wcn399x
[    5.633763] Bluetooth: hci0: QCA Product ID   :0x0000000a
[    5.645350] Bluetooth: hci0: QCA SOC Version  :0x40010224
[    5.650906] Bluetooth: hci0: QCA ROM Version  :0x00001001
[    5.665173] Bluetooth: hci0: QCA Patch Version:0x00006699
[    5.679356] Bluetooth: hci0: QCA controller version 0x02241001
[    5.691109] Bluetooth: hci0: QCA Downloading qca/crbtfw21.tlv
[    6.680102] Bluetooth: hci0: QCA Downloading qca/crnv21.bin
[    6.842948] Bluetooth: hci0: QCA setup on UART is completed

Fixes: 523760b7ff88 ("Bluetooth: hci_qca: Added support for WCN3998")
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/bluetooth/btqca.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 9f7e13fcb20e..dda76365726f 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -787,6 +787,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 	 */
 	if (soc_type == QCA_WCN3988)
 		rom_ver = ((soc_ver & 0x00000f00) >> 0x05) | (soc_ver & 0x0000000f);
+	else if (soc_type == QCA_WCN3998)
+		rom_ver = ((soc_ver & 0x0000f000) >> 0x07) | (soc_ver & 0x0000000f);
 	else
 		rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
 

-- 
2.47.3


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

* [PATCH v4 2/2] Bluetooth: qca: enable pwrseq support for WCN39xx devices
  2026-03-10 23:02 [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device Dmitry Baryshkov
  2026-03-10 23:02 ` [PATCH v4 1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips Dmitry Baryshkov
@ 2026-03-10 23:02 ` Dmitry Baryshkov
  2026-03-12 17:50 ` [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device patchwork-bot+bluetooth
  2 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2026-03-10 23:02 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio,
	Marcel Holtmann, Luiz Augusto von Dentz, Matthias Kaehlcke,
	Balakrishna Godavarthi, Harish Bandi
  Cc: linux-arm-msm, linux-bluetooth, linux-pm, linux-kernel,
	Bartosz Golaszewski

The WCN39xx family of WiFi/BT chips incorporates a simple PMU, spreading
voltages over internal rails. Implement support for using powersequencer
for this family of QCA devices in addition to using regulators.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/bluetooth/hci_qca.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index d6e78201a675..c17a462aef55 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2241,6 +2241,18 @@ static void qca_power_off(struct hci_uart *hu)
 	qcadev = serdev_device_get_drvdata(hu->serdev);
 	power = qcadev->bt_power;
 
+	switch (soc_type) {
+	case QCA_WCN3988:
+	case QCA_WCN3990:
+	case QCA_WCN3991:
+	case QCA_WCN3998:
+		host_set_baudrate(hu, 2400);
+		qca_send_power_pulse(hu, false);
+		break;
+	default:
+		break;
+	}
+
 	if (power && power->pwrseq) {
 		pwrseq_power_off(power->pwrseq);
 		set_bit(QCA_BT_OFF, &qca->flags);
@@ -2252,8 +2264,6 @@ static void qca_power_off(struct hci_uart *hu)
 	case QCA_WCN3990:
 	case QCA_WCN3991:
 	case QCA_WCN3998:
-		host_set_baudrate(hu, 2400);
-		qca_send_power_pulse(hu, false);
 		qca_regulator_disable(qcadev);
 		break;
 
@@ -2425,6 +2435,11 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 	}
 
 	switch (qcadev->btsoc_type) {
+	case QCA_WCN3950:
+	case QCA_WCN3988:
+	case QCA_WCN3990:
+	case QCA_WCN3991:
+	case QCA_WCN3998:
 	case QCA_WCN6750:
 	case QCA_WCN6855:
 	case QCA_WCN7850:
@@ -2449,12 +2464,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 			else
 				break;
 		}
-		fallthrough;
-	case QCA_WCN3950:
-	case QCA_WCN3988:
-	case QCA_WCN3990:
-	case QCA_WCN3991:
-	case QCA_WCN3998:
+
 		qcadev->bt_power->dev = &serdev->dev;
 		err = qca_init_regulators(qcadev->bt_power, data->vregs,
 					  data->num_vregs);

-- 
2.47.3


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

* RE: Bluetooth: extend WCN driver to support WCN399x device
  2026-03-10 23:02 ` [PATCH v4 1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips Dmitry Baryshkov
@ 2026-03-10 23:45   ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-03-10 23:45 UTC (permalink / raw)
  To: linux-bluetooth, dmitry.baryshkov

[-- Attachment #1: Type: text/plain, Size: 2957 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1064679

---Test result---

Test Summary:
CheckPatch                    PENDING   0.24 seconds
GitLint                       PENDING   0.22 seconds
SubjectPrefix                 PASS      0.26 seconds
BuildKernel                   PASS      26.30 seconds
CheckAllWarning               PASS      28.60 seconds
CheckSparse                   WARNING   32.74 seconds
BuildKernel32                 PASS      25.45 seconds
TestRunnerSetup               PASS      561.20 seconds
TestRunner_l2cap-tester       PASS      29.11 seconds
TestRunner_iso-tester         PASS      64.34 seconds
TestRunner_bnep-tester        PASS      6.45 seconds
TestRunner_mgmt-tester        FAIL      125.41 seconds
TestRunner_rfcomm-tester      PASS      9.75 seconds
TestRunner_sco-tester         FAIL      14.66 seconds
TestRunner_ioctl-tester       PASS      10.38 seconds
TestRunner_mesh-tester        FAIL      12.45 seconds
TestRunner_smp-tester         PASS      8.99 seconds
TestRunner_userchan-tester    PASS      6.93 seconds
IncrementalBuild              PENDING   0.53 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
drivers/bluetooth/btqca.c:1045:1: error: bad constant expressiondrivers/bluetooth/btqca.c:1046:1: error: bad constant expressiondrivers/bluetooth/btqca.c:1047:1: error: bad constant expressiondrivers/bluetooth/btqca.c:1047:1: error: bad constant expression
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.107 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:
WARNING: possible circular locking dependency detected
BUG: sleeping function called from invalid context at net/core/sock.c:3782
Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    2.569 seconds
Mesh - Send cancel - 2                               Timed out    1.998 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device
  2026-03-10 23:02 [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device Dmitry Baryshkov
  2026-03-10 23:02 ` [PATCH v4 1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips Dmitry Baryshkov
  2026-03-10 23:02 ` [PATCH v4 2/2] Bluetooth: qca: enable pwrseq support for WCN39xx devices Dmitry Baryshkov
@ 2026-03-12 17:50 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2026-03-12 17:50 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: brgl, andersson, konradybcio, marcel, luiz.dentz, mka,
	quic_bgodavar, c-hbandi, linux-arm-msm, linux-bluetooth, linux-pm,
	linux-kernel, bartosz.golaszewski

Hello:

This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 11 Mar 2026 01:02:56 +0200 you wrote:
> Qualcomm WCN3950, WCN3988 and WCN399x families of WiFi/BT chips preceed
> the later WCN / QCA devices, but they still incorporate a very simple
> PMU on die. It controls internal on-chip power networks, but, most
> importantly, it also requires a certain start-up procedure (first bring
> up VDD_IO, then bring up other voltages). In order to further unify code
> supporting different families of QCA / WCN chips and in order to
> maintain the required power up sequence, properly represent these chips
> in DTs and modify drivers to use power sequencing for these chips.
> 
> [...]

Here is the summary with links:
  - [v4,1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips
    https://git.kernel.org/bluetooth/bluetooth-next/c/77a65e88b9b8
  - [v4,2/2] Bluetooth: qca: enable pwrseq support for WCN39xx devices
    https://git.kernel.org/bluetooth/bluetooth-next/c/a529ecf9f12c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-03-12 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 23:02 [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device Dmitry Baryshkov
2026-03-10 23:02 ` [PATCH v4 1/2] Bluetooth: qca: fix ROM version reading on WCN3998 chips Dmitry Baryshkov
2026-03-10 23:45   ` Bluetooth: extend WCN driver to support WCN399x device bluez.test.bot
2026-03-10 23:02 ` [PATCH v4 2/2] Bluetooth: qca: enable pwrseq support for WCN39xx devices Dmitry Baryshkov
2026-03-12 17:50 ` [PATCH v4 0/2] Bluetooth: extend WCN driver to support WCN399x device patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox