linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
@ 2019-03-06 16:21 Balakrishna Godavarthi
  2019-03-06 22:33 ` Stephen Boyd
  2019-03-08  5:15 ` rjliao
  0 siblings, 2 replies; 8+ messages in thread
From: Balakrishna Godavarthi @ 2019-03-06 16:21 UTC (permalink / raw)
  To: marcel, johan.hedberg
  Cc: mka, linux-kernel, linux-bluetooth, hemantg, linux-arm-msm,
	rjliao, Balakrishna Godavarthi

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

Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
---
 drivers/bluetooth/hci_qca.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 237aea34b69f..1953b13511e7 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -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;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-06 16:21 [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup Balakrishna Godavarthi
@ 2019-03-06 22:33 ` Stephen Boyd
  2019-03-07  6:49   ` Balakrishna Godavarthi
  2019-03-08  5:15 ` rjliao
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Boyd @ 2019-03-06 22:33 UTC (permalink / raw)
  To: Balakrishna Godavarthi, johan.hedberg, marcel
  Cc: mka, linux-kernel, linux-bluetooth, hemantg, linux-arm-msm,
	rjliao, Balakrishna Godavarthi

Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)
> This patch enables enough time to ROME controller to bootup
> after we bring the enable ping out of reset.
> 
> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> ---

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?

>  drivers/bluetooth/hci_qca.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 237aea34b69f..1953b13511e7 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -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;

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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-06 22:33 ` Stephen Boyd
@ 2019-03-07  6:49   ` Balakrishna Godavarthi
  2019-03-07  6:52     ` rjliao
  2019-03-13  9:45     ` rjliao
  0 siblings, 2 replies; 8+ messages in thread
From: Balakrishna Godavarthi @ 2019-03-07  6:49 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: johan.hedberg, marcel, mka, linux-kernel, linux-bluetooth,
	hemantg, linux-arm-msm, rjliao

Hi Stepen,

On 2019-03-07 04:03, Stephen Boyd wrote:
> Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)
>> This patch enables enough time to ROME controller to bootup
>> after we bring the enable ping out of reset.
>> 
>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
>> ---
> 
> 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.

>>  drivers/bluetooth/hci_qca.c | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index 237aea34b69f..1953b13511e7 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -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;

-- 
Regards
Balakrishna.

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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-07  6:49   ` Balakrishna Godavarthi
@ 2019-03-07  6:52     ` rjliao
  2019-03-13  9:45     ` rjliao
  1 sibling, 0 replies; 8+ messages in thread
From: rjliao @ 2019-03-07  6:52 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: Stephen Boyd, johan.hedberg, marcel, mka, linux-kernel,
	linux-bluetooth, hemantg, linux-arm-msm

在 2019-03-07 14:49,Balakrishna Godavarthi 写道:
> Hi Stepen,
> 
> On 2019-03-07 04:03, Stephen Boyd wrote:
>> Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)
>>> This patch enables enough time to ROME controller to bootup
>>> after we bring the enable ping out of reset.
>>> 
>>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
>>> ---
>> 
>> 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.
> 
>>>  drivers/bluetooth/hci_qca.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>> 
>>> diff --git a/drivers/bluetooth/hci_qca.c 
>>> b/drivers/bluetooth/hci_qca.c
>>> index 237aea34b69f..1953b13511e7 100644
>>> --- a/drivers/bluetooth/hci_qca.c
>>> +++ b/drivers/bluetooth/hci_qca.c
>>> @@ -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;

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

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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-06 16:21 [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup Balakrishna Godavarthi
  2019-03-06 22:33 ` Stephen Boyd
@ 2019-03-08  5:15 ` rjliao
  1 sibling, 0 replies; 8+ messages in thread
From: rjliao @ 2019-03-08  5:15 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: marcel, johan.hedberg, mka, linux-kernel, linux-bluetooth,
	hemantg, linux-arm-msm

在 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.
> 
> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> ---
>  drivers/bluetooth/hci_qca.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 237aea34b69f..1953b13511e7 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -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;
Reviewed-by: Rocky Liao <rjliao@codeaurora.org>
Tested-by: Rocky Liao <rjliao@codeaurora.org>

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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-07  6:49   ` Balakrishna Godavarthi
  2019-03-07  6:52     ` rjliao
@ 2019-03-13  9:45     ` rjliao
  2019-03-19  0:49       ` Nicolas Boichat
  1 sibling, 1 reply; 8+ messages in thread
From: rjliao @ 2019-03-13  9:45 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: Stephen Boyd, johan.hedberg, marcel, mka, linux-kernel,
	linux-bluetooth, hemantg, linux-arm-msm

在 2019-03-07 14:49,Balakrishna Godavarthi 写道:
> Hi Stepen,
> 
> On 2019-03-07 04:03, Stephen Boyd wrote:
>> Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)
>>> This patch enables enough time to ROME controller to bootup
>>> after we bring the enable ping out of reset.
>>> 
>>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
>>> ---
>> 
>> 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.
> 
>>>  drivers/bluetooth/hci_qca.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>> 
>>> diff --git a/drivers/bluetooth/hci_qca.c 
>>> b/drivers/bluetooth/hci_qca.c
>>> index 237aea34b69f..1953b13511e7 100644
>>> --- a/drivers/bluetooth/hci_qca.c
>>> +++ b/drivers/bluetooth/hci_qca.c
>>> @@ -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;

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.

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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-13  9:45     ` rjliao
@ 2019-03-19  0:49       ` Nicolas Boichat
  2019-03-19  2:35         ` Claire Chang
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Boichat @ 2019-03-19  0:49 UTC (permalink / raw)
  To: rjliao
  Cc: Balakrishna Godavarthi, Stephen Boyd, johan.hedberg, marcel,
	Matthias Kaehlcke, lkml, linux-bluetooth, hemantg, linux-arm-msm,
	Claire Chang

On Wed, Mar 13, 2019 at 5:45 PM <rjliao@codeaurora.org> wrote:
>
> 在 2019-03-07 14:49,Balakrishna Godavarthi 写道:
> > Hi Stepen,
> >
> > On 2019-03-07 04:03, Stephen Boyd wrote:
> >> Quoting Balakrishna Godavarthi (2019-03-06 08:21:13)
> >>> This patch enables enough time to ROME controller to bootup
> >>> after we bring the enable ping out of reset.
> >>>
> >>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> >>> ---
> >>
> >> 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.
> >
> >>>  drivers/bluetooth/hci_qca.c | 2 ++
> >>>  1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/drivers/bluetooth/hci_qca.c
> >>> b/drivers/bluetooth/hci_qca.c
> >>> index 237aea34b69f..1953b13511e7 100644
> >>> --- a/drivers/bluetooth/hci_qca.c
> >>> +++ b/drivers/bluetooth/hci_qca.c
> >>> @@ -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;
>
> 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.

Stephen was also asking about a Fixes tag, maybe we should add this?
Fixes: 05ba533c5c11 ("Bluetooth: hci_qca: Add serdev support")

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

* Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup.
  2019-03-19  0:49       ` Nicolas Boichat
@ 2019-03-19  2:35         ` Claire Chang
  0 siblings, 0 replies; 8+ messages in thread
From: Claire Chang @ 2019-03-19  2:35 UTC (permalink / raw)
  To: Nicolas Boichat
  Cc: rjliao, Balakrishna Godavarthi, Stephen Boyd, johan.hedberg,
	marcel, Matthias Kaehlcke, lkml, linux-bluetooth, hemantg,
	linux-arm-msm, Claire Chang

> > >>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Tested-by: Claire Chang <tientzu@chromium.org>

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

end of thread, other threads:[~2019-03-19  2:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 16:21 [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup Balakrishna Godavarthi
2019-03-06 22:33 ` Stephen Boyd
2019-03-07  6:49   ` Balakrishna Godavarthi
2019-03-07  6:52     ` rjliao
2019-03-13  9:45     ` rjliao
2019-03-19  0:49       ` Nicolas Boichat
2019-03-19  2:35         ` Claire Chang
2019-03-08  5:15 ` rjliao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).