From patchwork Sun Feb 17 12:15:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10816993 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 6B4F8922 for ; Sun, 17 Feb 2019 12:16:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54B7F2A7D4 for ; Sun, 17 Feb 2019 12:16:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4909D2A7D8; Sun, 17 Feb 2019 12:16:35 +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 EA5142A7D4 for ; Sun, 17 Feb 2019 12:16:34 +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=to2PArEPoUlDqbs1sWVqp3bymWxiahPXL79AHhBZOKY=; b=Pn5Kf80qj88AQ6 3x6Wx/YjOO2gYE67N9tbSzCc2KfJIPKHEXccFzWMg92JaUiM5LvIpK/tCRFdjNlMbyZZua4nRcGCF 8ncpeg0K4xpK6dg52qnTZUlCRD9i6yJZA5WMT0H+L3KJ2rRTiYVfnlDd5bTo1QFwhHKSRjIcueL+m cE6PG2neBqzgMHufGFYdrzl3DK8625DIvZ5njZBAvoF/anKEWXE2qJVz9JI7cAM8ULSWOqvfTMghu uGOlXBXWN5W+dCuMvCAcpuA06IJDc+Ma82TxHy8cXFLvjNN1fEsGUOcxnbYHIQmZr0FaPBcXCjj+n aDmu+Y3iI8atiVlusa9A==; 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 1gvLN3-0007NM-En; Sun, 17 Feb 2019 12:16:33 +0000 Received: from avasout06.plus.net ([212.159.14.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvLMq-000781-34 for linux-arm-kernel@lists.infradead.org; Sun, 17 Feb 2019 12:16:21 +0000 Received: from localhost.localdomain ([87.114.170.31]) by smtp with ESMTP id vLLzgM2tCHd2LvLM8gaQAQ; Sun, 17 Feb 2019 12:15:37 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=FK01Odgs c=1 sm=1 tr=0 a=IwDniP0DpuMObaUqJdRMiQ==:117 a=IwDniP0DpuMObaUqJdRMiQ==:17 a=qyKJLktWOQhn6OkCE7gA:9 a=ltk_qqI1dF5I-_NL:21 a=Q6soJdELGrPS4MJB:21 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH 1/3] ARM: dts: rk3288 Tinker Board (S) sdcard changes Date: Sun, 17 Feb 2019 12:15:11 +0000 Message-Id: <20190217121513.22965-2-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfIW+p07NV00SDPjke0JokRGo/JUIiMUldPYL6vNcBNYI25W/O+aaQZDpkEE1XTcJ7pQYGS09Up9Bw6d9LnEM19gDMVktu6Knnv0OJSlvrAFc8zB3xuUo cIod8oRuTSrkBFAvs2DjA8ztNP1fRMkZjpFJ4u1wPAimV9sCFmxqCtxOEi5bT0jHXMvPk0vYHqfMfFQMaMSB+Tni4veflrX7OZ8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190217_041620_273076_9981213D X-CRM114-Status: GOOD ( 15.29 ) 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, 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 makes some minor changes to how the sd card is described in the device tree for the ASUS Tinker Board (S). In particular on the Tinker Board S, when booted from the eMMC, and with no card in the sd slot, and the log has endless messages about not being able to detect the card. Several methods to remove this error have been tried, the only one that works is the broken-cd and so that is what is applied here. Alas the ASUS schematic is not clear enough to indicate if the card detect is wired up to the cpu, the schematic does not show internal wiring on the Tinker Board! Now this error didn't show up on the Tinker Board, as that machine only boots where there is a sd card installed. However as the TB and TBS are so similar it is expected that the Tinker Board also doesn't have a functioning card detect. Hence the change here is made to the dtsi file, so it applies to both TB and TBS. The disable-wp is also removed, it doesnt seem needed on the micro sdcard slots, and without thisn the card can still be written to. Hence this flag is also removed. Signed-off-by: David Summers --- arch/arm/boot/dts/rk3288-tinker.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) beagleboard@davidjohnsummers.uk diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index 2b38075a2917..fceaeed44e34 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -432,9 +432,7 @@ bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; - card-detect-delay = <200>; - disable-wp; /* wp not hooked up */ + broken-cd; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; status = "okay"; -- From patchwork Sun Feb 17 12:15:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10816997 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 1327F13A4 for ; Sun, 17 Feb 2019 12:16:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F05B32A7D4 for ; Sun, 17 Feb 2019 12:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E38F32A7D8; Sun, 17 Feb 2019 12:16:50 +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 2C29D2A7D4 for ; Sun, 17 Feb 2019 12:16:50 +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=hAtmyc2fY3Mjs/PUypeEZ3ZNLcuVWxlmY9P/duZo69I=; b=OIsUWRT16Mkgbg Jl5zy8d/oYGJYjswvvvpT9JH96j1/uZYqd89QjOyWyXF5yOmxjdXKDUBikWqyhDzXLPWhNIcNosaG GN3ow+rOic+3qtASCvn0Wq71EaN09fOb02an9t5ehYtok8GAvuTBPC9xn5FYn6ntulU+RkpRcTE5S WKFW5+TQKBdriy9EA6Ggqcd4Izc8mLZpcUd+OJsYUUpmqRvvEgTpjIshan6W/S7ElGAeNHtvaZA4W WdLys14A7a/aqpNUCY7UlSds+TsFFfo4tkKUdQpbfHWz+7MGIfMkQBxNbFK5PFB3i+yTUz8wlV4Ct M/TihW1gGqSQWxfx0KqQ==; 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 1gvLND-0007cB-Ib; Sun, 17 Feb 2019 12:16:43 +0000 Received: from avasout06.plus.net ([212.159.14.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvLMx-00078F-RE for linux-arm-kernel@lists.infradead.org; Sun, 17 Feb 2019 12:16:32 +0000 Received: from localhost.localdomain ([87.114.170.31]) by smtp with ESMTP id vLLzgM2tCHd2LvLMGgaQAn; Sun, 17 Feb 2019 12:15:44 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=FK01Odgs c=1 sm=1 tr=0 a=IwDniP0DpuMObaUqJdRMiQ==:117 a=IwDniP0DpuMObaUqJdRMiQ==:17 a=X63dCvaKAAAA:20 a=OvfN7MOIAAAA:8 a=AI1YhfOiAAAA:8 a=V5NFcaBHAAAA:8 a=5mpuRNi4AAAA:8 a=rvHh0E1XO6TprAeEZs4A:9 a=N-hkzyawj4u5XedJ:21 a=09-r2RrawWPGnzw1:21 a=5YTr_Nlhc76s4ZyS:21 a=WKcxsw4WtVgA:10 a=naW0c5UNiJ17WtinOetU:22 a=ZRk3jL6q91YNeXra8VxS:22 a=AIFGTXQOaoIMFke0skzX:22 a=eHWn0xJZPbZ7L6UZR85b:22 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH 2/3] ARM: dts: rk3288 Tinker Board (S) add wi-fi Date: Sun, 17 Feb 2019 12:15:12 +0000 Message-Id: <20190217121513.22965-3-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfCWdXPU/DNP3jKkyuJiUWnmXRLkR2o7FCPTCxXKuXx5VGBSmjaBmQHYNyKOy8h2qNxAYfbSIX3qX9k4aNPeO0wTcZ9lfkXBlqfK/aZiy3b/cm5+DfA6s Klf5B/gchs6FBhI3npjiT9ZI6S0YIEKez1YOUtuDOMEfChq8P6WH7pr4ZnIZnECsUa2dGpUySvpjGoZf7lP6B/vdRL/3Dxb87Yw= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190217_041628_346961_00D85FB1 X-CRM114-Status: GOOD ( 15.85 ) 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 , linux-rockchip@lists.infradead.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 adds the wifi to the ASUS Tinker Board (S) machines. Unfortunatly neither the Tinker Board nor the Tinker Board S schematic indicate how the WiFi is wired up on these devices. The WiFi is provided by the RTL8723BS device, that has sdio WiFi and UART Bluetooth. This patch just adds the WiFi interface. With no schematic, most of the wiring has been derived from the ASUS patch to Debian: https://github.com/TinkerBoard/debian_kernel/commit/6a3128ade33f758887048578ada61a4b7ab8e678 In conjunction with the pin out of the RTL8723BS device: http://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf http://cit.odessa.ua/media/pdf/Intel-Compute-Stick/FN-Link_F23BDSM25-W1.pdf The only unusual part is that to bring the card up, both the pins RK_PD3 and RK_PD4 need to be pulled. Why this needs to be done is not clear, best explaination is that they are connected to the RTL8723BS pins WL_DIS# and BT_DIS#, which the data sheet vaguely says: Shared with GPIO9 This Pin Can Externally Shutdown the RTL8723BS WLAN function when BT_DISn is Pulled Low. When this pin deasserted, SDIO interface will be disabled. This pin can also support the WLAN Ra dio-off function with host interface remaining connected. Anyway extensive testing the TheSaint on ArchLinux Arm Forum https://archlinuxarm.org/forum/viewtopic.php?f=44&t=13064&start=120#p60548 Signed-off-by: David Summers Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/rk3288-tinker.dtsi | 39 +++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index fceaeed44e34..e1796f340eef 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -3,8 +3,9 @@ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. */ #include "rk3288.dtsi" #include +#include / { chosen { @@ -98,6 +97,15 @@ 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 { @@ -337,8 +345,8 @@ &io_domains { status = "okay"; - sdcard-supply = <&vccio_sd>; + wifi-supply = <&vcc_18>; }; &pinctrl { @@ -417,6 +425,12 @@ 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 +454,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; + sd-uhs-ddr50; + 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 Sun Feb 17 12:15:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10817001 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 6068113A4 for ; Sun, 17 Feb 2019 12:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AF5F2A7D7 for ; Sun, 17 Feb 2019 12:17:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E43A2A7D9; Sun, 17 Feb 2019 12:17:09 +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 C9F1F2A7D7 for ; Sun, 17 Feb 2019 12:17:08 +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=5Azuv6JRYouPHUuNXHA1sG6OK+e2s+cyQKmr2DwUWUI=; b=qYd9rYHB2b1hyO WPdevxCAHXD+U213WIytuxWXjuvg9dg6Q2Vhb6Z4PWX3pVwAIWD+V1V8G8tp7dOrj0pJj8BjJyhqE d+FAu73giRB/ih1MJzRenx5aWw9UU3w0d3at6kiaeTs+jkYFcsglM8TUWZioesAA25BR6aJmXe8VD KJMYd7d4ZFS/DzTOOG8Ut6gBS0lfUuU077OTVHPei4NE6Cy2Lv95H17tz+zi3NXrU/NqxvI/mJikE pVbvWrGQqE6/e8k3Wu34S31cDKTKr0D0PN9sCEymSL4ZpnRpTi461Ek9RSFEjLodYXSFp1iVl6cG6 2g2nf9IxveeMyDKBhMVg==; 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 1gvLNa-00081p-W4; Sun, 17 Feb 2019 12:17:06 +0000 Received: from avasout06.plus.net ([212.159.14.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvLN5-00078M-18 for linux-arm-kernel@lists.infradead.org; Sun, 17 Feb 2019 12:16:56 +0000 Received: from localhost.localdomain ([87.114.170.31]) by smtp with ESMTP id vLLzgM2tCHd2LvLMNgaQAy; Sun, 17 Feb 2019 12:15:52 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=FK01Odgs c=1 sm=1 tr=0 a=IwDniP0DpuMObaUqJdRMiQ==:117 a=IwDniP0DpuMObaUqJdRMiQ==:17 a=X63dCvaKAAAA:20 a=TkpssyMGhm8DTbAZXSUA:9 a=NnB7W_RyFDSnDlNr:21 a=n5Fje-ibHYVCOY7u:21 a=zA7_2-WrKBG-IMKZYL8h:22 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH 3/3] ARM: dts: rk3288 Tinker Board (S) add bluetooth Date: Sun, 17 Feb 2019 12:15:13 +0000 Message-Id: <20190217121513.22965-4-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfKsWF66wGX/1ob0yUw6pZb1Ra+A7Mb3vvE0UNWPIhTnYXJPCQHrNK+z1j9v4p0vQcjNSNuG7JWq0sEtbSEhcrzLJInFj2vWBECkVi85a92z3OUw6l4Z1 rBmKb6lRLfho7cV2svTVtLNv/STLEGdf8r1UavPww8viHMX65mVcj1498zYq/41Jmzvj8hj3TIBv1GRhJQuox1CRWL3eFOJVaX4hKiYApvpGpC57pAlnQmzM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190217_041635_693287_7E007B0F X-CRM114-Status: GOOD ( 15.53 ) 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, 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 to add Bluetooth to the ASUS Tinker Board (S) device tree. This patch is more contraversal - so probably view it as a request for comments. The reason behind this, is this patch does not currently set Bluetooth working on the these boards. The problem is that the bluetooth/hci_h5.c driver, that is used for Realtek serial devices, depends on ACPI. Unfortantly ACPI can not be enabled on armv7 machines such as the TB(S). And so the kernel module for the RTL8723BS Bluetooth can not be loaded. However this patch is believed to be an accurate description of the Tinker Board (S) wiring. It is strongly based on the ASUS patch: https://github.com/TinkerBoard/debian_kernel/commit/6a3128ade33f758887048578ada61a4b7ab8e678 As the Bluetooth is connected via a UART and this is wired into uart0, this has been described as a SerDev. The ASUS patch mentions the UART_CTS, but not the _RTS. Now as the RTL8723BS has both CTS and RTS on the uart, it has been assumed both are wired into uart0 on the cpu. The Bluetooth connection has several wake up pins both device and host and a reset pin. The wiring of these has been described; however how the kernel driver will use these isn't clear. E.g. should HOST_WAKE be an interupt? The main reason for asking for comments, is that when it comes time to make the changes to the bluetooth uart code, and add compatible flags, robh has indicated that this will only be accepted with a valid example. So the code below is that example. So I would like comments that this approach is valid, which can be used when the later submission comes. 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 e1796f340eef..931b4c652fdc 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -481,6 +481,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_LOW>; + 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 {