Skip to contentSkip to conversation

Bluetooth: hci_qca: Give enough time to ROME controller to bootup.

PATCH Superseded Balakrishna Godavarthi 5 participants 8 messages Mar 6, 2019 – Mar 19, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: hci_qca: Give enough time to ROME controller to bootup.

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

---
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_qca.c +2 -0
index 237aea34b69f..1953b13511e7 100644
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
 		qcadev = serdev_device_get_drvdata(hu->serdev);
 		if (qcadev->btsoc_type != QCA_WCN3990) {
 			gpiod_set_value_cansleep(qcadev->bt_en, 1);
+			/* Controller needs time to bootup. */
+			msleep(150);
 		} else {
 			hu->init_speed = qcadev->init_speed;
 			hu->oper_speed = qcadev->oper_speed;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)

Quoted 5 lines

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

---

Any Fixes tag? And maybe some more explanation or background on where 150 ms sleep comes from would be useful. Was it determined experimentally or did it come from a datasheet somewhere? Does the time differ between boards?

Quoted 16 lines
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_qca.c +2 -0
index 237aea34b69f..1953b13511e7 100644
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
                qcadev = serdev_device_get_drvdata(hu->serdev);
                if (qcadev->btsoc_type != QCA_WCN3990) {
                        gpiod_set_value_cansleep(qcadev->bt_en, 1);
+                       /* Controller needs time to bootup. */
+                       msleep(150);
                } else {
                        hu->init_speed = qcadev->init_speed;
                        hu->oper_speed = qcadev->oper_speed;
#2 lore raw

Hi Stepen,

Quoted 4 lines · Stephen Boyd

Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)

Quoted 3 lines

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

Quoted 8 lines
Quoted 2 lines

---

Any Fixes tag? And maybe some more explanation or background on where 150 ms sleep comes from would be useful. Was it determined experimentally or did it come from a datasheet somewhere? Does the time differ between boards?

[Bala]: this was observed in our stress testing and even the CHIP firmware team
confirmed that BT chip required at least 150 ms to boot up.

@Rocky to confirm my statement.

Quoted 16 lines
Quoted 16 lines
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_qca.c +2 -0
index 237aea34b69f..1953b13511e7 100644
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
                qcadev = serdev_device_get_drvdata(hu->serdev);
                if (qcadev->btsoc_type != QCA_WCN3990) {
                        gpiod_set_value_cansleep(qcadev->bt_en, 1);
+                       /* Controller needs time to bootup. */
+                       msleep(150);
                } else {
                        hu->init_speed = qcadev->init_speed;
                        hu->oper_speed = qcadev->oper_speed;
Signature · 2 lines
Regards
Balakrishna.
#3 lore raw
Quoted 23 lines · 在 2019-03-07 14:49,Balakrishna Godavarthi 写道:

Hi Stepen,

Quoted 4 lines · Stephen Boyd

Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)

Quoted 3 lines

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

Quoted 8 lines
Quoted 2 lines

---

Any Fixes tag? And maybe some more explanation or background on where 150 ms sleep comes from would be useful. Was it determined experimentally or did it come from a datasheet somewhere? Does the time differ between boards?

[Bala]: this was observed in our stress testing and even the CHIP firmware team
confirmed that BT chip required at least 150 ms to boot up.

@Rocky to confirm my statement.

Quoted 3 lines
Quoted 3 lines
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/bluetooth/hci_qca.c +0 -0
index 237aea34b69f..1953b13511e7 100644
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
Quoted 8 lines

drivers/bluetooth/hci_qca.c static int qca_open(struct hci_uart *hu) · line 515

Quoted 8 lines
drivers/bluetooth/hci_qca.c +2 -0
                qcadev = serdev_device_get_drvdata(hu->serdev);
                if (qcadev->btsoc_type != QCA_WCN3990) {
                        gpiod_set_value_cansleep(qcadev->bt_en, 1);
+                       /* Controller needs time to bootup. */
+                       msleep(150);
                } else {
                        hu->init_speed = qcadev->init_speed;
                        hu->oper_speed = qcadev->oper_speed;

Yes,ROME firmware needs 150ms to boot up after toggle the BT_EN pin.

#4 lore raw
In reply to Balakrishna Godavarthi
Quoted 23 lines · 在 2019-03-07 14:49,Balakrishna Godavarthi 写道:

Hi Stepen,

Quoted 4 lines · Stephen Boyd

Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)

