From patchwork Mon Feb 27 16:30:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13153873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9DAAC7EE36 for ; Mon, 27 Feb 2023 16:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbjB0Qaj (ORCPT ); Mon, 27 Feb 2023 11:30:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229831AbjB0Qag (ORCPT ); Mon, 27 Feb 2023 11:30:36 -0500 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74E1F1D935; Mon, 27 Feb 2023 08:30:35 -0800 (PST) Received: by mail-oi1-x22d.google.com with SMTP id bp19so2879407oib.4; Mon, 27 Feb 2023 08:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SAWhW5/ZnWeHEgpd0MyQefc2epsEeOvOGaibb4+S/Vk=; b=qL2SUOx8PeNpTXVu+f52nmeJL6R8pZRkKLzh1AHBRTAMZai+ZekvT8aiIeb2q1FCcw yek2PZ3YHEmLYh8E1QI1zHldFcdY/+DZPIqcE1RTtJnqssm7utvIm7Ihi8RXGWVXHFrx rSLoc6MRKyArAb2q3BJJPwHFHo4FMrDxjuDYRWOtZR9zm4e5WD9jWMkCFLUoQF06sMvb hSYgt8ouMIVejwZy13CSoDh6pZzryPY6wEwuGv4/ZhyROc9gjJaAQn2FoNX3I9WCVD9i pd6BBBZ51/r5WNE6W+h9hVlz2KnxcaEhtW7Iy9nT690DeEUu8kl/jKTDz3hfdpd4fvP/ RQig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SAWhW5/ZnWeHEgpd0MyQefc2epsEeOvOGaibb4+S/Vk=; b=aG5WDB3Oo/kOzF9ooV1OZsOS5MCzNx1qSeTKA9oTlLp6H2ktPGvy9aFxOob++DT9k5 XVIl001cYXE9CigfNQgZjV/brXfSeR3b5A3vf1NObq2kyvuYkeIBgbYdS7QnLPnuLBo/ 17KwgEIuVaJM9ZZU4bS8+G2stevGyeoWcaQmCD66Ir0S+62jdfzdD9dXNJDz+jiofMOM Jk0rEjfSChvzfykUN7KdhWymYF1C840V8xcOsZD2n8H+MWO5gnJFF6YAkvFnKSh3KgAU GpeR1ypY9CZT/YaUfT57WIC77x35uTh9+tSsJ5wyYQHwDZHtP3Id9qJkg1d4sZuoa3Of R45A== X-Gm-Message-State: AO0yUKXGDKv+9WqNFGNxkdd2+0GLknKl9oFxHn6sjFDyru12o5h9HZ6p D7rc07rFzaYeS+BHiupd5x5ms7A0lx4= X-Google-Smtp-Source: AK7set8MAAPsyxbCcn+KGnghPgtS15u+x3K++bHUAQn4v6dHOQphWDyh24Fogc0pw/iteaRUlCRScA== X-Received: by 2002:a05:6808:8ea:b0:37e:aa97:4660 with SMTP id d10-20020a05680808ea00b0037eaa974660mr12136016oic.16.1677515433231; Mon, 27 Feb 2023 08:30:33 -0800 (PST) Received: from localhost.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id ex16-20020a056808299000b0037fcc1fd34bsm3267713oib.13.2023.02.27.08.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 08:30:32 -0800 (PST) From: Chris Morgan To: linux-bluetooth@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, alistair@alistair23.me, anarsoul@gmail.com, 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 Subject: [PATCH 1/3 V3] dt-bindings: net: realtek-bluetooth: Add RTL8821CS Date: Mon, 27 Feb 2023 10:30:25 -0600 Message-Id: <20230227163027.130292-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227163027.130292-1-macroalpha82@gmail.com> References: <20230227163027.130292-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Chris Morgan Add compatible string for RTL8821CS for existing Realtek Bluetooth driver. Signed-off-by: Chris Morgan --- .../bindings/net/realtek-bluetooth.yaml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml index 143b5667abad..198c5dd1f257 100644 --- a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml @@ -4,24 +4,31 @@ $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 - Alistair Francis 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: + - items: + - enum: + - realtek,rtl8723bs-bt + - realtek,rtl8723cs-bt + - realtek,rtl8723ds-bt + - realtek,rtl8822cs-bt + - items: + - enum: + - realtek,rtl8821cs-bt + - const: realtek,rtl8822cs-bt device-wake-gpios: maxItems: 1 From patchwork Mon Feb 27 16:30:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13153870 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD848C7EE30 for ; Mon, 27 Feb 2023 16:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbjB0Qah (ORCPT ); Mon, 27 Feb 2023 11:30:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230178AbjB0Qaf (ORCPT ); Mon, 27 Feb 2023 11:30:35 -0500 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 914119009; Mon, 27 Feb 2023 08:30:34 -0800 (PST) Received: by mail-oi1-x236.google.com with SMTP id bi17so5647495oib.3; Mon, 27 Feb 2023 08:30:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Pi5SJcEKPHpeQOw0+UlGmmDXXROx+75oT2f8FTNnNag=; b=AB8LeUkTcrQRY85Hb0/W61RuKo2xweA6HreDGbedIZ4lpMLzlWTSUF/xrbrAt7n79W sqCwrYZXQtMCCDb02px/hr93KRyMc8K6ZUqcrguPZP3gMR72LJQY5aAe3DenFAUkS3S6 fnWI5wTCTi3h0HpuW5p1qlS3cCaO4GfWPIMgPo2s7nZ7OrE8otKGPCizqNyGCUcSAVrL zzt5BqTuGkbW1ZcGkJpM2lIH+0WYGzSPRyJNoxq6DJ5NDBh8JmqqPKxGBXd+XIQMWRhd NKN+JM0R82VVfdKjYF+UPulpevgsxwsydQlJ40rME2LUxmugStUN6xoREo//mf/rtTOK Nxrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pi5SJcEKPHpeQOw0+UlGmmDXXROx+75oT2f8FTNnNag=; b=1m61XXNTdpWQGw6p9drVfpnCdajEN5be3huciyAc1cLAudpzuapRx8MB5nDwmN+WdO a8pXCkuUPHZdCb15qxf/RWwK/m6kFngEMbU9gXv/FQ72EX5yaN0uetpp6kOzsIv+U/vd CedRtTDUZuSW36edaJybMg6PoPhMFwQ5gilkXnN824TCJA5utMBlCxS5Hk6ht5T3KQFq OgulAXMaL0nx5myUcnR7AgYA3UB6wP5TCaljyAoX3yH0tCD5g7/MCSKXva4wS2S5s69l 51ebyYTRj5RqF+OR8yJ3trpyTPNHzYg9yiyXeNY1vga/4UB9K2L8c4cD37w2P9+jJ9vJ lnkg== X-Gm-Message-State: AO0yUKWWjrxRS8ZV9k/rmH0wSLCZ1UAuA+qA3L9KAU1t0tACJopsT/9S rMdi/Wz20Nwxy88gw4c3FuhJtTnT1+c= X-Google-Smtp-Source: AK7set/bPQ3QZ2GzK9RQge0qhmbwGja53OKibb/98SsVY4DXh7x+yc6pKG4M6zYmVub6rgvZ98FZsg== X-Received: by 2002:a54:4005:0:b0:384:3eef:77f5 with SMTP id x5-20020a544005000000b003843eef77f5mr682758oie.49.1677515433836; Mon, 27 Feb 2023 08:30:33 -0800 (PST) Received: from localhost.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id ex16-20020a056808299000b0037fcc1fd34bsm3267713oib.13.2023.02.27.08.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 08:30:33 -0800 (PST) From: Chris Morgan To: linux-bluetooth@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, alistair@alistair23.me, anarsoul@gmail.com, 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 Subject: [PATCH 2/3 V3] Bluetooth: hci_h5: btrtl: Add support for RTL8821CS Date: Mon, 27 Feb 2023 10:30:26 -0600 Message-Id: <20230227163027.130292-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227163027.130292-1-macroalpha82@gmail.com> References: <20230227163027.130292-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Chris Morgan 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 --- 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, From patchwork Mon Feb 27 16:30:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13153872 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06AC9C7EE33 for ; Mon, 27 Feb 2023 16:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbjB0Qai (ORCPT ); Mon, 27 Feb 2023 11:30:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230121AbjB0Qaf (ORCPT ); Mon, 27 Feb 2023 11:30:35 -0500 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C6C04EE9; Mon, 27 Feb 2023 08:30:35 -0800 (PST) Received: by mail-oi1-x22e.google.com with SMTP id q15so5605960oiw.11; Mon, 27 Feb 2023 08:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2f/vVHxyRFoilKJr+B3hBhPHEkdjVLFye93UcIisf+c=; b=RcvKZUMoYJ2UB+3CEB+mhjFJASl07ag2QH9ah4cXsrUvhc0fwcYK+oiDGDzJ9RDJ+i GWngexc4RuRt7BeyT2k/46+2fviAQAQ8tvcghoGk+YFkv4kmHw7W9mnod1AFXVC49qqG FMol9a0wjzel7wDm0b7G3H2XOmkHwV4CHJYBHFpOsnYIDbIXsfTv0ReM96XlVFY0JQV7 pwl8aNtTHsoNyQequ3khtST88Per5eIXAmgItuffjGqIeKuuQ/UDneTRtQ9BENLTqe9S in6e/JEkC7SjmYR5nWp/tj7j9NsWi6aWDcRImaaVRZQcno+dqI+NgduJGNb1jI7d5xF6 ET1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2f/vVHxyRFoilKJr+B3hBhPHEkdjVLFye93UcIisf+c=; b=0x14lwL/4ifx2cXXjQ+WaJjDUvwKOcf5XITPqc2nD+7I1uUVMdpb6H5Kj/IoiXcehS huFNY7CG0lrQI+42mlL0brTpxJml2w2notWwf2Q3NaPU3hoWVSPvREq7+W41CEliJ6Z3 FYvTcmjhnzrQwA2WTUDLF400YrmcDNbWz8vlRP02MMAz/PunVMFZuvGYDwEFXwYD66FM qOYqMCrRqfC6irI04bw/6JGA2WRMhZVHA4cr/qpvevRYGzva/F5vjzOfJf+EPBqT5+GW 3Myu6rRYkB/QsiWzxulBCpbqatgj9RxW/G5Ip3qiGokA3zSYbjNnxbEeBbNhY/rHZlMB M99w== X-Gm-Message-State: AO0yUKVS4Vo4SoJZ39OWN5vL/6Mfr5J740RVZ71phTqNXc4DyrHLrssL BtoKddmnvmquMgsVpaIj88hzmc9M+NM= X-Google-Smtp-Source: AK7set+Ye/eJbK6v4B8x0QSXQJ6t+HwZprvGQgxn5y0nvuWH3AOFlsvrzk26r7CGMXwlB5hFusX40g== X-Received: by 2002:a05:6808:293:b0:384:a13:9516 with SMTP id z19-20020a056808029300b003840a139516mr5524507oic.30.1677515434370; Mon, 27 Feb 2023 08:30:34 -0800 (PST) Received: from localhost.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id ex16-20020a056808299000b0037fcc1fd34bsm3267713oib.13.2023.02.27.08.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 08:30:34 -0800 (PST) From: Chris Morgan To: linux-bluetooth@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, alistair@alistair23.me, anarsoul@gmail.com, 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 Subject: [PATCH 3/3 V3] arm64: dts: rockchip: Update compatible for bluetooth Date: Mon, 27 Feb 2023 10:30:27 -0600 Message-Id: <20230227163027.130292-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227163027.130292-1-macroalpha82@gmail.com> References: <20230227163027.130292-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Chris Morgan Update the compatible for the Realtek RTL8821CS bluetooth node. Signed-off-by: Chris Morgan --- arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi index 41262a69d33e..8fadd8afb190 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi @@ -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>;