diff mbox series

[v3,1/2] Bluetooth: btrtl: Add support for RTL8822C hci_ver 0x08

Message ID 20211027091416.1577668-2-adeep@lexina.in (mailing list archive)
State Queued, archived
Headers show
Series Bluetooth: hci_h5: btrtl: Add support for RTL8822CS hci_ver 0x08 | expand

Checks

Context Check Description
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/buildkernel success Build Kernel PASS
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester fail Total: 468, Passed: 463 (98.9%), Failed: 5, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Viacheslav Oct. 27, 2021, 9:14 a.m. UTC
Add detection of RTL8822CS controller with hci_ver = 0x08

Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
---
 drivers/bluetooth/btrtl.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rudi Heitbaum Jan. 19, 2022, 9:01 a.m. UTC | #1
On Wed, Oct 27, 2021 at 12:14:15PM +0300, Vyacheslav Bocharov wrote:
> Add detection of RTL8822CS controller with hci_ver = 0x08
> 
> Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
> ---
>  drivers/bluetooth/btrtl.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
> index c2bdd1e6060e..38d547cc6fcd 100644
> --- a/drivers/bluetooth/btrtl.c
> +++ b/drivers/bluetooth/btrtl.c
> @@ -156,6 +156,13 @@ static const struct id_table ic_id_table[] = {
>  	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
>  	  .cfg_name = "rtl_bt/rtl8822cs_config" },
>  
> +	/* 8822C with UART interface */
> +	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
> +	  .config_needed = true,
> +	  .has_rom_version = true,
> +	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
> +	  .cfg_name = "rtl_bt/rtl8822cs_config" },
> +
>  	/* 8822C with USB interface */
>  	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_USB),
>  	  .config_needed = false,

Hi Vyacheslav,

Could I make a suggestion rebasing this patch against 5.16 and putting 
the UART hci ver 0008 berore 000a

this has been tested on Tanix TX6.

Before:

[   11.512883] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8822
[   11.512940] Bluetooth: hci0: RTL: unknown IC info, lmp subver 8822, hci rev 000c, hci ver 0008
[   11.512957] Bluetooth: hci0: RTL: no config loaded

After:

[   12.642167] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8822
[   12.671911] Bluetooth: hci0: RTL: rom_version status=0 version=3
[   12.671961] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_fw.bin
[   12.706248] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_config.bin
[   12.730251] Bluetooth: hci0: RTL: cfg_sz 33, total sz 40737
[   13.318832] Bluetooth: hci0: RTL: fw version 0x05a91a4a

Tested-by: Rudi Heitbaum <rudi@heitbaum.com>

---
 drivers/bluetooth/btrtl.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
--- a/drivers/bluetooth/btrtl.c	2022-01-09 22:55:34.000000000 +0000
+++ b/drivers/bluetooth/btrtl.c	2022-01-15 07:12:21.102080089 +0000
@@ -148,7 +148,15 @@
 	  .fw_name  = "rtl_bt/rtl8761bu_fw.bin",
 	  .cfg_name = "rtl_bt/rtl8761bu_config" },
 
+ 	/* 8822C (hci ver 0008) with UART interface */
+	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
+	  .config_needed = true,
+	  .has_rom_version = true,
+	  .has_msft_ext = true,
+	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
+	  .cfg_name = "rtl_bt/rtl8822cs_config" },
+
-	/* 8822C with UART interface */
+	/* 8822C (hci ver 000a) with UART interface */
 	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_UART),
 	  .config_needed = true,
 	  .has_rom_version = true,
--
2.25.1
Viacheslav Jan. 19, 2022, 9:44 a.m. UTC | #2
Hi!
Thanks for reply

