[PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined

Shuai Zhang posted 1 patch 2 weeks, 4 days ago
There is a newer version of this series
drivers/bluetooth/hci_qca.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Shuai Zhang 2 weeks, 4 days ago
For platforms where the bt_en GPIO is not defined, software-based power
control should be disabled when power is managed by hardware.

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
cleared when bt_en is absent, aligning its behavior with WCN6750 and
WCN6855.

Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
---
 drivers/bluetooth/hci_qca.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index c17a462aef55..4512ff7cd0c0 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 
 		if (!qcadev->bt_en &&
 		    (data->soc_type == QCA_WCN6750 ||
-		     data->soc_type == QCA_WCN6855))
+		     data->soc_type == QCA_WCN6855 ||
+		     data->soc_type == QCA_WCN7850))
 			power_ctrl_enabled = false;
 
 		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
-- 
2.34.1
Re: [PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Dmitry Baryshkov 2 weeks, 4 days ago
On Thu, Mar 19, 2026 at 11:10:40AM +0800, Shuai Zhang wrote:
> For platforms where the bt_en GPIO is not defined, software-based power
> control should be disabled when power is managed by hardware.

What does it mean for this chip, managing the power in hardware?

> 
> Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
> cleared when bt_en is absent, aligning its behavior with WCN6750 and
> WCN6855.
> 
> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> ---
>  drivers/bluetooth/hci_qca.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index c17a462aef55..4512ff7cd0c0 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>  
>  		if (!qcadev->bt_en &&
>  		    (data->soc_type == QCA_WCN6750 ||
> -		     data->soc_type == QCA_WCN6855))
> +		     data->soc_type == QCA_WCN6855 ||
> +		     data->soc_type == QCA_WCN7850))
>  			power_ctrl_enabled = false;
>  
>  		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
> -- 
> 2.34.1
> 

-- 
With best wishes
Dmitry
Re: [PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Shuai Zhang 2 weeks, 4 days ago
Hi  Dmitry

On 3/19/2026 11:51 AM, Dmitry Baryshkov wrote:
> On Thu, Mar 19, 2026 at 11:10:40AM +0800, Shuai Zhang wrote:
>> For platforms where the bt_en GPIO is not defined, software-based power
>> control should be disabled when power is managed by hardware.
> What does it mean for this chip, managing the power in hardware?

bt_en is pulled high by hardware, or described in the device tree as a 
regular always-on GPIO.


>> Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
>> cleared when bt_en is absent, aligning its behavior with WCN6750 and
>> WCN6855.
>>
>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>> ---
>>   drivers/bluetooth/hci_qca.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index c17a462aef55..4512ff7cd0c0 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>>   
>>   		if (!qcadev->bt_en &&
>>   		    (data->soc_type == QCA_WCN6750 ||
>> -		     data->soc_type == QCA_WCN6855))
>> +		     data->soc_type == QCA_WCN6855 ||
>> +		     data->soc_type == QCA_WCN7850))
>>   			power_ctrl_enabled = false;
>>   
>>   		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
>> -- 
>> 2.34.1
>>
Re: [PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Dmitry Baryshkov 2 weeks, 4 days ago
On Thu, Mar 19, 2026 at 01:21:58PM +0800, Shuai Zhang wrote:
> Hi  Dmitry
> 
> On 3/19/2026 11:51 AM, Dmitry Baryshkov wrote:
> > On Thu, Mar 19, 2026 at 11:10:40AM +0800, Shuai Zhang wrote:
> > > For platforms where the bt_en GPIO is not defined, software-based power
> > > control should be disabled when power is managed by hardware.
> > What does it mean for this chip, managing the power in hardware?
> 
> bt_en is pulled high by hardware,

In which cases is it applicable?

> or described in the device tree as a
> regular always-on GPIO.

Why?

> 
> 
> > > Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
> > > cleared when bt_en is absent, aligning its behavior with WCN6750 and
> > > WCN6855.
> > > 
> > > Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> > > ---
> > >   drivers/bluetooth/hci_qca.c | 3 ++-
> > >   1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> > > index c17a462aef55..4512ff7cd0c0 100644
> > > --- a/drivers/bluetooth/hci_qca.c
> > > +++ b/drivers/bluetooth/hci_qca.c
> > > @@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
> > >   		if (!qcadev->bt_en &&
> > >   		    (data->soc_type == QCA_WCN6750 ||
> > > -		     data->soc_type == QCA_WCN6855))
> > > +		     data->soc_type == QCA_WCN6855 ||
> > > +		     data->soc_type == QCA_WCN7850))
> > >   			power_ctrl_enabled = false;
> > >   		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
> > > -- 
> > > 2.34.1
> > > 

