mbox series

[v7,0/2] Bluetooth: hci_h5: btrtl: Add support for RTL8822CS hci_ver 0x08

Message ID 20220126073905.3637841-1-adeep@lexina.in (mailing list archive)
Headers show
Series Bluetooth: hci_h5: btrtl: Add support for RTL8822CS hci_ver 0x08 | expand

Message

Viacheslav Jan. 26, 2022, 7:39 a.m. UTC
Add a variation of RTL8822CS with hci_ver = 0x08. This is fully similar
to RTL8822CS with hci_ver = 0x0a observed on the Tanix TX6 Android set-top
box and JetHome JetHub H1.

While testing the RTL8822CS SDIO WiFi/BT adapter, I found that in some
cases the kernel could not initialize it. However, manually resetting the
adapter via gpio allows it to start correctly.
Apparently at system start the adapter is in an undefined state (including
the unknown state of gpio after starting uboot). A forced reset helps to
initialize the adapter in most cases. Experimentally it was found that
100ms is enough to reset.
So, add power reset via enable-gpios in h5_btrtl_open function.

Changes from v6..v4:
- fix patch description
Changes from v3:
- add has_msft_ext option
Changes from v2:
- align the patches for bluetooth-next
Changes from v1:
- remove Signed-off-by chbgdn <chbgdn@gmail.com> as not reachable

Vyacheslav Bocharov (2):
  Bluetooth: btrtl: Add support for RTL8822C hci_ver 0x08
  Bluetooth: hci_h5: Add power reset via gpio in h5_btrtl_open

 drivers/bluetooth/btrtl.c  | 8 ++++++++
 drivers/bluetooth/hci_h5.c | 5 +++++
 2 files changed, 13 insertions(+)

Comments

Marcel Holtmann Jan. 26, 2022, 1:40 p.m. UTC | #1
Hi Vyacheslav,

> Add a variation of RTL8822CS with hci_ver = 0x08. This is fully similar
> to RTL8822CS with hci_ver = 0x0a observed on the Tanix TX6 Android set-top
> box and JetHome JetHub H1.
> 
> While testing the RTL8822CS SDIO WiFi/BT adapter, I found that in some
> cases the kernel could not initialize it. However, manually resetting the
> adapter via gpio allows it to start correctly.
> Apparently at system start the adapter is in an undefined state (including
> the unknown state of gpio after starting uboot). A forced reset helps to
> initialize the adapter in most cases. Experimentally it was found that
> 100ms is enough to reset.
> So, add power reset via enable-gpios in h5_btrtl_open function.
> 
> Changes from v6..v4:
> - fix patch description
> Changes from v3:
> - add has_msft_ext option
> Changes from v2:
> - align the patches for bluetooth-next
> Changes from v1:
> - remove Signed-off-by chbgdn <chbgdn@gmail.com> as not reachable
> 
> Vyacheslav Bocharov (2):
>  Bluetooth: btrtl: Add support for RTL8822C hci_ver 0x08
>  Bluetooth: hci_h5: Add power reset via gpio in h5_btrtl_open
> 
> drivers/bluetooth/btrtl.c  | 8 ++++++++
> drivers/bluetooth/hci_h5.c | 5 +++++
> 2 files changed, 13 insertions(+)

both patches have been applied to bluetooth-next tree.

Regards

Marcel
Viacheslav Jan. 26, 2022, 2:14 p.m. UTC | #2
26.01.2022 16:40, Marcel Holtmann wrote:
> Hi Vyacheslav,
> 
>> Add a variation of RTL8822CS with hci_ver = 0x08. This is fully similar
>> to RTL8822CS with hci_ver = 0x0a observed on the Tanix TX6 Android set-top
>> box and JetHome JetHub H1.
>>
>> While testing the RTL8822CS SDIO WiFi/BT adapter, I found that in some
>> cases the kernel could not initialize it. However, manually resetting the
>> adapter via gpio allows it to start correctly.
>> Apparently at system start the adapter is in an undefined state (including
>> the unknown state of gpio after starting uboot). A forced reset helps to
>> initialize the adapter in most cases. Experimentally it was found that
>> 100ms is enough to reset.
>> So, add power reset via enable-gpios in h5_btrtl_open function.
>>
>> Changes from v6..v4:
>> - fix patch description
>> Changes from v3:
>> - add has_msft_ext option
>> Changes from v2:
>> - align the patches for bluetooth-next
>> Changes from v1:
>> - remove Signed-off-by chbgdn <chbgdn@gmail.com> as not reachable
>>
>> Vyacheslav Bocharov (2):
>>   Bluetooth: btrtl: Add support for RTL8822C hci_ver 0x08
>>   Bluetooth: hci_h5: Add power reset via gpio in h5_btrtl_open
>>
>> drivers/bluetooth/btrtl.c  | 8 ++++++++
>> drivers/bluetooth/hci_h5.c | 5 +++++
>> 2 files changed, 13 insertions(+)
> 
> both patches have been applied to bluetooth-next tree.

Thanks!

> 
> Regards
> 
> Marcel
>
Rudi Heitbaum Jan. 28, 2022, 11:24 a.m. UTC | #3
On Wed, Jan 26, 2022 at 02:40:38PM +0100, Marcel Holtmann wrote:
> Hi Vyacheslav,
> 
> > Add a variation of RTL8822CS with hci_ver = 0x08. This is fully similar
> > to RTL8822CS with hci_ver = 0x0a observed on the Tanix TX6 Android set-top
> > box and JetHome JetHub H1.
> > 
> > While testing the RTL8822CS SDIO WiFi/BT adapter, I found that in some
> > cases the kernel could not initialize it. However, manually resetting the
> > adapter via gpio allows it to start correctly.
> > Apparently at system start the adapter is in an undefined state (including
> > the unknown state of gpio after starting uboot). A forced reset helps to
> > initialize the adapter in most cases. Experimentally it was found that
> > 100ms is enough to reset.
> > So, add power reset via enable-gpios in h5_btrtl_open function.
> > 
> > Changes from v6..v4:
> > - fix patch description
> > Changes from v3:
> > - add has_msft_ext option
> > Changes from v2:
> > - align the patches for bluetooth-next
> > Changes from v1:
> > - remove Signed-off-by chbgdn <chbgdn@gmail.com> as not reachable
> > 
> > Vyacheslav Bocharov (2):
> >  Bluetooth: btrtl: Add support for RTL8822C hci_ver 0x08
> >  Bluetooth: hci_h5: Add power reset via gpio in h5_btrtl_open
> > 
> > drivers/bluetooth/btrtl.c  | 8 ++++++++
> > drivers/bluetooth/hci_h5.c | 5 +++++
> > 2 files changed, 13 insertions(+)
> 
> both patches have been applied to bluetooth-next tree.

Thanks Marcel and Vyacheslav

> Regards
> 
> Marcel
>