From patchwork Sat Mar 9 15:39:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10845983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46B954B69 for ; Sat, 9 Mar 2019 15:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FEC32C3E4 for ; Sat, 9 Mar 2019 15:39:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2443D2A568; Sat, 9 Mar 2019 15:39:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C6C9A2C3E4 for ; Sat, 9 Mar 2019 15:39:46 +0000 (UTC) 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=3cPOYnh81q/stXp1jROJ1KgvHH8bW3nTx21a51Fq4bQ=; b=bcQmgIABWv79vH wDSBzYSqF6T4AhD6ZPqNfebEZKokTOK5+lufuPyoJo5yLj5XytXNweE/bUy5P1Pu87dFXHdhuppH7 QdWxNXq8ouna4lzCbfieBoru6nWjr1cSWVokJeRsy/TVujfRViZRWBnkuxiqLGaqBNQ9hrpJai2GB FF+BEby0Jn7NAe/P7WnduL26O0krmPYP9SPyBQpSM/EevHFFQjBZeE3rwMMq7BcKq2EVgLnZj2jwo Hocl1CiYx/dkyN66W0nvITx9jHyhnhETeoNSheENEtqr86GGlZBJm7bqKiZ8uxOujb4VPTQM7WSTN 7Kt9BXqyy/hQ6iopG7lA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e4f-00035Q-09; Sat, 09 Mar 2019 15:39:45 +0000 Received: from avasout02.plus.net ([212.159.14.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e4Z-00033A-Rg for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2019 15:39:41 +0000 Received: from localhost.localdomain ([87.114.146.246]) by smtp with ESMTP id 2e4PhIi6Rx6b62e4Qhg9zm; Sat, 09 Mar 2019 15:39:31 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=T4GiscCQ c=1 sm=1 tr=0 a=DwUJrZpGRQ5ePevJMiNdYw==:117 a=DwUJrZpGRQ5ePevJMiNdYw==:17 a=JfrnYn6hAAAA:8 a=7CQSdrXTAAAA:8 a=vJIJKeom-RswbmDfAKYA:9 a=TE9vAxTHP7uUtEBL:21 a=kzsRoEJelQF42h6Y:21 a=Qbp-gCSXuQMA:10 a=1CNFftbPRP8L7MoqJWF3:22 a=a-qgeE7W1pNrGK8U0ZQC:22 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, frowand.list@gmail.com, ulf.hansson@linaro.org, jh80.chung@samsung.com Subject: [PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection Date: Sat, 9 Mar 2019 15:39:21 +0000 Message-Id: <20190309153923.22806-1-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfDeJq2pfFVVr6HphYAbymPFb65NoRrAprdgpTG5p9Y1lLne8wQeSw0TCnqiCo82phH0YQdjqyiiZSY5QxHJHJ4UgW19FBUX1zBKYR56HqguaQK5hoTYF aNjSQbvRJsh0Pt3Qe7TSLSA58k1m4hcHWJICZS/SDPgnigmwyUw1elDxSCM98cxXsZr40R4B443y6WxtLigtUEtPARHSq+P5fPQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190309_073940_099695_AE24269D X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-mmc@vger.kernel.org, David Summers , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Problem: On ASUS Tinker Board S, when booting from the eMMC, and there is card in the sd slot, there are constant errors. Also when warm reboot, uboot can not access the sd slot Cause: Identified by Robin Murphy @ ARM. The Card Detect on rk3288 devices is pulled up by vccio-sd; so when the regulator powers this off, card detect gives spurious errors. A second problem, is during power down, vccio-sd apprears to be powered down. This causes a problem when warm rebooting from the sd card. This was identified by Jonas Karlman. History: A common fault on these rk3288 board, which impliment the reference design. When this arose before: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-August/281153.html And Ulf and Jaehoon clearly said this was a broken card detect design, which should be solved via polling Solution: Hence broken-cd is set as a property. This cures the errors. The powering down of vccio-sd during reboot is cured by adding regulator-boot-on. This solutions has been fairly widely reviewed and tested. Signed-off-by: David Summers Reviewed by: Robin Murphy Reviewed by: Jonas Karlman Test by: TheSaint @ ArchLinux Arm Tested-by: ... with an actual Name + mail address Reviewed-by: Robin Murphy Tested-by: Jonas Karlman Reviewed-by: Jonas Karlman Tested-by: Jonas Karlman --- arch/arm/boot/dts/rk3288-tinker.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index aa107ee41b8b..ef653c3209bc 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -254,6 +254,7 @@ }; vccio_sd: LDO_REG5 { + regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-name = "vccio_sd"; @@ -430,7 +431,7 @@ bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; - card-detect-delay = <200>; + broken-cd; disable-wp; /* wp not hooked up */ pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; From patchwork Sat Mar 9 15:39:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10845987 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3720922 for ; Sat, 9 Mar 2019 15:39:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACA272A568 for ; Sat, 9 Mar 2019 15:39:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A068D2C3FB; Sat, 9 Mar 2019 15:39:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E09E2A568 for ; Sat, 9 Mar 2019 15:39:59 +0000 (UTC) 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=PsRfCtf7UKDfawWJ0jEpzkL7iEl4/xXbBKjt5f4O4mc=; b=BVy/8WV5yC9XIz R+Czg5A9feOVDmOxbPiQcdaSsucmxiuoep62o67UBOpUk0oW4eVA2Ft7Uld97A20nqF03SVFl+Kqw BL1v4vK6pxc2woRjhGyHTTOVjBKXAZzR399Nuiex06p9+Dem5mHbjHqUEDlRusTFCo5dyI1UyD0YC Q09YIztMiAo/B/46ER7H7Y6zh+SxjMtO3amgZp50A+jxLfox+gPvWglFqliMnb4OQFtCw+DnSSuYY dRVqcmORYWeAchFNpCiS5kNTkX0QFA02rwgQRIMY1EYTz355eCVDCUZLdN94Eo3HWYVB0oCp3RHlt Q/3zxAUTfZQiC88w4idA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e4q-0003Lu-6W; Sat, 09 Mar 2019 15:39:56 +0000 Received: from avasout02.plus.net ([212.159.14.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e4Z-00033F-Ti for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2019 15:39:43 +0000 Received: from localhost.localdomain ([87.114.146.246]) by smtp with ESMTP id 2e4PhIi6Rx6b62e4UhgA09; Sat, 09 Mar 2019 15:39:35 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=T4GiscCQ c=1 sm=1 tr=0 a=DwUJrZpGRQ5ePevJMiNdYw==:117 a=DwUJrZpGRQ5ePevJMiNdYw==:17 a=X63dCvaKAAAA:20 a=5mpuRNi4AAAA:8 a=pGLkceISAAAA:8 a=7CQSdrXTAAAA:8 a=VPS7DyEM59tx19uc7SMA:9 a=uofxNaFErzebX8tY:21 a=A-po0UiBLE9ZhxD2:21 a=eHWn0xJZPbZ7L6UZR85b:22 a=a-qgeE7W1pNrGK8U0ZQC:22 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, frowand.list@gmail.com Subject: [PATCH v3 2/3] arm: dts: rk3288-tinker.dtsi: Enable WiFi Date: Sat, 9 Mar 2019 15:39:22 +0000 Message-Id: <20190309153923.22806-2-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190309153923.22806-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> <20190309153923.22806-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfM0SCpervKe/OKFvo2avhpT/EHjnHxRiRQhTaZw7nmxKQnPAmKNe1GcxEubJaCp1itNDbywEYUCQVR6YXcHV3FCNrDh332l4HTekAKg4xi7+jjHHC05P 4OghV9vSzl3d6RmVVrrGDLc5G2IemcRcM4m475O908g/X2PZLA3hviaMMxuW4LmmAE8BOYWD/63JHg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190309_073940_382025_8B9AD209 X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , devicetree@vger.kernel.org, David Summers , linux-rockchip@lists.infradead.org, Tony McKahan , Robin Murphy , 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 X-Virus-Scanned: ClamAV using ClamSMTP This patch adds wifi support to the ASUS Tinker Board (S) machines. This is provided by an wifi card (RTL8723BS) wired into the sdio interface. It requires certain pins pulled, to enable the WiFi. The schematics for these board do not show the WiFi connection, so the connections have been taken from: https://github.com/TinkerBoard/debian_kernel/blob/develop/arch/arm/boot/dts/rk3288-miniarm.dts In particular the pulling of two pins. This patch is almost identical to v1. A few additional line breaks for readability. On Armbian, they did not use sd-uhs-ddr50, so this has been removed. It does not change functionality. The ASUS patch set sd-uhs-sdr104;. Signed-off-by: David Summers Signed-off-by: Stefan Wahren Tested-by: Tony McKahan Reviewed-by: Robin Murphy Test-by: TheSaint @ ArchLinux ARM --- arch/arm/boot/dts/rk3288-tinker.dtsi | 40 +++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index ef653c3209bc..0ffab1b7c940 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -5,6 +5,7 @@ #include "rk3288.dtsi" #include +#include / { chosen { @@ -96,6 +97,17 @@ startup-delay-us = <100000>; vin-supply = <&vcc_io>; }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 RK808_CLKOUT1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable>; + reset-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_LOW>, + <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; + }; + }; &cpu0 { @@ -336,7 +348,7 @@ &io_domains { status = "okay"; - + wifi-supply = <&vcc_18>; sdcard-supply = <&vccio_sd>; }; @@ -416,6 +428,13 @@ rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + sdio { + wifi_enable: wifi-enable { + rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>, + <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm0 { @@ -440,6 +459,25 @@ vqmmc-supply = <&vccio_sd>; }; +&sdio0 { + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>; + max-frequency = <50000000>; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc_18>; + status = "okay"; +}; + + &tsadc { rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ From patchwork Sat Mar 9 15:39:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10845991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70235922 for ; Sat, 9 Mar 2019 15:40:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 599CF2A568 for ; Sat, 9 Mar 2019 15:40:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AB5C2C3FB; Sat, 9 Mar 2019 15:40:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E7EB52A568 for ; Sat, 9 Mar 2019 15:40:16 +0000 (UTC) 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=CnahXBfXPZuh6peE1tzMOoKX90aD7volW7P74VF3idI=; b=t9/eklypllvJBN mxT0k+G+QyPxH4I8ZdTZnhuNf21/XMlPfA8u9EWExXqTFgd1uWkFA3KKHqTfuh0SquyGgRLRVR9CI vwzHHJ8rZyVXp6mqDe2wqGTllhnmoIvd2iORBXMHoUhEn24POba0vLbmkC+U7cBGUQzIcWzjWV+Wz SmytCCceb3n94T0meobeNkib3daT4E8E0Mleyoo1VEKn7Wis8ncj7DioZttVYwUnN8Pc/2VQB1U1D 9jZmCz7SrAMa8OmvQnCp4kkr1ZhXJptJL8600SpLG5kUXntwfiLImwJ3VgoXerCiqiv3tbBKM2OsY 5G6kCm62S/DvTuZS2j1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e56-00045Y-IV; Sat, 09 Mar 2019 15:40:12 +0000 Received: from avasout02.plus.net ([212.159.14.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e4b-00034B-Vr for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2019 15:39:43 +0000 Received: from localhost.localdomain ([87.114.146.246]) by smtp with ESMTP id 2e4PhIi6Rx6b62e4YhgA0R; Sat, 09 Mar 2019 15:39:40 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=T4GiscCQ c=1 sm=1 tr=0 a=DwUJrZpGRQ5ePevJMiNdYw==:117 a=DwUJrZpGRQ5ePevJMiNdYw==:17 a=OLL_FvSJAAAA:8 a=ViPa0ciWmgWNDZ-_SmcA:9 a=1p1MZfBn9Gu4pFza:21 a=f5_gGt5-OF2vyWa9:21 a=pUjmoVUizdcA:10 a=6X9rrcGS-_EA:10 a=oIrB72frpwYPwTMnlWqB:22 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, frowand.list@gmail.com, marcel@holtmann.org, johan.hedberg@gmail.com, anarsoul@gmail.com Subject: [PATCH v3 3/3] arm: dts: rk3288-tinker.dtsi: Add outline Bluetooth support Date: Sat, 9 Mar 2019 15:39:23 +0000 Message-Id: <20190309153923.22806-3-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190309153923.22806-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> <20190309153923.22806-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfJtJjEwUSKCMwIOGX7XlW4wETRaqOYoLI/OT5+Lbs9zhgJjeqKL44cGLEILuabuFiHWxYPSw7hK2aRwX8y9eD2ETztNKJYWfIvkFoQ5yjpjov9s4SW0h J/OwsFiW8r2ToexXd0gLbxtPpe4Lj/l5A3hiGjsfX5/fu/viuf4QMQ6Ko91USV1iUDSjluT6tuPn7Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190309_073942_318832_6E9A2C10 X-CRM114-Status: GOOD ( 11.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-bluetooth@vger.kernel.org, David Summers , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch is an outline for bluetooth on the ASUS Tinker Board (S). Bluetooth is provided my RTL8723BS on these machine, and this is wired into UART0. Here this is performed as a SerDev device. Now as presented, this does not give functioning bluetooth. The updates needed to the device driver: https://www.spinics.net/lists/linux-bluetooth/msg78661.html Haven't yet been accepted. So this device tree hook doesn't yet have "realtek,rtl8723bs-bt" compatible flag. It is however still submitted as a patch, as it sets the UART up correctly. And so basic communciation can be had with the device. This has been confirmed by Tony McKahan @ Armbian, in particular that the CTS/RTS is needed. When Vasily patch is accepted, this will be added as a minor patch on top of this patch; as this patch gives the pins needed. The one oddity, is the RESET pin, it is labeled this way on the schematic. However the hci_h5.c driver calls this ENABLE. Here we have stuck with the schematic name. Signed-off-by: David Summers --- arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index 0ffab1b7c940..d29f5b34d7e6 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -486,6 +486,17 @@ &uart0 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; + + bluetooth { + clocks = <&rk808 RK808_CLKOUT1>; + reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; + vcc-18-supply = <&vcc_18>; + vcc-io-supply = <&vcc_io>; + }; }; &uart1 {