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 04318C433F5 for ; Wed, 22 Sep 2021 03:03:30 +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 A1EA26058D for ; Wed, 22 Sep 2021 03:03:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A1EA26058D 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=xi4NobiIxP2zMrMjSCMwXdUTFwUfayUXiWMEXTYxca0=; b=Bo6YcO4/2cOOO5 i9TvFWF3LQQNQ3UEqe0Qp2qJ2C4QoDigXk2J0oe5vF7Ck8Ijvt6vrVZeaPHZHad85e+4eM++o20VQ ZSWkhDdF0AIhHTF070hSV731lsq5p29n+GqRFlM6f9zgckK8YxIx9CDQsYVlDhWM3ye1VrxtAw+qV vA0zcqykvAnR+ZkJBT/y6ZVxgSURikhbMZw9TCBcrwWR6uFrzoTiUHgx6TSrVEhlF8SiU5ka8WECX yxM2wSQtpcX5Azb3pbWvl1jn9Knstsc/jFNmBuj7539RDckshV1HzBBiivLJ7rIwG/fQwma/tYV9B dQLZblJsCOi/Q5ITiI9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSsVk-006lru-O2; Wed, 22 Sep 2021 03:01:30 +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 1mSsSi-006kZK-BK for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 02:58:21 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 365CB60F21; Wed, 22 Sep 2021 02:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632279500; bh=BRxV/XO9EcK5CZljPdKNAm/vGqnp+V/fDzQKhe+tfuM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uacIacJPwQMDTQSRmqBM42fELhldMGN9Ml9g+X6mkGQyPAeTJEuupolKbkSowSQCR W/xCQ+e0JxAxWIVVTv6VF65ckMgFFvbgl8XHvJaiC2Qkq0s8KRxign3nRu/x5FNWEd F543ftpZNLoZNO+iKcxw5cpVLSXVUlchxPJU2n20/CWe1+2gbiAsOHzF6+T+0izDqG ZXLgGlQa9nL1V5NPtp8eCmK337PYBF0HfwHMuBKi6yOJnAzT0HIm4lv6Z+ua8Lgj3K 5LOeFK9oVxAbizs+stvRknoLaW1thh/ZJ4A1UgvW4g7V6oRpgKqy2TkePOBm7n0QQS +auK2ZpuUX97g== Date: Wed, 22 Sep 2021 10:58:14 +0800 From: Shawn Guo To: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, frieder.schrempf@kontron.de, tharvey@gateworks.com Subject: Re: [PATCH 1/2] arm64: dts: imx8mm-kontron-n801x-som: Fix the SPI chipselect polarity Message-ID: <20210922025813.GE10217@dragon> References: <20210716132845.3371666-1-festevam@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210716132845.3371666-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_195820_489060_E6B80B8C X-CRM114-Status: GOOD ( 16.22 ) 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:28:44AM -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 both, thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel