From patchwork Tue Dec 22 09:33:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7903231 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 5136DBEEE5 for ; Tue, 22 Dec 2015 09:35:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 845D8205BE for ; Tue, 22 Dec 2015 09:35:51 +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 9BF15205B3 for ; Tue, 22 Dec 2015 09:35:50 +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 1aBJME-0005bH-39; Tue, 22 Dec 2015 09:35:50 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBJLI-0003sX-VV; Tue, 22 Dec 2015 09:34:54 +0000 Received: by mail-pa0-f49.google.com with SMTP id cy9so32464903pac.0; Tue, 22 Dec 2015 01:34:32 -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=QQQVo3bOVf8ohLck2sajzsFLZY++PeIBcnVtvl/c84Y=; b=frc4xyeRQ1y9I5qys+kfLXfXWDS1PUIemaokemgt60DE/y1rH1fQYdvJATZn4+q3DK oSBva4sFGxgBtS1w13vHPXDJTKqVK/CPdlyD88K12C8xVWpyKnG33OtQLMepAiPHRt2f UYx+7lv1kvtT9P5mTYnWikWtN9BOyTZk/y/qrIC9h5uGasERFrjlzIpsrwiM0+33lx8S HgqnhRexKCiA2NDSIsyv+D1Sma5BK46YHv2NyW69zBeGr2aq0r5P5US32c/kGamRqmqc 0DdqV+69jcehaWfx8ixWElzsC+GbWp7qpDL4B2T11kk3jBPxa+kKTt8mZACKjw2S9Los QXnQ== X-Received: by 10.66.220.196 with SMTP id py4mr34229407pac.135.1450776871843; Tue, 22 Dec 2015 01:34:31 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id o2sm44624204pap.31.2015.12.22.01.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 01:34:30 -0800 (PST) From: Caesar Wang To: heiko@sntech.de Subject: [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board Date: Tue, 22 Dec 2015 17:33:52 +0800 Message-Id: <1450776833-27639-5-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450776833-27639-1-git-send-email-wxt@rock-chips.com> References: <1450776833-27639-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151222_013453_207864_61737A82 X-CRM114-Status: GOOD ( 10.97 ) 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, 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 Without this the wifi/bluetooth module doesn't work properly at bootup. Signed-off-by: Caesar Wang Patchset: Rockchip kylin board Patch[6/6], bring up kylin board. We need add the wifi regulator to control the power. (am https://patchwork.kernel.org/patch/7873721/) --- arch/arm/boot/dts/rk3036-kylin.dts | 43 +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts index 2ef38be..ed0466f 100644 --- a/arch/arm/boot/dts/rk3036-kylin.dts +++ b/arch/arm/boot/dts/rk3036-kylin.dts @@ -76,6 +76,32 @@ 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_rst_l>; + regulator-name = "bt_regulator"; + }; + + wifi_regulator: wifi-regulator { + /* + * 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) + */ + + 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>; + }; }; &acodec { @@ -303,12 +329,13 @@ sd-uhs-sdr50; sd-uhs-sdr104; cap-sdio-irq; + card-external-vcc-supply = <&wifi_regulator>; default-sample-phase = <90>; keep-power-in-suspend; non-removable; num-slots = <1>; pinctrl-names = "default"; - pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>; + pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>; }; &uart2 { @@ -330,6 +357,20 @@ }; }; + sdio { + wifi_enable_h: wifienable-h { + rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_rst_l: bt-rst-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>;