[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240212174822.77734-12-christophe.kerello@foss.st.com>
Date: Mon, 12 Feb 2024 18:48:21 +0100
From: Christophe Kerello <christophe.kerello@...s.st.com>
To: <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
<krzysztof.kozlowski@...aro.org>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>
CC: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<devicetree@...r.kernel.org>,
Christophe Kerello <christophe.kerello@...s.st.com>
Subject: [PATCH 11/12] mtd: rawnand: stm32_fmc2: add MP25 support
Add MP25 SOC support (4 chip select are available).
Signed-off-by: Christophe Kerello <christophe.kerello@...s.st.com>
---
drivers/mtd/nand/raw/stm32_fmc2_nand.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index c5bdb43f7221..d71ec12cd5b1 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1878,11 +1878,14 @@ static int stm32_fmc2_nfc_set_cdev(struct stm32_fmc2_nfc *nfc)
struct device *dev = nfc->dev;
bool ebi_found = false;
- if (dev->parent && of_device_is_compatible(dev->parent->of_node,
- "st,stm32mp1-fmc2-ebi"))
+ if (dev->parent && (of_device_is_compatible(dev->parent->of_node,
+ "st,stm32mp1-fmc2-ebi") ||
+ of_device_is_compatible(dev->parent->of_node,
+ "st,stm32mp25-fmc2-ebi")))
ebi_found = true;
- if (of_device_is_compatible(dev->of_node, "st,stm32mp1-fmc2-nfc")) {
+ if (of_device_is_compatible(dev->of_node, "st,stm32mp1-fmc2-nfc") ||
+ of_device_is_compatible(dev->of_node, "st,stm32mp25-fmc2-nfc")) {
if (ebi_found) {
nfc->cdev = dev->parent;
@@ -2119,6 +2122,10 @@ static const struct stm32_fmc2_nfc_data stm32_fmc2_nfc_mp1_data = {
.max_ncs = 2,
};
+static const struct stm32_fmc2_nfc_data stm32_fmc2_nfc_mp25_data = {
+ .max_ncs = 4,
+};
+
static const struct of_device_id stm32_fmc2_nfc_match[] = {
{
.compatible = "st,stm32mp15-fmc2",
@@ -2128,6 +2135,14 @@ static const struct of_device_id stm32_fmc2_nfc_match[] = {
.compatible = "st,stm32mp1-fmc2-nfc",
.data = &stm32_fmc2_nfc_mp1_data,
},
+ {
+ .compatible = "st,stm32mp25-fmc2",
+ .data = &stm32_fmc2_nfc_mp25_data,
+ },
+ {
+ .compatible = "st,stm32mp25-fmc2-nfc",
+ .data = &stm32_fmc2_nfc_mp25_data,
+ },
{}
};
MODULE_DEVICE_TABLE(of, stm32_fmc2_nfc_match);
--
2.25.1
Powered by blists - more mailing lists