From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754442AbbLVJeh (ORCPT ); Tue, 22 Dec 2015 04:34:37 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:36052 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932402AbbLVJec (ORCPT ); Tue, 22 Dec 2015 04:34:32 -0500 From: Caesar Wang To: heiko@sntech.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, keescook@google.com, leozwang@google.com, leecam@google.com, Caesar Wang 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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>; -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: wxt@rock-chips.com (Caesar Wang) Date: Tue, 22 Dec 2015 17:33:52 +0800 Subject: [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board In-Reply-To: <1450776833-27639-1-git-send-email-wxt@rock-chips.com> References: <1450776833-27639-1-git-send-email-wxt@rock-chips.com> Message-ID: <1450776833-27639-5-git-send-email-wxt@rock-chips.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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>; -- 1.9.1