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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 06282C64E7B for ; Wed, 2 Dec 2020 22:19:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A50D1221FD for ; Wed, 2 Dec 2020 22:19:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728145AbgLBWTk (ORCPT ); Wed, 2 Dec 2020 17:19:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbgLBWTk (ORCPT ); Wed, 2 Dec 2020 17:19:40 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8628C0617A7 for ; Wed, 2 Dec 2020 14:18:59 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id cm17so5747034edb.4 for ; Wed, 02 Dec 2020 14:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w+aMhLNq1eUvJgs6SrXO/85+NlnOMnHMly+a+tezdWo=; b=HPJA4fYkHsnGkMC38cJgmAaOkXQnXM7Tr2VwPCocQTaDxASqYUke/Fqpj05G/YnlzB eHjvakUlyg5TxEe8gQLzL6E/XyUCaJfwC73kuzkg4wnMHDBK1SkrK7e+jem3Pob/XwIG poKK8UNtA0Z7LVsNu90uC06K6mM2IjFoeDybs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w+aMhLNq1eUvJgs6SrXO/85+NlnOMnHMly+a+tezdWo=; b=cgx+la/+eGwkdjkhav7aP/b71buP2RrOncCUuWxtLUifrzaARk9Jom+2a7tqSFY2wd KaSfHU6HLjNbdSX2MxRv47gs9IZx2VYMsCQcuivvl6lBXXPtyn6jqefm4EIDMN0TsixQ XgbLJaiuTWfVcz8clHCcyfRcGs5uPbbudeK4qCxfLQzFedRJr80HKSqW5rc6PiDyYaaQ lqckbUkir7ZQDfhFDKB3F82Yn6VTkTJs3lryB9PeIBtiHM+47Pa0EPXcDSib8IJ8j/El mtWdNBrliS+d3lgiJ2T0DykdMn5GdPxKi9yCToWvcxd4qOYoRKwoIlYM6wPZS/nX2r0h Hx5A== X-Gm-Message-State: AOAM533KkP3PJ7gyezNbqNms+7BrAJCC1NWF9k2O9KzkNjICNTgYGyi2 uVTYOtmltkT9+KiEWGM+Eu1sTz2Be9YEig== X-Google-Smtp-Source: ABdhPJw58L4Z6r46I2rGqCmjFjBRf/booznFAjQhWtQDoE6A3iLYKnmF52hWNz5IRIcqHQaaEDhMEA== X-Received: by 2002:a05:6402:949:: with SMTP id h9mr141753edz.301.1606947538315; Wed, 02 Dec 2020 14:18:58 -0800 (PST) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com. [209.85.218.48]) by smtp.gmail.com with ESMTPSA id u23sm738645ejy.87.2020.12.02.14.18.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2020 14:18:57 -0800 (PST) Received: by mail-ej1-f48.google.com with SMTP id lt17so454980ejb.3 for ; Wed, 02 Dec 2020 14:18:56 -0800 (PST) X-Received: by 2002:a17:906:5847:: with SMTP id h7mr1817692ejs.124.1606947536600; Wed, 02 Dec 2020 14:18:56 -0800 (PST) MIME-Version: 1.0 References: <20201202214935.1114381-1-swboyd@chromium.org> In-Reply-To: <20201202214935.1114381-1-swboyd@chromium.org> From: Alexandru M Stan Date: Wed, 2 Dec 2020 14:18:20 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] spi: spi-geni-qcom: Use the new method of gpio CS control To: Stephen Boyd Cc: Mark Brown , linux-kernel , linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, Akash Asthana , Bjorn Andersson , Douglas Anderson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 2, 2020 at 1:49 PM Stephen Boyd wrote: > > Let's set the 'use_gpio_descriptors' field so that we use the new way of > requesting the CS GPIOs in the core. This allows us to avoid having to > configure the CS pins in "output" mode with an 'output-enable' pinctrl > setting. > > Cc: Akash Asthana > Cc: Bjorn Andersson > Reviewed-by: Douglas Anderson > Acked-by: Alexandru M Stan I meant this as a joke in chat. It doesn't really mean anything in any capacity. > Signed-off-by: Stephen Boyd > --- > drivers/spi/spi-geni-qcom.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c > index 25810a7eef10..c4c88984abc9 100644 > --- a/drivers/spi/spi-geni-qcom.c > +++ b/drivers/spi/spi-geni-qcom.c > @@ -636,6 +636,7 @@ static int spi_geni_probe(struct platform_device *pdev) > spi->auto_runtime_pm = true; > spi->handle_err = handle_fifo_timeout; > spi->set_cs = spi_geni_set_cs; > + spi->use_gpio_descriptors = true; > > init_completion(&mas->cs_done); > init_completion(&mas->cancel_done); > > base-commit: b65054597872ce3aefbc6a666385eabdf9e288da > -- > https://chromeos.dev > Unfortunately this patch makes my cros-ec (the main EC that used to work even before my debugging) also fail to probe: [ 0.839533] cros-ec-spi spi6.0: EC failed to respond in time [ 1.040453] cros-ec-spi spi6.0: EC failed to respond in time [ 1.040852] cros-ec-spi spi6.0: Cannot identify the EC: error -110 [ 1.040855] cros-ec-spi spi6.0: cannot register EC, fallback to spidev [ 1.040942] cros-ec-spi: probe of spi6.0 failed with error -110 I wasn't closely looking at this part closely when I was using my other spi port with spidev, so this is why I haven't noticed it before. Doug suggests this might be a polarity issue. More scoping to be had. On the other hand my gpioinfo output is better with this patch: line 86: "AP_SPI_FP_MISO" unused input active-high line 87: "AP_SPI_FP_MOSI" unused input active-high line 88: "AP_SPI_FP_CLK" unused input active-high line 89: "AP_SPI_FP_CS_L" "spi10 CS0" output active-low [used] Previously they were: line 86: "AP_SPI_FP_MISO" unused input active-high line 87: "AP_SPI_FP_MOSI" unused input active-high line 88: "AP_SPI_FP_CLK" unused input active-high line 89: "AP_SPI_FP_CS_L" unused output active-high But I'm still disappointed the rest of the pins (CLK MISO MOSI) are still "unused", but I was told that's just an artifact of those pins not being gpios (but remuxed to spi). Alexandru Stan (amstan)