From patchwork Mon May 8 16:21:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 98842 Delivered-To: patches@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1407437qge; Mon, 8 May 2017 09:21:32 -0700 (PDT) X-Received: by 10.28.133.70 with SMTP id h67mr12553009wmd.136.1494260492518; Mon, 08 May 2017 09:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494260492; cv=none; d=google.com; s=arc-20160816; b=rIXoRldeFnkFchO7uwr+9skWmqGS9KIMln6CqBJsNWCzqcCUGPOIH/M3+5Hc4n8kzr PHQ5H2n1LWt86PLJhzb7mFKu4+6TyJ1C3Yhv/6kSmRVxlK9FUigeWyerMSwh+tsa88T4 4wK/syS9MgrRMQiWwSKy2VU3t+em5haLxrGditSt+CJMiXMSge4u8Ykrt8ubVVZLVgfe GeEyfdWQL6rrayyKEibLYyoCbfLgpD6h+481XXrRLWzXW7zhD6Fq88/CJKxK1kFKi1lK eWJtwOR9a1yjztl25UOOjWD3g0MqJFy60cCxrOEneXuNTzqonl3RW63xi3dVhWqzBdXj zq5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1CPouluMvyZpOA63PEnDlKuHuD+yIsYNqjCsSvgSq+A=; b=VF8q1i9LCyUm/WkS+EtkWK7YZdIZjQmWfNCqeiOVKJMfKVLtTP5fJqBpOge8DJbGNs tKcLGB0yYLDQEd9+ltwmdNAv2taiMY6cPZ1T57FONIECP19UVWV3lYyc+PiHpeIgVOzl yB+R8q9jS1pNTg5LgBpHYKQPFWYUR8hmtLcSjhV6cU6yd4MKpeNo5KaDxc5foauUbS28 y9Kem0bdd4vwqG17Whh96ZXOSPRgYg/aIzYxVrMAReN7eSHLEv7zL1MZv0+ZK7/2RX5C gagNT8+66kRcsLK+ccvppL6g84tG8Zx3Ww/logAtb6Cra7uomogrYMgeXsyD/dHhLE21 DrXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::231 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com. [2a00:1450:400c:c09::231]) by mx.google.com with ESMTPS id x84si7711387wmg.6.2017.05.08.09.21.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2017 09:21:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::231 as permitted sender) client-ip=2a00:1450:400c:c09::231; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::231 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x231.google.com with SMTP id u65so18312087wmu.1 for ; Mon, 08 May 2017 09:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1CPouluMvyZpOA63PEnDlKuHuD+yIsYNqjCsSvgSq+A=; b=ApkuBRdp7A16unDEw/hn0A/EHmX41XZN1Q9+lJxs2/HPDlfPwxD33+aKYZTbOIOwHs 3NUw+TRGr04f5irg8g4tXdH8PDbk90fEMWFq7T+K79XiqovLFSzcugxkDQRloH/ICyGy IyjyfE2Kx4TpKdeBehDGMVjLHWXXvPMJ4STdk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1CPouluMvyZpOA63PEnDlKuHuD+yIsYNqjCsSvgSq+A=; b=aCMRbnn8yauwgnZHW3dzpEdc36FWWAyWdNkL89KpFR8fVM9bd/oCsHV6LKnmF+cKGo pjKRx1s6bcgp5nXFz5RJ4CjyrjOgvKa7xlK5AB/M5iCsesXm/2CIhxTsPtyazPbHC5F9 XaR5zOPFgeptxQs+ap7Re129wZhQy5WeshYqT/BOXrUYEbVHzSJRps0AltgJv3tFF+ZA lXkkqFRAsD8Jub2hrSZskrceyFHPZFHusDqR4yLPSwvOcUcgNkmhWjk+TG0Rsfl7aOtj zZa4WrBCJIx4168kAzSNt+md9270e0+JD2juO05Y7R9iGWMsdr5ncuzKKkXOBSsSelbx heZA== X-Gm-Message-State: AN3rC/4lZ1Msg1Tss9TgmnGBOzfsOsl3mHsGCxZlkw4Z4GGttW5HZ9Fl Ju2J5gdDlhKP7SkICIE= X-Received: by 10.25.217.147 with SMTP id s19mr21494744lfi.99.1494260492116; Mon, 08 May 2017 09:21:32 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id 1sm1600724ljn.59.2017.05.08.09.21.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 09:21:31 -0700 (PDT) From: Ulf Hansson To: Wei Xu , linux-arm-kernel@lists.infradead.org Cc: Ulf Hansson , Daniel Lezcano Subject: [PATCH 8/8] arm64: dts: hikey: Fix WiFi support Date: Mon, 8 May 2017 18:21:17 +0200 Message-Id: <1494260477-25163-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494260477-25163-1-git-send-email-ulf.hansson@linaro.org> References: <1494260477-25163-1-git-send-email-ulf.hansson@linaro.org> The description of the connection between the dwmmc (SDIO) controller and the Wifi chip, which is attached to the SDIO bus is wrong. Currently the SDIO card can't be detected and thus the Wifi doesn't work. Let's fix this by assigning the correct vmmc supply, which is the always on regulator VDD_3V3 and remove the WLAN enable regulator altogether. Then to properly deal with the power on/off sequence, add a mmc-pwrseq node to describe the resources needed to detect the SDIO card. Except for the WLAN enable GPIO and its corresponding assert/de-assert delays, the mmc-pwrseq node also contains a handle to a clock provided by the hi655x pmic. This clock is also needed to be able to turn on the WiFi chip. Signed-off-by: Ulf Hansson --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) -- 2.7.4 diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index d4b3879..f72698b 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -111,6 +111,15 @@ vin-supply = <®_sys_5v>; }; + wl1835_pwrseq: wl1835-pwrseq { + compatible = "mmc-pwrseq-simple"; + /* WLAN_EN GPIO */ + reset-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + clocks = <&pmic>; + clock-names = "ext_clock"; + power-off-delay-us = <10>; + }; + soc { spi0: spi@f7106000 { status = "ok"; @@ -302,11 +311,10 @@ }; dwmmc_2: dwmmc2@f723f000 { - broken-cd; bus-width = <0x4>; non-removable; - /* WL_EN */ - vmmc-supply = <&wlan_en_reg>; + vmmc-supply = <®_vdd_3v3>; + mmc-pwrseq = <&wl1835_pwrseq>; #address-cells = <0x1>; #size-cells = <0x0>; @@ -318,18 +326,6 @@ interrupts = <3 IRQ_TYPE_EDGE_RISING>; }; }; - - wlan_en_reg: regulator@1 { - compatible = "regulator-fixed"; - regulator-name = "wlan-en-regulator"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - /* WLAN_EN GPIO */ - gpio = <&gpio0 5 0>; - /* WLAN card specific delay */ - startup-delay-us = <70000>; - enable-active-high; - }; }; leds {