From patchwork Tue Aug 9 20:14:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 1665049 X-Patchwork-Delegate: tudor.ambarus@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=3/mkVLsc; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=jejZm+Ls; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M2PTR3dJJz9sFs for ; Wed, 10 Aug 2022 06:15:53 +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:References:In-Reply-To: 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: List-Owner; bh=AWkv1BmOxhyelgWTQ3tUm+s1x15RqXkQI8myG6OLXA0=; b=3/mkVLscuhHdOM wIgUU4yzHYFnle6KVvOuyy6akGIDE2PSkF2sX5u9n3AsGua09vEWfy4zIlfQPLGWAndx0zf/+aquC trWyoXdmDX4fvOI+dO32mT8W3+rLL0G4jVp9F2pRSWQJmKDzKcZNwSAh0P5FrX+WV0/ZIbpwALmla pUZNkaU40OEgIncv/cjGjJpMsf/xMf+tObiVgJHFkleNUH+il734Rc3JI7+jXMe9DwpevG5h9zBJe wfVZVKc9LQcRlVFxGEInomLtsl6u3EQNS930/iZ8iuVyM0+QA78FFfyUQh8rwG75xhy11X8J22ADa dlitHD4ENYy7VvSOrp8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVcs-006B3t-OB; Tue, 09 Aug 2022 20:14:54 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVcq-006B29-JO for linux-mtd@lists.infradead.org; Tue, 09 Aug 2022 20:14:53 +0000 Received: by mail-wr1-x42e.google.com with SMTP id l22so15518439wrz.7 for ; Tue, 09 Aug 2022 13:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=n+sIRfD+RQiRGeYS26jphMxCdbHEnhlhpCnFs913kcs=; b=jejZm+LsOkP/sKHcTEjTV6a/YYsp2p6PJWvV5Wq5e8AsJrGoqYxITRS6VyHhbYmoJM hz3dmUTvecCc+8BvqDnixZPoalS7dbYY5PMNY+/s85jL232ek1hkXHYI1OD5gzRwOV6k nlBEF2Gs8w1ocpv5PHneyEd6jUo47n/RFaR13fe5PGUkP23vB2QHFlpqLcpMtJqxujMF vfvY2a5JjxDykh1Wn/uI3hDCqNVys2WFTCDMTyXDTQLYOe4LiP+SYg/7YPfwdBLfYmXG giw3vBtwH9PmT61uF1ns7I+qhVCoRDczkpafU2m9cP6VaRONGMV3TLZI1ltQQGFyojJz UVTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=n+sIRfD+RQiRGeYS26jphMxCdbHEnhlhpCnFs913kcs=; b=wVxRsnkZjPpnhPlZvQ13pmd3MajEtTeXABt+Y5OsUll4EQxRZ6xBxXhIywyj41omQu JyX+LmSyDCm3z2E4Sdilc1aXKAWcXUw7poTGuA3oRJgI7sx1zJWwWqtnuDY665m1IAsU mOYc6KafyxbFBGdoIVWmHJ0iJ3/iKi5QCshOrC0wqQXt7Wl8EkIIq4cXjMJV7wcYGros 5CY9qP/SMqHTZR8RkXSBYKNgJPaKvNKXM/0h38RGGhHI6LI+qD4OSeG8o8stE+RHBuIM q7QpWAVELy2H4rqo3CqRt0LsKETEB60GyDYONk3SEFu2rILTVfcYXzW0arX+IakeDGHl NY5Q== X-Gm-Message-State: ACgBeo3WN16T7/UNVUTyhzGlSUACwUSerCPjkTkSoop2n7yPEYIfXvnj sQAQQzVt1opGom+3nT/S9weWAg== X-Google-Smtp-Source: AA6agR6Q0kQEIw5VavO/Vm78ynSFGIF8hJpL/Byv5pZN1uWpXtoptmzd9VDOfD5ycVuA3Pjge+IeXQ== X-Received: by 2002:a5d:6608:0:b0:220:625e:f4e1 with SMTP id n8-20020a5d6608000000b00220625ef4e1mr16069047wru.252.1660076090308; Tue, 09 Aug 2022 13:14:50 -0700 (PDT) Received: from debian.office.codethink.co.uk ([2405:201:8005:8149:e5c9:c0ac:4d82:e94b]) by smtp.gmail.com with ESMTPSA id q15-20020a7bce8f000000b003a53e6c5425sm24041wmj.8.2022.08.09.13.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 13:14:49 -0700 (PDT) From: Sudip Mukherjee To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: greentime.hu@sifive.com, jude.onyenegecha@sifive.com, william.salmon@sifive.com, adnan.chowdhury@sifive.com, ben.dooks@sifive.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v2 1/3] mtd: spi-nor: issi: is25wp256: Init flash based on SFDP Date: Tue, 9 Aug 2022 21:14:26 +0100 Message-Id: <20220809201428.118523-2-sudip.mukherjee@sifive.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220809201428.118523-1-sudip.mukherjee@sifive.com> References: <20220809201428.118523-1-sudip.mukherjee@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220809_131452_656711_663A6065 X-CRM114-Status: GOOD ( 14.00 ) X-Spam-Score: -0.2 (/) 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 datasheet of is25wp256 says it supports SFDP. Get rid of the static initialization of the flash parameters and init them when parsing SFDP. Testing showed the flash using SPINOR_OP_READ_1_1_4_4B 0x6c, SPINOR_OP_PP_4B 0x12 and SPINOR_OP_BE_4K_4B 0x21 before enabling SFDP. After this patch, it parses the SFDP information and still uses the [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The datasheet of is25wp256 says it supports SFDP. Get rid of the static initialization of the flash parameters and init them when parsing SFDP. Testing showed the flash using SPINOR_OP_READ_1_1_4_4B 0x6c, SPINOR_OP_PP_4B 0x12 and SPINOR_OP_BE_4K_4B 0x21 before enabling SFDP. After this patch, it parses the SFDP information and still uses the same opcodes. Signed-off-by: Sudip Mukherjee --- drivers/mtd/spi-nor/issi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index 89a66a19d754..8b48459b5054 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -71,7 +71,7 @@ static const struct flash_info issi_nor_parts[] = { { "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256) NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "is25wp256", INFO(0x9d7019, 0, 64 * 1024, 512) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) + PARSE_SFDP FIXUP_FLAGS(SPI_NOR_4B_OPCODES) .fixups = &is25lp256_fixups }, From patchwork Tue Aug 9 20:14:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 1665051 X-Patchwork-Delegate: tudor.ambarus@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=N6+fqDZ2; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=Yu+I6VTD; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M2PTR3fxgz9sGk for ; Wed, 10 Aug 2022 06:15:53 +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:References:In-Reply-To: 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: List-Owner; bh=JJIRbcX8vGoZGRVHgLiAxU4RksbLRqsPac0GhuendXM=; b=N6+fqDZ2snZj+b CLnYnqNQhRpnJFpMjm06snSnyn7sTXT0x5RC3ROohIfTH7fsJ1wm0xSyuUz7/TCeV/AXoRUip1j3K g3L598IGeT9ejDGfLX16W84lmc3tQWwZFqd/ur277HFtMwcGvyUQognxwqx61V3/XnIDkilGFN/LK 43eqRFEADj45dIBmwTNrT+8IyxnOeHbx/Edt76gXsYnrzuelmon/bSP/d+BL5T8jLSBUFYWKHfAqW 6rREkwrBvfbh51uC+BUAPjP1vaaZ65KTTeSKa14pwM/GHz5b3XNGNod4iAmtMTaInFkJwedsfTqRy hIi/0/gmZlBuQD57Dt+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVd0-006B82-Nl; Tue, 09 Aug 2022 20:15:02 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVcy-006B5N-14 for linux-mtd@lists.infradead.org; Tue, 09 Aug 2022 20:15:01 +0000 Received: by mail-wr1-x432.google.com with SMTP id z17so15504841wrq.4 for ; Tue, 09 Aug 2022 13:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=aYM+SEPG/7AeXfBir1sz3Jj6H6PWY6S17v6O/XAxZQU=; b=Yu+I6VTDeglbHhXcc4OhPmlmHty3sSwuan4B8e+IiRLJOz6S55SuTJU9xiqRVUuExg 78rQt3Ujcw6VBgMb4oDdXIXsbpeWvC42WuAMehz4M+b7oXARsw0q039dfqylRYkzS0rP Kg+ejclj8nUkoEcinIiuasxtGVtx4bQV9egkEg5do/+QCQDdGJ3S4GbSYuPflhjHo/xQ qp0zBxUHMmfLHncXKLRBAjREiu5aiFK/W0Bpw1I7YL8HCscDu7SSnAUToZQHY8J/d+YZ yBbFjoJY9UpcyjzX54xjWAytGZPe8JZkQOwaLzfnxQ4OhDq2dach2rOPqjfh1IJGFvuH f/Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=aYM+SEPG/7AeXfBir1sz3Jj6H6PWY6S17v6O/XAxZQU=; b=DEiJT1weNcI5KYe3HESHFH0zgwmEzcMSH45qTD5kj9aYtfDZFp1MoLvCLjDFyZYgyD GkIevND1JlISvy9wg05JpCCkAIBtnLv+xvkVW1sfkUlZ0TtjoDdzXRnzFylkK19pjHYZ 278oZljoSBHeN7NqahzacZc7YMqbtiG0QNIYfd8oha30ujCHBT19nRztqSogDOjvyjE4 7KaT8B2lu2llTXsVifJm6OmhaAlVmMFhh7nD2Ptlxj18F4WQZ9OeBfjYUrrAbhWV4oXw J3szibxgDep+B2uY3H08+KOIuB19gHapSm6tDSiVqC/LuSJX+TIZQ+up+ysFCX6BBsOb 2aaw== X-Gm-Message-State: ACgBeo24cwTnQxW+uLdmwO0XdywmTHn5AncK8W5sVdIUFcEQwPiJrZcX cksL/MYRHLp6T+71Es6jkeHC1A== X-Google-Smtp-Source: AA6agR70SagFhodtAdqWPBrXvzFjM78jJIg4F1hRUfV2yVHrJUrMmqUzPizh7p16F7PoiEiUUcWfMA== X-Received: by 2002:a5d:5964:0:b0:222:ed7f:4418 with SMTP id e36-20020a5d5964000000b00222ed7f4418mr5640931wri.133.1660076097720; Tue, 09 Aug 2022 13:14:57 -0700 (PDT) Received: from debian.office.codethink.co.uk ([2405:201:8005:8149:e5c9:c0ac:4d82:e94b]) by smtp.gmail.com with ESMTPSA id q15-20020a7bce8f000000b003a53e6c5425sm24041wmj.8.2022.08.09.13.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 13:14:57 -0700 (PDT) From: Sudip Mukherjee To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: greentime.hu@sifive.com, jude.onyenegecha@sifive.com, william.salmon@sifive.com, adnan.chowdhury@sifive.com, ben.dooks@sifive.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v2 2/3] mtd: spi-nor: add SFDP fixups for Quad Page Program Date: Tue, 9 Aug 2022 21:14:27 +0100 Message-Id: <20220809201428.118523-3-sudip.mukherjee@sifive.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220809201428.118523-1-sudip.mukherjee@sifive.com> References: <20220809201428.118523-1-sudip.mukherjee@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220809_131500_131041_EF28473E X-CRM114-Status: GOOD ( 12.41 ) X-Spam-Score: -0.2 (/) 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: SFDP table of some flash chips do not advertise support of Quad Input Page Program even though it has support. Use fixup flags and add hardware cap for these chips. Signed-off-by: Sudip Mukherjee --- drivers/mtd/spi-nor/core.c | 9 +++++++++ drivers/mtd/spi-nor/core.h | 2 ++ 2 files changed, 11 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:432 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org SFDP table of some flash chips do not advertise support of Quad Input Page Program even though it has support. Use fixup flags and add hardware cap for these chips. Signed-off-by: Sudip Mukherjee --- drivers/mtd/spi-nor/core.c | 9 +++++++++ drivers/mtd/spi-nor/core.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index f2c64006f8d7..7542404332a5 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -1962,6 +1962,12 @@ spi_nor_spimem_adjust_hwcaps(struct spi_nor *nor, u32 *hwcaps) if (nor->flags & SNOR_F_BROKEN_RESET) *hwcaps &= ~(SNOR_HWCAPS_X_X_X | SNOR_HWCAPS_X_X_X_DTR); + if (nor->flags & SNOR_F_HAS_QUAD_PP) { + *hwcaps |= SNOR_HWCAPS_PP_1_1_4; + spi_nor_set_pp_settings(¶ms->page_programs[SNOR_CMD_PP_1_1_4], + SPINOR_OP_PP_1_1_4, SNOR_PROTO_1_1_4); + } + for (cap = 0; cap < sizeof(*hwcaps) * BITS_PER_BYTE; cap++) { int rdidx, ppidx; @@ -2446,6 +2452,9 @@ static void spi_nor_init_fixup_flags(struct spi_nor *nor) if (fixup_flags & SPI_NOR_IO_MODE_EN_VOLATILE) nor->flags |= SNOR_F_IO_MODE_EN_VOLATILE; + + if (fixup_flags & SPI_NOR_QUAD_PP) + nor->flags |= SNOR_F_HAS_QUAD_PP; } /** diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 85b0cf254e97..7dbdf16a67b4 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -130,6 +130,7 @@ enum spi_nor_option_flags { SNOR_F_IO_MODE_EN_VOLATILE = BIT(11), SNOR_F_SOFT_RESET = BIT(12), SNOR_F_SWP_IS_VOLATILE = BIT(13), + SNOR_F_HAS_QUAD_PP = BIT(14), }; struct spi_nor_read_command { @@ -520,6 +521,7 @@ struct flash_info { u8 fixup_flags; #define SPI_NOR_4B_OPCODES BIT(0) #define SPI_NOR_IO_MODE_EN_VOLATILE BIT(1) +#define SPI_NOR_QUAD_PP BIT(2) u8 mfr_flags; From patchwork Tue Aug 9 20:14:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 1665052 X-Patchwork-Delegate: tudor.ambarus@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=Y1+ROP1d; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=gEw6cjkx; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M2PTw6cG9z9sFs for ; Wed, 10 Aug 2022 06:16:20 +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:References:In-Reply-To: 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: List-Owner; bh=vwEfYaZ6/ROTee/X8NWzPxrX+TBkxdI1tr+VQhe1fb8=; b=Y1+ROP1duiynQ6 5AowsFHXtUDn5913TDxuWtdSP1flvwu+H5n3Grr3rzJFTDvoP5XSblwMkmvKvmQNsfh6sco7Y2C9f WovANwqdapB58jcyb9c8ZeNq8xWTwwE0CCbo2UNdTTwVQI2CBZc0hPRE4aT6qy0QZgpKMEln31IYP krQt7jebaqF3cM5aZkKHciP7AsofVMLsd586f241Pxuo+YxaQW/Z51NYO8lJV6wbqkLh+hGXhZ7go BKkClhAPUBgeSBEtJTmy0+zubcQ94FW6r1Uz3Q3HM9ZMA+a9cuhgDCBFRIVcX85f6sxYwseGd6rsC bkzOra2+fmRbOdcaqVtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVd7-006B9u-3m; Tue, 09 Aug 2022 20:15:09 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVd4-006B8j-P6 for linux-mtd@lists.infradead.org; Tue, 09 Aug 2022 20:15:08 +0000 Received: by mail-wr1-x42a.google.com with SMTP id n4so13740456wrp.10 for ; Tue, 09 Aug 2022 13:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=fht4T02AJsm7RzN5fUBiXhu56qdywVISHR5D86D3Apw=; b=gEw6cjkxWXxas2xdn6RuNkbfUeSd9bj8xuWQIspShEkoneStEVjS2ZX+o4lzyl7oAc uJSg5WyRCCUxRPad0T+BR/WmkzdFsCtcVHUvJsQaixLFAaNeJGZsS168NzCBcjKu8KIO II4sv3LzNOyCTNZC7PUoWFa7qg95HWKTZMJxy5+SvCId/K975iyN7mZSxPCR9tlNKlGv qwhvXDBpT+qG+VdAJ5CeiGvrrQxXiwqjkAKVkThMa32qst0Qxnhaxp1kG8Gm45ETlwDj 5XXGmw6j1NQJ0SoQXDP9PV0a77HlHiqyPIvyFIAYIAM7w1mOF4XyQTyxkhQ3Dn5Rcpzy w4/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=fht4T02AJsm7RzN5fUBiXhu56qdywVISHR5D86D3Apw=; b=7ZpTiNFFLo7kRp5Wd3SU+sqBLvQkrTqR3KFK5WERUU3AIRUqCQtUuU1RPEx8rD7r6K 60ZACVvJg4+YrKNJP0lbxGvUBa/wPhBFRxDaVDRuVHl5u57baUbUAVblBscn4898ODE/ J+QJo1xzQkWSPNQqpApdfarWh/0d/6wwb8DcjTmyI8H4aRFCZ8APaHVrT8EPJ/x3tvg2 nrEVeFt51n9RX133S18d0+uJRwNagN2/OEz5FrQGHZ4M+/XIj4lJ2VBiEEn5P1iDKjIJ JoDBunok0CaUAqk7QtxdpEbSbb0GjW8CXWEXtQIurAUJQy1fU9HPxqcbuwGw+vwfL6z5 tfRQ== X-Gm-Message-State: ACgBeo0gIUVDFPk6kj0T1nSRAnRsv0MKSQmozoTAWO7OznT62hEayQKx wcffFRY3OE71SnwsnpPtu9Hg6w== X-Google-Smtp-Source: AA6agR4ob8fPym4LPeE8iqiDyhAvDhm1vefWb8U7o4ei9PRaZwpcMvL6xB0SHnLWnkB/tGwNcMzo6A== X-Received: by 2002:a05:6000:1f8a:b0:223:796f:c1ae with SMTP id bw10-20020a0560001f8a00b00223796fc1aemr179721wrb.514.1660076105156; Tue, 09 Aug 2022 13:15:05 -0700 (PDT) Received: from debian.office.codethink.co.uk ([2405:201:8005:8149:e5c9:c0ac:4d82:e94b]) by smtp.gmail.com with ESMTPSA id q15-20020a7bce8f000000b003a53e6c5425sm24041wmj.8.2022.08.09.13.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 13:15:04 -0700 (PDT) From: Sudip Mukherjee To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: greentime.hu@sifive.com, jude.onyenegecha@sifive.com, william.salmon@sifive.com, adnan.chowdhury@sifive.com, ben.dooks@sifive.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v2 3/3] mtd: spi-nor: issi: is25wp256: Enable Quad Input Page Program Date: Tue, 9 Aug 2022 21:14:28 +0100 Message-Id: <20220809201428.118523-4-sudip.mukherjee@sifive.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220809201428.118523-1-sudip.mukherjee@sifive.com> References: <20220809201428.118523-1-sudip.mukherjee@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220809_131506_838634_4CFDD4C4 X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -0.2 (/) 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 flash chip is25wp256 supports Quad Input Page Program but it is not discoverable from the SFDP table. Enable the fixup flag for is25wp256. Signed-off-by: Sudip Mukherjee --- drivers/mtd/spi-nor/issi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The flash chip is25wp256 supports Quad Input Page Program but it is not discoverable from the SFDP table. Enable the fixup flag for is25wp256. Signed-off-by: Sudip Mukherjee --- drivers/mtd/spi-nor/issi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index 8b48459b5054..36e6c4a1d022 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -72,7 +72,7 @@ static const struct flash_info issi_nor_parts[] = { NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "is25wp256", INFO(0x9d7019, 0, 64 * 1024, 512) PARSE_SFDP - FIXUP_FLAGS(SPI_NOR_4B_OPCODES) + FIXUP_FLAGS(SPI_NOR_4B_OPCODES | SPI_NOR_QUAD_PP) .fixups = &is25lp256_fixups }, /* PMC */