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 */