From patchwork Sat Apr 25 15:55:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 220572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59E0DC54FCB for ; Sat, 25 Apr 2020 15:55:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A76020748 for ; Sat, 25 Apr 2020 15:55:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=alistair23.me header.i=@alistair23.me header.b="qjrasrrR"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bCfVWHG8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726232AbgDYPzo (ORCPT ); Sat, 25 Apr 2020 11:55:44 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:37099 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbgDYPzm (ORCPT ); Sat, 25 Apr 2020 11:55:42 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 39C485803BB; Sat, 25 Apr 2020 11:55:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 25 Apr 2020 11:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=4NDaOwg5jepTh MDWgHjK7GYLbHX6IFibl+r4ExTotBU=; b=qjrasrrRtXMYrs6S+OE4vXcKll5qV 6GNU2SNqK9tkbOwLgbrIzS+BCJpVXCvl7yYG8TqGBa6HE6z4P/tqPbAU0veD9fMN r3e3VistO+tUtmhY9iyG5UfiASAcUkWiQT/L46PpWVVVDKcsuiWok/IhwnRQrk8K OzJqUq9a895xA2bVvA2cc0Xqz84dGnvbxKRmtMMgLwF+UbPOG0MODJej/ip9Nf1x FgBKXgqthiiWYUQdj9NvF1Ym705mVFl4yNVCHmvARvle82eg4FzwQnllmhBQB9Nl /fAyOMOVNU3cM5TzbcxlHoaLy/BsUs6IeRTIyfEWvr3FIbpHteEitBoXw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=4NDaOwg5jepThMDWgHjK7GYLbHX6IFibl+r4ExTotBU=; b=bCfVWHG8 LBSQMrCS0v3/C5HT46ThY53/r/E9V4cLosMlpERSPU8by3bZ798hbOvf+h+mpQah 9ydx84tj7uwAhDyjnorAVJbQS9R4nRkRGnRJjCR44GgxOyJ7+FvXqHpSZA10Qo3p 4/2MLlAXJ0McOkaSk5vWEBELiWiOE4ZPbMILD8ihKWFcKqYNWzoeduMPPWiyX6WK r67pQu2LAILHwDztoQ1Xo43q3IowrDxxjFolVkO1vbeThf+W85HsKVFk6t09Mgt4 IYxps+dfaSAs2auNdclPDzdaI6PJwdm3EGHHxWRoByWkBcId5zrO3zYDaALw0PbU guJE4eAXVSqn2Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheeggdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecukfhppeejfedrleefrdekgedrvddtkeenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: from alistair-xps-14z.alistair23.me (c-73-93-84-208.hsd1.ca.comcast.net [73.93.84.208]) by mail.messagingengine.com (Postfix) with ESMTPA id 4A9EB3280064; Sat, 25 Apr 2020 11:55:35 -0400 (EDT) From: Alistair Francis To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, mripard@kernel.org, wens@csie.org Cc: anarsoul@gmail.com, devicetree@vger.kernel.org, alistair23@gmail.com, linux-arm-kernel@lists.infradead.org, Alistair Francis Subject: [PATCH v4 2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree Date: Sat, 25 Apr 2020 08:55:30 -0700 Message-Id: <20200425155531.2816584-2-alistair@alistair23.me> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200425155531.2816584-1-alistair@alistair23.me> References: <20200425155531.2816584-1-alistair@alistair23.me> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vasily Khoruzhick RTL8723BS is often used in ARM boards, so add ability to bind it using device tree. Signed-off-by: Vasily Khoruzhick Signed-off-by: Alistair Francis --- drivers/bluetooth/hci_h5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index 106c110efe56..e60b2e0773db 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c @@ -1018,6 +1018,8 @@ static const struct of_device_id rtl_bluetooth_of_match[] = { #ifdef CONFIG_BT_HCIUART_RTL { .compatible = "realtek,rtl8822cs-bt", .data = (const void *)&rtl_vnd }, + { .compatible = "realtek,rtl8723bs-bt", + .data = (const void *)&rtl_vnd }, #endif { }, }; From patchwork Sat Apr 25 15:55:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 220571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94A56C55191 for ; Sat, 25 Apr 2020 15:55:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7516620748 for ; Sat, 25 Apr 2020 15:55:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=alistair23.me header.i=@alistair23.me header.b="MyWUkHZZ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="UCDRN4Jd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726304AbgDYPzy (ORCPT ); Sat, 25 Apr 2020 11:55:54 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:54085 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbgDYPzm (ORCPT ); Sat, 25 Apr 2020 11:55:42 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 3AC8E5803BD; Sat, 25 Apr 2020 11:55:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 25 Apr 2020 11:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=ILg74KFQ4/u/i LEbpVIGKPDUn0lqkuyVDFTjVVQFF4M=; b=MyWUkHZZ+Mcwdt7tPDh4nOqgZAEVt n8SU2n8ZR81Fv2JQ69Dyg1uEdGkMtEKpm/soc219ggCkilM6/1D9+OtmqfPOenjB ldoLtqTsxpA3l58j2j2ws+Qsm4ncs+ahXHyZGwqLceD/yhD67JU+9FsvbJJ0KH0H xKUJHUyoJjfvhIlvyuaPQBgQcyettaIm/ENgjGOFgP+fgXERqdExYTLQQvVQ3oZV qCIkbphLwFFe8aJ50Ie2LVfwUjbiiN6EUeCKBKsMIpfGk9Xp/ZhqrJHuekKCLYaY dduUrgJQ+SKwcqcQ2dEDydxkN8MCTy8Vkjd+XDRq0iFdlnkPfiOoL5EYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=ILg74KFQ4/u/iLEbpVIGKPDUn0lqkuyVDFTjVVQFF4M=; b=UCDRN4Jd LJ1aMZu0e0azt1QAd15mpQLEvkm7c3u+0gP103CIaOw4Q/XGpCcOEGGWyMJifCLg 9ohqiYsQi429Ig1oFNTzBFbW7VW/5MSqi2GRDxWR6smw/FieTf3ZS8BFdRFihbi+ 50WCmvYm5421efcI5PBTNEhlHYua0qS7FC5QP1biymBNhbukf3tm84In2sOVExAh GHl83AiZau8VJG05cv33yS4Of5eeOLPnRa0VbVUNsSBGGwqZRoTAq5tPACtbRGKN JyzCbsnjkiymVnm4+scLO6k6toz5ie3GpFcSOEJ2WAC2mCqstpej7t2ACneO7mug luZ/F72ZAiQlhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheeggdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecukfhppeejfedrleefrdekgedrvddtkeenuc evlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: from alistair-xps-14z.alistair23.me (c-73-93-84-208.hsd1.ca.comcast.net [73.93.84.208]) by mail.messagingengine.com (Postfix) with ESMTPA id 921A03280067; Sat, 25 Apr 2020 11:55:36 -0400 (EDT) From: Alistair Francis To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, mripard@kernel.org, wens@csie.org Cc: anarsoul@gmail.com, devicetree@vger.kernel.org, alistair23@gmail.com, linux-arm-kernel@lists.infradead.org, Alistair Francis Subject: [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard Date: Sat, 25 Apr 2020 08:55:31 -0700 Message-Id: <20200425155531.2816584-3-alistair@alistair23.me> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200425155531.2816584-1-alistair@alistair23.me> References: <20200425155531.2816584-1-alistair@alistair23.me> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The sopine board has an optional RTL8723BS WiFi + BT module that can be connected to UART1. Add this to the device tree so that it will work for users if connected. Signed-off-by: Alistair Francis --- .../allwinner/sun50i-a64-sopine-baseboard.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts index 2f6ea9f3f6a2..34357ba143cb 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts @@ -42,6 +42,11 @@ reg_vcc1v8: vcc1v8 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; }; &ac_power_supply { @@ -103,6 +108,17 @@ ext_rgmii_phy: ethernet-phy@1 { }; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_dldo4>; + vqmmc-supply = <®_eldo1>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + bus-width = <4>; + status = "okay"; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; @@ -174,6 +190,19 @@ &uart0 { status = "okay"; }; +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + uart-has-rtscts = <1>; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ + host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ + }; +}; + /* On Pi-2 connector */ &uart2 { pinctrl-names = "default";