All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] WAR to handle WCN6750 hardware issue
@ 2022-04-29 10:27 Balakrishna Godavarthi
  2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Balakrishna Godavarthi @ 2022-04-29 10:27 UTC (permalink / raw)
  To: agross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, marcel, johan.hedberg
  Cc: mka, linux-bluetooth, quic_hemantg, quic_saluvala, quic_rjliao,
	mcchou, Balakrishna Godavarthi

On WCN6750 sometimes observed AON power source takes 100ms
time to fully discharge voltage during OFF. As WCN6750 is
combo chip for WLAN and BT. If any of the tech area ON is
triggered during discharge phase, it fails to turn ON.
To overcome this hardware issue, During BT ON, driver check
for WLAN_EN pin status. If it high, it will pull BT_EN to high
immediately else it will wait for 100ms assuming WLAN was just
powered OFF and then BT_EN will be pulled to high.

Balakrishna Godavarthi (3):
  dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750
  arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node
  Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

 .../bindings/net/qualcomm-bluetooth.yaml           |  6 +++++
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi           |  1 +
 drivers/bluetooth/hci_qca.c                        | 30 +++++++++++++++++-----
 3 files changed, 31 insertions(+), 6 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750
  2022-04-29 10:27 [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Balakrishna Godavarthi
@ 2022-04-29 10:27 ` Balakrishna Godavarthi
  2022-04-29 12:00   ` WAR to handle WCN6750 hardware issue bluez.test.bot
                     ` (2 more replies)
  2022-04-29 10:27 ` [PATCH v1 2/3] arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node Balakrishna Godavarthi
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 17+ messages in thread
From: Balakrishna Godavarthi @ 2022-04-29 10:27 UTC (permalink / raw)
  To: agross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, marcel, johan.hedberg
  Cc: mka, linux-bluetooth, quic_hemantg, quic_saluvala, quic_rjliao,
	mcchou, Balakrishna Godavarthi

This patch adds a wlan-gpio entry and its reference usage for
BT SoC wcn6750.

Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
---
 Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
index f93c6e7..624f957 100644
--- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
@@ -24,6 +24,10 @@ properties:
       - qcom,qca6390-bt
       - qcom,wcn6750-bt
 
+  wlan-gpios:
+    maxItems: 1
+    description: gpio specifier used to wlan chip
+
   enable-gpios:
     maxItems: 1
     description: gpio specifier used to enable chip
@@ -123,6 +127,7 @@ allOf:
               - qcom,wcn6750-bt
     then:
       required:
+        - wlan-gpios
         - enable-gpios
         - swctrl-gpios
         - vddio-supply
@@ -166,6 +171,7 @@ examples:
             compatible = "qcom,wcn6750-bt";
             pinctrl-names = "default";
             pinctrl-0 = <&bt_en_default>;
+            wlan-gpios = <&tlmm 84 GPIO_ACTIVE_HIGH>;
             enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
             swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
             vddio-supply = <&vreg_l19b_1p8>;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v1 2/3] arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node
  2022-04-29 10:27 [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Balakrishna Godavarthi
  2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
@ 2022-04-29 10:27 ` Balakrishna Godavarthi
  2022-04-29 10:27 ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue Balakrishna Godavarthi
  2022-06-22  7:33 ` [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Dmitry Baryshkov
  3 siblings, 0 replies; 17+ messages in thread
From: Balakrishna Godavarthi @ 2022-04-29 10:27 UTC (permalink / raw)
  To: agross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, marcel, johan.hedberg
  Cc: mka, linux-bluetooth, quic_hemantg, quic_saluvala, quic_rjliao,
	mcchou, Balakrishna Godavarthi

Add wlan_enable gpio details in bluetooth node, As wlan enable gpio
status is required to enable bt.

Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index ecbf2b8..c556e8a 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -341,6 +341,7 @@
 		pinctrl-0 = <&bt_en>, <&sw_ctrl>;
 		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
 		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+		wlan-gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
 		vddaon-supply = <&vreg_s7b_0p9>;
 		vddbtcxmx-supply = <&vreg_s7b_0p9>;
 		vddrfacmn-supply = <&vreg_s7b_0p9>;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-04-29 10:27 [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Balakrishna Godavarthi
  2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
  2022-04-29 10:27 ` [PATCH v1 2/3] arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node Balakrishna Godavarthi
@ 2022-04-29 10:27 ` Balakrishna Godavarthi
  2022-04-29 14:54   ` Marcel Holtmann
                     ` (2 more replies)
  2022-06-22  7:33 ` [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Dmitry Baryshkov
  3 siblings, 3 replies; 17+ messages in thread
From: Balakrishna Godavarthi @ 2022-04-29 10:27 UTC (permalink / raw)
  To: agross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, marcel, johan.hedberg
  Cc: mka, linux-bluetooth, quic_hemantg, quic_saluvala, quic_rjliao,
	mcchou, Balakrishna Godavarthi

The patch is workaround for hardware issue on WCN6750.
On WCN6750 sometimes observed AON power source takes 100ms
time to fully discharge voltage during OFF. As WCN6750 is
combo chip for WLAN and BT. If any of the tech area ON is
triggered during discharge phase, it fails to turn ON.
To overcome this hardware issue, During BT ON, driver check
for WLAN_EN pin status. If it high, it will pull BT_EN to high
immediately else it will wait for 100ms assuming WLAN was just
powered OFF and then BT_EN will be pulled to high.

Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6750")
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
---
 drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index eab34e2..c3862d1 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -219,6 +219,7 @@ struct qca_serdev {
 	struct hci_uart	 serdev_hu;
 	struct gpio_desc *bt_en;
 	struct gpio_desc *sw_ctrl;
+	struct gpio_desc *wlan_en;
 	struct clk	 *susclk;
 	enum qca_btsoc_type btsoc_type;
 	struct qca_power *bt_power;
@@ -1627,12 +1628,25 @@ static int qca_regulator_init(struct hci_uart *hu)
 	if (qcadev->bt_en) {
 		gpiod_set_value_cansleep(qcadev->bt_en, 0);
 		msleep(50);
+	}
+
+	if (!qcadev->wlan_en || (qcadev->wlan_en && gpiod_get_value_cansleep(qcadev->wlan_en)))
+		gpiod_set_value_cansleep(qcadev->bt_en, 1);
+
+	if (qcadev->wlan_en && !gpiod_get_value_cansleep(qcadev->wlan_en)) {
+		gpiod_set_value_cansleep(qcadev->bt_en, 0);
+		msleep(100);
 		gpiod_set_value_cansleep(qcadev->bt_en, 1);
-		msleep(50);
-		if (qcadev->sw_ctrl) {
-			sw_ctrl_state = gpiod_get_value_cansleep(qcadev->sw_ctrl);
-			bt_dev_dbg(hu->hdev, "SW_CTRL is %d", sw_ctrl_state);
-		}
+	}
+
+	if (!gpiod_get_value_cansleep(qcadev->bt_en))
+		gpiod_set_value_cansleep(qcadev->bt_en, 1);
+
+	msleep(50);
+
+	if (qcadev->sw_ctrl) {
+		sw_ctrl_state = gpiod_get_value_cansleep(qcadev->sw_ctrl);
+		bt_dev_dbg(hu->hdev, "SW_CTRL is %d", sw_ctrl_state);
 	}
 
 	qca_set_speed(hu, QCA_INIT_SPEED);
@@ -1906,8 +1920,8 @@ static void qca_power_shutdown(struct hci_uart *hu)
 		qca_regulator_disable(qcadev);
 	} else if (soc_type == QCA_WCN6750) {
 		gpiod_set_value_cansleep(qcadev->bt_en, 0);
-		msleep(100);
 		qca_regulator_disable(qcadev);
+		msleep(100);
 		if (qcadev->sw_ctrl) {
 			sw_ctrl_state = gpiod_get_value_cansleep(qcadev->sw_ctrl);
 			bt_dev_dbg(hu->hdev, "SW_CTRL is %d", sw_ctrl_state);
@@ -2057,6 +2071,10 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 
 		qcadev->bt_power->vregs_on = false;
 
+		qcadev->wlan_en = devm_gpiod_get_optional(&serdev->dev, "wlan", GPIOD_ASIS);
+		if (!qcadev->wlan_en && data->soc_type == QCA_WCN6750)
+			dev_err(&serdev->dev, "failed to acquire WL_EN gpio");
+
 		qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
 					       GPIOD_OUT_LOW);
 		if (IS_ERR_OR_NULL(qcadev->bt_en) && data->soc_type == QCA_WCN6750) {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* RE: WAR to handle WCN6750 hardware issue
  2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
@ 2022-04-29 12:00   ` bluez.test.bot
  2022-04-29 14:50   ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Marcel Holtmann
  2022-05-04 20:31   ` Rob Herring
  2 siblings, 0 replies; 17+ messages in thread
From: bluez.test.bot @ 2022-04-29 12:00 UTC (permalink / raw)
  To: linux-bluetooth, quic_bgodavar

[-- Attachment #1: Type: text/plain, Size: 1313 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=636918

---Test result---

Test Summary:
CheckPatch                    PASS      4.79 seconds
GitLint                       PASS      3.01 seconds
SubjectPrefix                 FAIL      1.73 seconds
BuildKernel                   PASS      31.70 seconds
BuildKernel32                 PASS      28.95 seconds
Incremental Build with patchesPASS      49.95 seconds
TestRunner: Setup             PASS      484.37 seconds
TestRunner: l2cap-tester      PASS      17.17 seconds
TestRunner: bnep-tester       PASS      6.09 seconds
TestRunner: mgmt-tester       PASS      102.27 seconds
TestRunner: rfcomm-tester     PASS      9.76 seconds
TestRunner: sco-tester        PASS      9.61 seconds
TestRunner: smp-tester        PASS      9.27 seconds
TestRunner: userchan-tester   PASS      6.42 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 1.73 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth


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

* Re: [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750
  2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
  2022-04-29 12:00   ` WAR to handle WCN6750 hardware issue bluez.test.bot
@ 2022-04-29 14:50   ` Marcel Holtmann
  2022-05-04 20:31   ` Rob Herring
  2 siblings, 0 replies; 17+ messages in thread
From: Marcel Holtmann @ 2022-04-29 14:50 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: agross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, Johan Hedberg, mka, linux-bluetooth, quic_hemantg,
	quic_saluvala, quic_rjliao, mcchou

Hi Balakrishna,

> This patch adds a wlan-gpio entry and its reference usage for
> BT SoC wcn6750.
> 
> Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> ---
> Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
> index f93c6e7..624f957 100644
> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
> @@ -24,6 +24,10 @@ properties:
>       - qcom,qca6390-bt
>       - qcom,wcn6750-bt
> 
> +  wlan-gpios:
> +    maxItems: 1
> +    description: gpio specifier used to wlan chip
> +
>   enable-gpios:
>     maxItems: 1
>     description: gpio specifier used to enable chip
> @@ -123,6 +127,7 @@ allOf:
>               - qcom,wcn6750-bt
>     then:
>       required:
> +        - wlan-gpios

why is this in the Bluetooth section? Why should Bluetooth care about any WiFi GPIO?

Regards

Marcel


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

* Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-04-29 10:27 ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue Balakrishna Godavarthi
@ 2022-04-29 14:54   ` Marcel Holtmann
  2022-04-30  3:09     ` Balakrishna Godavarthi (QUIC)
  2022-04-29 22:59   ` [PATCH] Bluetooth: hci_qca: fix excluded_middle.cocci warnings kernel test robot
  2022-04-29 23:05   ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue kernel test robot
  2 siblings, 1 reply; 17+ messages in thread
From: Marcel Holtmann @ 2022-04-29 14:54 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: Andy Gross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, Johan Hedberg, mka, linux-bluetooth, quic_hemantg,
	quic_saluvala, quic_rjliao, mcchou

Hi Balakrishna,

> The patch is workaround for hardware issue on WCN6750.
> On WCN6750 sometimes observed AON power source takes 100ms
> time to fully discharge voltage during OFF. As WCN6750 is
> combo chip for WLAN and BT. If any of the tech area ON is
> triggered during discharge phase, it fails to turn ON.
> To overcome this hardware issue, During BT ON, driver check
> for WLAN_EN pin status. If it high, it will pull BT_EN to high
> immediately else it will wait for 100ms assuming WLAN was just
> powered OFF and then BT_EN will be pulled to high.
> 
> Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6750")
> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> ---
> drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> 1 file changed, 24 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index eab34e2..c3862d1 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -219,6 +219,7 @@ struct qca_serdev {
> 	struct hci_uart	 serdev_hu;
> 	struct gpio_desc *bt_en;
> 	struct gpio_desc *sw_ctrl;
> +	struct gpio_desc *wlan_en;
> 	struct clk	 *susclk;
> 	enum qca_btsoc_type btsoc_type;
> 	struct qca_power *bt_power;

I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.

And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.

Regards

Marcel


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

* [PATCH] Bluetooth: hci_qca: fix excluded_middle.cocci warnings
  2022-04-29 10:27 ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue Balakrishna Godavarthi
  2022-04-29 14:54   ` Marcel Holtmann
@ 2022-04-29 22:59   ` kernel test robot
  2022-04-29 23:05   ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue kernel test robot
  2 siblings, 0 replies; 17+ messages in thread
From: kernel test robot @ 2022-04-29 22:59 UTC (permalink / raw)
  To: Balakrishna Godavarthi, agross, robh+dt, bjorn.andersson,
	linux-arm-msm, devicetree, linux-kernel, marcel, johan.hedberg
  Cc: kbuild-all, mka, linux-bluetooth, quic_hemantg, quic_saluvala,
	quic_rjliao, mcchou, Balakrishna Godavarthi

From: kernel test robot <lkp@intel.com>

drivers/bluetooth/hci_qca.c:1633:42-44: WARNING !A || A && B is equivalent to !A || B


 Condition !A || A && B is equivalent to !A || B.

Generated by: scripts/coccinelle/misc/excluded_middle.cocci

CC: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/intel-lab-lkp/linux/commits/Balakrishna-Godavarthi/WAR-to-handle-WCN6750-hardware-issue/20220429-193129
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago

 drivers/bluetooth/hci_qca.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1630,7 +1630,7 @@ static int qca_regulator_init(struct hci
 		msleep(50);
 	}
 
-	if (!qcadev->wlan_en || (qcadev->wlan_en && gpiod_get_value_cansleep(qcadev->wlan_en)))
+	if (!qcadev->wlan_en || gpiod_get_value_cansleep(qcadev->wlan_en))
 		gpiod_set_value_cansleep(qcadev->bt_en, 1);
 
 	if (qcadev->wlan_en && !gpiod_get_value_cansleep(qcadev->wlan_en)) {

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

* Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-04-29 10:27 ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue Balakrishna Godavarthi
  2022-04-29 14:54   ` Marcel Holtmann
  2022-04-29 22:59   ` [PATCH] Bluetooth: hci_qca: fix excluded_middle.cocci warnings kernel test robot
@ 2022-04-29 23:05   ` kernel test robot
  2 siblings, 0 replies; 17+ messages in thread
From: kernel test robot @ 2022-04-29 23:05 UTC (permalink / raw)
  To: Balakrishna Godavarthi, agross, robh+dt, bjorn.andersson,
	linux-arm-msm, devicetree, linux-kernel, marcel, johan.hedberg
  Cc: kbuild-all, mka, linux-bluetooth, quic_hemantg, quic_saluvala,
	quic_rjliao, mcchou, Balakrishna Godavarthi

Hi Balakrishna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on bluetooth-next/master bluetooth/master linus/master v5.18-rc4 next-20220429]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Balakrishna-Godavarthi/WAR-to-handle-WCN6750-hardware-issue/20220429-193129
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: m68k-randconfig-c003-20220428 (https://download.01.org/0day-ci/archive/20220430/202204300657.daSC8FPf-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> drivers/bluetooth/hci_qca.c:1633:42-44: WARNING !A || A && B is equivalent to !A || B

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* RE: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-04-29 14:54   ` Marcel Holtmann
@ 2022-04-30  3:09     ` Balakrishna Godavarthi (QUIC)
  2022-05-10  3:17       ` Miao-chen Chou
  0 siblings, 1 reply; 17+ messages in thread
From: Balakrishna Godavarthi (QUIC) @ 2022-04-30  3:09 UTC (permalink / raw)
  To: Marcel Holtmann, Balakrishna Godavarthi (QUIC)
  Cc: Andy Gross, robh+dt, bjorn.andersson, linux-arm-msm, devicetree,
	linux-kernel, Johan Hedberg, mka, linux-bluetooth,
	Hemant Gupta (QUIC), Sai Teja Aluvala (Temp) (QUIC),
	quic_rjliao, mcchou

Hi Marcel,

-----Original Message-----
From: Marcel Holtmann <marcel@holtmann.org> 
Sent: Friday, April 29, 2022 8:24 PM
To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
Cc: Andy Gross <agross@kernel.org>; robh+dt@kernel.org; bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; mcchou@chromium.org
Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

Hi Balakrishna,

> The patch is workaround for hardware issue on WCN6750.
> On WCN6750 sometimes observed AON power source takes 100ms time to 
> fully discharge voltage during OFF. As WCN6750 is combo chip for WLAN 
> and BT. If any of the tech area ON is triggered during discharge 
> phase, it fails to turn ON.
> To overcome this hardware issue, During BT ON, driver check for 
> WLAN_EN pin status. If it high, it will pull BT_EN to high immediately 
> else it will wait for 100ms assuming WLAN was just powered OFF and 
> then BT_EN will be pulled to high.
> 
> Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI 
> Bluetooth chip wcn6750")
> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> ---
> drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> 1 file changed, 24 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c 
> index eab34e2..c3862d1 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -219,6 +219,7 @@ struct qca_serdev {
> 	struct hci_uart	 serdev_hu;
> 	struct gpio_desc *bt_en;
> 	struct gpio_desc *sw_ctrl;
> +	struct gpio_desc *wlan_en;
> 	struct clk	 *susclk;
> 	enum qca_btsoc_type btsoc_type;
> 	struct qca_power *bt_power;

I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.

And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.

[Bala]: We are working on serdev like driver for our QCA platform.  We are in initial stages of discussion, and soon we will start the driver development work. 
In mean to stop stability or functional issues we are trying to add these HACKs in QCA driver.

Regards

Marcel


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

* Re: [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750
  2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
  2022-04-29 12:00   ` WAR to handle WCN6750 hardware issue bluez.test.bot
  2022-04-29 14:50   ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Marcel Holtmann
@ 2022-05-04 20:31   ` Rob Herring
  2 siblings, 0 replies; 17+ messages in thread
From: Rob Herring @ 2022-05-04 20:31 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: agross, bjorn.andersson, linux-arm-msm, devicetree, linux-kernel,
	marcel, johan.hedberg, mka, linux-bluetooth, quic_hemantg,
	quic_saluvala, quic_rjliao, mcchou

On Fri, Apr 29, 2022 at 03:57:51PM +0530, Balakrishna Godavarthi wrote:
> This patch adds a wlan-gpio entry and its reference usage for

wlan-gpios

> BT SoC wcn6750.
> 
> Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> ---
>  Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
> index f93c6e7..624f957 100644
> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml
> @@ -24,6 +24,10 @@ properties:
>        - qcom,qca6390-bt
>        - qcom,wcn6750-bt
>  
> +  wlan-gpios:
> +    maxItems: 1
> +    description: gpio specifier used to wlan chip

How does one 'wlan' a chip?

> +
>    enable-gpios:
>      maxItems: 1
>      description: gpio specifier used to enable chip
> @@ -123,6 +127,7 @@ allOf:
>                - qcom,wcn6750-bt
>      then:
>        required:
> +        - wlan-gpios
>          - enable-gpios
>          - swctrl-gpios
>          - vddio-supply
> @@ -166,6 +171,7 @@ examples:
>              compatible = "qcom,wcn6750-bt";
>              pinctrl-names = "default";
>              pinctrl-0 = <&bt_en_default>;
> +            wlan-gpios = <&tlmm 84 GPIO_ACTIVE_HIGH>;
>              enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
>              swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
>              vddio-supply = <&vreg_l19b_1p8>;
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 
> 

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

* Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-04-30  3:09     ` Balakrishna Godavarthi (QUIC)
@ 2022-05-10  3:17       ` Miao-chen Chou
  2022-06-22  7:27         ` Balakrishna Godavarthi (QUIC)
  0 siblings, 1 reply; 17+ messages in thread
From: Miao-chen Chou @ 2022-05-10  3:17 UTC (permalink / raw)
  To: Balakrishna Godavarthi (QUIC)
  Cc: Marcel Holtmann, Andy Gross, robh+dt, bjorn.andersson,
	linux-arm-msm, devicetree, linux-kernel, Johan Hedberg, mka,
	linux-bluetooth, Hemant Gupta (QUIC),
	Sai Teja Aluvala (Temp) (QUIC),
	quic_rjliao, Alain Michaud, Abhishek Pandit-Subedi

Hi Bala,

When is the estimated start date and timeline of the driver development?

Thanks,
Miao

On Fri, Apr 29, 2022 at 8:09 PM Balakrishna Godavarthi (QUIC)
<quic_bgodavar@quicinc.com> wrote:
>
> Hi Marcel,
>
> -----Original Message-----
> From: Marcel Holtmann <marcel@holtmann.org>
> Sent: Friday, April 29, 2022 8:24 PM
> To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> Cc: Andy Gross <agross@kernel.org>; robh+dt@kernel.org; bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; mcchou@chromium.org
> Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
>
> Hi Balakrishna,
>
> > The patch is workaround for hardware issue on WCN6750.
> > On WCN6750 sometimes observed AON power source takes 100ms time to
> > fully discharge voltage during OFF. As WCN6750 is combo chip for WLAN
> > and BT. If any of the tech area ON is triggered during discharge
> > phase, it fails to turn ON.
> > To overcome this hardware issue, During BT ON, driver check for
> > WLAN_EN pin status. If it high, it will pull BT_EN to high immediately
> > else it will wait for 100ms assuming WLAN was just powered OFF and
> > then BT_EN will be pulled to high.
> >
> > Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI
> > Bluetooth chip wcn6750")
> > Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> > Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> > Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> > ---
> > drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> > 1 file changed, 24 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> > index eab34e2..c3862d1 100644
> > --- a/drivers/bluetooth/hci_qca.c
> > +++ b/drivers/bluetooth/hci_qca.c
> > @@ -219,6 +219,7 @@ struct qca_serdev {
> >       struct hci_uart  serdev_hu;
> >       struct gpio_desc *bt_en;
> >       struct gpio_desc *sw_ctrl;
> > +     struct gpio_desc *wlan_en;
> >       struct clk       *susclk;
> >       enum qca_btsoc_type btsoc_type;
> >       struct qca_power *bt_power;
>
> I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.
>
> And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.
>
> [Bala]: We are working on serdev like driver for our QCA platform.  We are in initial stages of discussion, and soon we will start the driver development work.
> In mean to stop stability or functional issues we are trying to add these HACKs in QCA driver.
>
> Regards
>
> Marcel
>

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

* RE: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-05-10  3:17       ` Miao-chen Chou
@ 2022-06-22  7:27         ` Balakrishna Godavarthi (QUIC)
  2022-10-13 19:11           ` mka
  0 siblings, 1 reply; 17+ messages in thread
From: Balakrishna Godavarthi (QUIC) @ 2022-06-22  7:27 UTC (permalink / raw)
  To: Miao-chen Chou, Balakrishna Godavarthi (QUIC)
  Cc: Marcel Holtmann, Andy Gross, robh+dt, bjorn.andersson,
	linux-arm-msm, devicetree, linux-kernel, Johan Hedberg, mka,
	linux-bluetooth, Hemant Gupta (QUIC),
	Sai Teja Aluvala (Temp) (QUIC), Rocky Liao (QUIC),
	Alain Michaud, Abhishek Pandit-Subedi

Hi Marcel/Miao,

We are working on new driver, by 7/29 we will submit initial patch for review.

Regards
Bala
-----Original Message-----
From: Miao-chen Chou <mcchou@chromium.org> 
Sent: Tuesday, May 10, 2022 8:47 AM
To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
Cc: Marcel Holtmann <marcel@holtmann.org>; Andy Gross <agross@kernel.org>; robh+dt@kernel.org; bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; Alain Michaud <alainmichaud@google.com>; Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

Hi Bala,

When is the estimated start date and timeline of the driver development?

Thanks,
Miao

On Fri, Apr 29, 2022 at 8:09 PM Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com> wrote:
>
> Hi Marcel,
>
> -----Original Message-----
> From: Marcel Holtmann <marcel@holtmann.org>
> Sent: Friday, April 29, 2022 8:24 PM
> To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> Cc: Andy Gross <agross@kernel.org>; robh+dt@kernel.org; 
> bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; 
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan 
> Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; 
> linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) 
> <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) 
> <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; 
> mcchou@chromium.org
> Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 
> HW issue
>
> Hi Balakrishna,
>
> > The patch is workaround for hardware issue on WCN6750.
> > On WCN6750 sometimes observed AON power source takes 100ms time to 
> > fully discharge voltage during OFF. As WCN6750 is combo chip for 
> > WLAN and BT. If any of the tech area ON is triggered during 
> > discharge phase, it fails to turn ON.
> > To overcome this hardware issue, During BT ON, driver check for 
> > WLAN_EN pin status. If it high, it will pull BT_EN to high 
> > immediately else it will wait for 100ms assuming WLAN was just 
> > powered OFF and then BT_EN will be pulled to high.
> >
> > Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI 
> > Bluetooth chip wcn6750")
> > Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> > Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> > Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> > ---
> > drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> > 1 file changed, 24 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/bluetooth/hci_qca.c 
> > b/drivers/bluetooth/hci_qca.c index eab34e2..c3862d1 100644
> > --- a/drivers/bluetooth/hci_qca.c
> > +++ b/drivers/bluetooth/hci_qca.c
> > @@ -219,6 +219,7 @@ struct qca_serdev {
> >       struct hci_uart  serdev_hu;
> >       struct gpio_desc *bt_en;
> >       struct gpio_desc *sw_ctrl;
> > +     struct gpio_desc *wlan_en;
> >       struct clk       *susclk;
> >       enum qca_btsoc_type btsoc_type;
> >       struct qca_power *bt_power;
>
> I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.
>
> And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.
>
> [Bala]: We are working on serdev like driver for our QCA platform.  We are in initial stages of discussion, and soon we will start the driver development work.
> In mean to stop stability or functional issues we are trying to add these HACKs in QCA driver.
>
> Regards
>
> Marcel
>

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

* Re: [PATCH v1 0/3] WAR to handle WCN6750 hardware issue
  2022-04-29 10:27 [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Balakrishna Godavarthi
                   ` (2 preceding siblings ...)
  2022-04-29 10:27 ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue Balakrishna Godavarthi
@ 2022-06-22  7:33 ` Dmitry Baryshkov
  3 siblings, 0 replies; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-06-22  7:33 UTC (permalink / raw)
  To: Balakrishna Godavarthi, agross, robh+dt, bjorn.andersson,
	linux-arm-msm, devicetree, linux-kernel, marcel, johan.hedberg
  Cc: mka, linux-bluetooth, quic_hemantg, quic_saluvala, quic_rjliao, mcchou

On 29/04/2022 13:27, Balakrishna Godavarthi wrote:
> On WCN6750 sometimes observed AON power source takes 100ms
> time to fully discharge voltage during OFF. As WCN6750 is
> combo chip for WLAN and BT. If any of the tech area ON is
> triggered during discharge phase, it fails to turn ON.
> To overcome this hardware issue, During BT ON, driver check
> for WLAN_EN pin status. If it high, it will pull BT_EN to high
> immediately else it will wait for 100ms assuming WLAN was just
> powered OFF and then BT_EN will be pulled to high.

Ugh. This adds another point to support separate power sequencer device 
for WiFi+BT devices. Let me refresh my last patchset, so that we can 
implement it as a part of common code, rather than hacking hci_qca on 
and on.

> 
> Balakrishna Godavarthi (3):
>    dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750
>    arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node
>    Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
> 
>   .../bindings/net/qualcomm-bluetooth.yaml           |  6 +++++
>   arch/arm64/boot/dts/qcom/sc7280-idp.dtsi           |  1 +
>   drivers/bluetooth/hci_qca.c                        | 30 +++++++++++++++++-----
>   3 files changed, 31 insertions(+), 6 deletions(-)
> 


-- 
With best wishes
Dmitry

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

* Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-06-22  7:27         ` Balakrishna Godavarthi (QUIC)
@ 2022-10-13 19:11           ` mka
  2022-10-13 20:06             ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 17+ messages in thread
From: mka @ 2022-10-13 19:11 UTC (permalink / raw)
  To: Balakrishna Godavarthi (QUIC)
  Cc: Miao-chen Chou, Marcel Holtmann, Andy Gross, robh+dt,
	bjorn.andersson, linux-arm-msm, devicetree, linux-kernel,
	Johan Hedberg, linux-bluetooth, Hemant Gupta (QUIC),
	Sai Teja Aluvala (Temp) (QUIC), Rocky Liao (QUIC),
	Alain Michaud, Abhishek Pandit-Subedi, Zhengping Jiang

On Wed, Jun 22, 2022 at 07:27:21AM +0000, Balakrishna Godavarthi (QUIC) wrote:
> Hi Marcel/Miao,
> 
> We are working on new driver, by 7/29 we will submit initial patch for review.

Has this ever been sent? I skimmed through the list archives and couldn't find it.

> -----Original Message-----
> From: Miao-chen Chou <mcchou@chromium.org> 
> Sent: Tuesday, May 10, 2022 8:47 AM
> To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> Cc: Marcel Holtmann <marcel@holtmann.org>; Andy Gross <agross@kernel.org>; robh+dt@kernel.org; bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; Alain Michaud <alainmichaud@google.com>; Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
> 
> Hi Bala,
> 
> When is the estimated start date and timeline of the driver development?
> 
> Thanks,
> Miao
> 
> On Fri, Apr 29, 2022 at 8:09 PM Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com> wrote:
> >
> > Hi Marcel,
> >
> > -----Original Message-----
> > From: Marcel Holtmann <marcel@holtmann.org>
> > Sent: Friday, April 29, 2022 8:24 PM
> > To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> > Cc: Andy Gross <agross@kernel.org>; robh+dt@kernel.org; 
> > bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; 
> > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan 
> > Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; 
> > linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) 
> > <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) 
> > <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; 
> > mcchou@chromium.org
> > Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 
> > HW issue
> >
> > Hi Balakrishna,
> >
> > > The patch is workaround for hardware issue on WCN6750.
> > > On WCN6750 sometimes observed AON power source takes 100ms time to 
> > > fully discharge voltage during OFF. As WCN6750 is combo chip for 
> > > WLAN and BT. If any of the tech area ON is triggered during 
> > > discharge phase, it fails to turn ON.
> > > To overcome this hardware issue, During BT ON, driver check for 
> > > WLAN_EN pin status. If it high, it will pull BT_EN to high 
> > > immediately else it will wait for 100ms assuming WLAN was just 
> > > powered OFF and then BT_EN will be pulled to high.
> > >
> > > Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI 
> > > Bluetooth chip wcn6750")
> > > Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> > > Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> > > Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> > > ---
> > > drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> > > 1 file changed, 24 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/bluetooth/hci_qca.c 
> > > b/drivers/bluetooth/hci_qca.c index eab34e2..c3862d1 100644
> > > --- a/drivers/bluetooth/hci_qca.c
> > > +++ b/drivers/bluetooth/hci_qca.c
> > > @@ -219,6 +219,7 @@ struct qca_serdev {
> > >       struct hci_uart  serdev_hu;
> > >       struct gpio_desc *bt_en;
> > >       struct gpio_desc *sw_ctrl;
> > > +     struct gpio_desc *wlan_en;
> > >       struct clk       *susclk;
> > >       enum qca_btsoc_type btsoc_type;
> > >       struct qca_power *bt_power;
> >
> > I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.
> >
> > And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.
> >
> > [Bala]: We are working on serdev like driver for our QCA platform.  We are in initial stages of discussion, and soon we will start the driver development work.
> > In mean to stop stability or functional issues we are trying to add these HACKs in QCA driver.
> >
> > Regards
> >
> > Marcel
> >

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

* Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-10-13 19:11           ` mka
@ 2022-10-13 20:06             ` Luiz Augusto von Dentz
  2022-10-13 20:12               ` mka
  0 siblings, 1 reply; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2022-10-13 20:06 UTC (permalink / raw)
  To: mka
  Cc: Balakrishna Godavarthi (QUIC),
	Miao-chen Chou, Marcel Holtmann, Andy Gross, robh+dt,
	bjorn.andersson, linux-arm-msm, devicetree, linux-kernel,
	Johan Hedberg, linux-bluetooth, Hemant Gupta (QUIC),
	Sai Teja Aluvala (Temp) (QUIC), Rocky Liao (QUIC),
	Alain Michaud, Abhishek Pandit-Subedi, Zhengping Jiang

Hi,

On Thu, Oct 13, 2022 at 12:29 PM mka@chromium.org <mka@chromium.org> wrote:
>
> On Wed, Jun 22, 2022 at 07:27:21AM +0000, Balakrishna Godavarthi (QUIC) wrote:
> > Hi Marcel/Miao,
> >
> > We are working on new driver, by 7/29 we will submit initial patch for review.
>
> Has this ever been sent? I skimmed through the list archives and couldn't find it.

If you are asking if it was applied, not it wasn't, it probably needs
to be resend since we were expecting a follow up on the set.

> > -----Original Message-----
> > From: Miao-chen Chou <mcchou@chromium.org>
> > Sent: Tuesday, May 10, 2022 8:47 AM
> > To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> > Cc: Marcel Holtmann <marcel@holtmann.org>; Andy Gross <agross@kernel.org>; robh+dt@kernel.org; bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; Alain Michaud <alainmichaud@google.com>; Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> > Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
> >
> > Hi Bala,
> >
> > When is the estimated start date and timeline of the driver development?
> >
> > Thanks,
> > Miao
> >
> > On Fri, Apr 29, 2022 at 8:09 PM Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com> wrote:
> > >
> > > Hi Marcel,
> > >
> > > -----Original Message-----
> > > From: Marcel Holtmann <marcel@holtmann.org>
> > > Sent: Friday, April 29, 2022 8:24 PM
> > > To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> > > Cc: Andy Gross <agross@kernel.org>; robh+dt@kernel.org;
> > > bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org;
> > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan
> > > Hedberg <johan.hedberg@gmail.com>; mka@chromium.org;
> > > linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC)
> > > <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC)
> > > <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>;
> > > mcchou@chromium.org
> > > Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750
> > > HW issue
> > >
> > > Hi Balakrishna,
> > >
> > > > The patch is workaround for hardware issue on WCN6750.
> > > > On WCN6750 sometimes observed AON power source takes 100ms time to
> > > > fully discharge voltage during OFF. As WCN6750 is combo chip for
> > > > WLAN and BT. If any of the tech area ON is triggered during
> > > > discharge phase, it fails to turn ON.
> > > > To overcome this hardware issue, During BT ON, driver check for
> > > > WLAN_EN pin status. If it high, it will pull BT_EN to high
> > > > immediately else it will wait for 100ms assuming WLAN was just
> > > > powered OFF and then BT_EN will be pulled to high.
> > > >
> > > > Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI
> > > > Bluetooth chip wcn6750")
> > > > Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> > > > Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> > > > Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> > > > ---
> > > > drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> > > > 1 file changed, 24 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/drivers/bluetooth/hci_qca.c
> > > > b/drivers/bluetooth/hci_qca.c index eab34e2..c3862d1 100644
> > > > --- a/drivers/bluetooth/hci_qca.c
> > > > +++ b/drivers/bluetooth/hci_qca.c
> > > > @@ -219,6 +219,7 @@ struct qca_serdev {
> > > >       struct hci_uart  serdev_hu;
> > > >       struct gpio_desc *bt_en;
> > > >       struct gpio_desc *sw_ctrl;
> > > > +     struct gpio_desc *wlan_en;
> > > >       struct clk       *susclk;
> > > >       enum qca_btsoc_type btsoc_type;
> > > >       struct qca_power *bt_power;
> > >
> > > I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.
> > >
> > > And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.
> > >
> > > [Bala]: We are working on serdev like driver for our QCA platform.  We are in initial stages of discussion, and soon we will start the driver development work.
> > > In mean to stop stability or functional issues we are trying to add these HACKs in QCA driver.
> > >
> > > Regards
> > >
> > > Marcel
> > >



-- 
Luiz Augusto von Dentz

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

* Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
  2022-10-13 20:06             ` Luiz Augusto von Dentz
@ 2022-10-13 20:12               ` mka
  0 siblings, 0 replies; 17+ messages in thread
From: mka @ 2022-10-13 20:12 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Balakrishna Godavarthi (QUIC),
	Miao-chen Chou, Marcel Holtmann, Andy Gross, robh+dt,
	bjorn.andersson, linux-arm-msm, devicetree, linux-kernel,
	Johan Hedberg, linux-bluetooth, Hemant Gupta (QUIC),
	Sai Teja Aluvala (Temp) (QUIC), Rocky Liao (QUIC),
	Alain Michaud, Abhishek Pandit-Subedi, Zhengping Jiang

On Thu, Oct 13, 2022 at 01:06:41PM -0700, Luiz Augusto von Dentz wrote:
> Hi,
> 
> On Thu, Oct 13, 2022 at 12:29 PM mka@chromium.org <mka@chromium.org> wrote:
> >
> > On Wed, Jun 22, 2022 at 07:27:21AM +0000, Balakrishna Godavarthi (QUIC) wrote:
> > > Hi Marcel/Miao,
> > >
> > > We are working on new driver, by 7/29 we will submit initial patch for review.
> >
> > Has this ever been sent? I skimmed through the list archives and couldn't find it.
> 
> If you are asking if it was applied, not it wasn't, it probably needs
> to be resend since we were expecting a follow up on the set.

Sorry, if I wasn't clear, my question was about the new serdev based driver
which was supposed to be posted by 7/29.

> > > -----Original Message-----
> > > From: Miao-chen Chou <mcchou@chromium.org>
> > > Sent: Tuesday, May 10, 2022 8:47 AM
> > > To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> > > Cc: Marcel Holtmann <marcel@holtmann.org>; Andy Gross <agross@kernel.org>; robh+dt@kernel.org; bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan Hedberg <johan.hedberg@gmail.com>; mka@chromium.org; linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>; Alain Michaud <alainmichaud@google.com>; Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> > > Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue
> > >
> > > Hi Bala,
> > >
> > > When is the estimated start date and timeline of the driver development?
> > >
> > > Thanks,
> > > Miao
> > >
> > > On Fri, Apr 29, 2022 at 8:09 PM Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com> wrote:
> > > >
> > > > Hi Marcel,
> > > >
> > > > -----Original Message-----
> > > > From: Marcel Holtmann <marcel@holtmann.org>
> > > > Sent: Friday, April 29, 2022 8:24 PM
> > > > To: Balakrishna Godavarthi (QUIC) <quic_bgodavar@quicinc.com>
> > > > Cc: Andy Gross <agross@kernel.org>; robh+dt@kernel.org;
> > > > bjorn.andersson@linaro.org; linux-arm-msm@vger.kernel.org;
> > > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Johan
> > > > Hedberg <johan.hedberg@gmail.com>; mka@chromium.org;
> > > > linux-bluetooth@vger.kernel.org; Hemant Gupta (QUIC)
> > > > <quic_hemantg@quicinc.com>; Sai Teja Aluvala (Temp) (QUIC)
> > > > <quic_saluvala@quicinc.com>; quic_rjliao <quic_rjliao@quicinc.com>;
> > > > mcchou@chromium.org
> > > > Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750
> > > > HW issue
> > > >
> > > > Hi Balakrishna,
> > > >
> > > > > The patch is workaround for hardware issue on WCN6750.
> > > > > On WCN6750 sometimes observed AON power source takes 100ms time to
> > > > > fully discharge voltage during OFF. As WCN6750 is combo chip for
> > > > > WLAN and BT. If any of the tech area ON is triggered during
> > > > > discharge phase, it fails to turn ON.
> > > > > To overcome this hardware issue, During BT ON, driver check for
> > > > > WLAN_EN pin status. If it high, it will pull BT_EN to high
> > > > > immediately else it will wait for 100ms assuming WLAN was just
> > > > > powered OFF and then BT_EN will be pulled to high.
> > > > >
> > > > > Fixes: d8f97da1b92d2 ("Bluetooth: hci_qca: Add support for QTI
> > > > > Bluetooth chip wcn6750")
> > > > > Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> > > > > Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> > > > > Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
> > > > > ---
> > > > > drivers/bluetooth/hci_qca.c | 30 ++++++++++++++++++++++++------
> > > > > 1 file changed, 24 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/drivers/bluetooth/hci_qca.c
> > > > > b/drivers/bluetooth/hci_qca.c index eab34e2..c3862d1 100644
> > > > > --- a/drivers/bluetooth/hci_qca.c
> > > > > +++ b/drivers/bluetooth/hci_qca.c
> > > > > @@ -219,6 +219,7 @@ struct qca_serdev {
> > > > >       struct hci_uart  serdev_hu;
> > > > >       struct gpio_desc *bt_en;
> > > > >       struct gpio_desc *sw_ctrl;
> > > > > +     struct gpio_desc *wlan_en;
> > > > >       struct clk       *susclk;
> > > > >       enum qca_btsoc_type btsoc_type;
> > > > >       struct qca_power *bt_power;
> > > >
> > > > I am really against these intermixing of Bluetooth and WiFi details. There is work ongoing to do some sequence power procedure. Maybe that is something you should look into. This is a mess.
> > > >
> > > > And again, we are still hacking around hci_qca.c instead of writing a clean serdev only driver for this hardware. I have the feeling that nobody listens to review comments these days. It is just hacking patches together to get hardware enabled somehow and then disappear.
> > > >
> > > > [Bala]: We are working on serdev like driver for our QCA platform.  We are in initial stages of discussion, and soon we will start the driver development work.
> > > > In mean to stop stability or functional issues we are trying to add these HACKs in QCA driver.
> > > >
> > > > Regards
> > > >
> > > > Marcel
> > > >
> 
> 
> 
> -- 
> Luiz Augusto von Dentz

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

end of thread, other threads:[~2022-10-13 20:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 10:27 [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Balakrishna Godavarthi
2022-04-29 10:27 ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Balakrishna Godavarthi
2022-04-29 12:00   ` WAR to handle WCN6750 hardware issue bluez.test.bot
2022-04-29 14:50   ` [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750 Marcel Holtmann
2022-05-04 20:31   ` Rob Herring
2022-04-29 10:27 ` [PATCH v1 2/3] arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node Balakrishna Godavarthi
2022-04-29 10:27 ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue Balakrishna Godavarthi
2022-04-29 14:54   ` Marcel Holtmann
2022-04-30  3:09     ` Balakrishna Godavarthi (QUIC)
2022-05-10  3:17       ` Miao-chen Chou
2022-06-22  7:27         ` Balakrishna Godavarthi (QUIC)
2022-10-13 19:11           ` mka
2022-10-13 20:06             ` Luiz Augusto von Dentz
2022-10-13 20:12               ` mka
2022-04-29 22:59   ` [PATCH] Bluetooth: hci_qca: fix excluded_middle.cocci warnings kernel test robot
2022-04-29 23:05   ` [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue kernel test robot
2022-06-22  7:33 ` [PATCH v1 0/3] WAR to handle WCN6750 hardware issue Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.