Skip to contentSkip to conversation

Bluetooth: power-on QCA6390 correctly

PATCH RESEND In review Bartosz Golaszewski 4 participants 9 messages Dec 8, 2023

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v2 cover Bluetooth: power-on QCA6390 correctly

From: Bartosz Golaszewski <[email protected]>

Resending with all maintainers in CC.

Patch 1 is just a typo fix as we're already touching this bindings. The second patch adds more regulator definitions and enforces them for the QCA6390 model. The final patch enables the power sequence for the BT module of QCA6390 in the hci_qca driver.

v1 -> v2:
- squashed the two bluetooth patches into one
- changed the naming convention for the RFA regulators to follow the existing ones
- added dt-bindings patches

Bartosz Golaszewski (3):
dt-bindings: net: bluetooth: qualcomm: fix a typo
dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390
Bluetooth: qca: run the power-on/off sequence for QCA6390 too

 .../net/bluetooth/qualcomm-bluetooth.yaml     | 26 ++++++++++++++++++-
 drivers/bluetooth/hci_qca.c                   | 14 +++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)
Signature · 1 line
2.40.1
#1 lore raw

PATCH RESEND v2 1/3 dt-bindings: net: bluetooth: qualcomm: fix a typo

From: Bartosz Golaszewski <[email protected]>

Spell supply correctly.

---
 .../devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml +1 -1
index eba2f3026ab0..ba8205f88e5f 100644
@@ -69,7 +69,7 @@ properties:
     description: VDD_RFA_CMN supply regulator handle
 
   vddrfa0p8-supply:
-    description: VDD_RFA_0P8 suppply regulator handle
+    description: VDD_RFA_0P8 supply regulator handle
 
   vddrfa1p7-supply:
     description: VDD_RFA_1P7 supply regulator handle
Signature · 1 line
2.40.1
#2 lore raw

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=808173

---Test result---

Test Summary:

