public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
@ 2024-07-09 12:18 Bartosz Golaszewski
  2024-07-09 12:18 ` [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
	Rocky Liao, Bjorn Andersson, Konrad Dybcio
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

The following series extend the usage of the power sequencing subsystem
in the hci_qca driver.

The end goal is to convert the entire driver to be exclusively pwrseq-based
and simplify it in the process. However due to a large number of users we
need to be careful and consider every case separately.

Right now the only model that fully uses the power sequencer is QCA6390 on
the RB5 board. The next steps are enabling pwrseq for Bluetooth on sm8650
and the X13s laptop. To that end we need to make wcn7850 and wcn6855 aware
of the power sequencing but also keep backward compatibility with older
device trees.

This series contains changes to mainline DT bindings for wcn7850, some
refactoring of the hci_qca driver, making pwrseq the default for the two
models mentioned above and finally modifies the device-tree for sm8650-qrd
to correctly represent the way the Bluetooth module is powered.

I made the last patch part of this series as it has a run-time dependency
on previous changes in it and bluetooth support on the board will break
without them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Changes in v3:
- Add a missing break in a switch case
- Link to v2: https://lore.kernel.org/r/20240708-hci_qca_refactor-v2-0-b6e83b3d1ca5@linaro.org

Changes in v2:
- Fix a switch issue reported by the test bot
- Link to v1: https://lore.kernel.org/r/20240705-hci_qca_refactor-v1-0-e2442121c13e@linaro.org

---
Bartosz Golaszewski (6):
      dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
      Bluetooth: hci_qca: schedule a devm action for disabling the clock
      Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
      Bluetooth: hci_qca: make pwrseq calls the default if available
      Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
      arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth

 .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 18 +++--
 arch/arm64/boot/dts/qcom/sm8650-qrd.dts            | 28 +++----
 drivers/bluetooth/hci_qca.c                        | 87 +++++++++++++---------
 3 files changed, 72 insertions(+), 61 deletions(-)
---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240704-hci_qca_refactor-0770e9931fb4

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH v2 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
@ 2024-07-08  9:39 Bartosz Golaszewski
  2024-07-08 10:15 ` Bluetooth: hci_qca: use the power sequencer " bluez.test.bot
  0 siblings, 1 reply; 17+ messages in thread
From: Bartosz Golaszewski @ 2024-07-08  9:39 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
	Rocky Liao, Bjorn Andersson, Konrad Dybcio
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

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

Drop the inputs from the host and instead expect the Bluetooth node to
consume the outputs of the internal PMU. This model is closer to reality
than how we represent it now.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 .../bindings/net/bluetooth/qualcomm-bluetooth.yaml     | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index 48ac9f10ef05..68c5ed111417 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -77,6 +77,9 @@ properties:
   vddrfa1p7-supply:
     description: VDD_RFA_1P7 supply regulator handle
 
+  vddrfa1p8-supply:
+    description: VDD_RFA_1P8 supply regulator handle
+
   vddrfa1p2-supply:
     description: VDD_RFA_1P2 supply regulator handle
 
@@ -89,6 +92,12 @@ properties:
   vddasd-supply:
     description: VDD_ASD supply regulator handle
 
+  vddwlcx-supply:
+    description: VDD_WLCX supply regulator handle
+
+  vddwlmx-supply:
+    description: VDD_WLMX supply regulator handle
+
   max-speed:
     description: see Documentation/devicetree/bindings/serial/serial.yaml
 
@@ -179,14 +188,13 @@ allOf:
               - qcom,wcn7850-bt
     then:
       required:
-        - enable-gpios
-        - swctrl-gpios
-        - vddio-supply
+        - vddrfacmn-supply
         - vddaon-supply
-        - vdddig-supply
+        - vddwlcx-supply
+        - vddwlmx-supply
         - vddrfa0p8-supply
         - vddrfa1p2-supply
-        - vddrfa1p9-supply
+        - vddrfa1p8-supply
   - if:
       properties:
         compatible:

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread
* [PATCH 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
@ 2024-07-05 20:26 Bartosz Golaszewski
  2024-07-05 20:36 ` Bluetooth: hci_qca: use the power sequencer " bluez.test.bot
  0 siblings, 1 reply; 17+ messages in thread
From: Bartosz Golaszewski @ 2024-07-05 20:26 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
	Rocky Liao, Bjorn Andersson, Konrad Dybcio
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

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

Drop the inputs from the host and instead expect the Bluetooth node to
consume the outputs of the internal PMU. This model is closer to reality
than how we represent it now.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 .../bindings/net/bluetooth/qualcomm-bluetooth.yaml     | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index 48ac9f10ef05..68c5ed111417 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -77,6 +77,9 @@ properties:
   vddrfa1p7-supply:
     description: VDD_RFA_1P7 supply regulator handle
 
+  vddrfa1p8-supply:
+    description: VDD_RFA_1P8 supply regulator handle
+
   vddrfa1p2-supply:
     description: VDD_RFA_1P2 supply regulator handle
 
@@ -89,6 +92,12 @@ properties:
   vddasd-supply:
     description: VDD_ASD supply regulator handle
 
+  vddwlcx-supply:
+    description: VDD_WLCX supply regulator handle
+
+  vddwlmx-supply:
+    description: VDD_WLMX supply regulator handle
+
   max-speed:
     description: see Documentation/devicetree/bindings/serial/serial.yaml
 
@@ -179,14 +188,13 @@ allOf:
               - qcom,wcn7850-bt
     then:
       required:
-        - enable-gpios
-        - swctrl-gpios
-        - vddio-supply
+        - vddrfacmn-supply
         - vddaon-supply
-        - vdddig-supply
+        - vddwlcx-supply
+        - vddwlmx-supply
         - vddrfa0p8-supply
         - vddrfa1p2-supply
-        - vddrfa1p9-supply
+        - vddrfa1p8-supply
   - if:
       properties:
         compatible:

-- 
2.43.0


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

end of thread, other threads:[~2024-08-01  3:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
2024-07-09 12:25   ` Bluetooth: hci_qca: use the power sequencer " bluez.test.bot
2024-07-10 16:15   ` [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Rob Herring (Arm)
2024-07-09 12:18 ` [PATCH v3 2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device() Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 4/6] Bluetooth: hci_qca: make pwrseq calls the default if available Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855 Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth Bartosz Golaszewski
2024-07-09 13:24 ` [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 neil.armstrong
2024-07-10 19:50 ` patchwork-bot+bluetooth
2024-07-10 20:43   ` Luiz Augusto von Dentz
2024-07-10 22:08     ` Konrad Dybcio
2024-07-11  7:11       ` Bartosz Golaszewski
2024-08-01  3:22 ` (subset) " Bjorn Andersson
  -- strict thread matches above, loose matches on Subject: below --
2024-07-08  9:39 [PATCH v2 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
2024-07-08 10:15 ` Bluetooth: hci_qca: use the power sequencer " bluez.test.bot
2024-07-05 20:26 [PATCH 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
2024-07-05 20:36 ` Bluetooth: hci_qca: use the power sequencer " bluez.test.bot

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