Message ID | 20240809132246.3395-1-claus.fabig@emerson.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TtcP/RCJ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=emerson.com header.i=@emerson.com header.a=rsa-sha256 header.s=email header.b=S0u+U4+c; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WgPmX3pr8z1ybS for <incoming@patchwork.ozlabs.org>; Fri, 9 Aug 2024 23:25:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=caEBNenY+96DdEpAA/agdy+3/c2xTJ2UT6yRJxTGO2s=; b=TtcP/RCJCq2cQK i1D8VKT9AV6n0igHs6odHXRidOOQvohVT0fXBj3qQActmHSgcZ5TFP7OfHsiAs3QPzXU6A3530Kys rLtmv/iL38JvhBV2yLNrOUhWK7O9rRpurMhcON1HwF+ldsbfuTNMAcosHEahPF8kOk22lNZjIXeTK +/gMREx9pofJqo2bBHjN7LbIq0ubkpdTZYb5BnOe/ajhmOFCQQAJ1b0dCE8n5vc7c0VskW8X713re gc7c2LedoyB5FF0a34wECwfvHMcWC5nF+ciAcMfymVFyPJYsGOIptKXHlX6wVc11WAaZkr6x501RN MCm8x8VziGxMwzEClzSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1scPcG-0000000BK9P-2vQw; Fri, 09 Aug 2024 13:25:12 +0000 Received: from mx0a-00300601.pphosted.com ([148.163.146.64]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1scPcC-0000000BK7h-1695 for linux-mtd@lists.infradead.org; Fri, 09 Aug 2024 13:25:10 +0000 Received: from pps.filterd (m0359308.ppops.net [127.0.0.1]) by mx0b-00300601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 479C4eFv004134; Fri, 9 Aug 2024 13:24:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emerson.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=email; bh=IXuzo+k1Fuz U2qFtsu2QEn/iOLlKK50tpT2YpCc7BLo=; b=S0u+U4+c20+I+JaBO+MRF9CNY79 hed6TRlrsljcIvzAgKkwXfp2BcYoIQ9UEe3nYm8QYtlsiLzGjImFkoClf1sInEsP n8yEtbSDbURC6KFACcH3Ys1zSg+Kh9QAFsCDLQhnTB/eXEJV7zGEl3kREAEM3Ehd hhZOUDND9YrT44KQ5b77GTRVxqNEyU9KIkA0vw/vySoo6+0Invbw3O7PHCTEMOPf FhWa+ZmEfr3hVLl1u4dg8m4VClUKv1G45mqJF0gfRUmOUhkfYklFkfdHGbCIwPce N95Is2d/wBfKOuAcyKIthkvHnxBJgL/JbWldfRCdmfqtpfyRhjaycD0ElcA== Received: from usgdcecpmsgae03.extemr.org ([144.191.128.204]) by mx0b-00300601.pphosted.com (PPS) with ESMTPS id 40wjsk1bta-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Aug 2024 13:24:55 +0000 (GMT) Received: from usgdcecpmsgap05.emrsn.org (10.16.75.137) by mail.emerson.com (10.16.11.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 9 Aug 2024 13:25:28 +0000 Received: from usgdcecpmsgap05.emrsn.org (10.16.75.137) by usgdcecpmsgap05.emrsn.org (10.16.75.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 9 Aug 2024 13:24:40 +0000 Received: from localhost.localdomain (10.19.249.15) by Inetmail.emrsn.net (10.16.75.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11 via Frontend Transport; Fri, 9 Aug 2024 13:24:38 +0000 From: Claus Fabig <claus.fabig@emerson.com> To: <claus.fabig@emerson.com>, <mwalle@kernel.org>, <tudor.ambarus@linaro.org>, <pratyush@kernel.org>, <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com> CC: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2] mtd: spi-nor: add support for MRAM Everspin EM008LX Date: Fri, 9 Aug 2024 15:21:58 +0200 Message-ID: <20240809132246.3395-1-claus.fabig@emerson.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-GUID: RFcVTwCqkTrzuRZrgTpuLLKXg_H3yzgQ X-Proofpoint-ORIG-GUID: RFcVTwCqkTrzuRZrgTpuLLKXg_H3yzgQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-09_10,2024-08-07_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 malwarescore=0 phishscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408090097 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240809_062508_966320_B1A5ABD3 X-CRM114-Status: GOOD ( 15.15 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The Everspin EM008LX MRAM has 8Mb and is populated on a custom board using Microchip's PCI12000 spi host controller running on low 30MHz clock. According to Everspin Read Fast (0xb) command below 60MH [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [148.163.146.64 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [148.163.146.64 listed in sa-accredit.habeas.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [148.163.146.64 listed in wl.mailspike.net] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [148.163.146.64 listed in bl.score.senderscore.com] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[v2] mtd: spi-nor: add support for MRAM Everspin EM008LX
|
expand
|
diff --git a/drivers/mtd/spi-nor/everspin.c b/drivers/mtd/spi-nor/everspin.c index add37104d673..178529ed0a28 100644 --- a/drivers/mtd/spi-nor/everspin.c +++ b/drivers/mtd/spi-nor/everspin.c @@ -31,6 +31,12 @@ static const struct flash_info everspin_nor_parts[] = { .size = SZ_512K, .sector_size = SZ_512K, .flags = SPI_NOR_NO_ERASE, + }, { + .id = SNOR_ID(0x6b, 0xbb, 0x14), + .name = "em008lx", + .size = SZ_1M, + .sector_size = SZ_64K, + .flags = SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, } };
The Everspin EM008LX MRAM has 8Mb and is populated on a custom board using Microchip's PCI12000 spi host controller running on low 30MHz clock. According to Everspin Read Fast (0xb) command below 60MHz is neither specified and nor tested. Test shows that using Read Fast (0xb) will result in reading inconsistent data in this setup but writing is fine, so only supporting Read (0x3) command should be acceptable for the moment. The device is JEDEC compatible (JESD251 and JESD251-1) but not able to provide SFDP information. For spec v3.2 refer to Link: https://www.everspin.com/file/158315/download. Successfully tested according to Link: https://www.kernel.org/doc/html/latest/driver-api/mtd/spi-nor.html. Signed-off-by: Claus Fabig <claus.fabig@emerson.com> --- Changes in V2: - add id for probing instead of name - change sector size from 1MB to 64k test em008lxb MRAM cat /sys/bus/spi/devices/spi-EMR5555\:00/spi-nor/partname em008lx cat /sys/bus/spi/devices/spi-EMR5555\:00/spi-nor/jedec_id 6bbb14 cat /sys/bus/spi/devices/spi-EMR5555\:00/spi-nor/manufacturer everspin cat /sys/kernel/debug/spi-nor/spi-EMR5555\:00/capabilities Supported read modes by the flash 1S-1S-1S opcode 0x03 mode cycles 0 dummy cycles 0 Supported page program modes by the flash 1S-1S-1S opcode 0x02 cat /sys/kernel/debug/spi-nor/spi-EMR5555\:00/params name em008lx id 6b bb 14 10 48 5f size 1.00 MiB write size 1 page size 256 address nbytes 3 flags HAS_SR_TB | HAS_16BIT_SR | HAS_4BIT_BP | HAS_SR_BP3_BIT6 opcodes read 0x03 dummy cycles 0 erase 0xd8 program 0x02 8D extension none protocols read 1S-1S-1S write 1S-1S-1S register 1S-1S-1S erase commands d8 (64.0 KiB) [0] c7 (1.00 MiB) sector map region (in hex) | erase mask | overlaid ------------------+------------+---------- 00000000-000fffff | [0 ] | no cat /proc/mtd dev: size erasesize name mtd0: 00020000 00020000 "spi-EMR1010:00" mtd1: 00100000 00010000 "spi-EMR5555:00" mtd_debug info /dev/mtd1 mtd.type = MTD_NORFLASH mtd.flags = MTD_CAP_NORFLASH mtd.size = 1048576 (1M) mtd.erasesize = 65536 (64K) mtd.writesize = 1 mtd.oobsize = 0 regions = 0 dd if=/dev/urandom of=spi_test bs=1M count=1 mtd_debug erase /dev/mtd1 0 1048576 mtd_debug read /dev/mtd1 0 1048576 spi_read Copied 1048576 bytes from address 0x00000000 in flash to spi_read hexdump spi_read 0000000 ffff ffff ffff ffff ffff ffff ffff ffff * 0100000 sha256sum spi_read f5fb04aa5b882706b9309e885f19477261336ef76a150c3b4d3489dfac3953ec spi_read mtd_debug write /dev/mtd1 0 1048576 spi_test Copied 1048576 bytes from spi_test to address 0x00000000 in flash mtd_debug read /dev/mtd1 0 1048576 spi_read Copied 1048576 bytes from address 0x00000000 in flash to spi_read sha256sum spi* 8b73cb3cf9a032236fc3f41c974fced7b8dd43262628c5425f178c84ad619965 spi_read 8b73cb3cf9a032236fc3f41c974fced7b8dd43262628c5425f178c84ad619965 spi_test drivers/mtd/spi-nor/everspin.c | 6 ++++++ 1 file changed, 6 insertions(+)