Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1081980ybt; Wed, 1 Jul 2020 18:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfY+dULAyu+yks+1U9JI1sPsy8FCIEpt5ixzPeXyUBOrZMzTWagI8xfveNgCdoVp3Xeiou X-Received: by 2002:a17:907:20c4:: with SMTP id qq4mr24740682ejb.85.1593653034941; Wed, 01 Jul 2020 18:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593653034; cv=none; d=google.com; s=arc-20160816; b=Si7Yty6OpYp4dGSRvDHqGwcm8yjmaqJkQQIHeny2ND1LuzRIc/Nh5kp5+5DrILRk2B htOf2Bb3Z8uyF8gNkO2WxiFb53CKXMEXwKWUWkWC/b5/Toe5VMFxCzvmyU/4H3cqME0r FlFIqGzcgC34wGtwuA8c7Xd7GDt5gSd66O6jCUEfdjV27yi/49GbK07qJRu4ZQ8EqC6R SB6MuhU1B/XLt0/aaKchiH8xAXs70zeZTAEeWY9mRs5+4MYNtVaduSIMyzg6lDNu0Uiq fqZs2PGIlfKpzkdxtkyYtI0CDlfl8M3UHvYbbRSiaEWSo0UFX/DYvMx0tykDwLyA02Ha dkzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bidqXxWn1K6tyc94efu0DN9VMaHnss5OkamlkUH5SKA=; b=rYJZvZM3gKDGXVHNT7JkFlfXJi/VS1uYvmlmKxSjA4CtUKeGO1/5lPn8HI77FXuH8q 69IOB09vCRcmPivr/4G/yG0pchXZfIhoqHBGqEeRW40Jp7THktlCbebO1Y6o2+R4zXgm 2TLig/O9pVPs/1TOys4zNfXnUBUCyG1VpYqUTBXDyjPD6y+LtPCs6bocD5z7huOYQ1vu 4iryKexZ1G6tzOkN+kPTZXPtpRwzeW3oGi3n6ARR/wXFacGzvqkGOCNuWRbS7yNbT6yq mDUKNzBcT/Glf0Th9w0AFdLpAycXr72vDnLeN6zd/LJk0RFppIAJEhFG2cyx1svXZhsp LKag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZPsF0tgW; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k21si4943670eds.345.2020.07.01.18.23.32; Wed, 01 Jul 2020 18:23:54 -0700 (PDT) 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=@kernel.org header.s=default header.b=ZPsF0tgW; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbgGBBXF (ORCPT + 99 others); Wed, 1 Jul 2020 21:23:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:53302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbgGBBXB (ORCPT ); Wed, 1 Jul 2020 21:23:01 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E34F2082F; Thu, 2 Jul 2020 01:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593652981; bh=heI/zeiybxQ+XENOmCPW/BYUbzGnLzbbihRM/RDA930=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZPsF0tgWtzDXiAawBeHTa91mhDgp8Gw/FxF3gSBkxA0q5dgR07mBxACM65IBRQA03 fbnGHYKlkPERiwYN1OabEtrkfAfqTa3QFqzw63cHn0WwsEQygMtF+aBgHfRxSKl+0R qGSCLVZwg9zzA/58B41dA09MRxVYzWXRIWwoCibA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tony Lindgren , maemo-leste@lists.dyne.org, Merlijn Wajer , Pavel Machek , Sebastian Reichel , Sasha Levin , devicetree@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 05/53] ARM: dts: omap4-droid4: Fix spi configuration and increase rate Date: Wed, 1 Jul 2020 21:21:14 -0400 Message-Id: <20200702012202.2700645-5-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702012202.2700645-1-sashal@kernel.org> References: <20200702012202.2700645-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit 0df12a01f4857495816b05f048c4c31439446e35 ] We can currently sometimes get "RXS timed out" errors and "EOT timed out" errors with spi transfers. These errors can be made easy to reproduce by reading the cpcap iio values in a loop while keeping the CPUs busy by also reading /dev/urandom. The "RXS timed out" errors we can fix by adding spi-cpol and spi-cpha in addition to the spi-cs-high property we already have. The "EOT timed out" errors we can fix by increasing the spi clock rate to 9.6 MHz. Looks similar MC13783 PMIC says it works at spi clock rates up to 20 MHz, so let's assume we can pick any rate up to 20 MHz also for cpcap. Cc: maemo-leste@lists.dyne.org Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi index e39eee628afd6..08a7d3ce383f2 100644 --- a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +++ b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi @@ -13,8 +13,10 @@ cpcap: pmic@0 { #interrupt-cells = <2>; #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <3000000>; + spi-max-frequency = <9600000>; spi-cs-high; + spi-cpol; + spi-cpha; cpcap_adc: adc { compatible = "motorola,mapphone-cpcap-adc"; -- 2.25.1