From patchwork Fri Feb 24 23:23:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 657273 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 24D27C7EE2F for ; Fri, 24 Feb 2023 23:24:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229768AbjBXXYF (ORCPT ); Fri, 24 Feb 2023 18:24:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjBXXYE (ORCPT ); Fri, 24 Feb 2023 18:24:04 -0500 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 985EC231D4; Fri, 24 Feb 2023 15:23:47 -0800 (PST) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-17213c961dfso1371993fac.0; Fri, 24 Feb 2023 15:23:47 -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=ALnkpz8ALlNTqOsurEtcPehgpRmTbr/BEiX5U4d+ylg=; b=EtSwvEl4wHMAYWoOnr6OlfOCj5VIPJX9tUA9ATsc/F2ZYx/XAT4GO+z2GEbdbXBCCB 39uvCsULlJmHlGFJfk/YSR7DLC/htqkS3lhAzFHPrj7EZXGP/ZBXFz3nkie2ACMFthPZ gPb+5BXzNxhe4RBPCx+2GyyM0WLgNk5yxKPhy9lGuHq0i3h2sbfqQKQwF6up7b7Af7A5 YGOBheos3F9B/Tdh9M1YL7Kqaw33eUP3JDsSTK1JmaI6RFgKbO8rnC/A9HDfEYLroWCH DKGKUBMeEC+McM+hsbrkAsy4gWqvQ+htRAgV8eqAnmgtM+Ig3d7QYq4kRZ/wwFIRYPKp iqyw== 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=ALnkpz8ALlNTqOsurEtcPehgpRmTbr/BEiX5U4d+ylg=; b=GxiPdt1alf1e1jOwLqEp1KgX7k3Cx5/x6XfLeB2o7nNX1E6BwQO8bfdhNOJbt9W0W3 aIue1J0/ZuF2BHqOiDVcGiVujHu8czAp5sJCJqYm4NSBpna1bWXfi0yh71xrX1tXAtZg tc8t4EEGRfZ4mZm8FXOaXeTVxOSXs4SvikaqHa+991lNJNoyJS8647svSen5a8YwAkrX DGNiWGHSWKQGu1sOmL4wvb8S11dJLRftcmrxGc9PAq1QfYElOFwZ9dt6Ucau5ANS1adI K1atfTyf/MJok22qJer04il5BJdD54RGoOBBqY70KldnAdwLt77iLAk+I7EsXknaNdv+ gs8g== X-Gm-Message-State: AO0yUKWg9cSjdYhOQ9Hzj7glwHZEwavn2eOvS3CpdT4hCt9kEynafk9L 2tmO39hNbiy+r0fYpFiavxRA0qCICgQ= X-Google-Smtp-Source: AK7set+4l2GHkhtxjGmZf4wArC1qwF3lZiAbvPIz0e1IHuhEpBXL8gPl73rsRn2bqElTB3K4PyIQqA== X-Received: by 2002:a05:6870:a54b:b0:172:21e9:21c7 with SMTP id p11-20020a056870a54b00b0017221e921c7mr8946638oal.40.1677281026056; Fri, 24 Feb 2023 15:23:46 -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 k22-20020a056870d39600b0016b0369f08fsm119706oag.15.2023.02.24.15.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 15:23:45 -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 V2] dt-bindings: net: realtek-bluetooth: Add RTL8821CS Date: Fri, 24 Feb 2023 17:23:37 -0600 Message-Id: <20230224232339.124969-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224232339.124969-1-macroalpha82@gmail.com> References: <20230224232339.124969-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml index 143b5667abad..f91d06d629b9 100644 --- a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml @@ -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 - 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: + - 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 From patchwork Fri Feb 24 23:23:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 656313 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 CF4FDC7EE31 for ; Fri, 24 Feb 2023 23:24:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjBXXYG (ORCPT ); Fri, 24 Feb 2023 18:24:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbjBXXYE (ORCPT ); Fri, 24 Feb 2023 18:24:04 -0500 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF642ED52; Fri, 24 Feb 2023 15:23:47 -0800 (PST) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1722c48a773so1320972fac.2; Fri, 24 Feb 2023 15:23:47 -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=jgvBF2hfMIZ0N5yUXWOdlorcPiNIzuUWRsOiPxYXlQy8aG+xFTqs+9zivEXSBx2d5p YS+0QT7FG+tWlpR3O59uhR9cz5VDAknOm6/x3Rxp1DClido4JghwtoyKIxXfHiKw3BAH OWg9Y+l3y5z6KTQfTPj1jd+NyPxamUzBeiPgl549xUXm/FU9H27cDEOC5v8mAh+IK+qT zg9RQPqup6HJFgCluvHEpn7Lf1m8x6fJw2rguE1e86dvFF3vHQiBFgSrri3ddjetl7dU ubLHNsf3XEeZcwqV4MHiatNZLcVc/Z4S13AFhdBAZUAKrhd1JrnYRM+u0716tINddHEa EDzw== 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=WikQimZW6K4sZGQmz5sClqLgw5cMWWu+bx9By9AWjZTt9FK0f1bJdv97RVkKup5hrE oAIwmYFppfPCT5KhhMZJN05QCtrv+dfpnnaCeSNPWyHvb0PZQ6aOm30G2qNv3Zq1zno7 5lN9/lGzWIh1cLrX19Qn7kIVBf9sSWb6cbdbQz9iwBQAERuDCti8EyKM/9PniGv9mfGd IpAcChy/kWYIYL8k9wXTzqXIToCqDbsEpHl0Z9BPmuxuQA9HHOzcDJUvy/ELR9IAiSX3 HmfJCspHAs9BYl8QPdRJ5C2F0ocO7pA4x7tclwph//msIZrTiBLTvUFFXenRUiTs+odW FqaQ== X-Gm-Message-State: AO0yUKV5n4AIssBHBKT9oCIo8aARU7uTX9X3iU6qbAxhrf4YQ0MCSo5x qQwYxBqQVV7ZYrPrtybG0zhrtP+isGk= X-Google-Smtp-Source: AK7set+zka4pq8KQXGjVN1FASvAvHq0OCmxDjCs6BbiXJ/sRS9u4YynA9aCd4kkTI1sVbq15KIMgJQ== X-Received: by 2002:a05:6870:d1ca:b0:172:80f4:9887 with SMTP id b10-20020a056870d1ca00b0017280f49887mr5493008oac.31.1677281026960; Fri, 24 Feb 2023 15:23:46 -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 k22-20020a056870d39600b0016b0369f08fsm119706oag.15.2023.02.24.15.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 15:23:46 -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 V2] Bluetooth: hci_h5: btrtl: Add support for RTL8821CS Date: Fri, 24 Feb 2023 17:23:38 -0600 Message-Id: <20230224232339.124969-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224232339.124969-1-macroalpha82@gmail.com> References: <20230224232339.124969-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Fri Feb 24 23:23:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 656312 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 BED4CC7EE23 for ; Fri, 24 Feb 2023 23:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjBXXYH (ORCPT ); Fri, 24 Feb 2023 18:24:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjBXXYE (ORCPT ); Fri, 24 Feb 2023 18:24:04 -0500 Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A62BE305CA; Fri, 24 Feb 2023 15:23:48 -0800 (PST) Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1729bdcca99so1259137fac.12; Fri, 24 Feb 2023 15:23:48 -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=WqcUrpJHyMd+DOpqLUAY26fI/ntqOLcXGXmVAEQ1CtlMgxgMxuBXEgLob50LuZSO5j t0ScwxeHCX+fLeR49iM27ekm8HCiNs7h81oah4QyAk1IMXj6TFMQswKGzasnBwZekOH3 FVAhWr4Tc0SEGzmnzpW9v7cYGtNu+i4RlAEHUxcCrs3m+O35foj9pefCGZnOzOXScUE2 IUFZRoylJ+KLKBIgVrZeJmKmlFJ0sMVF5aJ7sRIxP0RqclypWRjsB3KW/RtrDeufZZvK JuAvvjnQBuN19iOon7+BRGVjVOYq/IrmAGsXvGxmkrpznce8jc3FKdaorllUl0x1B4jo tzZQ== 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=5uxelF1zeZ0VcZeEhM9+OEkqysZjB7S9thV9RAr6EhXhVsXRCR8dVNstpMsyHvAG9L nZFy3fQ6KskSpxkiYqzQsnZ/aVNCTir+Rh+TJc1Scqp8S2uPvl0zQGiDdV2ruqvjCFvn 2vbmufEbri5vwzyxVMl+tVJN9wGeqx2h/bwDVp41S9GI2+GnX3xaKtDZ6+KYuvrC1+O3 9LMRL3a0WccCBl9UEX1+yXmdzkoO8ZV4ihUaB6Z4YJPQ8RMBdFOForKYnWJSeuUA7dBd Q1QH4uXdotUlPGxEEcEVdkAjBfBVdQAtp4Sqs2LiYSNs9lMjq54Hsr/vEhtpvnyi3Q2L W+9A== X-Gm-Message-State: AO0yUKWCAYfLTzYTNCzPq8O4m0dM3KMwlgrtTeZnwamy/7u1kaBoZNk3 5JEW54ZqLLFgLgn1XCBhzrcKRfWEMrg= X-Google-Smtp-Source: AK7set8C1egSTfnJAP1SL8dAmi9WqnexME0wh4BKjbOYt1RbkKQwYW5BEpVydoralYI7E1k4RlKwEQ== X-Received: by 2002:a05:6870:e9a1:b0:16a:b45a:e2d9 with SMTP id r33-20020a056870e9a100b0016ab45ae2d9mr12176536oao.7.1677281027757; Fri, 24 Feb 2023 15:23:47 -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 k22-20020a056870d39600b0016b0369f08fsm119706oag.15.2023.02.24.15.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 15:23:47 -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 V2] arm64: dts: rockchip: Update compatible for bluetooth Date: Fri, 24 Feb 2023 17:23:39 -0600 Message-Id: <20230224232339.124969-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224232339.124969-1-macroalpha82@gmail.com> References: <20230224232339.124969-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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>;