Bluetooth: Add support for RTL8821CS
Subsystems (4)
v2 cover Bluetooth: Add support for RTL8821CS
From: Chris Morgan <[email protected]>
This patch series is to add support for the RTL8821CS Bluetooth controller found on the RTL8821CS WiFi/Bluetooth combo chip.
This has been tested with firmware version 0x75b8f098 which has been submitted by Realtek for inclusion in linux-firmware.
https://lore.kernel.org/linux-firmware/[email protected]/
Changes from V1:
- Switched to use a fallback string for the rtl8822cs so as to not add an extra entry to the of_device_id table. The driver is capable of selecting the correct firmware blob to load.
- Updated the messages to note a new version of the firmware was tested and that Realtek has submitted this firmware upstream.
- Updated the devicetree node on the Anbernic RGxx3 series to use the fallback string of realtek,rtl8822cs-bt.
Chris Morgan (3):
dt-bindings: net: realtek-bluetooth: Add RTL8821CS
Bluetooth: hci_h5: btrtl: Add support for RTL8821CS
arm64: dts: rockchip: Update compatible for bluetooth
.../bindings/net/realtek-bluetooth.yaml | 23 +++++++++++-------- .../dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 2 +- drivers/bluetooth/btrtl.c | 8 +++++++ 3 files changed, 23 insertions(+), 10 deletions(-)
Signature · 7 lines
2.34.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v2 1/3 dt-bindings: net: realtek-bluetooth: Add RTL8821CS
From: Chris Morgan <[email protected]>
Add compatible string for RTL8821CS for existing Realtek Bluetooth driver.
--- .../bindings/net/realtek-bluetooth.yaml | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +14 -9
@@ -4,24 +4,29 @@ $id: http://devicetree.org/schemas/net/realtek-bluetooth.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth +title: RTL8723BS/RTL8723CS/RTL8821CS/RTL8822CS Bluetooth maintainers: - Vasily Khoruzhick <[email protected]> - Alistair Francis <[email protected]> description: - RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over - SDIO, while BT is connected over serial. It speaks H5 protocol with few - extra commands to upload firmware and change module speed. + RTL8723CS/RTL8723CS/RTL8821CS/RTL8822CS is a WiFi + BT chip. WiFi part + is connected over SDIO, while BT is connected over serial. It speaks + H5 protocol with few extra commands to upload firmware and change + module speed. properties: compatible: - enum: - - realtek,rtl8723bs-bt - - realtek,rtl8723cs-bt - - realtek,rtl8723ds-bt - - realtek,rtl8822cs-bt + oneOf: + - const: realtek,rtl8723bs-bt + - const: realtek,rtl8723cs-bt + - const: realtek,rtl8723ds-bt + - const: realtek,rtl8822cs-bt + - items: + - enum: + - realtek,rtl8821cs-bt + - const: realtek,rtl8822cs-bt device-wake-gpios: maxItems: 1
Signature · 1 line
2.34.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=724799
---Test result---
Test Summary:
CheckPatch PASS 1.97 seconds GitLint PASS 1.02 seconds SubjectPrefix FAIL 0.62 seconds BuildKernel PASS 31.79 seconds CheckAllWarning PASS 34.69 seconds CheckSparse WARNING 39.58 seconds CheckSmatch WARNING 109.23 seconds BuildKernel32 PASS 30.47 seconds TestRunnerSetup PASS 438.75 seconds TestRunner_l2cap-tester PASS 15.89 seconds TestRunner_iso-tester PASS 16.25 seconds TestRunner_bnep-tester PASS 5.38 seconds TestRunner_mgmt-tester PASS 108.41 seconds TestRunner_rfcomm-tester PASS 8.57 seconds TestRunner_sco-tester PASS 7.85 seconds TestRunner_ioctl-tester PASS 9.13 seconds TestRunner_mesh-tester PASS 6.81 seconds TestRunner_smp-tester PASS 7.81 seconds TestRunner_userchan-tester PASS 5.56 seconds IncrementalBuild PASS 36.88 seconds
Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:drivers/bluetooth/btrtl.c: note: in included file:drivers/bluetooth/btrtl.h:47:45: warning: array of flexible structures
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:drivers/bluetooth/btrtl.c: note: in included file:drivers/bluetooth/btrtl.h:47:45: warning: array of flexible structures
---
Regards,
Linux Bluetooth
Re: [PATCH 1/3 V2] dt-bindings: net: realtek-bluetooth: Add RTL8821CS
In reply to Chris MorganQuoted 6 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add compatible string for RTL8821CS for existing Realtek Bluetooth driver.
Signed-off-by Chris Morgan <[email protected]>
Alistair
Quoted 51 lines
---
.../bindings/net/realtek-bluetooth.yaml| 23 +++++++++++--------1 file changed, 14 insertions(+), 9 deletions(-)Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +0
-0@@ -4,24 +4,29 @@$id: http://devicetree.org/schemas/net/realtek-bluetooth.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +1
-1-title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth +title: RTL8723BS/RTL8723CS/RTL8821CS/RTL8822CS Bluetoothmaintainers:
- Vasily Khoruzhick <[email protected]>
- Alistair Francis <[email protected]>description:
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +4
-3- RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over - SDIO, while BT is connected over serial. It speaks H5 protocol with few - extra commands to upload firmware and change module speed. + RTL8723CS/RTL8723CS/RTL8821CS/RTL8822CS is a WiFi + BT chip. WiFi part + is connected over SDIO, while BT is connected over serial. It speaks + H5 protocol with few extra commands to upload firmware and change + module speed.properties:
compatible:Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +9
-5- enum: - - realtek,rtl8723bs-bt - - realtek,rtl8723cs-bt - - realtek,rtl8723ds-bt - - realtek,rtl8822cs-bt + oneOf: + - const: realtek,rtl8723bs-bt + - const: realtek,rtl8723cs-bt + - const: realtek,rtl8723ds-bt + - const: realtek,rtl8822cs-bt + - items: + - enum: + - realtek,rtl8821cs-bt + - const: realtek,rtl8822cs-bt device-wake-gpios: maxItems: 1Signature · 1 line
2.34.1
Re: [PATCH 1/3 V2] dt-bindings: net: realtek-bluetooth: Add RTL8821CS
In reply to Chris MorganQuoted 36 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add compatible string for RTL8821CS for existing Realtek Bluetooth driver.
Signed-off-by Chris Morgan <[email protected]>--- .../bindings/net/realtek-bluetooth.yaml | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-)Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +5
-4@@ -4,24 +4,29 @@ $id: http://devicetree.org/schemas/net/realtek-bluetooth.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth +title: RTL8723BS/RTL8723CS/RTL8821CS/RTL8822CS Bluetooth maintainers: - Vasily Khoruzhick <[email protected]> - Alistair Francis <[email protected]> description: - RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over - SDIO, while BT is connected over serial. It speaks H5 protocol with few - extra commands to upload firmware and change module speed. + RTL8723CS/RTL8723CS/RTL8821CS/RTL8822CS is a WiFi + BT chip. WiFi part + is connected over SDIO, while BT is connected over serial. It speaks + H5 protocol with few extra commands to upload firmware and change + module speed. properties: compatible:
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +5
-5- enum: - - realtek,rtl8723bs-bt - - realtek,rtl8723cs-bt - - realtek,rtl8723ds-bt - - realtek,rtl8822cs-bt + oneOf: + - const: realtek,rtl8723bs-bt + - const: realtek,rtl8723cs-bt + - const: realtek,rtl8723ds-bt + - const: realtek,rtl8822cs-bt
These still should be an enum. Why changing them?
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml line 29
Quoted 4 lines
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +4
-0+ - items: + - enum: + - realtek,rtl8821cs-bt + - const: realtek,rtl8822cs-bt
Best regards,
Krzysztof
PATCH v2 2/3 Bluetooth: hci_h5: btrtl: Add support for RTL8821CS
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
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.
--- drivers/bluetooth/btrtl.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/bluetooth/btrtl.c +8 -0
@@ -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,
Signature · 7 lines
2.34.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v2 3/3 arm64: dts: rockchip: Update compatible for bluetooth
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Update the compatible for the Realtek RTL8821CS bluetooth node.
--- arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi +1 -1
@@ -716,7 +716,7 @@ &uart1 { status = "okay"; bluetooth { - compatible = "realtek,rtl8821cs-bt"; + compatible = "realtek,rtl8821cs-bt", "realtek,rtl8822cs-bt"; device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.34.1