From patchwork Thu Mar 11 19:12:10 2021
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pratyush Yadav
X-Patchwork-Id: 12132543
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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,
MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT
autolearn=unavailable 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 B1ECBC433E0
for ;
Thu, 11 Mar 2021 19:14:21 +0000 (UTC)
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id 323F164E21
for ;
Thu, 11 Mar 2021 19:14:19 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 323F164E21
Authentication-Results: mail.kernel.org;
dmarc=fail (p=quarantine dis=none) header.from=ti.com
Authentication-Results: mail.kernel.org;
spf=none
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding
:Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:
List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From:
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
bh=buWQ0UiriI0tCAkTL8cCc9sHqBBV63z9BjcEgFAf2mE=; b=MVun+FFSONicm6ER/a6/vu13WP
BoRzcs6IyCb0tNriDuftD5MRhBJ9riz+buIQUe2EfydvLGNdZzLtGmG6J6/s5bVREAxeguqZJiE7f
ayunDoresC2sM3zwFAlOsr6UaIYjjcBN/xQ5pKZxy7jlUV2bSbQZbw/ieh5zESRuhEJRSijZjbRxl
B2C1I0YMfo7hagSHBvpUAzqmT/oBTaB5AvKGVVzvdcoLabHF8qnrPQY+uKZMpVrHnrKqN275gPxnk
4E+DgsShwDBVpP3Wv/NmjHri1LckUXyZDKD5V4GPxWqWeIaF56p76PNpIhWRfQu4MjggOoyEXGlvS
ThN6EARQ==;
Received: from localhost ([::1] helo=desiato.infradead.org)
by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux))
id 1lKQjm-009wje-5L; Thu, 11 Mar 2021 19:12:46 +0000
Received: from fllv0015.ext.ti.com ([198.47.19.141])
by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux))
id 1lKQjT-009wgu-SU; Thu, 11 Mar 2021 19:12:30 +0000
Received: from fllv0034.itg.ti.com ([10.64.40.246])
by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12BJCMBG123822;
Thu, 11 Mar 2021 13:12:22 -0600
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1615489942;
bh=K10iL76Rgk2W/O4gIBcHwJ90W5MxbdgPMg2+TPXlU58=;
h=From:To:CC:Subject:Date;
b=U0Gg9VpIDlC5XhTwNU5ZcXVGc0e4yE6p72o3dGXDfKhIEpPaOrzft/ZrAYp0Ce7tF
WYtqiP0mHXUJa3hg1kZWSHKB8ctox+3fwEkjSXaEEVg+RIUWEOxyv8uAkcOZiFkhl7
8ajsTiqpSAgfgrWluhKM5zMPqFDWxjDWFuDab7Dg=
Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23])
by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12BJCM8t112956
(version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL);
Thu, 11 Mar 2021 13:12:22 -0600
Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE102.ent.ti.com
(10.64.6.23) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 11
Mar 2021 13:12:22 -0600
Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE113.ent.ti.com
(10.64.6.34) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via
Frontend Transport; Thu, 11 Mar 2021 13:12:22 -0600
Received: from pratyush-OptiPlex-790.dhcp.ti.com (ileax41-snat.itg.ti.com
[10.172.224.153])
by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12BJCHvR080816;
Thu, 11 Mar 2021 13:12:17 -0600
From: Pratyush Yadav
To: Nishanth Menon , Tero Kristo , Rob Herring
, Tudor Ambarus , Michael
Walle , Miquel Raynal ,
Richard Weinberger , Vignesh Raghavendra ,
Mark Brown ,
, ,
, ,
CC: Pratyush Yadav , Lokesh Vutla
Subject: [RFC PATCH 0/6] spi: Add OSPI PHY calibration support for
spi-cadence-quadspi
Date: Fri, 12 Mar 2021 00:42:10 +0530
Message-ID: <20210311191216.7363-1-p.yadav@ti.com>
X-Mailer: git-send-email 2.30.0
MIME-Version: 1.0
X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20210311_191228_427682_5B9F1848
X-CRM114-Status: GOOD ( 13.47 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id:
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe:
,
Sender: "linux-arm-kernel"
Errors-To:
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
Hi,
This series adds support for OSPI PHY calibration on the Cadence OSPI
controller. This calibration procedure is needed to allow high clock
speeds in 8D-8D-8D mode. The procedure reads some pre-determined pattern
data from the flash and runs a sequence of test reads to find out the
optimal delays for high speed transfer. More details on the calibration
procedure in patch 5/6.
The main problem here is telling the controller where to find the
pattern and how to read it. This RFC uses nvmem cells which point to a
fixed partition containing the data to do the reads. It depends on [0]
and [1].
The obvious problem with this is it won't work when the partitions are
defined via command line. I don't see any good way to add nvmem cells to
command line partitions. I would like some help or ideas here. We don't
necessarily have to use nvmem either. Any way that can cleanly and
consistently let the controller find out where the pattern is stored is
good.
The dts patch depends on [2].
Tested on TI's J721E EVM.
[0] https://patchwork.ozlabs.org/project/linux-mtd/patch/20210302190012.1255-1-zajec5@gmail.com/
[1] https://patchwork.ozlabs.org/project/linux-mtd/patch/20210308011853.19360-1-ansuelsmth@gmail.com/
[2] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210305153926.3479-2-p.yadav@ti.com/
Pratyush Yadav (6):
spi: spi-mem: Tell controller when device is ready for calibration
mtd: spi-nor: core: consolidate read op creation
mtd: spi-nor: core: run calibration when initialization is done
spi: cadence-qspi: Use PHY for DAC reads if possible
spi: cadence-qspi: Tune PHY to allow running at higher frequencies
arm64: dts: ti: k3-j721e-som-p0: Enable PHY calibration
arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 55 ++
drivers/mtd/spi-nor/core.c | 74 +-
drivers/spi/spi-cadence-quadspi.c | 820 +++++++++++++++++++-
drivers/spi/spi-mem.c | 12 +
include/linux/spi/spi-mem.h | 8 +
5 files changed, 916 insertions(+), 53 deletions(-)
---
2.30.0