From patchwork Sat Sep 22 17:02:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10611483 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 5410E14DA for ; Sat, 22 Sep 2018 17:06:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A29C2A1FE for ; Sat, 22 Sep 2018 17:06:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C4B52A551; Sat, 22 Sep 2018 17:06:33 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 B1E112A1FE for ; Sat, 22 Sep 2018 17:06:32 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=9YDqbujTkZpy6LvTckjnkod0BEnliVkRjjt0rU/LYqI=; b=E3HlAfrcBSQ3BOZKMgbwgkcW3Z usmIBKnuvBahXtQSTTtBt5Lc8gXvr3P/XNQlLFUsIBxX1jarM5csweYEYyuOau7bhATGlbNIMLTot y+4XxlSFjOYZ71bLF6KjDLlH/eg6+I1LRx27Fw2NYftRz3iImTFIQUnJGujY/kp6Xd3U4zbunPk5Y YLDoNRO/W2+tLI5AXKiKpV3BCszX7dh317CuyRH922rdnOlfnMxVVkfAruawsVxICHYnpR1wgmmue CSmQ+0B8/3IZ3hP6XLxEu8M/Mg8hwyWyZiCf7AAoR9J6TYBShqponkCIKQJsloAvjVx4ygG9es9SC Uyd6tiRg==; 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 1g3lML-0003n8-Gg; Sat, 22 Sep 2018 17:06:21 +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 1g3lK4-0001To-52 for linux-arm-kernel@lists.infradead.org; Sat, 22 Sep 2018 17:04:14 +0000 Received: from localhost.localdomain ([87.112.59.232]) by smtp with ESMTP id 3lIvgLHeTWLW23lJCgxvwZ; Sat, 22 Sep 2018 18:03:07 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=fJUXI6Se c=1 sm=1 tr=0 a=j0Shb94RhMAfJhCYhuuKdw==:117 a=j0Shb94RhMAfJhCYhuuKdw==:17 a=GpGPpnUa4d_284rtdoIA:9 a=Yvc8SBXPFsxRUPa6:21 a=SCpA1q9lbMTLrlhj:21 From: David Summers To: Heiko Stuebner , robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH 3/3] This patch adds wifi to asus tinker board S Date: Sat, 22 Sep 2018 18:02:36 +0100 Message-Id: <20180922170236.8690-4-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180922170236.8690-1-beagleboard@davidjohnsummers.uk> References: <20180922170236.8690-1-beagleboard@davidjohnsummers.uk> X-CMAE-Envelope: MS4wfENvKJ2UnW2I5NcsamooNJyXBzTjjXxHVqHq0PTj86Dzq3eXIW8idW2uCFETkNL/yWTJ03BPTu4LIT/Dw1VjzrBawBp7vPHZKHqQhiIOO+3qKybf2QBw 6gOxrs+IXh3xXlR3GUgP3O12gffHFn3FhcHD9BiIF46z8kxeqK2bP4GHyFRxBzy+ROPDqEYjMOh0Pw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180922_100400_411453_C804BA2E X-CRM114-Status: GOOD ( 10.74 ) 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 MIME-Version: 1.0 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 Now as fair as I understand. the asus tinker board contains a wifi So should this patch be added to the tinker board dtsi ? It also far move complex - it adds far more things, so consider Signed-off-by: David Summers --- arch/arm/boot/dts/rk3288-tinker-s.dts | 93 +++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-tinker-s.dts b/arch/arm/boot/dts/rk3288-tinker-s.dts index bc691e3f9c07..3d91924fd8db 100644 --- a/arch/arm/boot/dts/rk3288-tinker-s.dts +++ b/arch/arm/boot/dts/rk3288-tinker-s.dts @@ -10,6 +10,95 @@ / { model = "Rockchip RK3288 Asus Tinker Board S"; compatible = "asus,rk3288-tinker-s", "rockchip,rk3288"; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>; + pinctrl-names = "default","rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_gpios>; + BT,reset_gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; + BT,wake_gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>; + BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + wifi_chip_type = "ap6212"; + sdio_vref = <1800>; + WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + io-domains { + compatible = "rockchip,rk3288-io-voltage-domain"; + rockchip,grf = <&grf>; + flash0-supply = <&vcc_flash>; + gpio30-supply = <&vcc_io>; + wifi-supply = <&vcc_18>; + sdcard-supply = <&vccio_sd>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>; + + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>; + }; + + vcc_flash: flash-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_flash"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_io>; + }; +}; + +&pinctrl { + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>; + }; + chip_enable_h: chip-enable-h { + rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wireless-bluetooth { + uart0_gpios: uart0-gpios { + rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdio0 { + status = "okay"; + clock-frequency = <50000000>; + clock-freq-min-max = <200000 50000000>; + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; + disable-wp; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + num-slots = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + supports-sdio; }; &emmc { @@ -25,3 +114,7 @@ mmc-ddr-1_8v; status = "okay"; }; + +&uart0 { + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>; +};