2023-12-08 09:10:52

by Bartosz Golaszewski

[permalink] [raw]
Subject: [RESEND PATCH v2 0/3] 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(-)

--
2.40.1



2023-12-08 09:10:55

by Bartosz Golaszewski

[permalink] [raw]
Subject: [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo

From: Bartosz Golaszewski <[email protected]>

Spell supply correctly.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
.../devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index eba2f3026ab0..ba8205f88e5f 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -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
--
2.40.1


2023-12-08 09:11:06

by Bartosz Golaszewski

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

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.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
.../net/bluetooth/qualcomm-bluetooth.yaml | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index ba8205f88e5f..861663f280eb 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -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:
- |
--
2.40.1


2023-12-08 09:11:17

by Bartosz Golaszewski

[permalink] [raw]
Subject: [RESEND PATCH v2 3/3] Bluetooth: qca: run the power-on/off sequence for QCA6390 too

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.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
drivers/bluetooth/hci_qca.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 35f74f209d1f..b27be08a1f6f 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -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;
--
2.40.1


2023-12-08 09:57:37

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: power-on QCA6390 correctly

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

2023-12-08 10:22:22

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo

On 08/12/2023 10:09, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
>
> Spell supply correctly.
>
> Signed-off-by: Bartosz Golaszewski <[email protected]>
> ---

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-12-08 10:33:09

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly

On Fri, Dec 08, 2023 at 10:09:33AM +0100, Bartosz Golaszewski wrote:
> 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

> 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(-)
>
> --
> 2.40.1
>
>

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

2023-12-08 10:57:12

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly

On Fri, Dec 8, 2023 at 11:32 AM Manivannan Sadhasivam
<[email protected]> wrote:
>
> On Fri, Dec 08, 2023 at 10:09:33AM +0100, Bartosz Golaszewski wrote:
> > 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.
>

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

> - Mani
>
> > 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(-)
> >
> > --
> > 2.40.1
> >
> >
>
> --
> மணிவண்ணன் சதாசிவம்