From: Chris Morgan <macroalpha82@gmail.com>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
alistair@alistair23.me, luiz.dentz@gmail.com,
johan.hedberg@gmail.com, marcel@holtmann.org, heiko@sntech.de,
krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH 2/3 V4] Bluetooth: hci_h5: btrtl: Add support for RTL8821CS
Date: Mon, 13 Mar 2023 14:14:46 -0500 [thread overview]
Message-ID: <640f7caa.050a0220.7e478.2265@mx.google.com> (raw)
In-Reply-To: <CA+E=qVdjvYn2qPCP+9EaS=90DT_uEVSk0z04tU3DL0X8NumUAQ@mail.gmail.com>
On Mon, Mar 13, 2023 at 11:36:21AM -0700, Vasily Khoruzhick wrote:
> On Mon, Mar 13, 2023 at 11:12 AM Chris Morgan <macroalpha82@gmail.com> wrote:
> >
> > I found the fix, simply put changing the compatible from
> > realtek,rtl8822cs-bt to realtek,rtl8732bs-bt fixes it (because it sets
> > the "H5_INFO_WAKEUP_DISABLE" flag). Is it too late for a V5, or should
> > I submit this as a fix to the devicetree and devicetree documentation?
>
> But is it actually compatible with rtl8723bs-bt though? I think you
> may need to add an entry for 8821cs to rtl_bluetooth_of_match in
> hci_h5.c
The compatible string would be an exact copy of what is present for
rtl8723bs-bt. Previously I was advised by the devicetree team to just
use a fallback string rather than add a duplicate entry to the driver,
so that's what I did. The driver itself can detect the difference
between the 8821cs and 8723bs and load the appropriate firmware.
Technically the rtl8822cs-bt also works as long as you only want to
"test" the driver and not use it. It's the power management stuff
that causes it to fail roughly 9 out of every 10 times you try to
use it for more than simple pairing (I tested 3 different controllers
with the new compatible string for a total of 7 tests and it works
consistently now).
If you're okay with the compatible string change, I'll update it and
resubmit this as a V5. It shouldn't require a change to the driver,
only the binding.
Thank you.
>
> > Thank you.
> >
> > On Fri, Mar 10, 2023 at 10:25 AM Chris Morgan <macroalpha82@gmail.com> wrote:
> > >
> > > I shudder to bring this up now, but I'm encountering a new bug and
> > > might have to withdraw this.
> > >
> > > I'm receiving errors in dmesg of the following, and I can't seem to
> > > figure out the root cause:
> > > Bluetooth: hci0: Out-of-order packet arrived
> > >
> > > Any thoughts on what might cause it?
> > > Thank you.
> > >
> > > On Tue, Feb 28, 2023 at 9:22 AM Chris Morgan <macroalpha82@gmail.com> wrote:
> > > >
> > > > From: Chris Morgan <macromorgan@hotmail.com>
> > > >
> > > > RTL8821CS is a WiFi + Bluetooth combo chip from Realtek that provides
> > > > WiFi A/B/G/N/AC over an SDIO interface and Bluetooth 4.2 over a UART
> > > > interface.
> > > >
> > > > Note that the firmware this was tested with was firmware version
> > > > 0x75b8f098.
> > > >
> > > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > > > ---
> > > > drivers/bluetooth/btrtl.c | 8 ++++++++
> > > > 1 file changed, 8 insertions(+)
> > > >
> > > > diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
> > > > index 69c3fe649ca7..72947d319fa6 100644
> > > > --- a/drivers/bluetooth/btrtl.c
> > > > +++ b/drivers/bluetooth/btrtl.c
> > > > @@ -128,6 +128,14 @@ static const struct id_table ic_id_table[] = {
> > > > .fw_name = "rtl_bt/rtl8821c_fw.bin",
> > > > .cfg_name = "rtl_bt/rtl8821c_config" },
> > > >
> > > > + /* 8821CS */
> > > > + { IC_INFO(RTL_ROM_LMP_8821A, 0xc, 0x8, HCI_UART),
> > > > + .config_needed = true,
> > > > + .has_rom_version = true,
> > > > + .has_msft_ext = true,
> > > > + .fw_name = "rtl_bt/rtl8821cs_fw.bin",
> > > > + .cfg_name = "rtl_bt/rtl8821cs_config" },
> > > > +
> > > > /* 8761A */
> > > > { IC_INFO(RTL_ROM_LMP_8761A, 0xa, 0x6, HCI_USB),
> > > > .config_needed = false,
> > > > --
> > > > 2.34.1
> > > >
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2023-03-13 19:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 15:22 [PATCH 0/3 V4] Bluetooth: Add support for RTL8821CS Chris Morgan
2023-02-28 15:22 ` [PATCH 1/3 V4] dt-bindings: net: realtek-bluetooth: Add RTL8821CS Chris Morgan
2023-02-28 15:25 ` Krzysztof Kozlowski
2023-02-28 22:39 ` Alistair
2023-02-28 15:22 ` [PATCH 2/3 V4] Bluetooth: hci_h5: btrtl: Add support for RTL8821CS Chris Morgan
2023-03-10 16:25 ` Chris Morgan
2023-03-13 18:12 ` Chris Morgan
2023-03-13 18:36 ` Vasily Khoruzhick
2023-03-13 19:14 ` Chris Morgan [this message]
2023-02-28 15:22 ` [PATCH 3/3 V4] arm64: dts: rockchip: Update compatible for bluetooth Chris Morgan
2023-03-04 0:50 ` [PATCH 0/3 V4] Bluetooth: Add support for RTL8821CS patchwork-bot+bluetooth
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=640f7caa.050a0220.7e478.2265@mx.google.com \
--to=macroalpha82@gmail.com \
--cc=alistair@alistair23.me \
--cc=anarsoul@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=johan.hedberg@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=luiz.dentz@gmail.com \
--cc=macromorgan@hotmail.com \
--cc=marcel@holtmann.org \
--cc=robh+dt@kernel.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