Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp40839pxu; Wed, 2 Dec 2020 14:23:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVQiTEMi9MGt10bqEMF5hRylh6CmyimxgQgD5scWaR0JW8Sw7lLw1RMknOBcJwRgqRKwL7 X-Received: by 2002:a17:906:3114:: with SMTP id 20mr1876923ejx.460.1606947787469; Wed, 02 Dec 2020 14:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606947787; cv=none; d=google.com; s=arc-20160816; b=UdSQVLs7LlyBclS2Q6INbCXnPaJayO7UBVV5h/W3L2QG8XB41b/fv5VqcpvJQ0ZCqA 5kvOefZr8xC10JG6qs7Wl30/8ccdvhK1lWeBRq7HvOPYqU5wf2RzOamI/+ffkcZa3mLu Cgg++THqrL1IXr6HU3jexFQHroAjN2L9lP6A0hMJXqA1EB9JMaOSKKaHx91PEb8dBAQE nAZkQYK6LNwrnFIQTZ4TJpjhg56NecLTy4NeoxpLKRBX55nM9UT26AbUiW5cyxZNj3KP fC8W39MvPli3DlLP2PuTwnfsPwwfyEOzsVT6sRuA0qE3jvv17t/dlIQ1+Ju4kJzFPkUu ConA== 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=w+aMhLNq1eUvJgs6SrXO/85+NlnOMnHMly+a+tezdWo=; b=AYb7nBDwAQRaBL8cuFEnQophNJuF0Ulpo7VendIwgJgatoF5YWPyQbm2szVDqwq9E/ Q4cCih75UZyIZ67rddQyI9I9A8cukgwULLL6K//oejxSUYRS6eGkA2fuE+sbBnF7/phc APSRczhD+cGLubPLXYUslhQU2YcMi8UN3K5DSgA0dGYgnqLQAONxOxQis0PxSUChJIuN cG1kp+54N4fCKEWDfbBIAkYHQ1XyVJyW+Vq6/7ZyE6xTg4B/hi9vakcrO2EmdjbrIC/4 Mf4JZyQ2iTFbLX9UNyDTb4tMcJXwF69HvH3rpfd61dLF5oj0Pl8qSRuR34NvSP8vtrA9 qsbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HPJA4fYk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb26si93654edb.382.2020.12.02.14.22.43; Wed, 02 Dec 2020 14:23:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HPJA4fYk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728074AbgLBWTk (ORCPT + 99 others); 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-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)