Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp117465pxu; Wed, 2 Dec 2020 16:50:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwed9uIN/b6QetieBGNLcsZ/nVL7k2K1rHfNi8pX87DBEWrNR6A6WdbOFRb50FlmKlCnBX/ X-Received: by 2002:a17:906:7b49:: with SMTP id n9mr389923ejo.418.1606956634696; Wed, 02 Dec 2020 16:50:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606956634; cv=none; d=google.com; s=arc-20160816; b=y7voDlbxlblhnUuLAlbnhh0ezxLx0olf0b5TsJ3MXcciOC/axPuda4XMLpx86vh/L0 icZUItSpPUaAk+GNFKPi08R2DSLiH5KTQ3i6XF71Dlqt7D8za1eV/lvbEF8+ZgcNtQsn 5S9Ms29h4NtL9Sqib2yUAzjFe5h9dPYgeCXJfU1pbueCuTR1MMFxma20ITNgX16mYy+S qHveFK6Z9zy9b6KOYeSm4lOzEQxRs4wmH1j9CyzaIxxpdnXLyKtHC8LQgRLYweEe8K60 jk+LZ23fKMQqMiG3J40FBarzxWNtt8ruecFjBiaL5LO3Ls9lJvfq1iFjdBQOohvA9OK+ q3Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=0iSNRCsv4QiujIvck7LYjf+I2m3BZnqlwW9BXnXzbgg=; b=LaLhfNKdX5hmKn/k6T/h5Hlte51hLsvUGQ/jrql0gAo2UBLDZlWSVtrS6W10yJi5o3 3lMLTvOQ/khIL9OVKkIVPaitcFd1Tp768poXkoY+UbW92AhNTnoiYsMTsiHbGOBry9nc UDZODUo34QrgmMJGzqX3/kOE8ogJV5k4UFJkmWnQIC/ge5HoAPNavwXk5zcWXcveHtEy RdBGhVQBiFVo7cIOU3HSZbDejLFusJUq1RwB2jNnOYhsgDOmfp8GcJEhWD+mySBmKacY mQi74ATT6j16iHSH7UGopWFseHaVqfjVTHLtrD3tSYCrtzmD2+Z6If9/pdqYNgQQBdaB k9oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="fb/2kM6R"; 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 q12si295767edb.395.2020.12.02.16.50.11; Wed, 02 Dec 2020 16:50:34 -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="fb/2kM6R"; 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 S1728987AbgLCAsK (ORCPT + 99 others); Wed, 2 Dec 2020 19:48:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbgLCAsK (ORCPT ); Wed, 2 Dec 2020 19:48:10 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4006AC0613D6 for ; Wed, 2 Dec 2020 16:47:30 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id j1so188209pld.3 for ; Wed, 02 Dec 2020 16:47:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=0iSNRCsv4QiujIvck7LYjf+I2m3BZnqlwW9BXnXzbgg=; b=fb/2kM6RvKx/QCzksjNVKwIbgLuaxVZ71SfRliwn9NTj2150eRm466siPuBe+587Hz WUmeb3sK7JQ34RniAA6QgcIZWbKfNGx/KMMgttWuwU2PkKIHCdSYQOi9S7xQ3FZZ6mCp qId5NR09c2AWb0Rr5vIXtkNA9Iy78eUUZby2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=0iSNRCsv4QiujIvck7LYjf+I2m3BZnqlwW9BXnXzbgg=; b=Ce19Y1dSaDrCqaJ2gzl2nB/LzVI6u+WDvBSEG5Qf7hYxlbq3O5PjMMgwJYWR50Pb3T 5owypev7PbmGuWRVRxHY19sBh6PdDV0LN/w7JJLGnpVgoPuiib8wzEt3eH0SsiHzom7S ESnOQsy43+t1wZyE3nXU+FwA7gvbLweU8c7QaORHVcoEZ5Y9SObHAIhcB4JV4dXKxcOY JwKt90EyUudwTCUxNrxZdI2mZpXkIeqwkwNmeAU7biLU/TvzZdPWcQyZxTH3kf+O8Oqp 5RX9WreYU2T4pQVTXCmyr3hc7X28JjdObFxdniE+LecQ/vj7Cjs7rLwVV/k2bJs+uW8n 4uMg== X-Gm-Message-State: AOAM531ddjbONSVsnd8Tp3D+hQhXdkG3vYVMv35JzQcqbSf3K1MDJWIA qyRmwtXiqnpdT/b7YVlidgwv2Q== X-Received: by 2002:a17:902:b70f:b029:da:b944:f3b7 with SMTP id d15-20020a170902b70fb02900dab944f3b7mr746054pls.82.1606956449808; Wed, 02 Dec 2020 16:47:29 -0800 (PST) Received: from chromium.org ([2620:15c:202:201:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id l190sm227210pfl.205.2020.12.02.16.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 16:47:29 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <160695172591.2717324.17788035024164242534@swboyd.mtv.corp.google.com> References: <20201202214935.1114381-1-swboyd@chromium.org> <160695172591.2717324.17788035024164242534@swboyd.mtv.corp.google.com> Subject: Re: [PATCH] spi: spi-geni-qcom: Use the new method of gpio CS control From: Stephen Boyd Cc: Mark Brown , linux-kernel , linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, Akash Asthana , Bjorn Andersson , Douglas Anderson To: Alexandru M Stan Date: Wed, 02 Dec 2020 16:47:27 -0800 Message-ID: <160695644776.2717324.633265815704005177@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Stephen Boyd (2020-12-02 15:28:45) > Quoting Alexandru M Stan (2020-12-02 14:18:20) > > 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 spid= ev > > [ 1.040942] cros-ec-spi: probe of spi6.0 failed with error -110 > >=20 > > 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. > >=20 >=20 > Ah I see. It looks like the cs-gpios polarity is wrong for the DTS on > sc7180. That's a patch that Doug has sent in for the qcom tree, commit > 37dd4b777942 ("arm64: dts: qcom: sc7180: Provide pinconf for SPI to use > GPIO for CS") and it is pending for the next release (v5.11). Doug says > he will send in a fix for the DTS side, but this patch is still "good" > as far as I can tell. It moves us to use gpio descriptors and also finds > bugs like this in the DTS file that we would have missed otherwise > because the legacy mode doesn't look at the polarity flags in DT. And that is wrong. With even more investigation and Doug's eagle eyes it seems that the cros-ec driver is overriding the spi::mode to clear out the SPI_CS_HIGH bit that the spi core sets in there when using the gpio descriptors. I'll send a patch for cros-ec-spi shortly.