19.01.2022 12:01, Rudi Heitbaum wrote:
 > On Wed, Oct 27, 2021 at 12:14:15PM +0300, Vyacheslav Bocharov wrote:
 >> Add detection of RTL8822CS controller with hci_ver = 0x08
 >>
 >> Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
 >> ---
 >>   drivers/bluetooth/btrtl.c | 7 +++++++
 >>   1 file changed, 7 insertions(+)
 >>
 >> diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
 >> index c2bdd1e6060e..38d547cc6fcd 100644
 >> --- a/drivers/bluetooth/btrtl.c
 >> +++ b/drivers/bluetooth/btrtl.c
 >> @@ -156,6 +156,13 @@ static const struct id_table ic_id_table[] = {
 >>   	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
 >>   	  .cfg_name = "rtl_bt/rtl8822cs_config" },
 >>
 >> +	/* 8822C with UART interface */
 >> +	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
 >> +	  .config_needed = true,
 >> +	  .has_rom_version = true,
 >> +	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
 >> +	  .cfg_name = "rtl_bt/rtl8822cs_config" },
 >> +
 >>   	/* 8822C with USB interface */
 >>   	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_USB),
 >>   	  .config_needed = false,
 >
 > Hi Vyacheslav,
 >
 > Could I make a suggestion rebasing this patch against 5.16 and putting
 > the UART hci ver 0008 berore 000aI recently submitted a v4 patch with 
the .has_msft_ext added based on bluetooth-next, but without the correct 
order.
https://patchwork.kernel.org/project/bluetooth/list/?series=606500
Maybe the order of the lines is not so important?)

 >
 > this has been tested on Tanix TX6.also tested on JetHome JetHub H1 
and applied to Armbian patchset 
(https://github.com/armbian/build/pull/3201).

Also need to update the firmware in linux-firmware, the correct binaries 
are in armbian-firmware.

 >
 > Before:
 >
 > [   11.512883] Bluetooth: hci0: RTL: examining hci_ver=08 
hci_rev=000c lmp_ver=08 lmp_subver=8822
 > [   11.512940] Bluetooth: hci0: RTL: unknown IC info, lmp subver 
8822, hci rev 000c, hci ver 0008
 > [   11.512957] Bluetooth: hci0: RTL: no config loaded
 >
 > After:
 >
 > [   12.642167] Bluetooth: hci0: RTL: examining hci_ver=08 
hci_rev=000c lmp_ver=08 lmp_subver=8822
 > [   12.671911] Bluetooth: hci0: RTL: rom_version status=0 version=3
 > [   12.671961] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_fw.bin
 > [   12.706248] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_config.bin
 > [   12.730251] Bluetooth: hci0: RTL: cfg_sz 33, total sz 40737
 > [   13.318832] Bluetooth: hci0: RTL: fw version 0x05a91a4a
 >
 > Tested-by: Rudi Heitbaum <rudi@heitbaum.com>
 >
 > ---
 >   drivers/bluetooth/btrtl.c | 10 +++++++++-
 >   1 file changed, 9 insertions(+), 1 deletion(-)
 >
 > diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
 > --- a/drivers/bluetooth/btrtl.c	2022-01-09 22:55:34.000000000 +0000
 > +++ b/drivers/bluetooth/btrtl.c	2022-01-15 07:12:21.102080089 +0000
 > @@ -148,7 +148,15 @@
 >   	  .fw_name  = "rtl_bt/rtl8761bu_fw.bin",
 >   	  .cfg_name = "rtl_bt/rtl8761bu_config" },
 >
 > + 	/* 8822C (hci ver 0008) with UART interface */
 > +	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
 > +	  .config_needed = true,
 > +	  .has_rom_version = true,
 > +	  .has_msft_ext = true,
 > +	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
 > +	  .cfg_name = "rtl_bt/rtl8822cs_config" },
 > +
 > -	/* 8822C with UART interface */
 > +	/* 8822C (hci ver 000a) with UART interface */
 >   	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_UART),
 >   	  .config_needed = true,
 >   	  .has_rom_version = true,
 > --
 > 2.25.1
 >
--
Vyacheslav
diff mbox series

Patch

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index c2bdd1e6060e..38d547cc6fcd 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -156,6 +156,13 @@  static const struct id_table ic_id_table[] = {
 	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
 	  .cfg_name = "rtl_bt/rtl8822cs_config" },
 
+	/* 8822C with UART interface */
+	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
+	  .config_needed = true,
+	  .has_rom_version = true,
+	  .fw_name  = "rtl_bt/rtl8822cs_fw.bin",
+	  .cfg_name = "rtl_bt/rtl8822cs_config" },
+
 	/* 8822C with USB interface */
 	{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_USB),
 	  .config_needed = false,