From patchwork Wed Jul 22 06:58:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 6840081 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8863F9F38B for ; Wed, 22 Jul 2015 06:58:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BC19206ED for ; Wed, 22 Jul 2015 06:58:57 +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 6841B204A0 for ; Wed, 22 Jul 2015 06:58:56 +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 1ZHnzO-00019g-B6; Wed, 22 Jul 2015 06:58:50 +0000 Received: from mail-wi0-f182.google.com ([209.85.212.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHnzM-00018c-P1 for linux-rockchip@lists.infradead.org; Wed, 22 Jul 2015 06:58:49 +0000 Received: by wibud3 with SMTP id ud3so140427612wib.1 for ; Tue, 21 Jul 2015 23:58:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=g6MoYJOughIvevYytVYHH/C7mfCVAQVM7lZJqe2FrFQ=; b=Z9JdgRxm6blEhy00NQW/VsVoYjRSlaDssAiqIxRxN5UBubAjc2oclontL2HIuwhhxz bVlylVWqhIk8c7bRwcrNzDIwyFqQECtWRbefR87cjbUsZmqqufcKo1AKsjT+WxQ0FCDT jKgAh4QU0DCe4DcMQCKS+VeoDYGlnJj/8FuhMQhDbukpUHJQBhvug9+AzBe5b3tG8dqa rzv490/Z1KcSwf3K6kmGDtmJEuK3ShnO5aUD6c5IRPMEdny9ewBx/cXa46LuIet53c7X 6QZ7P++/gdKtcFSR1Zxs308mq8x45fRBgl14bHXkRBseEwzpqeJ/OMBK8yaVpm+H1fJF hO5A== X-Gm-Message-State: ALoCoQneFc5JonZ7DhwVtrcewt2+ic0InUybqYd1ZFQZPpdqRqZPDZxzSJYWn8OshFBwdBpepfS4 X-Received: by 10.180.73.2 with SMTP id h2mr3629126wiv.72.1437548305751; Tue, 21 Jul 2015 23:58:25 -0700 (PDT) Received: from panicking (net-2-33-42-142.cust.dsl.teletu.it. [2.33.42.142]) by smtp.gmail.com with ESMTPSA id v20sm788764wjw.17.2015.07.21.23.58.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Jul 2015 23:58:24 -0700 (PDT) Date: Wed, 22 Jul 2015 08:58:35 +0200 From: Michael Trimarchi To: Romain Perier , Seungwon Jeon Subject: Re: Firefly wifi mainline patches Message-ID: <20150722065835.GA12069@panicking> References: <20150721125133.GA4102@panicking> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150721_235849_116984_8C4119A1 X-CRM114-Status: GOOD ( 29.21 ) X-Spam-Score: -2.6 (--) 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: "open list:ARM/Rockchip SoC..." , linux-mmc@vger.kernel.org, Heiko Stuebner Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 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 Hi On Wed, Jul 22, 2015 at 08:45:37AM +0200, Romain Perier wrote: > Hi Michael, > > You can ask and discuss about wifi here, but could you re-send you > patches as described in [1] please ? > > Short version: > 1. git format-patch HEAD~2 # extract your two commits > 2. scripts/get_maintainer.pl -f # list maintainers > 3. git send-email --to --cc *.patch > I know how it works. Right now they are not patches but I will include them inline with some description in it to understand what problem I still have. The first one is an hack. Problem is this: card answer to me that support from 2.0V but regulator is connected to 1.8V. So capability report are wrong, for now this is just an hack From 661979de16b3d0d010659a2e601209aa894d55f4 Mon Sep 17 00:00:00 2001 From: Michael Trimarchi Date: Tue, 21 Jul 2015 16:14:13 +0200 Subject: [PATCH] dw_mmc: hack voltage response from wifi Signed-off-by: Michael Trimarchi --- drivers/mmc/host/dw_mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 923152a..5d2f38a 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2355,8 +2355,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (ret == -EPROBE_DEFER) goto err_host_allocated; - if (!mmc->ocr_avail) - mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; + if (!mmc->ocr_avail || !strcmp("mmc0", mmc_hostname(mmc))) + mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 | + MMC_VDD_165_195 | MMC_VDD_20_21; if (host->pdata->caps) mmc->caps = host->pdata->caps; -- 1.9.1 Here I have some limitation of the frequency. If I choose more the 5Mhz I can start to have -110 e/o timeout on firmware. Firmware is the ap6535 firmware. Wifi is stable and working on this frequency static int dw_mci_execute_tuning(struct mmc_host *mmc, u32 opcode) { struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci *host = slot->host; const struct dw_mci_drv_data *drv_data = host->drv_data; int err = 0; if (drv_data && drv_data->execute_tuning) err = drv_data->execute_tuning(slot); return err; } I have changed this to report 0 in case excute tuning is not implemented From 4d68f996e28aa135a331e67ccd95874632276606 Mon Sep 17 00:00:00 2001 From: Michael Trimarchi Date: Tue, 21 Jul 2015 15:21:48 +0200 Subject: [PATCH] firefly: add a minimal wifi settings Signed-off-by: Michael Trimarchi --- arch/arm/boot/dts/rk3288-firefly.dtsi | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi index 149b9ed..effce71 100644 --- a/arch/arm/boot/dts/rk3288-firefly.dtsi +++ b/arch/arm/boot/dts/rk3288-firefly.dtsi @@ -116,6 +116,19 @@ vin-supply = <&vcc_io>; }; + vcc_wifi: wifi-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_pwr>; + regulator-name = "vcc_wifi"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + startup-delay-us = <100000>; + vin-supply = <&vcc_io>; + }; + + vcc_flash: flash-regulator { compatible = "regulator-fixed"; regulator-name = "vcc_flash"; @@ -460,13 +473,31 @@ &sdio0 { broken-cd; bus-width = <4>; + clock-freq-min-max = <400000 5000000>; disable-wp; non-removable; + cap-sd--highspeed; num-slots = <1>; pinctrl-names = "default"; - pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>; + + sd-uhs-sdr104; + sd-uhs-sdr12; + sd-uhs-sdr25; + cap-sdio-irq; + vmmc-supply = <&vcc_18>; +/* mmc-supply = <&vcc_wifi>; */ status = "okay"; + + brcmf: bcrmf@1 { + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&gpio4>; + reg = <0>; + interrupts = <30 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "host-wake"; + status = "okay"; + }; }; &sdmmc {