Quoted 3 lines

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

Quoted 8 lines
Quoted 2 lines

---

Any Fixes tag? And maybe some more explanation or background on where 150 ms sleep comes from would be useful. Was it determined experimentally or did it come from a datasheet somewhere? Does the time differ between boards?

[Bala]: this was observed in our stress testing and even the CHIP firmware team
confirmed that BT chip required at least 150 ms to boot up.

@Rocky to confirm my statement.

Quoted 3 lines
Quoted 3 lines
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/bluetooth/hci_qca.c +0 -0
index 237aea34b69f..1953b13511e7 100644
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
Quoted 8 lines

drivers/bluetooth/hci_qca.c static int qca_open(struct hci_uart *hu) · line 515

Quoted 8 lines
drivers/bluetooth/hci_qca.c +2 -0
                qcadev = serdev_device_get_drvdata(hu->serdev);
                if (qcadev->btsoc_type != QCA_WCN3990) {
                        gpiod_set_value_cansleep(qcadev->bt_en, 1);
+                       /* Controller needs time to bootup. */
+                       msleep(150);
                } else {
                        hu->init_speed = qcadev->init_speed;
                        hu->oper_speed = qcadev->oper_speed;

Hello,

Any concern to merge this change? Without this change the Rome cannot up while running the serdev way, we should mainline this change ASAP.

#5 lore raw
Quoted 44 lines · On Wed, Mar 13, 2019 at 5:45 PM <[email protected]> wrote:
Quoted 25 lines · 在 2019-03-07 14:49,Balakrishna Godavarthi 写道:

Hi Stepen,

Quoted 4 lines · Stephen Boyd

Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)

Quoted 3 lines

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

Quoted 9 lines
Quoted 2 lines

---

Any Fixes tag? And maybe some more explanation or background on where 150 ms sleep comes from would be useful. Was it determined experimentally or did it come from a datasheet somewhere? Does the time
differ between boards?

[Bala]: this was observed in our stress testing and even the CHIP firmware team
confirmed that BT chip required at least 150 ms to boot up.

@Rocky to confirm my statement.

Quoted 3 lines
Quoted 3 lines
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/bluetooth/hci_qca.c +0 -0
index 237aea34b69f..1953b13511e7 100644
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
Quoted 8 lines

drivers/bluetooth/hci_qca.c static int qca_open(struct hci_uart *hu) · line 515

Quoted 8 lines
drivers/bluetooth/hci_qca.c +2 -0
                qcadev = serdev_device_get_drvdata(hu->serdev);
                if (qcadev->btsoc_type != QCA_WCN3990) {
                        gpiod_set_value_cansleep(qcadev->bt_en, 1);
+                       /* Controller needs time to bootup. */
+                       msleep(150);
                } else {
                        hu->init_speed = qcadev->init_speed;
                        hu->oper_speed = qcadev->oper_speed;

Hello,

Quoted 2 lines

Any concern to merge this change? Without this change the Rome cannot up while running the serdev way, we should mainline this change ASAP.

Stephen was also asking about a Fixes tag, maybe we should add this?

Fixes 05ba533c5c11 ("Bluetooth: hci_qca: Add serdev support")
Reviewed-by Tested-by on v1 1/1
#7 lore raw
In reply to Balakrishna Godavarthi
Quoted 13 lines · 在 2019-03-07 00:21,Balakrishna Godavarthi 写道:

This patch enables enough time to ROME controller to bootup after we bring the enable ping out of reset.

---
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_qca.c +0 -0
index 237aea34b69f..1953b13511e7 100644

drivers/bluetooth/hci_qca.c static int qca_open(struct hci_uart *hu) · line 515

Quoted 8 lines
drivers/bluetooth/hci_qca.c +2 -0
@@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu)
 		qcadev = serdev_device_get_drvdata(hu->serdev);
 		if (qcadev->btsoc_type != QCA_WCN3990) {
 			gpiod_set_value_cansleep(qcadev->bt_en, 1);
+			/* Controller needs time to bootup. */
+			msleep(150);
 		} else {
 			hu->init_speed = qcadev->init_speed;
 			hu->oper_speed = qcadev->oper_speed;