-- 
With best wishes
Dmitry
Re: [PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Shuai Zhang 2 weeks, 4 days ago
On 3/19/2026 1:42 PM, Dmitry Baryshkov wrote:
> On Thu, Mar 19, 2026 at 01:21:58PM +0800, Shuai Zhang wrote:
>> Hi  Dmitry
>>
>> On 3/19/2026 11:51 AM, Dmitry Baryshkov wrote:
>>> On Thu, Mar 19, 2026 at 11:10:40AM +0800, Shuai Zhang wrote:
>>>> For platforms where the bt_en GPIO is not defined, software-based power
>>>> control should be disabled when power is managed by hardware.
>>> What does it mean for this chip, managing the power in hardware?
>> bt_en is pulled high by hardware,
> In which cases is it applicable?


On platforms using an M.2 slot with both UART and USB support, bt_en is 
pulled high

by hardware. The current platforms are Lemans‑EVK and Monaco‑EVK.


>
>> or described in the device tree as a
>> regular always-on GPIO.
> Why?


This is equivalent to bt_en being pulled high by hardware,

and it applies to the same scenarios and platforms mentioned above.


>
>>
>>>> Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
>>>> cleared when bt_en is absent, aligning its behavior with WCN6750 and
>>>> WCN6855.
>>>>
>>>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>>>> ---
>>>>    drivers/bluetooth/hci_qca.c | 3 ++-
>>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>>>> index c17a462aef55..4512ff7cd0c0 100644
>>>> --- a/drivers/bluetooth/hci_qca.c
>>>> +++ b/drivers/bluetooth/hci_qca.c
>>>> @@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>>>>    		if (!qcadev->bt_en &&
>>>>    		    (data->soc_type == QCA_WCN6750 ||
>>>> -		     data->soc_type == QCA_WCN6855))
>>>> +		     data->soc_type == QCA_WCN6855 ||
>>>> +		     data->soc_type == QCA_WCN7850))
>>>>    			power_ctrl_enabled = false;
>>>>    		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
>>>> -- 
>>>> 2.34.1
>>>>
Re: [PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Dmitry Baryshkov 2 weeks, 4 days ago
On Thu, Mar 19, 2026 at 02:06:49PM +0800, Shuai Zhang wrote:
> 
> On 3/19/2026 1:42 PM, Dmitry Baryshkov wrote:
> > On Thu, Mar 19, 2026 at 01:21:58PM +0800, Shuai Zhang wrote:
> > > Hi  Dmitry
> > > 
> > > On 3/19/2026 11:51 AM, Dmitry Baryshkov wrote:
> > > > On Thu, Mar 19, 2026 at 11:10:40AM +0800, Shuai Zhang wrote:
> > > > > For platforms where the bt_en GPIO is not defined, software-based power
> > > > > control should be disabled when power is managed by hardware.
> > > > What does it mean for this chip, managing the power in hardware?
> > > bt_en is pulled high by hardware,
> > In which cases is it applicable?
> 
> 
> On platforms using an M.2 slot with both UART and USB support, bt_en is
> pulled high
> 
> by hardware. The current platforms are Lemans‑EVK and Monaco‑EVK.

This needs to be a part of the commit message.

> 
> 
> > 
> > > or described in the device tree as a
> > > regular always-on GPIO.
> > Why?
> 
> 
> This is equivalent to bt_en being pulled high by hardware,
> 
> and it applies to the same scenarios and platforms mentioned above.

No, DT would not describe the GPIO as always-on in this case.

> 
> 
> > 
> > > 
> > > > > Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
> > > > > cleared when bt_en is absent, aligning its behavior with WCN6750 and
> > > > > WCN6855.
> > > > > 
> > > > > Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> > > > > ---
> > > > >    drivers/bluetooth/hci_qca.c | 3 ++-
> > > > >    1 file changed, 2 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> > > > > index c17a462aef55..4512ff7cd0c0 100644
> > > > > --- a/drivers/bluetooth/hci_qca.c
> > > > > +++ b/drivers/bluetooth/hci_qca.c
> > > > > @@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
> > > > >    		if (!qcadev->bt_en &&
> > > > >    		    (data->soc_type == QCA_WCN6750 ||
> > > > > -		     data->soc_type == QCA_WCN6855))
> > > > > +		     data->soc_type == QCA_WCN6855 ||
> > > > > +		     data->soc_type == QCA_WCN7850))
> > > > >    			power_ctrl_enabled = false;
> > > > >    		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
> > > > > -- 
> > > > > 2.34.1
> > > > > 

