From patchwork Thu Dec 1 21:27:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Barrett-Morrison X-Patchwork-Id: 28554 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp494706wrr; Thu, 1 Dec 2022 13:30:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf47KSZ68ckr/zWDC+brq6okcPTm7WjPG/VoxDUOwlcTBpoKIZbD0qNx1M1Nm+DeZKyI6HVq X-Received: by 2002:a63:1b17:0:b0:477:de14:988b with SMTP id b23-20020a631b17000000b00477de14988bmr30939924pgb.131.1669930201746; Thu, 01 Dec 2022 13:30:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669930201; cv=none; d=google.com; s=arc-20160816; b=ebwQRlMCqICRiw0P2HY2q6XL8ITWCzSkWNp8GihBFrIh/gRiG02+jnBvllb+HhjXaU sfJGmh8SSC7zAUdcXeqZt9ofN+Spvup8v7GUQl/9jIdCCmRK+8Tb3NkZa7p3Dpr5WGOB GNxeV0nYUAVDUvVzKIGXE9hkbAoRWdWzs0E+zfh8fsahogRFOGdcG9TB8hwG/6rnFaU/ +2FlojBNeH7oPoJm77Y86Kg36m9HJtt6saIqoBqg86pBEqX7Ry/mGFBOOjtbgy1lsOZx Y15nNiOihjYTW3MI90n/itvU82gXFW7/ir0PEGRjvF/kxj4dkt6z3zwO2AdMjCnZmRNW 0DFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=kFCBGy/PHSqulvVt1jN7WYpo1L/uAw3+z6frKWBhRoc=; b=pmWaoaNJ7xxQO9KoJ21O2u61j+3tJmfB1UZKiem6nj11GvwroYpFokR6ExLsKk8zXa 3Cwo7gOQH5V9feTkq1rSc86nQe3r5MJBOOCa1lazA6wpkK7kNJKWdpnQJeKIQsmdhOE+ 9a4aRB5DVfch9Fqe7C6NmAh8+ZWwyBqfnYQoiv123qqNxhOpUW+wV1reeT+09mO62BsS XkE+Bec0EFn7YxBp0gOAyRhk4N9UH7Iv5oA25Qxydvxot4DVeGkK8OYZYDup7Jzc6YHZ WFIW1v0vLbx/tM7WNqRikCHFJOd+tX/ZDFKIkvtMjR3t3n9FgcW5nzQVU7jmensWie/E 9jUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b="3CXh/w9V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo3-20020a17090b1c8300b0020ae29877besi5860559pjb.20.2022.12.01.13.29.48; Thu, 01 Dec 2022 13:30:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b="3CXh/w9V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbiLAV2C (ORCPT + 99 others); Thu, 1 Dec 2022 16:28:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbiLAV16 (ORCPT ); Thu, 1 Dec 2022 16:27:58 -0500 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58A061DDCB for ; Thu, 1 Dec 2022 13:27:55 -0800 (PST) Received: by mail-qt1-x832.google.com with SMTP id jr1so2661602qtb.7 for ; Thu, 01 Dec 2022 13:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kFCBGy/PHSqulvVt1jN7WYpo1L/uAw3+z6frKWBhRoc=; b=3CXh/w9VqvcrpteYx9ZB6drtCGMaYRyRN3VkzHIHJUjgctE/YIBhqFIb1Q8LDz2obG 03sUPuMoq04AewWPt24FcyfTfGVob9U1O5iUUfZXHA+VJQ76jR3N2w7aERMHjFA3PMw3 bwA5ZBI30wBg4Vvgz3HKRXFYqWdXRnK/17ml4D7Oa344Tvlrd73XcEaLHszpAOkw4KWJ waTX2CZoNpddDf02/2M4qEcqBrCFxf6a0YiQcq1ZXuRcSqRAQqkyW66jyw3NgqdprRi5 nQ+dGC9UwbsUp0bnoliqhRM7jD5JzprvH4CIN8ixgoiw6sArPUNONhgXPNAgXhSSbQtk lpRw== 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 :subject:date:message-id:reply-to; bh=kFCBGy/PHSqulvVt1jN7WYpo1L/uAw3+z6frKWBhRoc=; b=5FYcy5vQcQ7P6ZrV55M/3OZjTS5CcSObDRBkoazGNoQHX2lwYIuYohVtL1TaXff/xt 2di7vHCKBpIaXbzSa5ks/1wueFe5hUEAnegAiBOAAR+X62mRzj/VlPhKrbPn9Pwt9t9S z5KKUJubzU4w7L/I6rEfzMhGMWhrIDsMcOfKk6pY6HhTcPd3+PCTqt2HQnpLquTGQDPr m3jbutS2HlCKhglxP9prDOa90qOqvrb7tmSxV02dd0ihN0o29w6snm558xba0A+BrVpn Ad4md+8NwAuoCLEOuL5suKANLxmi6yEePZftHeIxNP0Ojo5VmcpH5iajfYMGIKnVAS+g GWBw== X-Gm-Message-State: ANoB5pnFEJpKl1RA8NU7ap142vFoxO+ScR9qmK7meH5bEXTzG9+8ukqw ofJfAzKHMMjyr/OipD5A6sikrQ== X-Received: by 2002:a37:6d7:0:b0:6fc:a68a:64b8 with SMTP id 206-20020a3706d7000000b006fca68a64b8mr3852069qkg.341.1669930074446; Thu, 01 Dec 2022 13:27:54 -0800 (PST) Received: from nathan-ideapad.. (d-75-76-18-234.oh.cpe.breezeline.net. [75.76.18.234]) by smtp.gmail.com with ESMTPSA id l15-20020a37f90f000000b006fc447eebe5sm4071321qkj.27.2022.12.01.13.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 13:27:54 -0800 (PST) From: Nathan Barrett-Morrison Cc: nathan.morrison@timesys.com, greg.malysa@timesys.com, Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org (open list:SPI NOR SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 1/3] mtd: spi-nor: Extend SFDP 4byte address instruction lookup table with new octal modes as per JEDEC JESD216F Date: Thu, 1 Dec 2022 16:27:48 -0500 Message-Id: <20221201212750.267721-2-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221201212750.267721-1-nathan.morrison@timesys.com> References: <20221201212750.267721-1-nathan.morrison@timesys.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751048731075140400?= X-GMAIL-MSGID: =?utf-8?q?1751048731075140400?= This adds the new bit fields for reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D programming: 1S-1S-8S, 1S-8S-8S Signed-off-by: Nathan Barrett-Morrison --- drivers/mtd/spi-nor/sfdp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c index 2257f1b4c2e2..e4e87815ba94 100644 --- a/drivers/mtd/spi-nor/sfdp.c +++ b/drivers/mtd/spi-nor/sfdp.c @@ -953,11 +953,16 @@ static int spi_nor_parse_4bait(struct spi_nor *nor, { SNOR_HWCAPS_READ_1_1_1_DTR, BIT(13) }, { SNOR_HWCAPS_READ_1_2_2_DTR, BIT(14) }, { SNOR_HWCAPS_READ_1_4_4_DTR, BIT(15) }, + { SNOR_HWCAPS_READ_1_1_8, BIT(20) }, + { SNOR_HWCAPS_READ_1_8_8, BIT(21) }, + { SNOR_HWCAPS_READ_1_8_8_DTR, BIT(22) }, }; static const struct sfdp_4bait programs[] = { { SNOR_HWCAPS_PP, BIT(6) }, { SNOR_HWCAPS_PP_1_1_4, BIT(7) }, { SNOR_HWCAPS_PP_1_4_4, BIT(8) }, + { SNOR_HWCAPS_PP_1_1_8, BIT(23) }, + { SNOR_HWCAPS_PP_1_8_8, BIT(24) }, }; static const struct sfdp_4bait erases[SNOR_ERASE_TYPE_MAX] = { { 0u /* not used */, BIT(9) }, From patchwork Thu Dec 1 21:27:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Barrett-Morrison X-Patchwork-Id: 28556 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp494998wrr; Thu, 1 Dec 2022 13:30:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf7b/yd3LGfpGS/fZbWcbMWTXZfCaBMgN0atSYFT6oDexxYgT+r2aMu8a7TGfZ8OBEHvUdm5 X-Received: by 2002:a17:90a:4302:b0:20a:e469:dc7d with SMTP id q2-20020a17090a430200b0020ae469dc7dmr69821526pjg.97.1669930240854; Thu, 01 Dec 2022 13:30:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669930240; cv=none; d=google.com; s=arc-20160816; b=F5mIz2L1ej9Xs3CyGlCs2FFk9wc5mJWRfQAQSM4225vfxQzQKqR8J42uSJZ40gABNU Bbm1YdQXtBk+XdMWcZpuINpoRJ77vXCrjeQpwLTF0dFfL6mU842zUQp7z6s0MkezhnZV u6NuVzUufD1z1H9cmc5VAwjGGVox7pCDhYwiD81ld/PGdZYUjrDG7aTrcKzjZn19ygcK uHR6mF300SvcTr/WCYdgSiVbPGp7rO5X/HlNIvr7FyxFs3JPuc6POwi/68xl0VdIOwb1 HcacZxXCeGfOkOHI75JC1D5NqHM33DaDY/7SSs4yE/XFmANOztiwRv9U40Yelbiezd6P AZAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=VEyo4vlQR3u2sX38LTBhVX1Aa2arb17/54UJyym5vVg=; b=IfPbUEQbdI23hc5BZzl4+Ko+K9DLpHaKBTDx3opLvoTUsiXfvCE5e85tYh+BJFhta0 mKzMPTWMzMhOGv98qBIxcWmMhsPs0DOFENNptYXQgRHeKFK4WZGOVCkxLClV7ABk7fAs mxlzT2kJSAe+GQwXifDZOEJo8JG+Xo33YcDHQ//WsqkSNU9N29t7Gk68Qndi7KqIk+j+ wKfV6iZE0fZFhHFUSTDrOmi7vGHygtovqWXCVNdeL0FFDeM7NuLTNLCy1gtKiqs3uPhf mqbiXpC9Aft6zQezAmjDxvXLhuXtNGYt3WXyEUdfStZGORDJKKppoWQWjE1XJyruVEPS hEfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=EWk5IELM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a056a0022d100b005251aec9b1esi5934087pfj.225.2022.12.01.13.30.27; Thu, 01 Dec 2022 13:30:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=EWk5IELM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230445AbiLAV2K (ORCPT + 99 others); Thu, 1 Dec 2022 16:28:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230503AbiLAV17 (ORCPT ); Thu, 1 Dec 2022 16:27:59 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9637345ED2 for ; Thu, 1 Dec 2022 13:27:56 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id jr1so2661676qtb.7 for ; Thu, 01 Dec 2022 13:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VEyo4vlQR3u2sX38LTBhVX1Aa2arb17/54UJyym5vVg=; b=EWk5IELMmlI38n1uhUacmXE6nI16ZieyrjDtXucqKGOoILjkZCVKd7G5MmpoHtVUDR FODUAoMPinQwe7s/RYoC24pIP5eSH5ct7ktaljx7Ne+L+GrC7Zw9P1lbpqcNIctg7Oys K5MPpKo9YR9fnOMDN/QtxzqAAqAFeoUA8LuDQM/xMlxw4jadGSbkKxbwBV8M2Ypa8+HO fyZ56Xplt1NT6SFye1XZpVCIYFEiCmoA7TZeQwcNZKkCy3GQJkYiTY7N8Qzco3MdgL+Z BJexh6if4a8RuEKHFOxVaUqXIMFiqiYJ/HMg6j1NhyhdRS/lLtn+FvKyEXmCRrosq6hB UQGw== 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 :subject:date:message-id:reply-to; bh=VEyo4vlQR3u2sX38LTBhVX1Aa2arb17/54UJyym5vVg=; b=gqN/M/IXinX4V7vw3oLGZS+owYGaCjNXXrZcUoHiZF+Ckm4Zs1exRFiKY7oe10kMtP CZQT2c4dGZbRZYI9OSJihAzl2IlySptCaCX1kem3xWRpnB4GlW6kf+27OqyN3tGvfrIl 19p4lLpET4jEnsdWqnu2rzwn9FIsp34BQM4mxaDttI4hdM8hCapCQ0vMsDVekMDc1yRM LA96zAlWMw/SwGlw4UnbljyL5L8GDzn5ykg4o0Qgj4ln1iSmvTxrtTsWXqv2LvxDDc9Z 5D5f2wrijlfJlswzpky3vkutXJSsTzmmA3zcLKU64Ml/cr4a3MGCg/vw6inZfSETMUEK amyg== X-Gm-Message-State: ANoB5pm8Dpj15vCUKe41N2a+rdxDYzPQusBu9vVh/CDOnc9/I2/5iwaQ L0m66bnMN+y/dIBH+hdUP2r/eA== X-Received: by 2002:a05:620a:1098:b0:6ef:a7f:e09d with SMTP id g24-20020a05620a109800b006ef0a7fe09dmr61482350qkk.109.1669930075721; Thu, 01 Dec 2022 13:27:55 -0800 (PST) Received: from nathan-ideapad.. (d-75-76-18-234.oh.cpe.breezeline.net. [75.76.18.234]) by smtp.gmail.com with ESMTPSA id l15-20020a37f90f000000b006fc447eebe5sm4071321qkj.27.2022.12.01.13.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 13:27:55 -0800 (PST) From: Nathan Barrett-Morrison Cc: nathan.morrison@timesys.com, greg.malysa@timesys.com, Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org (open list:SPI NOR SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 2/3] mtd: spi-nor: Add additional octal-mode flags to be checked during SFDP Date: Thu, 1 Dec 2022 16:27:49 -0500 Message-Id: <20221201212750.267721-3-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221201212750.267721-1-nathan.morrison@timesys.com> References: <20221201212750.267721-1-nathan.morrison@timesys.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751048772247778036?= X-GMAIL-MSGID: =?utf-8?q?1751048772247778036?= This adds some support for searching a chips SFDP table for: read commands: 1S-8S-8S program commands: 1S-1S-8S, 1S-8S-8S Signed-off-by: Nathan Barrett-Morrison --- drivers/mtd/spi-nor/core.c | 8 ++++++++ drivers/mtd/spi-nor/core.h | 5 +++-- drivers/mtd/spi-nor/sfdp.c | 8 ++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index bee8fc4c9f07..2f882608abc6 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2359,6 +2359,13 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor) SNOR_PROTO_1_1_8); } + if (no_sfdp_flags & SPI_NOR_OCTAL_READ_1_8_8) { + params->hwcaps.mask |= SNOR_HWCAPS_READ_1_8_8; + spi_nor_set_read_settings(¶ms->reads[SNOR_CMD_READ_1_8_8], + 0, 16, SPINOR_OP_READ_1_8_8, + SNOR_PROTO_1_8_8); + } + if (no_sfdp_flags & SPI_NOR_OCTAL_DTR_READ) { params->hwcaps.mask |= SNOR_HWCAPS_READ_8_8_8_DTR; spi_nor_set_read_settings(¶ms->reads[SNOR_CMD_READ_8_8_8_DTR], @@ -2514,6 +2521,7 @@ static void spi_nor_init_params_deprecated(struct spi_nor *nor) if (nor->info->no_sfdp_flags & (SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_OCTAL_READ | + SPI_NOR_OCTAL_READ_1_8_8 | SPI_NOR_OCTAL_DTR_READ)) spi_nor_sfdp_init_params_deprecated(nor); } diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 85b0cf254e97..7bc1cde049b7 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -514,8 +514,9 @@ struct flash_info { #define SPI_NOR_DUAL_READ BIT(3) #define SPI_NOR_QUAD_READ BIT(4) #define SPI_NOR_OCTAL_READ BIT(5) -#define SPI_NOR_OCTAL_DTR_READ BIT(6) -#define SPI_NOR_OCTAL_DTR_PP BIT(7) +#define SPI_NOR_OCTAL_READ_1_8_8 BIT(6) +#define SPI_NOR_OCTAL_DTR_READ BIT(7) +#define SPI_NOR_OCTAL_DTR_PP BIT(8) u8 fixup_flags; #define SPI_NOR_4B_OPCODES BIT(0) diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c index e4e87815ba94..e1b7547bf81e 100644 --- a/drivers/mtd/spi-nor/sfdp.c +++ b/drivers/mtd/spi-nor/sfdp.c @@ -1089,6 +1089,14 @@ static int spi_nor_parse_4bait(struct spi_nor *nor, spi_nor_set_pp_settings(¶ms_pp[SNOR_CMD_PP_1_4_4], SPINOR_OP_PP_1_4_4_4B, SNOR_PROTO_1_4_4); + if (pp_hwcaps & SNOR_HWCAPS_PP_1_1_8) + spi_nor_set_pp_settings(¶ms_pp[SNOR_CMD_PP_1_1_8], + SPINOR_OP_PP_1_1_8_4B, + SNOR_PROTO_1_1_8); + if (pp_hwcaps & SNOR_HWCAPS_PP_1_8_8) + spi_nor_set_pp_settings(¶ms_pp[SNOR_CMD_PP_1_8_8], + SPINOR_OP_PP_1_8_8_4B, + SNOR_PROTO_1_8_8); for (i = 0; i < SNOR_ERASE_TYPE_MAX; i++) { if (erase_mask & BIT(i)) From patchwork Thu Dec 1 21:27:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Barrett-Morrison X-Patchwork-Id: 28555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp494823wrr; Thu, 1 Dec 2022 13:30:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4PULCg0mH1GulB+xb8zrpJeBcSOsLrzm5TOfdXt40DAyNCdg4xz2Su+CeRl9G6XP4w+Vau X-Received: by 2002:a17:90a:7183:b0:212:ede4:3c19 with SMTP id i3-20020a17090a718300b00212ede43c19mr73731149pjk.151.1669930217720; Thu, 01 Dec 2022 13:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669930217; cv=none; d=google.com; s=arc-20160816; b=ZuNlV6nTMfTcKm8nz0LVZTIuQOrOzlSkfZp8IUhZip4AvnpdsirpnfbKLxwZ2Bn+bf cdJWYWt8m5n57Bb4ZfVf7RPlHyYJ6FCB8W4mKDHzaIzbjqaK7nPjCXwBrdAhBEcye8nt Uoe4ddaijwGO82uPtApAnt8O6rAzYnLt/zmbx3XlAynhEVRbKGeDCGCC/c13qW/yWnK2 do8ZXPDqATs5n64HaIeANp+H5CaI1wWO4uHL27J/5++THD1NW05mnR+Zz4/Cc1cYF2H/ zIolWAVOYeD3bVAncBDf4+y7WTTJs1N1uwnm2qXk8TACrmROaY7teEZtORuaZG3XD0bZ lCEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=li+eohcDsrqZE5thNT9n12zEt/TyQONsMqyuNuEAzg4=; b=a1AYgU3Q+dnM9ej1mnWt8oWgw7YBUQYU8mkngdL2m2GBhL2aXx0GDUSBUJZ3F5iDGa 5DZ6EIihqgefO+36EJmwDphg733OnD7g6kO01bCTZg7M1uTNkryYsYX6BHNw23wMw4aQ 2BorEMyi2FR4glQ9AQUW1QTWOgglB0/eXZW+cew+FAYbAViXmgopLEUGik1Hht9UMOTf +mjtwfTk63yPVAqexpLT5W3/pXTAyIf6aaXnlPZIzj0jNR99539OdfhNwbXevVcDt+sL KXYR+8yleNpzTliHJuo0qGXAY4WfQVTtpJHivdoA1CXH1QEhi8gUZSxJR1WNyqpg+7/d SQjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=PjVzQkoE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a63d441000000b00476f3facb4csi5456836pgj.221.2022.12.01.13.30.02; Thu, 01 Dec 2022 13:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=PjVzQkoE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231135AbiLAV2H (ORCPT + 99 others); Thu, 1 Dec 2022 16:28:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbiLAV17 (ORCPT ); Thu, 1 Dec 2022 16:27:59 -0500 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 364261FF8E for ; Thu, 1 Dec 2022 13:27:57 -0800 (PST) Received: by mail-qt1-x829.google.com with SMTP id cg5so2649977qtb.12 for ; Thu, 01 Dec 2022 13:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=li+eohcDsrqZE5thNT9n12zEt/TyQONsMqyuNuEAzg4=; b=PjVzQkoENto/e487Z27Cxxpm4kMorb2W7vhofH1USRr3gHeMGX7xgxidNv6FvEoRUv K3syUnaPBXdo28aVd+NnOf5D1NiOKyH8lKuIfhKRQLmcZo43RXPp5e/XR2jfPs7Q0/xi 3rYByZ/zu1DikWacoISBNi07ebXBx/H95oysyXr8MDuC9LY3uRncMC8MmVMUWc1dSfSv P4p3im5osoIRnplNXe8WHd8OK4IUSkUMNIlymWtLgPzkJ2SSF4BPiLZ3427ZTZlYAy3O KSZYMaePC29JfVkG93xmOjJ87Bb7ZnmqA8QX1i3xkEBuzwWVK1a2Ks9cpl9IPaDo3gXz ho0g== 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 :subject:date:message-id:reply-to; bh=li+eohcDsrqZE5thNT9n12zEt/TyQONsMqyuNuEAzg4=; b=bidcxclml41YPqlai3pjUjaorWcEGRiHkBq+DXruBupqUEPTZ3zdC+sWpYTHeWKFUm OcW+ViFiIu3GWR9i0DAIsg/3T2f5FX4IqDBkX3prMXYV6OczeNmRPXMoPp0KsphARkVC qbllf5zd7moPQgMwJCp6gBMUMdwc4WoVDUzUka1NMW5ltqI8cZNARYm/wMRshP6sNQgS 2YDP1ChIEk5vMUXsiRbI6QFNi6rymnTqNCNOuXyp0SAoSrBS29Blsy+2yIGU/9x4v7hr TVaafwiAFrcS+wwAHK52/RJSAP653Xtu2NGWV8dd0wLW9xGOVde/uMvmOCiIu+xjYRsj YTLQ== X-Gm-Message-State: ANoB5pnAQ+KzZxkQYOUxVHRGClLHXm7lh21xNKzuqFk2r/8nWMq4ChRB MIDDj0rNtJHUQymrV512wad8lw== X-Received: by 2002:ac8:714a:0:b0:3a6:8aa9:3b85 with SMTP id h10-20020ac8714a000000b003a68aa93b85mr10168073qtp.144.1669930076851; Thu, 01 Dec 2022 13:27:56 -0800 (PST) Received: from nathan-ideapad.. (d-75-76-18-234.oh.cpe.breezeline.net. [75.76.18.234]) by smtp.gmail.com with ESMTPSA id l15-20020a37f90f000000b006fc447eebe5sm4071321qkj.27.2022.12.01.13.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 13:27:56 -0800 (PST) From: Nathan Barrett-Morrison Cc: nathan.morrison@timesys.com, greg.malysa@timesys.com, Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org (open list:SPI NOR SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/3] mtd: spi-nor: Add support for IS25LX256 operating in 1S-8S-8S octal read mode Date: Thu, 1 Dec 2022 16:27:50 -0500 Message-Id: <20221201212750.267721-4-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221201212750.267721-1-nathan.morrison@timesys.com> References: <20221201212750.267721-1-nathan.morrison@timesys.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751048747989575459?= X-GMAIL-MSGID: =?utf-8?q?1751048747989575459?= This adds the IS25LX256 chip into the ISSI flash_info parts table Signed-off-by: Nathan Barrett-Morrison --- drivers/mtd/spi-nor/issi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index 89a66a19d754..98cc5e1d9c18 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -74,6 +74,9 @@ static const struct flash_info issi_nor_parts[] = { NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) FIXUP_FLAGS(SPI_NOR_4B_OPCODES) .fixups = &is25lp256_fixups }, + { "is25lx256", INFO(0x9d5a19, 0, 128 * 1024, 256) + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_4B_OPCODES | + SPI_NOR_OCTAL_READ_1_8_8) }, /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2)