devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly
@ 2023-12-08  9:09 Bartosz Golaszewski
  2023-12-08  9:09 ` [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-12-08  9:09 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Balakrishna Godavarthi, Rocky Liao, Alex Elder, Srini Kandagatla
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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


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

* [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo
  2023-12-08  9:09 [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Bartosz Golaszewski
@ 2023-12-08  9:09 ` Bartosz Golaszewski
  2023-12-08 10:22   ` Krzysztof Kozlowski
  2023-12-08  9:09 ` [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390 Bartosz Golaszewski
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-12-08  9:09 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Balakrishna Godavarthi, Rocky Liao, Alex Elder, Srini Kandagatla
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Spell supply correctly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 .../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


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

* [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390
  2023-12-08  9:09 [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Bartosz Golaszewski
  2023-12-08  9:09 ` [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo Bartosz Golaszewski
@ 2023-12-08  9:09 ` Bartosz Golaszewski
  2023-12-08 10:24   ` Krzysztof Kozlowski
  2023-12-08  9:09 ` [RESEND PATCH v2 3/3] Bluetooth: qca: run the power-on/off sequence for QCA6390 too Bartosz Golaszewski
  2023-12-08 10:32 ` [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Manivannan Sadhasivam
  3 siblings, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-12-08  9:09 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Balakrishna Godavarthi, Rocky Liao, Alex Elder, Srini Kandagatla
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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 <bartosz.golaszewski@linaro.org>
---
 .../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


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

* [RESEND PATCH v2 3/3] Bluetooth: qca: run the power-on/off sequence for QCA6390 too
  2023-12-08  9:09 [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Bartosz Golaszewski
  2023-12-08  9:09 ` [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo Bartosz Golaszewski
  2023-12-08  9:09 ` [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390 Bartosz Golaszewski
@ 2023-12-08  9:09 ` Bartosz Golaszewski
  2023-12-08 10:32 ` [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Manivannan Sadhasivam
  3 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-12-08  9:09 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Balakrishna Godavarthi, Rocky Liao, Alex Elder, Srini Kandagatla
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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 <bartosz.golaszewski@linaro.org>
---
 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


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

* Re: [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo
  2023-12-08  9:09 ` [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo Bartosz Golaszewski
@ 2023-12-08 10:22   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:22 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Balakrishna Godavarthi, Rocky Liao, Alex Elder,
	Srini Kandagatla
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

On 08/12/2023 10:09, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Spell supply correctly.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390
  2023-12-08  9:09 ` [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390 Bartosz Golaszewski
@ 2023-12-08 10:24   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:24 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Balakrishna Godavarthi, Rocky Liao, Alex Elder,
	Srini Kandagatla
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

On 08/12/2023 10:09, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> 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 <bartosz.golaszewski@linaro.org>
> ---
>  .../net/bluetooth/qualcomm-bluetooth.yaml     | 24 +++++++++++++++++++
>  1 file changed, 24 insertions(+)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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


Best regards,
Krzysztof


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

* Re: [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly
  2023-12-08  9:09 [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2023-12-08  9:09 ` [RESEND PATCH v2 3/3] Bluetooth: qca: run the power-on/off sequence for QCA6390 too Bartosz Golaszewski
@ 2023-12-08 10:32 ` Manivannan Sadhasivam
  2023-12-08 10:56   ` Bartosz Golaszewski
  3 siblings, 1 reply; 8+ messages in thread
From: Manivannan Sadhasivam @ 2023-12-08 10:32 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Balakrishna Godavarthi, Rocky Liao, Alex Elder, Srini Kandagatla,
	linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

On Fri, Dec 08, 2023 at 10:09:33AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> 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
> 
> 

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

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

* Re: [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly
  2023-12-08 10:32 ` [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Manivannan Sadhasivam
@ 2023-12-08 10:56   ` Bartosz Golaszewski
  0 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-12-08 10:56 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Abel Vesa
  Cc: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Balakrishna Godavarthi, Rocky Liao, Alex Elder, Srini Kandagatla,
	linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

On Fri, Dec 8, 2023 at 11:32 AM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>
> On Fri, Dec 08, 2023 at 10:09:33AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > 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
> >
> >
>
> --
> மணிவண்ணன் சதாசிவம்

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

end of thread, other threads:[~2023-12-08 10:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08  9:09 [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Bartosz Golaszewski
2023-12-08  9:09 ` [RESEND PATCH v2 1/3] dt-bindings: net: bluetooth: qualcomm: fix a typo Bartosz Golaszewski
2023-12-08 10:22   ` Krzysztof Kozlowski
2023-12-08  9:09 ` [RESEND PATCH v2 2/3] dt-bindings: net: bluetooth: qualcomm: add regulators for QCA6390 Bartosz Golaszewski
2023-12-08 10:24   ` Krzysztof Kozlowski
2023-12-08  9:09 ` [RESEND PATCH v2 3/3] Bluetooth: qca: run the power-on/off sequence for QCA6390 too Bartosz Golaszewski
2023-12-08 10:32 ` [RESEND PATCH v2 0/3] Bluetooth: power-on QCA6390 correctly Manivannan Sadhasivam
2023-12-08 10:56   ` Bartosz Golaszewski

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).