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 E65DEC07E95 for ; Fri, 16 Jul 2021 13:31:06 +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 A5E2F600D4 for ; Fri, 16 Jul 2021 13:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5E2F600D4 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:References:In-Reply-To: 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: List-Owner; bh=yxkHHIyc2ZRIrtYnY9rjrFtJIbyn4IQ65rbsqe7Jg60=; b=prIqEQLp+f4S92 7tSAXiz++j7ZX6l12rCk3bMPz6/jyeM3R0nqxicWbwYU1ofLmFMhiG9QPfYE/LPP4w0Fi5jJE4v6r Xow6QuakZDesY2mdK61wg4iZU15KnXKEBZ7qRUDDReJyabtJkZMEjs3S+Fvm2J9QjCEEcF8Wbg8Vm dpNjHXiGLHMq/3XTDBpIx8/rSQaCXsZh/y3UzMg5UVIjepjOY3Hwl8jy0+DiSykQzVTNcsisVVZwJ qZZXMXLwGKi39Y8UtIvAd/mF+kZolujr/c6T7MUgho0Ri0589JNbaL9g6plGbK8QfmLqljBUK/N9e Ed1s42rgPZQ7zRtBprAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4NuC-004SYS-FX; Fri, 16 Jul 2021 13:29:28 +0000 Received: from mail-vs1-xe29.google.com ([2607:f8b0:4864:20::e29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4Nty-004SWv-72 for linux-arm-kernel@lists.infradead.org; Fri, 16 Jul 2021 13:29:15 +0000 Received: by mail-vs1-xe29.google.com with SMTP id r25so5045907vsk.2 for ; Fri, 16 Jul 2021 06:29:13 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=41t62om1HSHTSwNWn18iE5ubC061YdEAdkT7fs1NReM=; b=fqqCvxHlJGoo96UZl0op7sqX6m9kbTHxPutj3aPWX9lJdblHtoQEVFzKSjyUmV6AG3 r+cTToSM/gPPwHz7+7r6pXZd/3G9I20qQ6E2Fse+O8lEU2WKUX/IVFU3bb8gzlekXclW 0XusTeHyD19qNUOuuR/UDMnhxQdHhDP9FRgan4pnWvd6vliWt85uUASJRVdjvjhjEEc6 vRKc/dRu4EGy4AOZ62NceJ3jpFyw4a0BwCt/uGnJKJ79g6GW6obSv5Wdfq3Q50K0EVkh GBw+zrl1Z/UmlGxKZCFE0FDQwmkF4CZ/Zpp2MupRfgb9AVmJqfbaE2pGpfNDghbCtd6m xyKg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=41t62om1HSHTSwNWn18iE5ubC061YdEAdkT7fs1NReM=; b=BK8GuYqXJaonSONHhtd5waGXaEHjNM/ALrSDwxSMXfoUVCMmi/NBczUJfSuLk5eJFY K2lLL5nZovIW8z4+wCQSBmW5DRq3YjrT4vNKzjGjZhTzdu3XRL3iZgYYGjyCYeEIO9gx VOPEkjuw8RVMrTAWGhq4n+5eb111O+FsXJW8jzPCMaCkacablAWn0zN6Du9uNo6/GgJT +qaGkU9G77QMOTE9F11a/n9Mk0XRelrOj3J3gVawVN83MqRH0G6qfmrgUpYMswql6QaO Xqq97Ak6N3YXGTb7i87zUJoF+w/8smJhQj+tK+bQ7W3yGW/zWY0fMdzfLBk00RmVQhIe 5dXA== X-Gm-Message-State: AOAM5317WKGRETN5Rqz8Z3USns+pbz6AABlc2wAcC/5S+ZJtppH4Mfcd GjugWkTGZCTl/rB5Qd8o1qE= X-Google-Smtp-Source: ABdhPJy4RzaQxbaAphLp5LPm9hPA3hhSEM0nlIx2phNjBXW+TUDk7QsznlNietPa/1bcQqPZmxE0qQ== X-Received: by 2002:a05:6102:10dd:: with SMTP id t29mr11871931vsr.24.1626442152887; Fri, 16 Jul 2021 06:29:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jul 2021 06:29:12 -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 2/2] arm64: dts: imx8mm-venice: Fix the SPI chipselect polarity Date: Fri, 16 Jul 2021 10:28:45 -0300 Message-Id: <20210716132845.3371666-2-festevam@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210716132845.3371666-1-festevam@gmail.com> References: <20210716132845.3371666-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210716_062914_298804_F975E15F X-CRM114-Status: GOOD ( 16.28 ) 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-venice-gw71xx.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi index 905b68a3daa5..138bb8c9bf56 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi @@ -57,7 +57,7 @@ reg_usb_otg1_vbus: regulator-usb-otg1 { &ecspi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_spi2>; - cs-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi index b7c91bdc21dd..27afa46a253a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi @@ -76,7 +76,7 @@ reg_usb_otg2_vbus: regulator-usb-otg2 { &ecspi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_spi2>; - cs-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi index d2ffd62a3bd4..a59e849c7be2 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi @@ -96,7 +96,7 @@ reg_wifi_en: regulator-wifi-en { &ecspi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_spi2>; - cs-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; 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