Subject: [PATCH v1 0/3] WAR to handle WCN6750 hardware issue

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


Subject: [PATCH v1 2/3] arm64: dts: qcom: sc7280: Add wlan enable gpio to bluetooth node

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

Signed-off-by: Sai Teja Aluvala <[email protected]>
Signed-off-by: Balakrishna Godavarthi <[email protected]>
---
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

Subject: [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750

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

Signed-off-by: Sai Teja Aluvala <[email protected]>
Signed-off-by: Balakrishna Godavarthi <[email protected]>
---
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

2022-04-29 16:21:36

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750

Hi Balakrishna,

> This patch adds a wlan-gpio entry and its reference usage for
> BT SoC wcn6750.
>
> Signed-off-by: Sai Teja Aluvala <[email protected]>
> Signed-off-by: Balakrishna Godavarthi <[email protected]>
> ---
> 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

2022-04-30 02:31:03

by bluez.test.bot

[permalink] [raw]
Subject: RE: WAR to handle WCN6750 hardware issue

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

Subject: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

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 <[email protected]>
Signed-off-by: Sai Teja Aluvala <[email protected]>
Signed-off-by: Balakrishna Godavarthi <[email protected]>
---
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

2022-04-30 17:19:42

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

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/[email protected]/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 <[email protected]>


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

Subject: RE: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

Hi Marcel,

-----Original Message-----
From: Marcel Holtmann <[email protected]>
Sent: Friday, April 29, 2022 8:24 PM
To: Balakrishna Godavarthi (QUIC) <[email protected]>
Cc: Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Johan Hedberg <[email protected]>; [email protected]; [email protected]; Hemant Gupta (QUIC) <[email protected]>; Sai Teja Aluvala (Temp) (QUIC) <[email protected]>; quic_rjliao <[email protected]>; [email protected]
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 <[email protected]>
> Signed-off-by: Sai Teja Aluvala <[email protected]>
> Signed-off-by: Balakrishna Godavarthi <[email protected]>
> ---
> 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

2022-05-02 23:26:27

by kernel test robot

[permalink] [raw]
Subject: [PATCH] Bluetooth: hci_qca: fix excluded_middle.cocci warnings

From: kernel test robot <[email protected]>

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 <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

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

2022-05-05 03:56:26

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] dt-bindings: net: bluetooth: Add wlan-gpio entry for wcn6750

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 <[email protected]>
> Signed-off-by: Balakrishna Godavarthi <[email protected]>
> ---
> 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
>
>

2022-05-10 04:18:03

by Miao-chen Chou

[permalink] [raw]
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)
<[email protected]> wrote:
>
> Hi Marcel,
>
> -----Original Message-----
> From: Marcel Holtmann <[email protected]>
> Sent: Friday, April 29, 2022 8:24 PM
> To: Balakrishna Godavarthi (QUIC) <[email protected]>
> Cc: Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Johan Hedberg <[email protected]>; [email protected]; [email protected]; Hemant Gupta (QUIC) <[email protected]>; Sai Teja Aluvala (Temp) (QUIC) <[email protected]>; quic_rjliao <[email protected]>; [email protected]
> 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 <[email protected]>
> > Signed-off-by: Sai Teja Aluvala <[email protected]>
> > Signed-off-by: Balakrishna Godavarthi <[email protected]>
> > ---
> > 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
>

Subject: RE: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

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 <[email protected]>
Sent: Tuesday, May 10, 2022 8:47 AM
To: Balakrishna Godavarthi (QUIC) <[email protected]>
Cc: Marcel Holtmann <[email protected]>; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Johan Hedberg <[email protected]>; [email protected]; [email protected]; Hemant Gupta (QUIC) <[email protected]>; Sai Teja Aluvala (Temp) (QUIC) <[email protected]>; quic_rjliao <[email protected]>; Alain Michaud <[email protected]>; Abhishek Pandit-Subedi <[email protected]>
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) <[email protected]> wrote:
>
> Hi Marcel,
>
> -----Original Message-----
> From: Marcel Holtmann <[email protected]>
> Sent: Friday, April 29, 2022 8:24 PM
> To: Balakrishna Godavarthi (QUIC) <[email protected]>
> Cc: Andy Gross <[email protected]>; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; Johan
> Hedberg <[email protected]>; [email protected];
> [email protected]; Hemant Gupta (QUIC)
> <[email protected]>; Sai Teja Aluvala (Temp) (QUIC)
> <[email protected]>; quic_rjliao <[email protected]>;
> [email protected]
> 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 <[email protected]>
> > Signed-off-by: Sai Teja Aluvala <[email protected]>
> > Signed-off-by: Balakrishna Godavarthi <[email protected]>
> > ---
> > 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
>

2022-06-22 07:36:59

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v1 0/3] WAR to handle WCN6750 hardware issue

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

