Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp499986imi; Fri, 22 Jul 2022 03:47:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vd0Eph92YSEGY2fXuKDn/08VVXSSjSNQ0DvxTCnPUPzkfRS/yFuvJekB0ALr2SAVCXJG4u X-Received: by 2002:a17:90a:fd12:b0:1f2:c4a:ab05 with SMTP id cv18-20020a17090afd1200b001f20c4aab05mr3469085pjb.193.1658486835702; Fri, 22 Jul 2022 03:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658486835; cv=none; d=google.com; s=arc-20160816; b=HbSbnJar7QaK/VLbjz/kdffpnUvYjUfpSxYsEfrR+QPCFuTkZrllGX0nI4x1qCD5Fz A0hMBLQ8EFL69hXQ2MxYxQWwEK9NwJGseqUimIdVg57fNHg2vRBmXfgb8ud+ceDihdAM b/cjb89CMk02raWooz6GpR4+/vvfU/a8cdy3VFDMTkWHeYmYadWh4GWHwe+g4CKxK/vc zzJVvDtZvb9WZweh9VCuhjb9kTCd0IHZaUdeflxqtO76JLnIxaJ1PcQuJZb8plDOyeph SlmSdVTlVE/Ibinu3mQZYYhL2QYMTgHYecF5vVi+Ex9jGn0z4+m62Iglq9KyNzaW3nt2 B5FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EOEXLOldU7ZOXJVFuOzzIy1TJAM2KQnM9rtTSEMd8Is=; b=x4/D1j1/RSLCTPlmjcwNwsP9uzrntIgy/KrmwzNgMCvDubK3dePp0/ZX6WkvxOlS6A F/DLRNvZDt4IxeEZQJegneU0BfC3cbINZqzZLC2d40I1n1PaYx+oyRBWTYqk+k6jd0nW 5fibDHX1WhNHdVwnXMi1QGXOZDRBKH5NZ6b3Gy+hidATUXNI6hUK2tII65uoUizpF2VU EZsUCr1vAe/+ZWoiAuGhlOqhpZfopVKfqKIbJ7Ub1MeqQknrXcWSQG3VUTX7Yoe5CHVG NYojj3601bEGiPN77RsxXIT/jwB610PZL6ycE7g6w0Txa5j1isRSIf0MVWF0zTbNeYJb u1CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Z5hOVzON; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a170902e81100b0016d2f548842si6126454plg.105.2022.07.22.03.46.59; Fri, 22 Jul 2022 03:47:15 -0700 (PDT) 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=pass header.i=@sifive.com header.s=google header.b=Z5hOVzON; 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 S235189AbiGVKZc (ORCPT + 99 others); Fri, 22 Jul 2022 06:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235143AbiGVKZG (ORCPT ); Fri, 22 Jul 2022 06:25:06 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9250B9D53E for ; Fri, 22 Jul 2022 03:24:59 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id oy13so7845567ejb.1 for ; Fri, 22 Jul 2022 03:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EOEXLOldU7ZOXJVFuOzzIy1TJAM2KQnM9rtTSEMd8Is=; b=Z5hOVzONR2hSjRiyIpxdvM0KIHcqCLzpk7zVnvTl4U4q0oGJ+R8P1MSOShCivcDGPg w8hwkX8kyTjjAAIk2mOyB0xkssTj/6xp6+a184MJvz9UeZvrql57jfD+xFo7ENa3Qrc8 sANHEoKz+JtJ7cRXPj+cmURudkULMeTEs0ykQbzpj8OsfhkMdf7L0McBepSGu3461xKW CYiPiZ+KlveknszWEKo+3uOnsp5wt7wKAI+sSz8udVjsRPZVmBxI0lwUcFYr3ck9C7z2 TuVFMN2spFkZ4bZcReL/03ezepwh79rnn5AOa+K8IkYMOquX1hg7Ni/r1TtIMHn0etDe qGpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EOEXLOldU7ZOXJVFuOzzIy1TJAM2KQnM9rtTSEMd8Is=; b=ZwfTCZQEwCzUqaowYMs/y2E6vX/+EZbsNBevZNHwm8lfiXMI3pQEEVSWWHMDEFxZYe 7CFJqHeYQyDmHh7nbyBswx8PbBsyAspzedwqoh/Q0wbZ/JBU0bwOHKLv10O/jLPUNW1L 2+FxH+7MNWDypfYmiFXV8xlv1OSar9a8OqnaIBIUi6Bj+XURa4FQmWZv6Ozv8XQC9ZG+ gwvKRBOvs/QgFz1sNdUjzJRVjfj2kSi7JKIWLG6tNBalsiQn0OSknc1Y/mVE9BPoeKAx ++YsjryhnPu3caopL9lWKrvvqjUdhluL8fQPaRixI3+0X9/IuILgAEjkxmI8yRQM4Evf UsEw== X-Gm-Message-State: AJIora+0UmPL/oi6b+5GTFTT0Cu0O78OzThCtcbVmBhxeb+buu55hZoG 0mJ7BAZCkEB5wnwyQb/9si7WhvHoOUzGM3/dMl8kvw== X-Received: by 2002:a17:907:2888:b0:72b:8f41:1405 with SMTP id em8-20020a170907288800b0072b8f411405mr2483664ejc.564.1658485497471; Fri, 22 Jul 2022 03:24:57 -0700 (PDT) MIME-Version: 1.0 References: <20220712163823.428126-1-sudip.mukherjee@sifive.com> <20220712163823.428126-3-sudip.mukherjee@sifive.com> <3a9877d0-3cc5-6452-764b-d07b38c72b00@microchip.com> In-Reply-To: From: Sudip Mukherjee Date: Fri, 22 Jul 2022 11:24:46 +0100 Message-ID: Subject: Re: [PATCH 2/3] mtd: spi-nor: add support for Quad Page Program to no_sfdp_flags To: Tudor Ambarus Cc: Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Greentime Hu , Jude Onyenegecha , William Salmon , Adnan Chowdhury , Ben Dooks , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tudor, On Mon, Jul 18, 2022 at 7:49 PM Sudip Mukherjee wrote: > > On Mon, Jul 18, 2022 at 6:02 PM wrote: > > > > On 7/12/22 19:38, Sudip Mukherjee wrote: > > > [You don't often get email from sudip.mukherjee@sifive.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > > > > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > > > Some flash chips which does not have a SFDP table can support Quad > > > Input Page Program. Enable it in hwcaps if defined. > > > > > > > > > diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h > > > index 58fbedc94080f..dde636bdb1a7c 100644 > > > --- a/drivers/mtd/spi-nor/core.h > > > +++ b/drivers/mtd/spi-nor/core.h > > > @@ -462,6 +462,7 @@ struct spi_nor_fixups { > > > * SPI_NOR_OCTAL_READ: flash supports Octal Read. > > > * SPI_NOR_OCTAL_DTR_READ: flash supports octal DTR Read. > > > * SPI_NOR_OCTAL_DTR_PP: flash supports Octal DTR Page Program. > > > + * SPI_NOR_QUAD_PP: flash supports Quad Input Page Program. > > > > You don't need this flag if your flash supports the 4-byte Address > > Instruction Table. Does you flash support it? Can you dump all the > > SFDP tables, please? > > Not sure what the correct way to dump sfdp is. I did this from sysfs. I tried decoding this SFDP table and I think the parameters table says it has "3-Byte only addressing". So, I guess that means it does not support 4-byte Address Instruction Table. And the datasheet says it supports "Quad Input Page Program (3-byte Address)". My existing patchset works for Quad Input Page Program, and I can send a v2 with the previous patch and this merged together (as you suggested) or I can try enabling sfdp for this chip and then use a fixup_flags to enable "Quad Input Page Program" which I think will be more complicated. Which one will you suggest? -- Regards Sudip