From patchwork Fri Dec 2 13:55:37 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: 28916 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp874945wrr; Fri, 2 Dec 2022 06:04:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5xfvU5aMtQE9ZQ8/EkS3h2SLpGEg12V/CEdznUCAq3FQshbfJ3Rj0ysgZsoIr+XGUwbDOK X-Received: by 2002:a17:903:2350:b0:189:907c:8378 with SMTP id c16-20020a170903235000b00189907c8378mr23365644plh.107.1669989875220; Fri, 02 Dec 2022 06:04:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669989875; cv=none; d=google.com; s=arc-20160816; b=pd69Hw26pkakxRGelfJ7cvl3Swf9MtOWVh/Rm/zz9AdjXiPA8N9zz2iQhPkhVht92W NPzyyMPJ1tT+qBeUcamMSxtzF3WR/U85iPSq19B25axpsCrUQ4/lVs/N7yPnS7OEIEaD 4Q4X9AlIOXmvAYSgBQjhQB//aLh3QPTtJ8vWlmcktspCi8RAOww/zQI4gUVUaL+KsEWE bN1PZ3Rkix+Q9K+C9tMN+St/16MlfEZ1NUAnbnK3neiAFvaWJjtElVCZ5Ef6aoVEe4FK B3D2uRATG+xUURv9mKvPDeptSKv2SQpbucKIhJGcTRRkiVjzc/2ic5En91KPx5CyT7l/ /SCw== 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=o7Z+6wpZ9hX4SBG3n3Tvno5guqRauqwWZO6AW4FeXArq+Fku8R+S/zul0EdwzX6zJN 8P+EIzFgGa9E9HKwIWti/CE2DPKFJkFMp1zViKgY8es0NJc+SCOqmXgGjvAbaPAFmszw TLT7MFxSgqONQibPL9QGV3LGxF8cSaJPdsCEhXqQUmaJNrGJyh3LVNHGulXdxhN6e0ur Idgw6bzza1AfCnDwqUAgkVzRgmkpUCe6A5DcpfwD0j3DjvSQ1GrX/PW1v4QkHAvnKvNW muonreTUXmGs5K5s1Revrdf21/y0OdcuOR1uDs6TYz6Hmvp3jf0vJzDZDosxfpPaa9L1 6TRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=L5WmemJA; 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 a19-20020a17090acb9300b00208606154f7si6785145pju.117.2022.12.02.06.04.10; Fri, 02 Dec 2022 06:04:35 -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=L5WmemJA; 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 S233610AbiLBNzu (ORCPT + 99 others); Fri, 2 Dec 2022 08:55:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232825AbiLBNzq (ORCPT ); Fri, 2 Dec 2022 08:55:46 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF2FBE4EC for ; Fri, 2 Dec 2022 05:55:45 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id a27so5121564qtw.10 for ; Fri, 02 Dec 2022 05:55:45 -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=L5WmemJAO6bGk5YpyHsWgaHHqP8pQGgrhBueew2H9B5Ebuoy8da3D/W/R9F+NDZeiX Q1nKwO1vdtSB39YyxX5uuG4BhSutxQgLJdXYdyePxV0pyf4UhHyqMgoW1B0Ph526ZURO ZyN/xnkiLF/TdMISWsj0uIMog1cQZ2X8xFhoY/bMFrwZIiWp2PpOxFCeaVTUZQDWjgf6 hJoP5YJ7c5Ao7nWD4+KTTGOhPe6ujxfIa41ZWwy5a8saDxUfKYxcjbPs78f8LQuM7ysn q/l9orAO4UjDMjYUCDLg8DxBEUnuhlFkvcmuJ8QPapS7rT18UKjNVZyOp+eYQ4fTQzsy t7sQ== 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=T+yYX61U+19sqojiCein1GIrKzCn0D7jDlp1RqyUBmpMKUU/LoEqSvOWfMzhRYSKWs kp1dXZ4xMrRl+80f4NIvXvlt3FQ5N+uxtCjSsBrfC5gRM78hBxAadI9FBAsnsSp9OV9F ZL8eZUWtn1btVBqIrt39y0R/qBgz4UdGv9uivNwFpmHXFc0xa7pulBvAFI3VWKcdRmyb HzjRqkOAj+qC5ZZsVYBi9Fdz9IIjY0Upjvi8/2fl/bJ0cm57cE7whjWbZNhH15/h5zGW 6VX6Rl5MvV1zOBYCqgEAKS3+KD/0YKiQ3RRwNgosl27/IRiOXRrnlzEmo5a31nxWSjRp AW0Q== X-Gm-Message-State: ANoB5pnegCkX5d92tws2m2IEtJKJko/twsCG1bub47vDsAeVBWw3yZte 5XFU2egprQtgPxBM/c26Ql6Lbg== X-Received: by 2002:a05:622a:590e:b0:3a4:fcde:733d with SMTP id ga14-20020a05622a590e00b003a4fcde733dmr67306718qtb.269.1669989344644; Fri, 02 Dec 2022 05:55:44 -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 x1-20020ac84d41000000b0039a610a04b1sm4122237qtv.37.2022.12.02.05.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 05:55:44 -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 v4 1/3] mtd: spi-nor: Extend SFDP 4byte address instruction lookup table with new octal modes as per JEDEC JESD216F Date: Fri, 2 Dec 2022 08:55:37 -0500 Message-Id: <20221202135539.271936-2-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202135539.271936-1-nathan.morrison@timesys.com> References: <20221202135539.271936-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?1751111303474109719?= X-GMAIL-MSGID: =?utf-8?q?1751111303474109719?= 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 Reviewed-by: Michael Walle --- 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 Fri Dec 2 13:55:38 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: 28918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp875271wrr; Fri, 2 Dec 2022 06:05:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zGfmzjfrIVH3mphhsbK0tSR17D9nfddr6xn+VF42K3L/knZlh+hPZ6eS3bLXU2Cbb1yYk X-Received: by 2002:aa7:8f28:0:b0:574:fef6:9f99 with SMTP id y8-20020aa78f28000000b00574fef69f99mr29290530pfr.49.1669989901467; Fri, 02 Dec 2022 06:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669989901; cv=none; d=google.com; s=arc-20160816; b=gDeBuL95YZ9T5+qa1bbrdZRgL8v7pahN71MO5GwaPmqZTTuLrgA1vvVqkBio3vv33u r4byhXdghezHl88FZDRN9F4znLzwOJWxB3KYMdiXPUjn45IrIKrf142slh5cRzpncLia z8AjNBITKRG4LU3OIv0FRS54LwYT2U71P34oS2Kzf40Js0XSC+g7kGgXGuADCdB11jbu cLvI7j0Y6BgaTJq25wVfwA4WSPcrZkxoHe4J+LscxGpqMOmBiWCd8Wjm0GYJjY1uNurF F/jHLot5lEgdPqzC3E7lwPtiywjkJHi5Vq/NQY9ZQw4UyHwCo18i79P8bxB3aMcBPPHV 8RFQ== 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=ZGjb7Uqfw2TGFRhH8/MDvnTU61at8sAfSWXXepkn37Q=; b=XcnfLyxucbfuPbCsTrWcQybDbciZ1UeADgjjA79jycAdSlfAfkyXvrUmh+VRcj9VlJ cKPXIgr0WBbl6W9x7i24RKkaBW12talrYGus+Y2d2djsYuZBJrx0z1/S6RVFxGUUyxH2 750zVSVvF5WHRG8fOIqYTozJe/zuhjDTuki8IjGQP0h5ARrvDTPRczhH0vnt9Eaaxky8 XSkwGtEe1kT5pgCYWfrLExX+2sV6mSeHXsk6r/fcBgsRrQ0pMoK0f05wRlbXn0ZnEONC JzFOGa0Z16zeWdzeueWjgXYZqR1J1dLwwJmUKZa2zMxUCMGJ0YpVWBz14vN4zk9Q0ky0 D6mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=uiLT3I4v; 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 lw9-20020a17090b180900b00218a8a158f5si11997269pjb.161.2022.12.02.06.04.28; Fri, 02 Dec 2022 06:05: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=uiLT3I4v; 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 S233627AbiLBNzx (ORCPT + 99 others); Fri, 2 Dec 2022 08:55:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233582AbiLBNzr (ORCPT ); Fri, 2 Dec 2022 08:55:47 -0500 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89943B957C for ; Fri, 2 Dec 2022 05:55:46 -0800 (PST) Received: by mail-qv1-xf31.google.com with SMTP id u10so3442647qvp.4 for ; Fri, 02 Dec 2022 05:55:46 -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=ZGjb7Uqfw2TGFRhH8/MDvnTU61at8sAfSWXXepkn37Q=; b=uiLT3I4vgcsnSV/JwiTu0ZuYVwmaObX0mKCt6uVP215+MyIgPPlR2p9kLRQalYp964 OHyPYDm2UevA8Pu+qA3v5CKAU73uTqt2Zw7EgPb0Dq4+5T1oN1/m6pM5qxL3g8sLffh4 mlnti0ZmLHEIiM0gEDUEnnizIGBFlm792Z/mysV4DJQERCfG62ZlLxY5NngJXoq637IV m3fyj9RIrWiuCHfgDkZoy/9/aDnpwl6H36vS2gVE937kEq2AfDo3YDlY5ZFUoxR4YOD2 ZUVedzGjYndMrQXC4xlTwEyG0sM8S/XeE+RRPkSBICPEDjZpgwxRGFK75EonDG21KNlA l5kA== 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=ZGjb7Uqfw2TGFRhH8/MDvnTU61at8sAfSWXXepkn37Q=; b=BVUsd+00aea4rkKxpIb1gfxsjcIms2OTR1JHj5B0j0uNupDZaz4jLEUUU3m6qLMdXW t5BhK/TwTI59mqQg1D83DRHG1lpjKN/j4QlFUEs+nQ7IZMDfuuKmDtgv8nmPuVmPNikE ztSO8oIGMAv8nX+vgc0yk07qtolB/0dVtSQxs9Xa+ynUedwcneSPgBIMJr9Wl9HzZSUD GekFbXiF1Gz1hVk/4Bz3OGcmiNMjzF4A0UCaERB9rTA/mFR215z0xHeM6IYarPPC5//m 7ZJhDldnDYrAqi+8wgqUMvfSNL5ELhm2qCRr0vAbMUvnSEFxe072EzKdFLsIssj4TioM TGDw== X-Gm-Message-State: ANoB5pkcJnBB6mD1t5WbdnwYBiI0xJc5UByKPS2+7uMHAT7AK1W72IrR V0Vq6U66Shj3k9nftIy9S2Tl3A== X-Received: by 2002:ad4:44b4:0:b0:4c6:d91c:441f with SMTP id n20-20020ad444b4000000b004c6d91c441fmr37090751qvt.118.1669989345678; Fri, 02 Dec 2022 05:55:45 -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 x1-20020ac84d41000000b0039a610a04b1sm4122237qtv.37.2022.12.02.05.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 05:55:45 -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 v4 2/3] mtd: spi-nor: Add additional octal-mode page program flags to be checked during SFDP 4BAIT parsing Date: Fri, 2 Dec 2022 08:55:38 -0500 Message-Id: <20221202135539.271936-3-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202135539.271936-1-nathan.morrison@timesys.com> References: <20221202135539.271936-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?1751111331064610492?= X-GMAIL-MSGID: =?utf-8?q?1751111331064610492?= This adds some support for automatically searching a chip's SFDP table for: program commands: 1S-1S-8S, 1S-8S-8S Signed-off-by: Nathan Barrett-Morrison Reviewed-by: Michael Walle --- drivers/mtd/spi-nor/sfdp.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 Fri Dec 2 13:55:39 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: 28917 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp874996wrr; Fri, 2 Dec 2022 06:04:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf6TYaRd9s5NxFYwx4Quim8EXgBu4ieCtaZM2JxtKPPNgzvG9qmsje2KPEdaEQyJOqwBWNVF X-Received: by 2002:a17:903:32ca:b0:189:9031:675c with SMTP id i10-20020a17090332ca00b001899031675cmr23112018plr.139.1669989880101; Fri, 02 Dec 2022 06:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669989880; cv=none; d=google.com; s=arc-20160816; b=xQiwQ69pj5AnrrwuvKXrKyy3hGR0p/1kgHLlx7O4h32D2YTw0OOde5axyVTQeklgRN rH1fCJ5G8tHIX+EAU6/Drb/9+ETtcIn96wET63PlHDcCTK0xyIGpHN/kaWNW7ldJHURT u/SrvZFIDWgkzEf9H635igwoP9xwZsi4Vq0rMRdPoejhd1lIULA+rpcli1rgH2u7tWW2 CBVh5JcOAf+lX4PTzo3FP828puiYN85qQ+bfwUfR6WpKrDu5tRcIl665PE75LEiGkXKt RTeJqBBomwZW4Qa+aCpDYxet8zRiD0fTmRXtJ639+82HZ+uBsHWnVMtTekxxvD9JNUrc KDKg== 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=aN/7/h+h5Hpms0utb+UumNlSGE7V17/9wj785xAfzjY=; b=y5+FanZJJxkHr9UdQgDWp6pkJBiKMgy7d8QmRzfsipitOJkmzfAusFFsIvacdOVqSy RECpPkFXEEN04S3cHennDFJaMSuRVnEHzDepeY/AxdtCShWIeCZtjZtrayjHTnbxjlrx cQycOGqlZPzY0PYGMOY/9QzvJYpB5tuekJzwFP3ri+hJkUSbBZ5eaJGvyp79lOShfxu6 mvy2qwFEsNWAGqye+qYUfVA4z2NChM8Kp0bcyYeVg1V9FXP8J467/glR2s6d8zyFcxtQ SMMKGr9hQJSxcxh2WFJUl8p9gTc9CKKa5DirfcbpTHhyVE9bE4yD/Faeq2sM6mS+bX3K 7Sog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=LCzV62wD; 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 ls16-20020a17090b351000b00217d892ab40si11652681pjb.29.2022.12.02.06.04.14; Fri, 02 Dec 2022 06:04: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=LCzV62wD; 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 S233600AbiLBNz4 (ORCPT + 99 others); Fri, 2 Dec 2022 08:55:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233598AbiLBNzs (ORCPT ); Fri, 2 Dec 2022 08:55:48 -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 B9707BE4EC for ; Fri, 2 Dec 2022 05:55:47 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id x28so4028326qtv.13 for ; Fri, 02 Dec 2022 05:55:47 -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=aN/7/h+h5Hpms0utb+UumNlSGE7V17/9wj785xAfzjY=; b=LCzV62wD19bVIRTiuK9BapJ+Qf6X3XlFWMnP6gGd28pj3TviIJMod7uNGVKOdQoVX1 LsQtUx7YJat0zJT7K4QxsEKU2wfxSR5ZdUHJAnyKCFFK0XMofuQWMpKUs4SmRznJ6S7k tujqZqqCkHhwbkvuZnVqoIVjpVXJkzTHYFWqpmzVX84I3GKV7MD1lHql5hEZxl9sET6p h2u493NCAAOO4u6m2YkTPkjzoHFjp3f1LRkK1CJQRlmTNGMUV7db5dBNBX59a4Az5XT+ Fd3nb3MqvIT8BPpsw/mVeoDKF7OldbaE+mcdRdWzoPjPH/N79nmmXwjDWP/zmPqDz0EP 2olw== 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=aN/7/h+h5Hpms0utb+UumNlSGE7V17/9wj785xAfzjY=; b=1+0NMIi+EwJcRMsvZRp8Hwm96XWZ/kCb3wu6474+L5wHgXElXna2WvKoewc/y6lTf3 glIhLVsYp+qz9M7FyjsQEcCn6UdQb8rvgwd65s/HJssXHAc+Gh3OEWmuznxQQgR5pOAL YFWOga5Qw/WMYcmY3opVHmwYhxjJVCpwrSUC16VHHhLha3zhiAVdFyWdpjwcAa7tFXGr jQ9lRdaz8GuHY2L5ZvHhcYE8jSnWXFSMdZekgWvhQKNEp5BQpOgJBmlU7FOQrhJIvfFU zlEij63WHeSzO3nzkNuSQ71C6yhqpga85suMnDSSTGmXbJKVf/SR0EhsaV6Z+brRW2GA GDVg== X-Gm-Message-State: ANoB5pknzDbH/zZfLWA0dHvyMYMCWMbDoDF2NxCB9No8taCGs48Ul+W7 yU4D3GaQ69BMFSenvA6b1QF6Cg== X-Received: by 2002:ac8:704:0:b0:39c:d509:76a5 with SMTP id g4-20020ac80704000000b0039cd50976a5mr50313757qth.382.1669989346833; Fri, 02 Dec 2022 05:55:46 -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 x1-20020ac84d41000000b0039a610a04b1sm4122237qtv.37.2022.12.02.05.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 05:55:46 -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 v4 3/3] mtd: spi-nor: Add support for IS25LX256 operating in 1S-8S-8S octal read mode Date: Fri, 2 Dec 2022 08:55:39 -0500 Message-Id: <20221202135539.271936-4-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202135539.271936-1-nathan.morrison@timesys.com> References: <20221202135539.271936-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?1751111308725400560?= X-GMAIL-MSGID: =?utf-8?q?1751111308725400560?= This adds the IS25LX256 chip into the ISSI flash_info parts table Signed-off-by: Nathan Barrett-Morrison Reviewed-by: Michael Walle --- drivers/mtd/spi-nor/issi.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index 89a66a19d754..362bc3603d8f 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -29,6 +29,35 @@ static const struct spi_nor_fixups is25lp256_fixups = { .post_bfpt = is25lp256_post_bfpt_fixups, }; +static int +is25lx256_post_bfpt_fixups(struct spi_nor *nor, + const struct sfdp_parameter_header *bfpt_header, + const struct sfdp_bfpt *bfpt) +{ + /* + * IS25LX256 supports both 1S-1S-8S and 1S-8S-8S. + * However, the BFPT does not contain any information denoting this + * functionality, so the proper fast read opcodes are never setup. + * We're correcting this issue via the fixup below. Page program + * commands are detected and setup properly via the 4BAIT lookup. + */ + params->hwcaps.mask |= SNOR_HWCAPS_READ_1_1_8; + spi_nor_set_read_settings(¶ms->reads[SNOR_CMD_READ_1_1_8], + 0, 8, SPINOR_OP_READ_1_1_8, + SNOR_PROTO_1_1_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); + + return 0; +} + +static const struct spi_nor_fixups is25lx256_fixups = { + .post_bfpt = is25lx256_post_bfpt_fixups, +}; + static void pm25lv_nor_late_init(struct spi_nor *nor) { struct spi_nor_erase_map *map = &nor->params->erase_map; @@ -74,6 +103,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, 0, 0) + PARSE_SFDP + .fixups = &is25lx256_fixups }, /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2)