Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2951210pxb; Mon, 18 Apr 2022 11:47:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgNAh0Bz9yYdxvKboPRme2tELL9MX/lnLuuzgmfSkynwNSp5IrU1hoM3E15HuPR+kmojxx X-Received: by 2002:a17:90b:4d0d:b0:1ce:ef5d:f1ef with SMTP id mw13-20020a17090b4d0d00b001ceef5df1efmr19541975pjb.91.1650307668025; Mon, 18 Apr 2022 11:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650307668; cv=none; d=google.com; s=arc-20160816; b=Ajs5OY2aY37GslwWhjDMJ8JKtxDE4+spyQrr+dK8yXpbgI4l/6A+chKpzIWp4ZkV10 XxI2UY2DRV8WMJ5jeh9DDax17qnkn+wfT0z/taqXDCrDFiMY86yS2weaGbjLnktZbDu+ iejxhfMMf/G6f9XpT0mP5Li/GHdoq4Ea5rtmU9mXILQCkdVzlHrLR9XepstiNopZbFry dVYfVHFHebTF5QgM8avEOkEde+yVZWgcsVH7onqS5lfTWWsvl5TS8fhmt5MsExpnsFgt hMOHBf77wJVnwUXdgByS8SdGZ3LNhyw2+XmBfi9311L4ZIXqP3zm9ZTpIsBk+wm1ssvS ba9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=sDTjYlCaBa9GLh++sa/WCQdXuUrcubJCdTwx3SdcA1Q=; b=Ke7sJykLCaxrPHD+mYbF704KLQntyUnsXUYI1n0qCSO/3Z56qwBDzsMkDJ00TZOedM MUQtOP+syISrSyL5+NKHVNiPYrxQpd76ygikMLIjSFYTWYviljkE5SCKWyc6bhwon1Ac yuUU/Vtq4jz4020croG1IAkyBfBkqb2qc1zTf5jlzR0J7Gr56t38ESq6Kr3Ab5wOKadQ 5xBhau6QWNe9+NLXXzld0XDwmMW9zoo9UcD0gN1xzi0HpVDxEF2jztMzWTdIgChv3huZ A4DfzQ+VUt7is5121xGRar3Rls8Y4dxplohelv8ZvIRvU8pyKvTaz2+Y0HJXzthsWUeY XXfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=hzXAChF9; 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 x3-20020a633103000000b0039d1c7e2ac8si10067076pgx.390.2022.04.18.11.47.32; Mon, 18 Apr 2022 11:47:47 -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=@walle.cc header.s=mail2016061301 header.b=hzXAChF9; 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 S236080AbiDRMQK (ORCPT + 99 others); Mon, 18 Apr 2022 08:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233086AbiDRMQI (ORCPT ); Mon, 18 Apr 2022 08:16:08 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E15F1A82E for ; Mon, 18 Apr 2022 05:13:30 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 920A122175; Mon, 18 Apr 2022 14:13:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1650284008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sDTjYlCaBa9GLh++sa/WCQdXuUrcubJCdTwx3SdcA1Q=; b=hzXAChF9N1ILebUw69v7FcCfSE9sAXERxDXW3a/CotuLCpZBsGXKG1XdWjLEjkWmngXnWn gUazAnZpwYWZz0SfXIFiXCWZAbIDjBnh1xOoOE3zQl21SBxUiY9RKR1vj9Sd+tf27qs1U2 qgWiIvXubT6htCbhqMTTfZv3JAd4bBc= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 18 Apr 2022 14:13:28 +0200 From: Michael Walle To: Tudor Ambarus , Pratyush Yadav Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC v1 2/2] mtd: spi-nor: expose internal parameters via debugfs In-Reply-To: <20220418121044.2825448-2-michael@walle.cc> References: <20220418121044.2825448-1-michael@walle.cc> <20220418121044.2825448-2-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Am 2022-04-18 14:10, schrieb Michael Walle: > There is no way to gather all information to verify support for a new > flash chip. Also if you want to convert an existing flash chip to the > new SFDP parsing, there is not enough information to determine if the > flash will work like before. To ease this development, expose internal > parameters via the debugfs. Here's an example: # cat params name w25q32dw id ef6016 size 4.00 MiB write size 1 page size 256 address width 3 flags HAS_SR_TB|HAS_LOCK|HAS_16BIT_SR|NO_READ_CR|SOFT_RESET opcodes read 3b dummy cycles 8 erase 20 program 02 8D extension none protocols read 1S-1S-2S write 1S-1S-1S register 1S-1S-1S erase commands 20 (4.00 KiB) [1] 52 (32.0 KiB) [2] d8 (64.0 KiB) [3] c7 (4.00 MiB) sector map region | erase mask | flags --------------------+------------+---------- 00000000 - 003fffff | [ 123] | # cat capabilities Supported read modes by the flash 1S-1S-1S opcode 03 mode cycles 00 dummy cycles 00 1S-1S-1S (fast read) opcode 0b mode cycles 00 dummy cycles 08 1S-1S-2S opcode 3b mode cycles 00 dummy cycles 08 1S-2S-2S opcode bb mode cycles 02 dummy cycles 02 1S-1S-4S opcode 6b mode cycles 00 dummy cycles 08 1S-4S-4S opcode eb mode cycles 02 dummy cycles 04 4S-4S-4S opcode eb mode cycles 02 dummy cycles 00 Supported page program modes by the flash 1S-1S-1S opcode 02