From patchwork Sun Sep 30 15:09:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10621433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8EC4175A for ; Sun, 30 Sep 2018 15:09:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE9A329502 for ; Sun, 30 Sep 2018 15:09:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E16629504; Sun, 30 Sep 2018 15:09:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 29FBA29502 for ; Sun, 30 Sep 2018 15:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lz8YWihSBoe6ociS+YL/6DAWk7MCP+u7vdN4di+NE6k=; b=qgpg6dfOTZmV41 a+MJTA8IF+MEuj/lo1OicUU7aHV+Ee8cGE2hn80QXBBFERTUH8lzfOm0tPY0wqxhy2bPA0T7/VoUe MPxfwU0rdQUkwMHLwSk3ZHPkcmbWIuJypX6zcSf5JQCuFLnUMpZBAIplwokDDbzj6jQWf/PO56DoG QnrLzzGpWsnN7B7Q1wAiJ/1s3cI8/+5qbUswe/kiz4j2Wvk7wgCYJFePFQjtVxDMrIH+j2PN0vuBr qi1+vAp/Bgb5bODykw2uiidDJ+QTrNSjCJhKfL+vTs6SpoS3AAJHPGGg7CABzVJHK6wiWkPK7lrf7 l2DH7xnyZKZzImA9CG4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6dLu-0003ry-LJ; Sun, 30 Sep 2018 15:09:46 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6dLq-0003qy-KQ for linux-arm-kernel@lists.infradead.org; Sun, 30 Sep 2018 15:09:44 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCD9A3D955; Sun, 30 Sep 2018 15:09:31 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B937170FB; Sun, 30 Sep 2018 15:09:29 +0000 (UTC) From: Hans de Goede To: Maxime Ripard , Chen-Yu Tsai Subject: [PATCH] ARM: dts: sun7i: Disable OOB IRQ for brcm wifi on Cubietruck and Banana Pro Date: Sun, 30 Sep 2018 17:09:27 +0200 Message-Id: <20180930150927.12076-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 30 Sep 2018 15:09:31 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180930_080942_712234_EB3CD7DC X-CRM114-Status: GOOD ( 17.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , linux-arm-kernel@lists.infradead.org, devicetree Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP While doing some brcmfmac driver work I needed to test this also on some devicetree based boards. So I fired up the good old Cubietruck and when that would not work a Banana Pro. With an unmodified 4.17 kernel both boards intermittently would come up with non working wifi with the following errors: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout brcmfmac: brcmf_bus_started: failed: -110 brcmfmac: brcmf_attach: dongle is not responding: err=-110 brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed They would come up this way more often then with actual working wifi, once this problem happens it seems to require a power-cycle to fix. Once things work one can safely reboot without hitting the issue. I've found that disabling OOB interrupts fixes this. This really is more of a workaround then a proper fix, but it makes the wifi reliable again and it does not have much of a downside. Using an OOB IRQ instead of the sdio-IRQ mechanism is mostly important to allow the MMC controller to go into runtime-suspend which is not really an issue on these boards since they are (usually) not battery powered. I've looked at recent brcmfmac and mmc-core changes which may explain this and I've not found anything. So the most likely culprit is the A20 external interrupt handling e.g. perhaps it is set to edge instead of level? Either way I do not have time to further investigate this. BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908438 Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 16 +++++++++++++--- arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts index 0898eb6162f5..0e1ddd998b20 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts @@ -174,9 +174,19 @@ brcmf: wifi@1 { reg = <1>; compatible = "brcm,bcm4329-fmac"; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; - interrupt-names = "host-wake"; + /* + * OOB interrupt support is broken ATM, often the first irq + * does not get seen resulting in the drv probe failing with: + * + * brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout + * brcmfmac: brcmf_bus_started: failed: -110 + * brcmfmac: brcmf_attach: dongle is not responding: err=-110 + * brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed + * + * interrupt-parent = <&pio>; + * interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; + * interrupt-names = "host-wake"; + */ }; }; diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index 5649161de1d7..a837516db6f9 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -222,9 +222,19 @@ brcmf: wifi@1 { reg = <1>; compatible = "brcm,bcm4329-fmac"; - interrupt-parent = <&pio>; - interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */ - interrupt-names = "host-wake"; + /* + * OOB interrupt support is broken ATM, often the first irq + * does not get seen resulting in the drv probe failing with: + * + * brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout + * brcmfmac: brcmf_bus_started: failed: -110 + * brcmfmac: brcmf_attach: dongle is not responding: err=-110 + * brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed + * + * interrupt-parent = <&pio>; + * interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */ + * interrupt-names = "host-wake"; + */ }; };