-- 
With best wishes
Dmitry
Re: [PATCH v1] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined
Posted by Shuai Zhang 2 weeks, 4 days ago
On 3/19/2026 2:44 PM, Dmitry Baryshkov wrote:
> On Thu, Mar 19, 2026 at 02:06:49PM +0800, Shuai Zhang wrote:
>> On 3/19/2026 1:42 PM, Dmitry Baryshkov wrote:
>>> On Thu, Mar 19, 2026 at 01:21:58PM +0800, Shuai Zhang wrote:
>>>> Hi  Dmitry
>>>>
>>>> On 3/19/2026 11:51 AM, Dmitry Baryshkov wrote:
>>>>> On Thu, Mar 19, 2026 at 11:10:40AM +0800, Shuai Zhang wrote:
>>>>>> For platforms where the bt_en GPIO is not defined, software-based power
>>>>>> control should be disabled when power is managed by hardware.
>>>>> What does it mean for this chip, managing the power in hardware?
>>>> bt_en is pulled high by hardware,
>>> In which cases is it applicable?
>>
>> On platforms using an M.2 slot with both UART and USB support, bt_en is
>> pulled high
>>
>> by hardware. The current platforms are Lemans‑EVK and Monaco‑EVK.
> This needs to be a part of the commit message.


I will update.


>
>>
>>>> or described in the device tree as a
>>>> regular always-on GPIO.
>>> Why?
>>
>> This is equivalent to bt_en being pulled high by hardware,
>>
>> and it applies to the same scenarios and platforms mentioned above.
> No, DT would not describe the GPIO as always-on in this case.


Yes, understood. In this case, bt_en is pulled high by hardware and is
not described as an always-on GPIO in the device tree.


>
>>
>>>>>> Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is
>>>>>> cleared when bt_en is absent, aligning its behavior with WCN6750 and
>>>>>> WCN6855.
>>>>>>
>>>>>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>>>>>> ---
>>>>>>     drivers/bluetooth/hci_qca.c | 3 ++-
>>>>>>     1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>>>>>> index c17a462aef55..4512ff7cd0c0 100644
>>>>>> --- a/drivers/bluetooth/hci_qca.c
>>>>>> +++ b/drivers/bluetooth/hci_qca.c
>>>>>> @@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>>>>>>     		if (!qcadev->bt_en &&
>>>>>>     		    (data->soc_type == QCA_WCN6750 ||
>>>>>> -		     data->soc_type == QCA_WCN6855))
>>>>>> +		     data->soc_type == QCA_WCN6855 ||
>>>>>> +		     data->soc_type == QCA_WCN7850))
>>>>>>     			power_ctrl_enabled = false;
>>>>>>     		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
>>>>>> -- 
>>>>>> 2.34.1
>>>>>>