From patchwork Thu Jan 7 08:25:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7974331 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A44F6BEEE5 for ; Thu, 7 Jan 2016 08:28:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0E1620172 for ; Thu, 7 Jan 2016 08:28:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DDC872013D for ; Thu, 7 Jan 2016 08:28:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aH5w6-0001by-0g; Thu, 07 Jan 2016 08:28:46 +0000 Received: from mail-pa0-f52.google.com ([209.85.220.52]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aH5vG-0000eM-9H; Thu, 07 Jan 2016 08:27:57 +0000 Received: by mail-pa0-f52.google.com with SMTP id qh10so2768236pab.2; Thu, 07 Jan 2016 00:27:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S00mXZ5+xl5Zw9E0RFl8xhm55kfsjPj5skS5Kkt8qDU=; b=Kbr86De6RhfY1r548VAHSwnCr5NZo458QwqNu2u4wUcWJZJt2aloZwoq5dcfGAkQPH 5A6VOhmVCQZqARzcukFy4MnljVxYqaxUC1XPVh/Y/8GMQPbzvWl2u7d8uz+mWXidlJ7e hbSpPBRqIMfXzM4ys7U1lzuO81VWaOPu1WKAj1CNLlhLMfKNrWwn45X47NPdb0kfZniC QbRDrwmZ28nMQTyUPBNwKLU0nKCSlXoNg4b3g3H/EO6K2ZoioSyolvTrX+nytzZek8wz RazTOX+gGMrOwiJtUQqrkk/aiFIISV1j7minIsieY6pcs31s6YEttrdL/LooAWFEvc5W QX7Q== X-Received: by 10.66.190.66 with SMTP id go2mr150971832pac.114.1452155253838; Thu, 07 Jan 2016 00:27:33 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id qj8sm9945010pac.40.2016.01.07.00.27.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 00:27:32 -0800 (PST) From: Caesar Wang To: Heiko Stuebner , Ulf Hansson Subject: [PATCH v2 08/12] ARM: dts: rockchip: add the wifi/bt regulator for kylin board Date: Thu, 7 Jan 2016 16:25:51 +0800 Message-Id: <1452155155-16232-9-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452155155-16232-1-git-send-email-wxt@rock-chips.com> References: <1452155155-16232-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160107_002754_695454_6A943BFA X-CRM114-Status: GOOD ( 12.39 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Pawel Moll , Ian Campbell , Kumar Gala , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , leecam@google.com, linux-arm-kernel@lists.infradead.org, keescook@google.com, leozwang@google.com, Caesar Wang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the wifi/bt regulator for simple mmc sequence. Also, add the exteral clock and reset gpios for simple mmmc sequence on kylin board. Without this the wifi/bluetooth module doesn't work properly at bootup. Signed-off-by: Caesar Wang --- Changes in v2: - As Heiko comment, modify it to fit the simple-mmc-sequence. arch/arm/boot/dts/rk3036-kylin.dts | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts index b2e5f5d..4346ce5 100644 --- a/arch/arm/boot/dts/rk3036-kylin.dts +++ b/arch/arm/boot/dts/rk3036-kylin.dts @@ -40,6 +40,7 @@ /dts-v1/; +#include #include "rk3036.dtsi" / { @@ -76,6 +77,43 @@ regulator-always-on; regulator-boot-on; }; + + bt_regulator: bt-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_enable_l>; + regulator-name = "bt_regulator"; + }; + + wifi_regulator: wifi-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + regulator-name = "wifi_regulator"; + vin-supply = <&bt_regulator>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 RK808_CLKOUT1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_wake_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 = <&gpio0 27 GPIO_ACTIVE_LOW>; + ext-vcc-supply = <&wifi_regulator>; + }; + }; &acodec { @@ -312,6 +350,7 @@ cap-sdio-irq; default-sample-phase = <90>; keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; non-removable; num-slots = <1>; pinctrl-names = "default"; @@ -337,6 +376,20 @@ }; }; + sdio { + wifi_enable_h: wifienable-h { + rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_enable_l: bt-enable-l { + rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_h: bt-wake-h { + rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>; + }; + }; + sleep { global_pwroff: global-pwroff { rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;