Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4025831rwi; Sat, 22 Oct 2022 04:04:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM764nSRZCAS65Eg91zkcQLehFhWLED58M5s6jAi5uZg1MyXx8cbbkSGHDLYnAcoIWjER4NP X-Received: by 2002:a05:6402:370c:b0:453:9fab:1b53 with SMTP id ek12-20020a056402370c00b004539fab1b53mr22240447edb.28.1666436691329; Sat, 22 Oct 2022 04:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666436691; cv=none; d=google.com; s=arc-20160816; b=hlZj0iZxi/jv9aU+Nuvv866K9eB1GVtysqmr7TuMfmreLO5khFK2u4Lj1j1QBuK7Zq Ale19xBAA9Nab2oOLoBeovpz2PrkeQDQALEFN0BPdbY5JLHz+O2AteZnzS3ok1G1MEov DELdEXxIjPUPh5P49lnQpxZSSgub1zWPixjukkXdpWLp5O4BGrIKRxHf4SSST3pjQD8s Nl+ls4kr+UnIyLI0fHzhsB711782WDeS7+hwGapg7DqR+T3kP7yzAUXOpsiDGQABKvR7 Df8Mk0sJ/M3Kb+bA+Fd4HSiKQtK1qcSH8e6A9n5xEA/RAJsCBUqaCQt900PqOssDzOnH XY8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=06Eh/nhcc2dk5YHgUHqVnCwIQ6d3gtHqF6ndFEyn00o=; b=Q+h3AqyWaMPLJiYGniVPywK6awa84myg40Wh0MWCsKt5OwwI8uwtXvIaV8jCRo6ZGe Out8vvrMnr/rMiQWnTrG2ROyMR6ZXAJ6aPigRPlDirfemY7Z8OAaOmCPYQSRijJz8CvD bhT3UHgeC0nRXGMDMnUqeWJ67A54zRIJcA7tpCDcVE7P/1H/YK/Y47ciAmgSEYO1RrWg qiZSpGL4p5Kq52tcsBRH0P+uFedXWlBFoB7dIGnrGa+HqUFqv6bmnX1viKG2R/SZNlhx mM8XzZqhPdJDbhPLnVT0EO63G/+PgI3SbU2YXDM4JswcyzdSFh8qZ9962CRyyJn8h/81 E/Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=VMuZTZXR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn20-20020a17090794d400b007123952b00dsi22629251ejc.100.2022.10.22.04.04.23; Sat, 22 Oct 2022 04:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=VMuZTZXR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbiJVK4X (ORCPT + 99 others); Sat, 22 Oct 2022 06:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbiJVK4E (ORCPT ); Sat, 22 Oct 2022 06:56:04 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ED2E2FC5A3; Sat, 22 Oct 2022 03:13:58 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id r14so14446268edc.7; Sat, 22 Oct 2022 03:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=06Eh/nhcc2dk5YHgUHqVnCwIQ6d3gtHqF6ndFEyn00o=; b=VMuZTZXRwDpR3O+afkcfnJXAjQaa5SZKkHcYlMnVcwYNqOFKFxdi0LFa6WPSQTKNM/ pc5fiF04hiUnP4DSCczNQyvQnbN4AESxQECufjLjtfKnqrc2XPmpgpeNDR7z2bs4+CHL IvxEmFJCZ4uAe2JcieU3RgEEe8ustULxygdjz8h62X8fClJKGJOxjr2kcqtm9V/C4mwv yE0qxdwqHcSimSx+euw2ho3YtC6fIVUsyvNQKYfQMgkoPu104g3gYBtWIeZiHzwa2X3P Z9a6e48lhW1bTuubdJt+KuMtq8fuANAk9+DD21gRtOqQNpE5bj8W7pO+mWUV8oGMa6n6 OcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=06Eh/nhcc2dk5YHgUHqVnCwIQ6d3gtHqF6ndFEyn00o=; b=Xgfzcd+8X0rAhGvuC5MoEy4r9s6iO7+27K0emNHr49Eh1V7G/HGk2Dp9SDmQGUYMd7 MYI15XY0R2JfRV6RybjCusfBjQvSPKytpw7XOYm4TeRepYLMaoUgFUOCp8sqY42sh4/v /GWMlz21i4o/rVMZZaeQ5c5DnKohgDejKUrGDwYbG/7fhmNRRfjuNg+mtwpGptX3BIf+ 5omtDskMJswvBBbReu1IkxIfXMyzMO7CMt470+1GCx0ynKmJKHBq9toaRFHbl4b5AIvk 7vOUMOC8J7edlfOU7ZC38wg09bGgW+XK8QQXatCGrwvkPO60irNCgxd9JSZ78pt1Z+tA +Ziw== X-Gm-Message-State: ACrzQf1dW/moNpcBRgQ/S/jylWReRDmw77oXbUqjoRoMZsqnmPLlHm1h S0TUQw+HD1sP23SxlfisTxDt+/0VXUzZ0NP7Jhg= X-Received: by 2002:a17:906:7314:b0:791:a45a:bc84 with SMTP id di20-20020a170906731400b00791a45abc84mr17664692ejc.394.1666433634815; Sat, 22 Oct 2022 03:13:54 -0700 (PDT) MIME-Version: 1.0 References: <20221004-up-aml-fix-spi-v4-0-0342d8e10c49@baylibre.com> <20221004-up-aml-fix-spi-v4-2-0342d8e10c49@baylibre.com> In-Reply-To: <20221004-up-aml-fix-spi-v4-2-0342d8e10c49@baylibre.com> From: Martin Blumenstingl Date: Sat, 22 Oct 2022 12:13:43 +0200 Message-ID: Subject: Re: [PATCH v4 2/4] spi: meson-spicc: Use pinctrl to drive CLK line when idle To: Amjad Ouled-Ameur Cc: Kevin Hilman , Jerome Brunet , Rob Herring , Neil Armstrong , Krzysztof Kozlowski , Mark Brown , linux-amlogic@lists.infradead.org, Da Xue , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 21, 2022 at 3:31 PM Amjad Ouled-Ameur wrote: > > Between SPI transactions, all SPI pins are in HiZ state. When using the SS > signal from the SPICC controller it's not an issue because when the > transaction resumes all pins come back to the right state at the same time > as SS. > > The problem is when we use CS as a GPIO. In fact, between the GPIO CS > state change and SPI pins state change from idle, you can have a missing or > spurious clock transition. > > Set a bias on the clock depending on the clock polarity requested before CS > goes active, by passing a special "idle-low" and "idle-high" pinctrl state > and setting the right state at a start of a message > > Reported-by: Da Xue > Signed-off-by: Neil Armstrong > Signed-off-by: Amjad Ouled-Ameur Reviewed-by: Martin Blumenstingl