mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: rudi@heitbaum.com
Cc: alistair@alistair23.me, anarsoul@gmail.com, conor+dt@kernel.org,
	davem@davemloft.net, devicetree@vger.kernel.org,
	edumazet@google.com, jernej.skrabec@gmail.com,
	johan.hedberg@gmail.com, krzysztof.kozlowski+dt@linaro.org,
	kuba@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sunxi@lists.linux.dev, luiz.dentz@gmail.com,
	marcel@holtmann.org, netdev@vger.kernel.org, pabeni@redhat.com,
	robh+dt@kernel.org, samuel@sholland.org, wens@csie.org
Subject: Re: [PATCH 2/3] Bluetooth: btrtl: Add support for RTL8822BS UART
Date: Sun, 14 May 2023 10:15:56 +0200	[thread overview]
Message-ID: <b39161bb-5ebd-89b8-dc25-df05f0304a8f@wanadoo.fr> (raw)
In-Reply-To: <20230514074731.70614-3-rudi@heitbaum.com>

Le 14/05/2023 à 09:47, Rudi Heitbaum a écrit :
> Add a RTL8822BS UART with hci_ver = 0x07. This is similar to RTL8822CS
> observed on the Tanix TX6 Android set-top box. But the previous
> generation of chip. The RTL8822BS requires the
> BROKEN_LOCAL_EXT_FEATURES_PAGE_2 quirk.
> 
> Signed-off-by: Rudi Heitbaum <rudi-8t6dWLoy+3lWk0Htik3J/w@public.gmane.org>
> ---
>   drivers/bluetooth/btrtl.c  | 12 +++++++++++-
>   drivers/bluetooth/hci_h5.c |  6 ++++++
>   2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
> index 2915c82d719d..b53a4ef88550 100644
> --- a/drivers/bluetooth/btrtl.c
> +++ b/drivers/bluetooth/btrtl.c
> @@ -234,7 +234,15 @@ static const struct id_table ic_id_table[] = {
>   	  .fw_name  = "rtl_bt/rtl8822cu_fw.bin",
>   	  .cfg_name = "rtl_bt/rtl8822cu_config" },
>   
> -	/* 8822B */
> +	/* 8822BS with UART interface */
> +	{ IC_INFO(RTL_ROM_LMP_8822B, 0xb, 0x7, HCI_UART),
> +	  .config_needed = true,
> +	  .has_rom_version = true,
> +	  .has_msft_ext = true,
> +	  .fw_name  = "rtl_bt/rtl8822bs_fw.bin",
> +	  .cfg_name = "rtl_bt/rtl8822bs_config" },
> +
> +	/* 8822BU with USB interface */
>   	{ IC_INFO(RTL_ROM_LMP_8822B, 0xb, 0x7, HCI_USB),
>   	  .config_needed = true,
>   	  .has_rom_version = true,
> @@ -1182,6 +1190,8 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
>   
>   		hci_set_aosp_capable(hdev);
>   		break;
> +	case CHIP_ID_8822B:
> +		set_bit(HCI_QUIRK_BROKEN_LOCAL_EXT_FEATURES_PAGE_2, &hdev->quirks);

break missing?
If it is intentinal, a "fallthrough;" would be more explicit.

just my 2c,

CJ

>   	default:
>   		rtl_dev_dbg(hdev, "Central-peripheral role not enabled.");
>   		rtl_dev_dbg(hdev, "WBS supported not enabled.");
> diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
> index fefc37b98b4a..726b6c7e28b8 100644
> --- a/drivers/bluetooth/hci_h5.c
> +++ b/drivers/bluetooth/hci_h5.c
> @@ -1072,6 +1072,10 @@ static struct h5_vnd rtl_vnd = {
>   	.acpi_gpio_map	= acpi_btrtl_gpios,
>   };
>   
> +static const struct h5_device_data h5_data_rtl8822bs = {
> +	.vnd = &rtl_vnd,
> +};
> +
>   static const struct h5_device_data h5_data_rtl8822cs = {
>   	.vnd = &rtl_vnd,
>   };
> @@ -1100,6 +1104,8 @@ static const struct dev_pm_ops h5_serdev_pm_ops = {
>   
>   static const struct of_device_id rtl_bluetooth_of_match[] = {
>   #ifdef CONFIG_BT_HCIUART_RTL
> +	{ .compatible = "realtek,rtl8822bs-bt",
> +	  .data = (const void *)&h5_data_rtl8822bs },
>   	{ .compatible = "realtek,rtl8822cs-bt",
>   	  .data = (const void *)&h5_data_rtl8822cs },
>   	{ .compatible = "realtek,rtl8723bs-bt",


  reply	other threads:[~2023-05-14  8:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-14  7:47 [PATCH 0/3] Bluetooth: btrtl: Add support for RTL8822BS Rudi Heitbaum
2023-05-14  7:47 ` [PATCH 1/3] dt-bindings: net: realtek-bluetooth: Add RTL8822BS Rudi Heitbaum
2023-05-14  9:51   ` Krzysztof Kozlowski
2023-05-14  9:53   ` Krzysztof Kozlowski
2023-05-14  7:47 ` [PATCH 2/3] Bluetooth: btrtl: Add support for RTL8822BS UART Rudi Heitbaum
2023-05-14  8:15   ` Christophe JAILLET [this message]
2023-05-14  9:14   ` kernel test robot
2023-05-14  9:44   ` kernel test robot
2023-05-14 11:05   ` kernel test robot
2023-05-14  7:47 ` [PATCH 3/3] arm64: dts: allwinner: h6: tanix-tx6: Add compatible bluetooth Rudi Heitbaum
2023-05-14  9:55   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b39161bb-5ebd-89b8-dc25-df05f0304a8f@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=alistair@alistair23.me \
    --cc=anarsoul@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=johan.hedberg@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=rudi@heitbaum.com \
    --cc=samuel@sholland.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®