From patchwork Wed Oct 19 00:13:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 616501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BFAFC4167B for ; Wed, 19 Oct 2022 00:15:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbiJSAPb (ORCPT ); Tue, 18 Oct 2022 20:15:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbiJSAPO (ORCPT ); Tue, 18 Oct 2022 20:15:14 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A55C2DC7 for ; Tue, 18 Oct 2022 17:14:22 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id c23so10767146qtw.8 for ; Tue, 18 Oct 2022 17:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tPxQuovvewOKNM4sFmdgepf8my0rffxD1wdRkvUTkNM=; b=VA+9xuESM5YZgThqah9h4HIpCC0WfZso/X53WR5ufIAa33CBT9P1x+7A/Lmv3Q5EwH HjpkoIK/nUOroSs9MG76RsAQFYAOSNmznKdRNKoUw2waB44OiBz7AlB39GSHMlwlHtMy Hx1RZ+AkHCWrAk+1Ne438tlzPadBMAUfZlRw3Mr38Tv6Sju2/1h2Y1wQ6mfB6tsvCSRK uZL0zeJkXRUhu8aewSq+76ERgPoJX7ohzBkWQNkZ3Ox4B5ra6+G0N9tsQO68/jn/xYl1 zNDKDGD09b7WZV6veO1rv/IoIS/09QufXnLaAFWdm76MlmHJmOHlqev9nbt2hG/2uPw4 ppgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tPxQuovvewOKNM4sFmdgepf8my0rffxD1wdRkvUTkNM=; b=Vh4YoSrL+Jc0FIzHahcyG2QNhzjBGgWURWW7rBgxZcJV1USvoqnTcQfSMDVtyGyIJ1 tg+eYd8jD5S75+ed51y0dioXFR52eUSUU/a/YyOsJb3sjRwkinEbcMDmnrVOIuCMK63C VwFcWoDLyENtt5onOHprxPzYhGgLEaN1oQOBD9ZJzOl8XQQrga4TyuITSZGYVrJnn08H 21XOCOLKmf3scBw+RrCYNTPy0eP/jwFbq3OXtgPzveQTgABZBKWo1HHn9SGWo2bT++Kb sIM9MdVZnSrMjGnzLHfqfZujzf1MQ5IbWRyymomElIps0rPgheCZMPUeivN3vJnx+uzJ hMpw== X-Gm-Message-State: ACrzQf1c1Vo/njIR6mD0hO+tulaJQbpsgtujjQGhtWVzbnSgujD3+StV 9/zCukpfmpxCTJwQlg+viu3yLw== X-Google-Smtp-Source: AMsMyM6sqQiSuSUa8nNzqBDCoaZ5KEW52W616gyu+bUqBd/yW3+bLy6I/6ZU1Si0p/RMg6g0KYROKw== X-Received: by 2002:a05:622a:44f:b0:39c:dcf5:3eeb with SMTP id o15-20020a05622a044f00b0039cdcf53eebmr4300152qtx.675.1666138443893; Tue, 18 Oct 2022 17:14:03 -0700 (PDT) Received: from krzk-bin.MSRM (pool-72-83-177-149.washdc.east.verizon.net. [72.83.177.149]) by smtp.gmail.com with ESMTPSA id ay40-20020a05620a17a800b006bb78d095c5sm3381240qkb.79.2022.10.18.17.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 17:14:03 -0700 (PDT) From: Krzysztof Kozlowski To: Bjorn Andersson , Andy Gross , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Matthias Kaehlcke , Douglas Anderson , Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v3 2/4] arm64: dts: qcom: sc7180: revert "arm64: dts: qcom: sc7180: Avoid glitching SPI CS at bootup on trogdor" Date: Tue, 18 Oct 2022 20:13:49 -0400 Message-Id: <20221019001351.1630089-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221019001351.1630089-1-krzysztof.kozlowski@linaro.org> References: <20221019001351.1630089-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This reverts commit e440e30e26dd6b0424002ad0ddcbbcea783efd85 because it is not a reliable way of fixing SPI CS glitch and it depends on specific Linux kernel pin controller driver behavior. This behavior of kernel driver was changed in commit b991f8c3622c ("pinctrl: core: Handling pinmux and pinconf separately") thus effectively the DTS fix stopped being effective. Proper solution for the glitching SPI chip select must be implemented in the drivers, not via ordering of entries in DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson --- Changes since v2: 1. New patch Not tested on hardware. Cc: Doug Anderson --- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 27 +++----------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index eae22e6e97c1..8f6e19bd6a99 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -880,17 +880,17 @@ &sdhc_2 { }; &spi0 { - pinctrl-0 = <&qup_spi0_cs_gpio_init_high>, <&qup_spi0_cs_gpio>; + pinctrl-0 = <&qup_spi0_cs_gpio>; cs-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; }; &spi6 { - pinctrl-0 = <&qup_spi6_cs_gpio_init_high>, <&qup_spi6_cs_gpio>; + pinctrl-0 = <&qup_spi6_cs_gpio>; cs-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; }; ap_spi_fp: &spi10 { - pinctrl-0 = <&qup_spi10_cs_gpio_init_high>, <&qup_spi10_cs_gpio>; + pinctrl-0 = <&qup_spi10_cs_gpio>; cs-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; cros_ec_fp: ec@0 { @@ -1422,27 +1422,6 @@ pinconf { }; }; - qup_spi0_cs_gpio_init_high: qup-spi0-cs-gpio-init-high { - pinconf { - pins = "gpio37"; - output-high; - }; - }; - - qup_spi6_cs_gpio_init_high: qup-spi6-cs-gpio-init-high { - pinconf { - pins = "gpio62"; - output-high; - }; - }; - - qup_spi10_cs_gpio_init_high: qup-spi10-cs-gpio-init-high { - pinconf { - pins = "gpio89"; - output-high; - }; - }; - qup_uart3_sleep: qup-uart3-sleep { pinmux { pins = "gpio38", "gpio39",