2022-10-13 19:29:14

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

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 <[email protected]>
> Sent: Tuesday, May 10, 2022 8:47 AM
> To: Balakrishna Godavarthi (QUIC) <[email protected]>
> Cc: Marcel Holtmann <[email protected]>; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Johan Hedberg <[email protected]>; [email protected]; [email protected]; Hemant Gupta (QUIC) <[email protected]>; Sai Teja Aluvala (Temp) (QUIC) <[email protected]>; quic_rjliao <[email protected]>; Alain Michaud <[email protected]>; Abhishek Pandit-Subedi <[email protected]>
> 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) <[email protected]> wrote:
> >
> > Hi Marcel,
> >
> > -----Original Message-----
> > From: Marcel Holtmann <[email protected]>
> > Sent: Friday, April 29, 2022 8:24 PM
> > To: Balakrishna Godavarthi (QUIC) <[email protected]>
> > Cc: Andy Gross <[email protected]>; [email protected];
> > [email protected]; [email protected];
> > [email protected]; [email protected]; Johan
> > Hedberg <[email protected]>; [email protected];
> > [email protected]; Hemant Gupta (QUIC)
> > <[email protected]>; Sai Teja Aluvala (Temp) (QUIC)
> > <[email protected]>; quic_rjliao <[email protected]>;
> > [email protected]
> > 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 <[email protected]>
> > > Signed-off-by: Sai Teja Aluvala <[email protected]>
> > > Signed-off-by: Balakrishna Godavarthi <[email protected]>
> > > ---
> > > 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
> >

2022-10-13 20:17:43

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

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 [email protected] <[email protected]> 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 <[email protected]>
> > > Sent: Tuesday, May 10, 2022 8:47 AM
> > > To: Balakrishna Godavarthi (QUIC) <[email protected]>
> > > Cc: Marcel Holtmann <[email protected]>; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Johan Hedberg <[email protected]>; [email protected]; [email protected]; Hemant Gupta (QUIC) <[email protected]>; Sai Teja Aluvala (Temp) (QUIC) <[email protected]>; quic_rjliao <[email protected]>; Alain Michaud <[email protected]>; Abhishek Pandit-Subedi <[email protected]>
> > > 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) <[email protected]> wrote:
> > > >
> > > > Hi Marcel,
> > > >
> > > > -----Original Message-----
> > > > From: Marcel Holtmann <[email protected]>
> > > > Sent: Friday, April 29, 2022 8:24 PM
> > > > To: Balakrishna Godavarthi (QUIC) <[email protected]>
> > > > Cc: Andy Gross <[email protected]>; [email protected];
> > > > [email protected]; [email protected];
> > > > [email protected]; [email protected]; Johan
> > > > Hedberg <[email protected]>; [email protected];
> > > > [email protected]; Hemant Gupta (QUIC)
> > > > <[email protected]>; Sai Teja Aluvala (Temp) (QUIC)
> > > > <[email protected]>; quic_rjliao <[email protected]>;
> > > > [email protected]
> > > > 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 <[email protected]>
> > > > > Signed-off-by: Sai Teja Aluvala <[email protected]>
> > > > > Signed-off-by: Balakrishna Godavarthi <[email protected]>
> > > > > ---
> > > > > 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

2022-10-13 20:17:50

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] Bluetooth: hci_qca: WAR to handle WCN6750 HW issue

Hi,

On Thu, Oct 13, 2022 at 12:29 PM [email protected] <[email protected]> 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 <[email protected]>
> > Sent: Tuesday, May 10, 2022 8:47 AM
> > To: Balakrishna Godavarthi (QUIC) <[email protected]>
> > Cc: Marcel Holtmann <[email protected]>; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Johan Hedberg <[email protected]>; [email protected]; [email protected]; Hemant Gupta (QUIC) <[email protected]>; Sai Teja Aluvala (Temp) (QUIC) <[email protected]>; quic_rjliao <[email protected]>; Alain Michaud <[email protected]>; Abhishek Pandit-Subedi <[email protected]>
> > 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) <[email protected]> wrote:
> > >
> > > Hi Marcel,
> > >
> > > -----Original Message-----
> > > From: Marcel Holtmann <[email protected]>
> > > Sent: Friday, April 29, 2022 8:24 PM
> > > To: Balakrishna Godavarthi (QUIC) <[email protected]>
> > > Cc: Andy Gross <[email protected]>; [email protected];
> > > [email protected]; [email protected];
> > > [email protected]; [email protected]; Johan
> > > Hedberg <[email protected]>; [email protected];
> > > [email protected]; Hemant Gupta (QUIC)
> > > <[email protected]>; Sai Teja Aluvala (Temp) (QUIC)
> > > <[email protected]>; quic_rjliao <[email protected]>;
> > > [email protected]
> > > 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 <[email protected]>
> > > > Signed-off-by: Sai Teja Aluvala <[email protected]>
> > > > Signed-off-by: Balakrishna Godavarthi <[email protected]>
> > > > ---
> > > > 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