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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 9832CC07E95 for ; Fri, 16 Jul 2021 13:39:19 +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 599C2613F5 for ; Fri, 16 Jul 2021 13:39:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 599C2613F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=/kfBH03coJDoz0ClL5mWv0E7M1TpeZr89a8HRva0iWM=; b=sN9YevilNkcNgI pj7GKgqe7eST/YqINmx4Wx2MMRuu0msyCdlxzh8PYd0hySIHJKhMUtp0c7+Q4v0K7O7DyTccWFulc LaAFi+J2CsTtrGkWTNrGaolGEBnBSyqqvFicmMNQ7AuuInrQFf11+le8sLBKMElY4PgpJ6cAIzjrK RhqQmR2poA0s8W1Z0KWuJ7Mn1cc71+Wn3uOXEDWLV6nuOgp0+OmHu1LlLWJ4C+D28T39bLD7GeuFo UYq087WWKZkTMYMeoNUjLY4frcqsq6JkNL0GScQfFjsXIuJ/4OgkmFjpTLiMy26KJIGdU5Ai2lozi igU0bJXedD1PX2Nhi0VQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4O25-004Umm-Se; Fri, 16 Jul 2021 13:37:38 +0000 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4O21-004Ulb-KE for linux-arm-kernel@lists.infradead.org; Fri, 16 Jul 2021 13:37:34 +0000 Received: by mail-vs1-xe35.google.com with SMTP id u7so4997834vst.9 for ; Fri, 16 Jul 2021 06:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+iL18PYVuozR6beNOvYddo36PvcdHEXorcryWxlEANc=; b=PUu+8wc4ofE+6piwtBnIlnV/Eid2GRZkCPLehmxZjLPoJpatkEYV+duUPGMfkOYR4y Y1YYY8yCr2cyS/P7/BKCildxNJ5/H4qQ53FI6do0pqL9eIuANdbOk7s6g9WiukcE/k/d b2DhQUdnAUH8J9FaCOwB456x0MJTcr1g78zCQaAjwpc291eEvME+jtrWJ2I0yrU+pP79 f6D2Dfth1eYlUypw2KfKgJEZT7mCtDFKL9g6yHiQUoH+cAeBUeivVhg/QoM8Ef1m2qk6 JH6u9qssHV9EUuowEAulE6AGajCL8OXVWCekKAFTPDIU9Hz4ijWuL4K+btB/FFpj+d2l OWIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+iL18PYVuozR6beNOvYddo36PvcdHEXorcryWxlEANc=; b=USU+k5XrTO7kO/59PsmgpKAkzsP9w2EZ3VvEcQYpH8GhHfPnDzmuAdypZbTtHS3FyI 8ds2i3o89JeW6JNDKEiVQMYvqsthx5az27P/3qJzXGCsMFdFlT6wp8xIhJd93wHEr/NI zAMlmmFTeM6cshp1a3CTO4S8j8bdMpzFduM6qKDJV5Xfy+QEaYz/KbT/R1sDlfh4WDNk D+ZVHuWpL4ehC7drIruYr7Kz44b8dI+2EL51pF8/cmBmZE6q5L2ACCzHqvIbQGY5gvH4 ptvBPGR+/2TY2fpHhvdajj5eHMP7Es4cLfwetahzb1nmVodh5Me1jM4EWq0/JIj9B5La U7Fg== X-Gm-Message-State: AOAM533Hkn7PGlVfbFIVMUyaVGt6zyP4MBOv1fePyaZD2fag0OgAIcpW lNcfNtFeTDQ2WoAeb4NJsuI= X-Google-Smtp-Source: ABdhPJyNgMlLHzl2/SzZjGhwsHQKYlK56dbQw7KfpSprmco+U5oIZ+dH2asGd/rka+zPS9LvnXxngg== X-Received: by 2002:a05:6102:362:: with SMTP id f2mr12753943vsa.26.1626442652786; Fri, 16 Jul 2021 06:37:32 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:485:504a:9f0b:cb12:835a:e9f9]) by smtp.gmail.com with ESMTPSA id 184sm1352572vks.33.2021.07.16.06.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jul 2021 06:37:32 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: linux-arm-kernel@lists.infradead.org, o.rempel@pengutronix.de, Markus.Niebel@tq-group.com, Fabio Estevam Subject: [PATCH 1/4] ARM: dts: imx6dl-alti6p: Fix the SPI chipselect polarity Date: Fri, 16 Jul 2021 10:36:56 -0300 Message-Id: <20210716133659.3372047-1-festevam@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210716_063733_709695_896F6190 X-CRM114-Status: GOOD ( 15.97 ) 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 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 --- arch/arm/boot/dts/imx6dl-alti6p.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6dl-alti6p.dts b/arch/arm/boot/dts/imx6dl-alti6p.dts index 4329b372d8cb..e8325fd680d9 100644 --- a/arch/arm/boot/dts/imx6dl-alti6p.dts +++ b/arch/arm/boot/dts/imx6dl-alti6p.dts @@ -192,7 +192,7 @@ &can1 { }; &ecspi1 { - cs-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; status = "okay"; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel