Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Caesar Wang <wxt@rock-chips.com>
To: Heiko Stuebner <heiko@sntech.de>, linux-rockchip@lists.infradead.org
Cc: leozwang@google.com, Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, keescook@google.com,
	Caesar Wang <wxt@rock-chips.com>
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	[thread overview]
Message-ID: <1452865796-23527-7-git-send-email-wxt@rock-chips.com> (raw)
In-Reply-To: <1452865796-23527-1-git-send-email-wxt@rock-chips.com>

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 <wxt@rock-chips.com>

---

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>;
-- 
1.9.1

  parent reply	other threads:[~2016-01-15 13:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 13:49 [PATCH v3 0/9] Add the family patches to support for kylin board Caesar Wang
2016-01-15 13:49 ` [PATCH v3 1/9] ARM: dts: rockchip: add hdmi/vop device node for rk3036 Caesar Wang
     [not found] ` <1452865796-23527-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-15 13:49   ` [PATCH v3 2/9] ARM: dts: rockchip: add i2s_clk_out to list of clocks used on rk3036 i2s Caesar Wang
2016-01-15 13:49   ` [PATCH v3 7/9] ARM: dts: rockchip: add the sdmmc for kylin board Caesar Wang
2016-01-17 19:37     ` Heiko Stuebner
2016-01-15 13:49 ` [PATCH v3 3/9] ASoC: rockchip: i2s: add support for grabbing output clock to codec Caesar Wang
2016-01-15 17:46   ` Mark Brown
     [not found]     ` <20160115174623.GZ6588-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-01-15 21:48       ` Sonny Rao
2016-01-22 17:18         ` Mark Brown
     [not found]           ` <20160122171815.GD6588-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-01-25  1:15             ` Jianqun Xu
2016-01-26  9:52               ` Heiko Stübner
2016-01-27 12:47                 ` Mark Brown
2016-01-15 13:49 ` [PATCH v3 4/9] ARM: dts: rockchip: enable the uart0 for kylin board Caesar Wang
2016-01-17 19:23   ` Heiko Stuebner
2016-01-15 13:49 ` [PATCH v3 5/9] ARM: dts: rockchip: enable the high speed on sdio " Caesar Wang
2016-01-17 19:26   ` Heiko Stuebner
2016-01-15 13:49 ` Caesar Wang [this message]
2016-01-17 19:31   ` [PATCH v3 6/9] ARM: dts: rockchip: add the sdio power sequence " Heiko Stuebner
2016-01-15 13:49 ` [PATCH v3 8/9] ARM: dts: rockchip: add reboot-mode node for rk3036 SoCs Caesar Wang
     [not found]   ` <1452865796-23527-9-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-17 19:18     ` Heiko Stuebner
2016-01-18  1:11       ` Andy Yan
2016-01-15 13:49 ` [PATCH v3 9/9] ARM: dts: rockchip: add pl330-broken-no-flushp quirk " Caesar Wang
2016-01-17 19:20   ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452865796-23527-7-git-send-email-wxt@rock-chips.com \
    --to=wxt@rock-chips.com \
    --cc=broonie@kernel.org \
    --cc=heiko@sntech.de \
    --cc=keescook@google.com \
    --cc=leozwang@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox