From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 298D7C433E2 for ; Sun, 30 Aug 2020 01:40:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E947020838 for ; Sun, 30 Aug 2020 01:40:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Iqif38zF"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="NkMLeZqW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E947020838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DZw7Ysb3ytA1O7N0BBxXoP68KJPduB2qQb5nhk1G9tw=; b=Iqif38zF+VzLpmqZZnQ6aywxa 5+gF+TfmZeaV8kxOlZ8ZP8+HuBAu9/Sc/nyqAfs/ndeYzB2x8YjT6Z9m5H5bGXRp1MpfdnDMJvfPt /z+cUMj2zJIIz+X7xCpfpy91FVIe6vDrbeuDhWvn3zJXLF7QxVcw/PkFZSh5FbkfmHBGJEmG98eCd 1btd0SES0G2XnYkXnBQghfThQQwH7TlVXGttdr9lgzlTNQO1QOuwZuVD3kNrEhnhBtKic9TVIXrNb nPiQJWG8OVfTXMfRMukz1F4XuFX81bWY1CCzQAxUlbNTNKZXuu3PNnKwwMl3Q8x1nr21rqJQvH9vQ hILQrkDUA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCCIp-0000Z3-Qh; Sun, 30 Aug 2020 01:38:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCCIn-0000Yk-6Y for linux-arm-kernel@lists.infradead.org; Sun, 30 Aug 2020 01:38:38 +0000 Received: from dragon (80.251.214.228.16clouds.com [80.251.214.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7EBDA20776; Sun, 30 Aug 2020 01:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598751515; bh=bVGe0q6SpWiEKCnkIc+28fmByrf55jWeQfkTW+7W8Z0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NkMLeZqW0ydWAhgqpUtkW82pCQGj5wAEFcGO6WBuYBouvj1Pk8XA5OWlGnCYpZhLg TQKYm0SxDBE7vEqMElL+hMmt9Ev4HYzqSbzlePXZoVmqvRXP+I/2OtAFKMUu8RW876 bsI9Sl/PzDdTqfW9I3yo1ZgpZimVUhQpAhlGXqzU= Date: Sun, 30 Aug 2020 09:38:31 +0800 From: Shawn Guo To: Fabio Estevam Subject: Re: [PATCH] ARM: dts: imx: Fix the SPI chipselect polarity Message-ID: <20200830013819.GA32096@dragon> References: <20200819210424.8844-1-festevam@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200819210424.8844-1-festevam@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200829_213837_397798_05D9E847 X-CRM114-Status: GOOD ( 18.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linus.walleij@linaro.org, linux-imx@nxp.com, kernel@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 19, 2020 at 06:04:24PM -0300, Fabio Estevam wrote: > The conversion of the spi-imx driver to use GPIO descriptors > in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") > helped to detect the following SPI chipselect polarity mismatch on an > imx6q-sabresd: > > [ 4.854337] m25p80@0 enforce active low on chipselect handle > > Prior to the above commit, the chipselect polarity passed via cs-gpios > property was ignored and considered active-low. > > The reason for such mismatch is clearly explained in the comments inside > drivers/gpio/gpiolib-of.c: > > * SPI children have active low chip selects > * by default. This can be specified negatively > * by just omitting "spi-cs-high" in the > * device node, or actively by tagging on > * GPIO_ACTIVE_LOW as flag in the device > * tree. If the line is simultaneously > * tagged as active low in the device tree > * and has the "spi-cs-high" set, we get a > * conflict and the "spi-cs-high" flag will > * take precedence. > > To properly represent the SPI chipselect polarity, change it to active-low > when the "spi-cs-high" property is absent. > > Signed-off-by: Fabio Estevam Applied, thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel