[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231026152316.2729575-3-estl@gmx.net>
Date: Thu, 26 Oct 2023 17:23:03 +0200
From: Eberhard Stoll <estl@....net>
To: linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>
Cc: Eberhard Stoll <eberhard.stoll@...tron.de>,
Frieder Schrempf <frieder.schrempf@...tron.de>,
Chuanhong Guo <gch981213@...il.com>,
Mario Kicherer <dev@...herer.org>,
Martin Kurbanov <mmkurbanov@...rdevices.ru>
Subject: [PATCH 2/4] mtd: spinand: Add support for clock to rx delay setting
From: Eberhard Stoll <eberhard.stoll@...tron.de>
Add the configuration parameter to set the spi clock to receive
data delay parameter for SPI NAND devices.
This parameter is often referenced as tCLQV in SPI NAND device
data sheets.
Signed-off-by: Eberhard Stoll <eberhard.stoll@...tron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@...tron.de>
---
drivers/mtd/nand/spi/core.c | 2 ++
include/linux/mtd/spinand.h | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 393ff37f0d23..e546b0d1f76f 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -1113,6 +1113,8 @@ int spinand_match_and_init(struct spinand_device *spinand,
info->op_variants.update_cache);
spinand->op_templates.update_cache = op;
+ spinand->spimem->spi->rx_sample_delay_ns = table[i].rx_sample_delay_ns;
+
return 0;
}
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index 3e285c09d16d..fe34d5259c97 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -326,6 +326,7 @@ struct spinand_ondie_ecc_conf {
* @model: model name
* @devid: device ID
* @flags: OR-ing of the SPINAND_XXX flags
+ * @rx_sample_delay_ns: clock to rx data delay timing (tCLQV)
* @memorg: memory organization
* @eccreq: ECC requirements
* @eccinfo: on-die ECC info
@@ -343,6 +344,7 @@ struct spinand_info {
const char *model;
struct spinand_devid devid;
u32 flags;
+ u32 rx_sample_delay_ns;
struct nand_memory_organization memorg;
struct nand_ecc_props eccreq;
struct spinand_ecc_info eccinfo;
@@ -378,6 +380,9 @@ struct spinand_info {
#define SPINAND_SELECT_TARGET(__func) \
.select_target = __func,
+#define SPINAND_RX_SAMPLE_DELAY(__delay) \
+ .rx_sample_delay_ns = __delay,
+
#define SPINAND_INFO(__model, __id, __memorg, __eccreq, __op_variants, \
__flags, ...) \
{ \
--
2.25.1
Powered by blists - more mailing lists