CheckPatch                    PASS      1.97 seconds
GitLint                       FAIL      1.45 seconds
SubjectPrefix                 FAIL      0.69 seconds
BuildKernel                   PASS      28.63 seconds
CheckAllWarning               PASS      31.34 seconds
CheckSparse                   PASS      37.30 seconds
CheckSmatch                   PASS      101.04 seconds
BuildKernel32                 PASS      27.67 seconds
TestRunnerSetup               PASS      430.36 seconds
TestRunner_l2cap-tester       PASS      23.40 seconds
TestRunner_iso-tester         PASS      50.16 seconds
TestRunner_bnep-tester        PASS      7.24 seconds
TestRunner_mgmt-tester        FAIL      166.09 seconds
TestRunner_rfcomm-tester      PASS      11.38 seconds
TestRunner_sco-tester         PASS      14.92 seconds
TestRunner_ioctl-tester       PASS      12.37 seconds
TestRunner_mesh-tester        PASS      9.17 seconds
TestRunner_smp-tester         PASS      10.05 seconds
TestRunner_userchan-tester    PASS      7.77 seconds
IncrementalBuild              PASS      35.78 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[RESEND,v2,2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (81>80): "[RESEND,v2,2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390"
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 497, Passed: 496 (99.8%), Failed: 1, Not Run: 0

Failed Test Cases
LL Privacy - Start Discovery 2 (Disable RL) Failed 0.301 seconds

---
Regards,
Linux Bluetooth

#4 lore raw

PATCH RESEND v2 2/3 dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Add regulator properties for QCA6390 that are missing from the bindings and enforce required properties for this model as well.

---
 .../net/bluetooth/qualcomm-bluetooth.yaml     | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml +24 -0
index ba8205f88e5f..861663f280eb 100644
@@ -65,12 +65,21 @@ properties:
   vddbtcxmx-supply:
     description: VDD_BT_CXMX supply regulator handle
 
+  vddpmu-supply:
+    description: VDD_PMU supply regulator handle
+
   vddrfacmn-supply:
     description: VDD_RFA_CMN supply regulator handle
 
   vddrfa0p8-supply:
     description: VDD_RFA_0P8 supply regulator handle
 
+  vddrfa0p9-supply:
+    description: VDD_RFA_0P9 supply regulator handle
+
+  vddrfa1p3-supply:
+    description: VDD_RFA1P3 supply regulator handle
+
   vddrfa1p7-supply:
     description: VDD_RFA_1P7 supply regulator handle
 
@@ -180,6 +189,21 @@ allOf:
         - vddrfa0p8-supply
         - vddrfa1p2-supply
         - vddrfa1p9-supply
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,qca6390-bt
+    then:
+      required:
+        - enable-gpios
+        - vddio-supply
+        - vddpmu-supply
+        - vddaon-supply
+        - vddrfa0p9-supply
+        - vddrfa1p3-supply
+        - vddrfa1p9-supply
 
 examples:
   - |
Signature · 1 line
2.40.1
Reviewed-by on v2 2/3
#5 lore raw

Re: [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390

Quoted 9 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Add regulator properties for QCA6390 that are missing from the bindings and enforce required properties for this model as well.

---
 .../net/bluetooth/qualcomm-bluetooth.yaml     | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

Maybe we should split the binding... I'll take a look.

Best regards,
Krzysztof

#6 lore raw

PATCH RESEND v2 3/3 Bluetooth: qca: run the power-on/off sequence for QCA6390 too

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The Bluetooth module on QCA6390 needs to be powered-on by enabling the relevant regulators and driving the enable GPIO high. We can reuse the power sequence for the WNC models if we add the list of required regulators to the OF match data.

---
 drivers/bluetooth/hci_qca.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/bluetooth/hci_qca.c +13 -1
index 35f74f209d1f..b27be08a1f6f 100644
@@ -1788,6 +1788,7 @@ static int qca_power_on(struct hci_dev *hdev)
 	case QCA_WCN6750:
 	case QCA_WCN6855:
 	case QCA_WCN7850:
+	case QCA_QCA6390:
 		ret = qca_regulator_init(hu);
 		break;
 
@@ -2044,7 +2045,15 @@ static const struct qca_device_data qca_soc_data_qca2066 __maybe_unused = {
 
 static const struct qca_device_data qca_soc_data_qca6390 __maybe_unused = {
 	.soc_type = QCA_QCA6390,
-	.num_vregs = 0,
+	.vregs = (struct qca_vreg []) {
+		{ "vddio", 20000 },
+		{ "vddaon", 100000 },
+		{ "vddpmu", 1250000 },
+		{ "vddrfa0p9", 200000 },
+		{ "vddrfa1p3", 400000 },
+		{ "vddrfa1p9", 400000 },
+	},
+	.num_vregs = 6,
 };
 
 static const struct qca_device_data qca_soc_data_wcn6750 __maybe_unused = {
@@ -2129,6 +2138,7 @@ static void qca_power_shutdown(struct hci_uart *hu)
 
 	case QCA_WCN6750:
 	case QCA_WCN6855:
+	case QCA_QCA6390:
 		gpiod_set_value_cansleep(qcadev->bt_en, 0);
 		msleep(100);
 		qca_regulator_disable(qcadev);
@@ -2276,6 +2286,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 	case QCA_WCN6750:
 	case QCA_WCN6855:
 	case QCA_WCN7850:
+	case QCA_QCA6390:
 		qcadev->bt_power = devm_kzalloc(&serdev->dev,
 						sizeof(struct qca_power),
 						GFP_KERNEL);
@@ -2386,6 +2397,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)
 	case QCA_WCN6750:
 	case QCA_WCN6855:
 	case QCA_WCN7850:
+	case QCA_QCA6390:
 		if (power->vregs_on) {
 			qca_power_shutdown(&qcadev->serdev_hu);
 			break;
Signature · 1 line
2.40.1
#7 lore raw
In reply to Bartosz Golaszewski
Quoted 9 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Resending with all maintainers in CC.

Patch 1 is just a typo fix as we're already touching this bindings. The second patch adds more regulator definitions and enforces them for the QCA6390 model. The final patch enables the power sequence for the BT module of QCA6390 in the hci_qca driver.

Is bluetooth fully functional without handling WLAN specific resources like regulators, enable GPIO? When I checked last time, the chip requires both Bluetooth and WLAN resources to become fully operational.

- Mani

Quoted 19 lines

v1 -> v2:
- squashed the two bluetooth patches into one
- changed the naming convention for the RFA regulators to follow the existing ones
- added dt-bindings patches

Bartosz Golaszewski (3):
dt-bindings: net: bluetooth: qualcomm: fix a typo
dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390
Bluetooth: qca: run the power-on/off sequence for QCA6390 too

 .../net/bluetooth/qualcomm-bluetooth.yaml     | 26 ++++++++++++++++++-
 drivers/bluetooth/hci_qca.c                   | 14 +++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)
Signature · 1 line
2.40.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
#8 lore raw
Quoted 12 lines · Manivannan Sadhasivam
Quoted 9 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Resending with all maintainers in CC.

Patch 1 is just a typo fix as we're already touching this bindings. The second patch adds more regulator definitions and enforces them for the QCA6390 model. The final patch enables the power sequence for the BT module of QCA6390 in the hci_qca driver.

Quoted 4 lines

Is bluetooth fully functional without handling WLAN specific resources like regulators, enable GPIO? When I checked last time, the chip requires both Bluetooth and WLAN resources to become fully operational.

WLAN-specific regulators for PCIe are enabled anyway but the WLAN enable GPIO is low and the relevant pin function is not even configured. I can confirm Bluetooth is functional.

I too thought we'd need a common power-sequence here but Abel pointed out that neither RB5 nor X13s require it, it's only needed in later models.

Bart

Quoted 24 lines

- Mani

Quoted 11 lines

v1 -> v2:
- squashed the two bluetooth patches into one
- changed the naming convention for the RFA regulators to follow the existing ones
- added dt-bindings patches

Bartosz Golaszewski (3):
dt-bindings: net: bluetooth: qualcomm: fix a typo
dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390
Bluetooth: qca: run the power-on/off sequence for QCA6390 too

Quoted 8 lines
 .../net/bluetooth/qualcomm-bluetooth.yaml     | 26 ++++++++++++++++++-
 drivers/bluetooth/hci_qca.c                   | 14 +++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)

--
2.40.1

--
மணிவண்ணன் சதாசிவம்