Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1331742ybf; Thu, 27 Feb 2020 08:59:06 -0800 (PST) X-Google-Smtp-Source: APXvYqznlg+nRDnbFCOzfor2KFGdo75f277KRtnYIi+RDnz5x2uVMwVrJYVfS5GQfqfWS72H5sEd X-Received: by 2002:a9d:6d81:: with SMTP id x1mr571306otp.9.1582822746681; Thu, 27 Feb 2020 08:59:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582822746; cv=none; d=google.com; s=arc-20160816; b=IFE4hCemu5yo4lsZ3FQzgMLa/zz1WLZbqSruveIYXQCdHzNA4QA1n00+fL/dAMwcZY vetc2aX2816s1y5dvpGi5YYFOlXB+3jKSXEPNzTMjI6+gNDGGKsSo5/jZMxqzOfuGS8D qfBk71YbOybw/FYuCRWL0fNgVT1H4f2hBNWUwItExG9+TddqP3aDa9DyoAnszvbtBDJB Fhx23IUA2IFRik3D/L3q3H1QHQpIbN2vxWZEuTDcxvRARbdqr1xuZykKwMVlMYqnukv9 shNEGedJ4O2U3LJ3TwKdFDewIqymKnR/JSM7O2B8+o/nIAWi7bQLeNJFp5l0lJJJSmvF uVfQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=8HKtIoyKIo5yVzywmMT77H9DXbETV9VVR93g+HIOK70=; b=NUqAH9k4XCCMXfnJNlkOKb1mf6wqI4foKYtE5LNIfuyYXNbrwvGlGvjBgdltNii3rr 5aB4JvJps6e4dCv/wwXwaqoDZHSi1sUSTifNujhDcUjbhKN9Y8F1B+B4729tsysJdUx0 Axok2+q0gNNqWe2L1ZT8tnfhf4ZssxYJGczGh/GlUNJob0DRJHfLXvsWyvuz1n96gGFt ZUesTD2uBBhH0AsHeNHSK7dny0Gq6GIf2aA3IeBkBJNlKk7qW7BZHDCvYd3IGp7md9QR IaX+34MXvHlQYa3uYKe9/Cw00uk9Bug2gU7ZcqaazJxE2Ks3E9VsFXAFEG6Uq4PYi7vq n/3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t28si2159055otr.16.2020.02.27.08.58.54; Thu, 27 Feb 2020 08:59:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729382AbgB0Q6p (ORCPT + 99 others); Thu, 27 Feb 2020 11:58:45 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40026 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729174AbgB0Q6p (ORCPT ); Thu, 27 Feb 2020 11:58:45 -0500 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 01505296437; Thu, 27 Feb 2020 16:58:43 +0000 (GMT) Date: Thu, 27 Feb 2020 17:58:41 +0100 From: Boris Brezillon To: Pratyush Yadav Cc: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mark Brown , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, Sekhar Nori , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v2 06/11] mtd: spi-nor: add support for DTR protocol Message-ID: <20200227175841.51435e3f@collabora.com> In-Reply-To: <20200226093703.19765-7-p.yadav@ti.com> References: <20200226093703.19765-1-p.yadav@ti.com> <20200226093703.19765-7-p.yadav@ti.com> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Feb 2020 15:06:58 +0530 Pratyush Yadav wrote: > Double Transfer Rate (DTR) is SPI protocol in which data is transferred > on each clock edge as opposed to on each clock cycle. Make > framework-level changes to allow supporting flashes in DTR mode. > > Right now, mixed DTR modes are not supported. So, for example a mode > like 4S-4D-4D will not work. All phases need to be either DTR or STR. Didn't go deep into the patch but at first glance you don't seem to extend the framework to support stateful modes as I tried to do here [1]. That's really something we should address before considering supporting xD-xD-xD modes, unless the SPI-NOR only supports one stateful mode. If we don't do that first, we might face all sort of unpleasant issues: * kexec not working correctly because the previous kernel left the NOR in an unknown state * suspend/resume not working properly * linux not booting properly because the bootloader left the device in its non-default mode * ... [1]https://patchwork.kernel.org/cover/10638055/