Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9445834ybi; Wed, 24 Jul 2019 04:16:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbWPimIULTNoQzorGhtmRQswBfbLCaIOEhUJmCfv6UHrrH0VOIul9EyzxRZPxjK9+45MEo X-Received: by 2002:a17:902:76c7:: with SMTP id j7mr82722890plt.247.1563966971328; Wed, 24 Jul 2019 04:16:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563966971; cv=none; d=google.com; s=arc-20160816; b=rCxWNgW23N6ubaTcZ2jl3FxNOhv8vyX4JIaC7SlbZO9jnVwqCoGPUcZKZ3OoCTRQE7 46k71uTXy0jrOZ4RuoFoqbvUf4E6rgNtVrfJCjDP8cI9M78kCvysbfwy1XgoBj/H7Ono wQQH6XMdDLyBaDD+qQvbM5KUZTo4VWek7BR0oFZy2hL8UdlUHoMHBP2Qqxl/Wqs6Ja3i KYZOTzPwuU8f1VLcwFO8aMbedb3nUs1TB416mHfwYF1DK228/kHpAhe1kMpfR+nNx8Tt AC2h+97522QtpdbT0z+QDnKeWbJQnNnj/4wXoG4jhNlvWryeGhk/Y54v3LP+FdfwmtKh N2PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:user-agent:cc:to :references:in-reply-to:from:subject:content-transfer-encoding :mime-version:dmarc-filter:dkim-signature:dkim-signature; bh=dJ+GGOOI4NgRrQF1Hg/alnIy0qORarF9hnxhThKrGWg=; b=n2p8uMRQYoaKKO0uzK+rf3EGVtN+2AttxzT7sV7X9HEOThDO7LbInRxsinn1vzMF3o wIcCEr7+IUbvr9bfJdYQGLosCPtqMjCDY0ddfQY2Os06cAvqkWcGTyJZA7Y+oMcx/8Wj lC0MbsB0t9IvIunqGNLidMJJb34Xam1h24ikFJhAh7DDcmJQmdd1iD2IGkZGzFWZFmd/ add7RDVeAvq03tmwnB6hHG+tXdXB2sbwD7zh3/Hnfr8jhDkt7Wvl+qyEcxf9l5GrKESJ J1GQT/Pgg728iIkFz5ep2quqBRX9A4U44fMDNt0x28FlAMzh403I7a/alOZxTawf3aN8 d/iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Cs8P7ecj; dkim=pass header.i=@codeaurora.org header.s=default header.b=nwxpTwkK; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si30398563pgp.288.2019.07.24.04.15.55; Wed, 24 Jul 2019 04:16:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Cs8P7ecj; dkim=pass header.i=@codeaurora.org header.s=default header.b=nwxpTwkK; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727357AbfGXLOp (ORCPT + 99 others); Wed, 24 Jul 2019 07:14:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57014 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726514AbfGXLOo (ORCPT ); Wed, 24 Jul 2019 07:14:44 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 021706058E; Wed, 24 Jul 2019 11:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1563966883; bh=WNP4i+Xm1K+QKneKcjzQw8TLaJsuxelXCn8BDxP0KmE=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=Cs8P7ecjL4qJAglKJWQFu89m2H/UTaMYu6NK0Y/pMEWyAohi5PmtVKTmtT/VkkQaZ cPIgvBvqwG/f7duTlIPKTdWo5MhKougu1o3yCMRbcoU7d0y1FFNIhGghOZ1IaU1R// 9CdGSZ8c0FPy0Q1qtAWghzEGJuNLuMktaIeMUDbs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MISSING_DATE,MISSING_MID,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 892B46030E; Wed, 24 Jul 2019 11:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1563966880; bh=WNP4i+Xm1K+QKneKcjzQw8TLaJsuxelXCn8BDxP0KmE=; h=Subject:From:In-Reply-To:References:To:Cc:From; b=nwxpTwkKRsUFRsdwd8oWca0fKhpYtNdgckvbtR5XsbOdiF791fp6/T37Y8wOjdDAQ Iq+bGMIQnwFIwZHVDV8dkehN/WsE3ylck1JHlxexpC/ygH0WHZdjTaOGT4ibwjkV6h gzgZRM7YQ1bo+fkgUchmZdLFbE5/TJdkF4HiXm5s= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 892B46030E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wlcore/wl18xx: Add invert-irq OF property for physically inverted IRQ From: Kalle Valo In-Reply-To: <20190607172958.20745-1-erosca@de.adit-jv.com> References: <20190607172958.20745-1-erosca@de.adit-jv.com> To: Eugeniu Rosca Cc: Geert Uytterhoeven , Simon Horman , "David S. Miller" , Greg Kroah-Hartman , Randy Dunlap , Tony Lindgren , Ulf Hansson , John Stultz , , , , Spyridon Papageorgiou , Joshua Frkuska , "George G . Davis" , Andrey Gusakov , Linux-Renesas , Eugeniu Rosca , Eugeniu Rosca User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20190724111443.021706058E@smtp.codeaurora.org> Date: Wed, 24 Jul 2019 11:14:41 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Eugeniu Rosca wrote: > The wl1837mod datasheet [1] says about the WL_IRQ pin: > > ---8<--- > SDIO available, interrupt out. Active high. [..] > Set to rising edge (active high) on powerup. > ---8<--- > > That's the reason of seeing the interrupt configured as: > - IRQ_TYPE_EDGE_RISING on HiKey 960/970 > - IRQ_TYPE_LEVEL_HIGH on a number of i.MX6 platforms > > We assert that all those platforms have the WL_IRQ pin connected > to the SoC _directly_ (confirmed on HiKey 970 [2]). > > That's not the case for R-Car Kingfisher extension target, which carries > a WL1837MODGIMOCT IC. There is an SN74LV1T04DBVR inverter present > between the WLAN_IRQ pin of the WL18* chip and the SoC, effectively > reversing the requirement quoted from [1]. IOW, in Kingfisher DTS > configuration we would need to use IRQ_TYPE_EDGE_FALLING or > IRQ_TYPE_LEVEL_LOW. > > Unfortunately, v4.2-rc1 commit bd763482c82ea2 ("wl18xx: wlan_irq: > support platform dependent interrupt types") made a special case out > of these interrupt types. After this commit, it is impossible to provide > an IRQ configuration via DTS which would describe an inverter present > between the WL18* chip and the SoC, generating the need for workarounds > like [3]. > > Create a boolean OF property, called "invert-irq" to specify that > the WLAN_IRQ pin of WL18* is connected to the SoC via an inverter. > > This solution has been successfully tested on R-Car H3ULCB-KF-M06 using > the DTS configuration [4] combined with the "invert-irq" property. > > [1] http://www.ti.com/lit/ds/symlink/wl1837mod.pdf > [2] https://www.96boards.org/documentation/consumer/hikey/hikey970/hardware-docs/ > [3] https://github.com/CogentEmbedded/meta-rcar/blob/289fbd4f8354/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0024-wl18xx-do-not-invert-IRQ-on-WLxxxx-side.patch > [4] https://patchwork.kernel.org/patch/10895879/ > ("arm64: dts: ulcb-kf: Add support for TI WL1837") > > Signed-off-by: Eugeniu Rosca Based on the discussion I'm dropping this. Please resend once there's a conclusion. Patch set to Changes Requested. -- https://patchwork.kernel.org/patch/10982491/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches