From patchwork Fri Jan 15 13:49:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 8041041 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 6F44BBEEE5 for ; Fri, 15 Jan 2016 13:52:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C568203B4 for ; Fri, 15 Jan 2016 13:52:08 +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 01989203A4 for ; Fri, 15 Jan 2016 13:52:07 +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 1aK4nO-0005XO-BI; Fri, 15 Jan 2016 13:52:06 +0000 Received: from mail-pf0-f193.google.com ([209.85.192.193]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aK4me-0004uy-3V; Fri, 15 Jan 2016 13:51:22 +0000 Received: by mail-pf0-f193.google.com with SMTP id n128so8555378pfn.3; Fri, 15 Jan 2016 05:51:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=93D/U63NgPBXVvCVbdE+q+IEY2WzJav79anBmtmGQEU=; b=Uwkj3WkBd0WKod80xwuTHX4PH2qq59UyLRWGC+hDCIWb4weX4h5+cVf0L5EuHyZI+R Cv8EjdT88B9XHIMwRivF01FN99cXQDFUVuhrzYqwkYm3unBvYXk4+xWdSNz8V3drbmtS oSJcO7mFT5TYOvRJMpSxuoOrymIVwFJUepzLfaGscuQXNOcVnVftrAlXGGDA7SRijN/i Dq1BX9WEx2AMdjCGgWCsZQPQS0Sn7MMdK9zEmlPnXQNz+qKlwxBSMS8Nfui1Ws7k+pAH 8RBh3GjtCekAbGqe5C7ML3Jsn4wuOmaWxPsZ4W7Be1E03cy0sdhGzcm/NYGKCK4bKGzX FnKg== X-Gm-Message-State: ALoCoQlgg0wO0MbSeftVoyI2u44OizNdzbBcfkWwMPCkul7UWnBXHG10U5J6Fr49EC2Cs0yFmiXvlu8X+gPYKfQTRdKJ1PC8XQ== X-Received: by 10.98.64.215 with SMTP id f84mr15135675pfd.113.1452865859762; Fri, 15 Jan 2016 05:50:59 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id 16sm15811805pfh.48.2016.01.15.05.50.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jan 2016 05:50:58 -0800 (PST) From: Caesar Wang To: Heiko Stuebner , linux-rockchip@lists.infradead.org Subject: [PATCH v3 6/9] ARM: dts: rockchip: add the sdio power sequence for kylin board Date: Fri, 15 Jan 2016 21:49:53 +0800 Message-Id: <1452865796-23527-7-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452865796-23527-1-git-send-email-wxt@rock-chips.com> References: <1452865796-23527-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160115_055120_328195_560308A9 X-CRM114-Status: GOOD ( 12.36 ) 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: linux-kernel@vger.kernel.org, Mark Brown , leozwang@google.com, keescook@google.com, linux-arm-kernel@lists.infradead.org, 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 sdio power sequence for kylin board. The WLAN attached to a SDIO interface, wifi/bluetooth have reset and power been needed to enable. AFAIK, the simple power sequence provider sets a value for multiple GPIOs. So the reset and power of WlAN chip can be handled in mmc power sequence. On the module itself this is one of these, that should can be handled by reset GPIOs in simple mmc power sequence. The Bluetooth host wake is high active from bootup, this patch is also set pinctrl bias as the default to enable the pull up in soc internal. Signed-off-by: Caesar Wang --- Changes in v3: - As Javier/Heiko discuss on https://patchwork.kernel.org/patch/7974311/, try to change dts with reset-gpios handle. arch/arm/boot/dts/rk3036-kylin.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts index 4fbd0a3..d30a6dd 100644 --- a/arch/arm/boot/dts/rk3036-kylin.dts +++ b/arch/arm/boot/dts/rk3036-kylin.dts @@ -78,6 +78,23 @@ regulator-always-on; regulator-boot-on; }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + 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 + * - SDIO_RESET_L_WL_RST + * - SDIO_RESET_L_BT_EN + */ + reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>, /* WL_REG_ON */ + <&gpio0 27 GPIO_ACTIVE_LOW>, /* WL_RST */ + <&gpio2 9 GPIO_ACTIVE_LOW>; /* BT_EN */ + }; }; &acodec { @@ -311,6 +328,7 @@ cap-sdio-irq; default-sample-phase = <90>; keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; non-removable; num-slots = <1>; pinctrl-names = "default"; @@ -348,6 +366,12 @@ }; }; + sdio { + 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>;