From patchwork Fri Aug 23 10:31:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11111447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5ED6112C for ; Fri, 23 Aug 2019 10:31:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96783206E0 for ; Fri, 23 Aug 2019 10:31:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cAmopSoy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="L06V5E+m" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96783206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LOPlA7x1wOieNDy4CCL87Z46wfBwZv8ve3B8x6Gusas=; b=cAmopSoy+bybG9 AzW9nfjcsvG0cjpiMNR6U154fv4Urkx//cB6BcmXSGyvt4IX7Yo6OYOrR7LhjvMcQIhvX0yoXcv5s LDZjtPIOva8clWAqWw9ohrFuCpOs+/GO09mgWhbXddC3Sc2xruaNGTuoR4eeyesW5qzTEtW+taiFj V8iA6E8mxPHV2T6LFxFAwRGJ9zmgCOUSndW0uWPOySamhuyZgzGMaDzwBAf0IPbqMYnCiwbZZQDDo KxukBhTeO1mFOwCsOYjC7ULcuhauQefIjsv8epuyLu4jD9as6XBBvl00i/dnzXPh8biQ08E95+S2B I65HPNP4MjiXAz6k/G1Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i16rN-0003Gz-Jh; Fri, 23 Aug 2019 10:31:57 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i16rE-00036E-6W for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 10:31:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566556306; bh=m2aKtRbkPTkJVuTP8zfANK/QWGiSc2Jdal4+JCozxGg=; h=From:To:Cc:Subject:Date:References:From; b=L06V5E+mkypAmZdneB6hYyjjUgHu1laLiD9Wh+yKZ0GS6HqU85zz3VnR2U5Yqh8Cs wQLUPAQ/M5iElTZD+whjM+wQATeeHAFO7fXvdYhIHPm6F8VcsCcB0Upvp7zNkXFcqX fDbww4+L2ojZKXMHD7vkME/9BukKozBvzSOCNKMk= From: megous@megous.com To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Marcel Holtmann , Johan Hedberg Subject: [RESEND PATCH 1/5] dt-bindings: net: Add compatible for BCM4345C5 bluetooth device Date: Fri, 23 Aug 2019 12:31:35 +0200 Message-Id: <20190823103139.17687-2-megous@megous.com> In-Reply-To: <20190823103139.17687-1-megous@megous.com> References: <20190823103139.17687-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_033148_399522_BA623623 X-CRM114-Status: UNSURE ( 7.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ondrej Jirman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ondrej Jirman This is present in the AP6526 WiFi/Bluetooth 5.0 module. Signed-off-by: Ondrej Jirman Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/broadcom-bluetooth.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt index c26f4e11037c..4fa00e2eafcf 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt @@ -13,6 +13,7 @@ Required properties: * "brcm,bcm20702a1" * "brcm,bcm4330-bt" * "brcm,bcm43438-bt" + * "brcm,bcm4345c5" Optional properties: From patchwork Fri Aug 23 10:31:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11111453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5342112C for ; Fri, 23 Aug 2019 10:32:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2CEB206E0 for ; Fri, 23 Aug 2019 10:32:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IZgIqMnd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="L/60kFSD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2CEB206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pwh1h4j5RxfZrjo2AiRdh0UJYDOVprCONSF/yxnSn6w=; b=IZgIqMndw/iCfY UYXjV1HYwJraRL/Xh4M7FcCxw0TTH7kyNaH0Yy1J0NJ4hMH9Hrd5m5L5XK6IEcUeQzRKIGSNxpys1 TIvncZ6lQDXGQ2L2ANYVhN4lKAdW3P67YvmFqWa0v5uIK0SDJZSb/JaIrkleqDnbV2zbg6zdnhgB7 A6TIJqd50paagFxgi5MDDlkezGTB0XtecpzLKBDsq6+ytM6gKb8TtPbTdoyIIYJaPsoZHuQYVSB3O MODJcsMxe7KlTrUxjtT7cZdxoQAGlA/yVI+Eokqip90KQVkbN3dem5MkfHzJthzhLOvxPCEm9rPgI sfh0WeEyljwbRiAtiM3w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i16rw-00041F-Uj; Fri, 23 Aug 2019 10:32:32 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i16rE-00036F-G9 for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 10:31:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566556306; bh=67uddpb2R7BIS7IqV2fjba5xXtiX29M8NMIbKWrD2kc=; h=From:To:Cc:Subject:Date:References:From; b=L/60kFSD7WwXS9H7E3DLRI81r0aV18fY7q8fmCWGjkj3oIRQd/hoiqF95/m22WbX+ AZq3WKhSwX1Qk9EDEh/UojmpdEkVAuMPiRsANDRdCw+lqBUoiQT+2BgPxDI3gZy2bp h4w2bCxkYUOfuL6klEKvWsE7u8o6gfzXrQpaCy5A= From: megous@megous.com To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Marcel Holtmann , Johan Hedberg Subject: [RESEND PATCH 2/5] bluetooth: bcm: Add support for loading firmware for BCM4345C5 Date: Fri, 23 Aug 2019 12:31:36 +0200 Message-Id: <20190823103139.17687-3-megous@megous.com> In-Reply-To: <20190823103139.17687-1-megous@megous.com> References: <20190823103139.17687-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_033148_698161_E9672EEF X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ondrej Jirman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ondrej Jirman Detect BCM4345C5 and load a corresponding firmware file. Signed-off-by: Ondrej Jirman --- Checkpatch reports a spurious error. drivers/bluetooth/btbcm.c | 3 +++ drivers/bluetooth/hci_bcm.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 124ef0a3e1dd..2d2e6d862068 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -23,6 +23,7 @@ #define BDADDR_BCM43430A0 (&(bdaddr_t) {{0xac, 0x1f, 0x12, 0xa0, 0x43, 0x43}}) #define BDADDR_BCM4324B3 (&(bdaddr_t) {{0x00, 0x00, 0x00, 0xb3, 0x24, 0x43}}) #define BDADDR_BCM4330B1 (&(bdaddr_t) {{0x00, 0x00, 0x00, 0xb1, 0x30, 0x43}}) +#define BDADDR_BCM4345C5 (&(bdaddr_t) {{0xac, 0x1f, 0x00, 0xc5, 0x45, 0x43}}) #define BDADDR_BCM43341B (&(bdaddr_t) {{0xac, 0x1f, 0x00, 0x1b, 0x34, 0x43}}) int btbcm_check_bdaddr(struct hci_dev *hdev) @@ -73,6 +74,7 @@ int btbcm_check_bdaddr(struct hci_dev *hdev) !bacmp(&bda->bdaddr, BDADDR_BCM2076B1) || !bacmp(&bda->bdaddr, BDADDR_BCM4324B3) || !bacmp(&bda->bdaddr, BDADDR_BCM4330B1) || + !bacmp(&bda->bdaddr, BDADDR_BCM4345C5) || !bacmp(&bda->bdaddr, BDADDR_BCM43430A0) || !bacmp(&bda->bdaddr, BDADDR_BCM43341B)) { bt_dev_info(hdev, "BCM: Using default device address (%pMR)", @@ -332,6 +334,7 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = { { 0x2122, "BCM4343A0" }, /* 001.001.034 */ { 0x2209, "BCM43430A1" }, /* 001.002.009 */ { 0x6119, "BCM4345C0" }, /* 003.001.025 */ + { 0x6606, "BCM4345C5" }, /* 003.006.006 */ { 0x230f, "BCM4356A2" }, /* 001.003.015 */ { 0x220e, "BCM20702A1" }, /* 001.002.014 */ { 0x4217, "BCM4329B1" }, /* 002.002.023 */ diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 4d9de20bab7b..95c312ae94cf 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -1419,6 +1419,7 @@ static void bcm_serdev_remove(struct serdev_device *serdev) #ifdef CONFIG_OF static const struct of_device_id bcm_bluetooth_of_match[] = { { .compatible = "brcm,bcm20702a1" }, + { .compatible = "brcm,bcm4345c5" }, { .compatible = "brcm,bcm4330-bt" }, { .compatible = "brcm,bcm43438-bt" }, { }, From patchwork Fri Aug 23 10:31:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11111451 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A363213B1 for ; Fri, 23 Aug 2019 10:32:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 637FA23402 for ; Fri, 23 Aug 2019 10:32:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="chc1Ln9z"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="AE8bLTOa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 637FA23402 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kuUpIkpwAGxqr00fZ+qshUilN4NztcL0HPGg6r7JBkk=; b=chc1Ln9zlSad4V jcQZJzUdT8H+m8wsqkzIoyhWtsLxW0OxXGTxKfY+qJmZSkOqxiOyBqmL2304NxbpEdlk31/IWK0d7 NiOHPvF1uX65wJ/HX2oLA1qLCiFh7mFaCyBM5adnC9ub3aQBjoF+CNGS8//N87BSYCUeouO+hD7+0 hlVGQUHQ1/d92G47VDIg9STb3PuUDwX9MO2IjBqMynZhY6MAuifP1kotsD0uyihqpUWsxXqLrI7FU snacgmSQRmuOpl7IAr7rEwn3TNyYzKbk32jY5N8ZbPJaLg68Z6iTQoPuuwbtv8kXwePEwg9i+0kWB BBcnVrFsu2xPFRbkYA4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i16rp-0003mg-45; Fri, 23 Aug 2019 10:32:25 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i16rE-00036I-Q1 for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 10:31:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566556307; bh=aV9HCPL2dWHEvC4yV8gUMeG+A7RjDzsVcU9TnfVEEvo=; h=From:To:Cc:Subject:Date:References:From; b=AE8bLTOahfLkvWgkklCbF9ZCJq+vb40VaQZK+O+q5SBVGQ0jAcsXRFG9D6p6QSnaF LV08z3eoFXfN/sfe0GQPO2H2JD1DK8n/qK+zSGrgFASW9vH0hsIxCVOYG369B9kjDy WaeRclL6+8c+Gusxoeqq6TPLA7sb2TPj+r/BFR4o= From: megous@megous.com To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Marcel Holtmann , Johan Hedberg Subject: [RESEND PATCH 3/5] bluetooth: hci_bcm: Give more time to come out of reset Date: Fri, 23 Aug 2019 12:31:37 +0200 Message-Id: <20190823103139.17687-4-megous@megous.com> In-Reply-To: <20190823103139.17687-1-megous@megous.com> References: <20190823103139.17687-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_033149_003373_5F7F1DFC X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ondrej Jirman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ondrej Jirman Some supported devices need more time to come out of reset (eg. BCM4345C5 in AP6256). I don't have/found a datasheet, so the value was arrive at experimentally with the Oprange Pi 3 board. Without increased delay, I got intermittent failures during probe. This is a Bluetooth 5.0 device, so maybe that's why it takes longer to initialize than the others. Signed-off-by: Ondrej Jirman --- drivers/bluetooth/hci_bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 95c312ae94cf..7646636f2d18 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -260,7 +260,7 @@ static int bcm_gpio_set_power(struct bcm_device *dev, bool powered) } /* wait for device to power on and come out of reset */ - usleep_range(10000, 20000); + usleep_range(100000, 120000); dev->res_enabled = powered; From patchwork Fri Aug 23 10:31:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11111449 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A42913B1 for ; Fri, 23 Aug 2019 10:32:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08091206E0 for ; Fri, 23 Aug 2019 10:32:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HvISWE2H"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="PsR9yChw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08091206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kx8547yPMJGlc5RCaodt7rV5A4yLMXxrpxXoT3mKUcw=; b=HvISWE2H/n4lPx 9+h6TB0KtuhFaCixlWu+rQebhwqGyM3lNYmVbip/UPLoHymeAD94pjez2CMjDzka3Sm4sz+NUwqDo 89jaTOJj96rBTVslHL/DJkKp7+U0D3c88PmV6qR6jLx5ArfUGbjPVBadGNC0vIIjtsb6VHjeHJFyb sFWKF8KW+rrypqGYsSze/tfjmICA3yxhg/qW+Zfkj8EuAVxBVAhuCpSXn1J4rwC3+jvHbZ/hj53IQ gpOfeo+rgUk4BdnnC89d3HfUHSjPzFR3VaXfcg/q5aPKBFuI8Ln65KuJvM28ddoNVZXnI2Wrtacyd t8ZDKm/4SN38QrOrxOGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i16ra-0003Wl-Ul; Fri, 23 Aug 2019 10:32:11 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i16rF-00036K-2R for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 10:31:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566556307; bh=y/VyM0hZNMJuHkjWlJoe2Ll8Mns+SaZDNjGgFDEV18I=; h=From:To:Cc:Subject:Date:References:From; b=PsR9yChwkB7y4rgbtoOSmoYDza6Ag6WO9cQo+O/jRPIDy9UCjPuVe8rhS69ui8GiY TpwekQ9n9eRPnZh42uFqZ13fVEVMOdM0UUbH5Rd2SNEvxa+uYgjMV/t8xaCvJxdaEu asrCvCfzNX139HnJBnxAHX+u6vT6YM0SlZVcZiKA= From: megous@megous.com To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Marcel Holtmann , Johan Hedberg Subject: [RESEND PATCH 4/5] arm64: dts: allwinner: h6: Add pin configs for uart1 Date: Fri, 23 Aug 2019 12:31:38 +0200 Message-Id: <20190823103139.17687-5-megous@megous.com> In-Reply-To: <20190823103139.17687-1-megous@megous.com> References: <20190823103139.17687-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_033149_273671_C57F91B5 X-CRM114-Status: UNSURE ( 8.04 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ondrej Jirman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ondrej Jirman Orange Pi 3 uses UART1 for bluetooth. Add pinconfigs so that we can use them. Signed-off-by: Ondrej Jirman --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 67f920e0fc33..7657e816096b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -298,6 +298,16 @@ pins = "PH0", "PH1"; function = "uart0"; }; + + uart1_pins: uart1-pins { + pins = "PG6", "PG7"; + function = "uart1"; + }; + + uart1_rts_cts_pins: uart1-rts-cts-pins { + pins = "PG8", "PG9"; + function = "uart1"; + }; }; gic: interrupt-controller@3021000 { From patchwork Fri Aug 23 10:31:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11111455 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA339112C for ; Fri, 23 Aug 2019 10:32:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 885E7206E0 for ; Fri, 23 Aug 2019 10:32:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LCQgdAJn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="DigB5/Gz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 885E7206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3zXa4wICAVwveicVnY6zaUc0OqWvsaNaRBQxyC2m2zY=; b=LCQgdAJnqPhOEp AdxCX6q+oaqOU0ev5uK8bnryE/V4ch2yjix938SM+JHi5lRXQVZKds/HmQ1Jb0YFtUq83rDvWvINm Gf+bQVScD2dCsavuDqT1+Tgnb1fGuSdUOXI9yYw3tI15g3zJy01GRZr8upjZuVCWS8C1QEgTOjQ9U luIYUJRcTYbpDeomEqGL1zF09DuyMrCpTRnRg45WCO+lWmY1VZLQmPEn3T1eOXmpObfL6SH99Tup+ cWb7dE3TYZnZiDzZVp1jdmp+dJz321MV9dlvKMmKL9+34rw5SsYaxYa88W7KIbu7OJzFiJP++Ezvt uESej6r1Xm/nPnIGRswg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i16s7-0004EY-Fk; Fri, 23 Aug 2019 10:32:43 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i16rG-00037c-QT for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 10:31:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566556307; bh=Zdq7TsrioBhNJ4nRUcC5Dq41WDeZro1CErpIBoxFFlk=; h=From:To:Cc:Subject:Date:References:From; b=DigB5/Gzg4cMrhlQlNhoXSWgNEMQ/gOr13IQAEJPfmCfyuvFKk5RkTyngZexthmXD cWRc7Bt8hLxmIZnn8syMNxhbnV5Dx6C6abzysI5JS2x2i7SQzf3pja8slt5n9qTegq XPMIUi+Zb8xRoPCqp0/U5RYZcWlYz7ESLPVo/bEU= From: megous@megous.com To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Marcel Holtmann , Johan Hedberg Subject: [RESEND PATCH 5/5] arm64: dts: allwinner: orange-pi-3: Enable UART1 / Bluetooth Date: Fri, 23 Aug 2019 12:31:39 +0200 Message-Id: <20190823103139.17687-6-megous@megous.com> In-Reply-To: <20190823103139.17687-1-megous@megous.com> References: <20190823103139.17687-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_033151_029872_B0DCCF1E X-CRM114-Status: GOOD ( 10.62 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ondrej Jirman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ondrej Jirman The board contains AP6256 WiFi/BT module that has its bluetooth part connected to SoC's UART1 port. Enable this port, and add node for the bluetooth device. Bluetooth part is named bcm4345c5. You'll need a BCM4345C5.hcd firmware file that can be found in the Xulongs's repository for H6: https://github.com/orangepi-xunlong/OrangePiH6_external/tree/master/ap6256 The driver expects the firmware at the following path relative to the firmware directory: brcm/BCM4345C5.hcd Signed-off-by: Ondrej Jirman --- .../dts/allwinner/sun50i-h6-orangepi-3.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts index 49d954369087..a9e776446c35 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts @@ -15,6 +15,7 @@ aliases { serial0 = &uart0; + serial1 = &uart1; }; chosen { @@ -271,6 +272,24 @@ status = "okay"; }; +/* There's the BT part of the AP6256 connected to that UART */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&rtc 1>; + clock-names = "lpo"; + device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */ + host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */ + shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */ + max-speed = <1500000>; + }; +}; + &usb2otg { /* * This board doesn't have a controllable VBUS even though it