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 40A33C636CA for ; Fri, 16 Jul 2021 13:31:07 +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 031ED600D4 for ; Fri, 16 Jul 2021 13:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 031ED600D4 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=md2mGtj4fVQSPXSNq/ZnAwiJuJiV1J9r33Ls8dxqreQ=; b=n2EQvGnDg0h4CE szPy9JJdf6WL7BXJ5OQ4PG4iHpbiGf21WEzdP6Cooysm4WYpi2qoj+kbYFHenz+tvbEQU3bKyswYV MmdZqVeCOptSLK3EMEibc3x04Q/pgbrM/wscvNjQofxcNaeAJbdKbW7eda61y+ANVSM0sSL6Bakeg j0DZBOglz8NlbQwX+McAg2ShufDgEGn4AHpbK9Z/PC2IfCiEo2CmX7vcDTAl+3NN5UWiaIDJ9u/Ng 4WFody8HgPtJVpdY+0cSiyuUdLBYW9dBN8p6J26Hsj2DOlOrXAv4Q3Sb511uW7+JTv4AtvjZ1tTjz v70g9qTV7sDlEIUcAn5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4Nu0-004SXX-Jv; Fri, 16 Jul 2021 13:29:16 +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 1m4Ntx-004SWk-58 for linux-arm-kernel@lists.infradead.org; Fri, 16 Jul 2021 13:29:14 +0000 Received: by mail-vs1-xe35.google.com with SMTP id o19so2792734vsn.3 for ; Fri, 16 Jul 2021 06:29:11 -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=ZgXWWsbFUrkz9xQSqXSzVf0HoImvW8yMLExh5u3+Bg8=; b=MTUyo+WKXhMrLStfSqO5PVZIVxA9DpKcjqP6std+STuRiBbg1lF/W2vRmYbgBPIdIq HEy/lwYng34aOr6tDTWr8bhQYZ0g/28rrd0HEUztWRceGb4zWwwBz1x0DHHmwSxLn0BX TfSZ8YUi/U5jMp2LOLjVpHxCBdyHdgGP8FHymRcVA8FZIofDsRugnZIxNuyXKXwORlCE BHNG6I4ceV6RobFEltMaWga0Xrz6c9QFgWMBFbNSGYo0oxXdTboUVyndCHTVXsttMwfl /gI2Z2RW4akeiRj7gOaKBYcgFztB3A6hKxVGrcYDa3p0Nai25ijNjEXuattlKnqYqMw4 dNWw== 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=ZgXWWsbFUrkz9xQSqXSzVf0HoImvW8yMLExh5u3+Bg8=; b=cpUhvsSs+VIjvy120AbY04rAgE5wREDh7r7OYu3vztXh0GjEJpdtswfpNrfEbtmDei lDFfeCsJxCHG6ZiIF0I8aP+DdeLcdCRmsX4aGSzR2YrVijG9rS3vV7J/8sAJywCutf+9 L6ZfMkPerTrJEPZJCdmuZgWt+wEScscVHNLij+cyFHPixJvE0hIi5Y7AL8m53ZPap3bU OwnITgESMaIG5ImH7L61MsTy4Kq13A4OTzNM4tfp0cCjT4yeTOC4lPxsD3l2/yYVa/V7 IMoihNLoMv/yAZC3bxbnlJlbhNKJdLyaC1ZFRsN1z+s7YwUrESbtAbuVGjjV3yCTSdWN TiJg== X-Gm-Message-State: AOAM531hYe7rvabUb6ttGjYcYq5dFvO/WWSONLPviBCa1XyU1+pSrDeO bFwBofbMc/mMRiCad5i/UgQ= X-Google-Smtp-Source: ABdhPJx+D2lFWn4jONdiREkjd3tB8GretawGX77jQ+QCqlXWm38dW3OpHTN75eTENzmorW1wecLwPQ== X-Received: by 2002:a67:fa16:: with SMTP id i22mr12435702vsq.49.1626442150872; Fri, 16 Jul 2021 06:29:10 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:485:504a:9f0b:cb12:835a:e9f9]) by smtp.gmail.com with ESMTPSA id j7sm1212064vsn.24.2021.07.16.06.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jul 2021 06:29:10 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: linux-arm-kernel@lists.infradead.org, frieder.schrempf@kontron.de, tharvey@gateworks.com, Fabio Estevam Subject: [PATCH 1/2] arm64: dts: imx8mm-kontron-n801x-som: Fix the SPI chipselect polarity Date: Fri, 16 Jul 2021 10:28:44 -0300 Message-Id: <20210716132845.3371666-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_062913_245911_84364A77 X-CRM114-Status: GOOD ( 15.56 ) 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/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi index d0456daefda8..5a2805c51361 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi @@ -63,7 +63,7 @@ opp-750M { &ecspi1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; - cs-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; status = "okay"; spi-flash@0 { -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel