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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,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 30A68C433EF for ; Wed, 22 Sep 2021 03:06:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EC22660FA0 for ; Wed, 22 Sep 2021 03:06:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EC22660FA0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=QgMmyjV1qHNeOf/Fll+fpJMzIsHz4gSQ2M4GfKVk52w=; b=JxzTEc0t384su0 MoM7jDEljUoi56Ko5Itrocg4HpfNeqInKyA/w96oXq4f9WOXTaqDAD9xVdoiAeqUfxHsxw9h5O/Si 84zh24q4l4EKmmDl/HzU15eeaePwj96XnMPiw6212nk6ylrJqIy+xORLXS8iwodu5yf+y9HH5Fdqz Xoh+Ju/Q+vx13mmXVI2fimDPEuWzyG1jJD5+Z2YXpHDC8XpCWI4MarR9rM8UpAoFcxDwFpF+pweY7 kbQQa7kXpf9txQMU0aiPZKLZQPbA2TitwgNtWRW5e+Hr5UTdOaV5e257OsisSg7PGxTPIrs2H0a0U 3psu70U3IshjHM6QG3OA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSsZ4-006nEr-HW; Wed, 22 Sep 2021 03:04:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSsYu-006nCP-IK for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 03:04:47 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D734E6058D; Wed, 22 Sep 2021 03:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632279884; bh=XXRL1o+0JjzNCLIHKf5s2ESW5R4l0B0OJzNkryB10wU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oVfFRNGBcNv/rCExlxcO9g2ggmWDAGMfSmLVsXqVfue7KOk/GCqK6grg3Z3A0HZBc X14o8b2MXh6stK+PK+EjA8+vGeK0PXASzCZ3louHrZ2ssQec+Kuwiswe9iNwr1ASaC wSk3bic2T8lJ47ugAGm2CVuWIvfuaZo/5Xc0wJFwmSaxiqDQ/bjzubUfA6qJK5PSr8 nzUMajlLLzMt7IVVOeJI5aC8f28UDGptYTdxUZ+fih1XTT6fVMrfTsN7cvRRTyt0Oj 8G2dHVE7r5PjwpR7Wl/rMFatCmYk1OQoN1YK8+PeZBoH7NCHuj3saOZSvyw4EaCh5l YdpswzAwnhEYg== Date: Wed, 22 Sep 2021 11:04:39 +0800 From: Shawn Guo To: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, o.rempel@pengutronix.de, Markus.Niebel@tq-group.com Subject: Re: [PATCH 1/4] ARM: dts: imx6dl-alti6p: Fix the SPI chipselect polarity Message-ID: <20210922030438.GG10217@dragon> References: <20210716133659.3372047-1-festevam@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210716133659.3372047-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-20210921_200444_699149_0518A164 X-CRM114-Status: GOOD ( 16.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Fri, Jul 16, 2021 at 10:36:56AM -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 for example: > > [ 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 all, thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel