Message ID | 20230926131655.51224-1-nicolas.ferre@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2117253vqu; Tue, 26 Sep 2023 11:36:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFr0IKIJLE4KqtK2+T3qis0PdDVAqEAZPxnhLX9NOzMq8crBybfMSzeDQC8b9j9c7GHtdgO X-Received: by 2002:a17:902:7889:b0:1c4:29dd:2519 with SMTP id q9-20020a170902788900b001c429dd2519mr6245854pll.67.1695753405327; Tue, 26 Sep 2023 11:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695753405; cv=none; d=google.com; s=arc-20160816; b=wdvmlC2XDHXT9hhiddqfaB5IN81wX/IR0vTaCC8G27wP9wC2YL/KEcdfmt9fW6H8Me 0WyIH9DJpshIicbd8FWEmojVrVrzXxxNy6pXKVEtSF7o9u880m6h0RT97yzUxcTwcJ9r NBEn2PzkQtkI4ZVKn394vjuRffLOHNoSL5PS9LtRpFYREaMoJT1e082sHzS4G4cJNulY Sy1i8OhwNXAlnBRd/f/2wniT7u2KP8z+ShCQMU6kjweDdYq7ubFrpQCFDb4DUwY6uDCw L9eityfMTFBkYdq3ei34cNWSzsI9BClezsQFVqU0/qhnUTNU6cLMsJdYs05mzsr13tqQ j0vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UxTudQi9hpata0d6J94ZX21Ztc+v2jjYO9pZ64HIZQk=; fh=vvknMSatbnsqaAD/pVE7PlBE/EQ/Dm6fPxeWvFGuwBM=; b=PVZa+mXGRkv8Lm4hm6yGBRMu1HEm19QeryAiwuiqo7OxcjOPb2M7AP5Gs2tuAlxddr z2jZMH6h6R/bG0Ni2rR48g6MYLGxx2uG9mVrCr5rFQw+U4ch5J9IdHv9WELKtJg4Zx9z 5wAhaeoCqY1g6tP9hTZoPRAQ6agVNSDUWfQbwRqxtTiIV6px0XbB8fLk516IrkckRW7I 0iY4mc0InnXMkkMH5xye5zuR5oxnXhQS7/uCnSMMiLxoarNOpHuz/Il4rzMT5NQvSzzy aa+AJVOC7aIkOLyU1Uq03xVZ+Kk1YvOyEmNLM82PEtbtOwac1XTiEglUmepCuIyje+Fj XIbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="R9/vkdt/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p6-20020a170902780600b001bf095dfb74si3800738pll.66.2023.09.26.11.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 11:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="R9/vkdt/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AA3E08025DDE; Tue, 26 Sep 2023 06:18:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234820AbjIZNSD (ORCPT <rfc822;pwkd43@gmail.com> + 28 others); Tue, 26 Sep 2023 09:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbjIZNSC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 26 Sep 2023 09:18:02 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F5DCF3 for <linux-kernel@vger.kernel.org>; Tue, 26 Sep 2023 06:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1695734275; x=1727270275; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dlh3dXQftHY/1ZVP5UFfcPDTvFrZfh14Xuy9dWmFSS0=; b=R9/vkdt/4jUG0rxvhzumrMkpolOcHNSL0Y/uYkqayKVwCvAF0vOxp5Dp aRwtvaXcGwwQumAF3aOW1MTF7NejykqIeZ0hZufDKHD2DjHIrLhy61b8/ XEdA/Bjaxu43GUkyqJCtwi5HPIBu4eb81SYHGC9DuNbQGaq5bLaOK6rOa 1zzPsL5/+N6jXoZFbiRuLhsTdDnoi4b5ZMzXwj6vihvl69sUstzhbrPoq GT3NAX80THctYr1GqqfUN/CDQofzNH/Ff2YfUn4xAChBBRkiyCloyW7FJ RxKLgp5PfV8/4/AC9rx3UuhEelZts+iUwoTosgXqfnqtc1+bYAqyNFuVe Q==; X-CSE-ConnectionGUID: qv2bLBQUQDS1+ybmYDf9uQ== X-CSE-MsgGUID: FZx5G028Q867FAN1S4AGaQ== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="6518420" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 26 Sep 2023 06:17:49 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 26 Sep 2023 06:17:28 -0700 Received: from ROU-LT-M43238L.mchp-main.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Tue, 26 Sep 2023 06:17:27 -0700 From: <nicolas.ferre@microchip.com> To: Tudor Ambarus <tudor.ambarus@linaro.org>, <miquel.raynal@bootlin.com>, <linux-mtd@lists.infradead.org> CC: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Nicolas Ferre <nicolas.ferre@microchip.com> Subject: [PATCH v2] mtd: spi-nor: atmel: add at25ff321a entry Date: Tue, 26 Sep 2023 15:16:55 +0200 Message-ID: <20230926131655.51224-1-nicolas.ferre@microchip.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 06:18:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777502271989695349 X-GMAIL-MSGID: 1778126322637504312 |
Series |
[v2] mtd: spi-nor: atmel: add at25ff321a entry
|
|
Commit Message
Nicolas Ferre
Sept. 26, 2023, 1:16 p.m. UTC
From: Nicolas Ferre <nicolas.ferre@microchip.com> Add the at25ff321a 4MB SPI flash which is able to provide SFDP informations. Datasheet: https://www.renesas.com/us/en/document/dst/at25ff321a-datasheet Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> --- v1 -> v2: - adapt to new struct flash_info atmel_nor_parts init - don't set the no_sfdp_flags property Hi, This flash is present on the MikoE flash 10 Click board and was tested on sama7g5-ek at spi frequency of 80 MHz: Here are the tests that I ran: root@sama5d27-wlsom1-ek-sd:~# dd if=/dev/urandom of=./spi_test bs=1M count=3 3+0 records in 3+0 records out 3145728 bytes (3.1 MB, 3.0 MiB) copied, 0.285407 s, 11.0 MB/s root@sama5d27-wlsom1-ek-sd:~# mtd_debug write /dev/mtd0 0 3145728 spi_test Copied 3145728 bytes from spi_test to address 0x00000000 in flash root@sama5d27-wlsom1-ek-sd:~# mtd_debug erase /dev/mtd0 0 3145728 Erased 3145728 bytes from address 0x00000000 in flash root@sama5d27-wlsom1-ek-sd:~# mtd_debug read /dev/mtd0 0 3145728 spi_read Copied 3145728 bytes from address 0x00000000 in flash to spi_read root@sama5d27-wlsom1-ek-sd:~# hexdump spi_read 0000000 ffff ffff ffff ffff ffff ffff ffff ffff * 0300000 root@sama5d27-wlsom1-ek-sd:~# mtd_debug write /dev/mtd0 0 3145728 spi_test Copied 3145728 bytes from spi_test to address 0x00000000 in flash root@sama5d27-wlsom1-ek-sd:~# mtd_debug read /dev/mtd0 0 3145728 spi_read Copied 3145728 bytes from address 0x00000000 in flash to spi_read root@sama5d27-wlsom1-ek-sd:~# sha1sum spi_test spi_read 4de5dbe39ab24b169e9dad01a8cc12c4756270a2 spi_test 4de5dbe39ab24b169e9dad01a8cc12c4756270a2 spi_read root@sama5d27-wlsom1-ek-sd:~# cat /sys/bus/spi/devices/spi0.1/spi-nor/partname at25ff321a root@sama5d27-wlsom1-ek-sd:~# cat /sys/bus/spi/devices/spi0.1/spi-nor/jedec_id 1f4708 root@sama5d27-wlsom1-ek-sd:~# cat /sys/bus/spi/devices/spi0.1/spi-nor/manufacturer atmel root@sama5d27-wlsom1-ek-sd:~# hexdump -C /sys/bus/spi/devices/spi0.1/spi-nor/sfdp 00000000 53 46 44 50 06 01 00 ff 00 06 01 10 10 00 00 ff |SFDP............| 00000010 e5 20 e1 ff ff ff ff 01 40 eb 08 6b 08 3b 00 ff |. ......@..k.;..| 00000020 ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 |............. .R| 00000030 10 d8 00 ff 50 2a 2a 01 82 ff 9c d2 64 c1 08 46 |....P**.....d..F| 00000040 7a 75 7a 75 f7 c4 d5 5c 00 06 51 ff 88 30 00 00 |zuzu...\..Q..0..| 00000050 root@sama5d27-wlsom1-ek-sd:~# md5sum /sys/bus/spi/devices/spi0.1/spi-nor/sfdp d540f07cbfb7c9c19654c453b561b311 /sys/bus/spi/devices/spi0.1/spi-nor/sfdp # # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set root@sama5d27-wlsom1-ek-sd:~# mtdinfo /dev/mtd0 mtd0 Name: spi0.1 Type: nor Eraseblock size: 65536 bytes, 64.0 KiB Amount of eraseblocks: 64 (4194304 bytes, 4.0 MiB) Minimum input/output unit size: 1 byte Sub-page size: 1 byte Character device major/minor: 90:0 Bad blocks are allowed: false Device is writable: true Best regards, Nicolas drivers/mtd/spi-nor/atmel.c | 5 +++++ 1 file changed, 5 insertions(+)
Comments
On Tue, 26 Sep 2023 15:16:55 +0200, nicolas.ferre@microchip.com wrote: > Add the at25ff321a 4MB SPI flash which is able to provide > SFDP informations. s/informations/information > Datasheet: https://www.renesas.com/us/en/document/dst/at25ff321a-datasheet s/Datasheet/Link > > Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git, spi-nor/next branch. Thanks! [1/1] mtd: spi-nor: atmel: add at25ff321a entry https://git.kernel.org/mtd/c/8f407eda173f Cheers,
diff --git a/drivers/mtd/spi-nor/atmel.c b/drivers/mtd/spi-nor/atmel.c index 95f0e139284e..e13b8d2dd50a 100644 --- a/drivers/mtd/spi-nor/atmel.c +++ b/drivers/mtd/spi-nor/atmel.c @@ -213,6 +213,11 @@ static const struct flash_info atmel_nor_parts[] = { .flags = SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE, .no_sfdp_flags = SECT_4K, .fixups = &atmel_nor_global_protection_fixups + }, { + .id = SNOR_ID(0x1f, 0x47, 0x08), + .name = "at25ff321a", + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE, + .fixups = &atmel_nor_global_protection_fixups }, { .id = SNOR_ID(0x1f, 0x48, 0x00), .name = "at25df641",