Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3223179ioo; Tue, 24 May 2022 16:45:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzODdjuIWLRc2AbwlU0d5oBvpPLVMQzh0Bk0cjt3Ld2v70kHqGi08uAZL1/N9/y2Womw5j/ X-Received: by 2002:a17:906:8301:b0:6e4:896d:59b1 with SMTP id j1-20020a170906830100b006e4896d59b1mr25830533ejx.396.1653435943901; Tue, 24 May 2022 16:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653435943; cv=none; d=google.com; s=arc-20160816; b=0A+1NmYeqOsw03hduiwgPusnEoWuAZWzuSXyzxZe4QSyeL9Y+MbSW6MgkwcjpcG921 hMEIuP5g4Ox8Xb6+0M2gXzpZ2zPrEPyJlAJH0QrufiaECq7Cd8rBBpgxHHhmg70pXnEC xSf0KYwUQApKcv9Ps5HLtmjjIKIO392Re70R6+/c9gmsTzdGkgttb+dlQ0iE8y+d2Tzw 5VRjt0QwOplj+Q8uMI9ZTuLPkyF2iAKiVshu6x+aYIKIs4vHxnulOS5znd0MnweH+HC6 +Vs/WD596kFMnR3mw7paJJ/x3+ceONGUv8gTf97CxBN6WkmbZdGfJJWPL8xDoT7vQlIH 9oWQ== 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=lhGQ7tI7wUakb4EC0eKrtQPP0/Pvguw0Yv+MToZjl2E=; b=XxiI0PqysAkrHNvQh51uPwm/9jwhwq7skHIsrk0fYPrW9aRi1dW0ABezF8BbMvmS22 oOQcSjGQ1NGX9mw6FrLj3boP8+8+ne0htR9KSknCTEIGKQClV1+f22zyi37/GLfG4uqo ajIZOgCmeXIasFRk35LqRv4MsE+wrv2Mvgu/D/tRk0yob02gWIUaE1DrqywIc8wZaQOp 8SI4GAoVI0BjrZ8xgx/6rmba1V4I8RIYN5r4u31xscGmcTJ1eMVKklJkFvOpbMilKYG6 cSLQVZ2zJT2YH2a7gkvh6jZO5of/KI39bqeJMN6pxLaP+cehpfCyh5MuxJkMJ2M8+PPX OvDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=AkCfXPN7; 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 fy12-20020a1709069f0c00b006e7ec2aba88si15958687ejc.948.2022.05.24.16.45.18; Tue, 24 May 2022 16:45:43 -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=AkCfXPN7; 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 S242288AbiEXWbD (ORCPT + 99 others); Tue, 24 May 2022 18:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242278AbiEXWbB (ORCPT ); Tue, 24 May 2022 18:31:01 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46694366BD for ; Tue, 24 May 2022 15:30:59 -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 ADA11221D4; Wed, 25 May 2022 00:30:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1653431456; 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=lhGQ7tI7wUakb4EC0eKrtQPP0/Pvguw0Yv+MToZjl2E=; b=AkCfXPN7d5TXu1LEgNEP3517qTQIuyfHqvMT91ZTbkKaH6rNMxHCcV/2yKKm6zSKCeSMRj IlubmWCkPfKRzqlldBgBuvH0jUa6gCoXlz9EUZdBhhcYVNM7iYuzPnErdIRGhh7O0govft p6mbpfi1z7FNnPVFdDReNeE9+nAeNsc= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 25 May 2022 00:30:50 +0200 From: Michael Walle To: Tom Fitzhenry Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Martijn Braam , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: spi-nor: gigadevice: add support for gd25lq128e In-Reply-To: <28d3925a-983a-fcb8-19af-6e6baf892d53@tom-fitzhenry.me.uk> References: <20220523055541.724422-1-tom@tom-fitzhenry.me.uk> <65339d49135ffb578b5cd5ae459cea8a@walle.cc> <28d3925a-983a-fcb8-19af-6e6baf892d53@tom-fitzhenry.me.uk> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <10c2bc96821e9a907e54ef1675dc4c60@walle.cc> 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-05-24 22:50, schrieb Tom Fitzhenry: > On 23/5/22 18:03, Michael Walle wrote: >> According to JEP106BC the vendor code 0x25 is Tristar. I'm >> not sure what is going on here. > > Nor I! The board schematic[0] reports the use of GD25LQ128EWIGR > (vendor Gigadevices), but indeed the chip itself reports vendor > Tristar. > > I will ask the community/vendor about this discrepancy. Yes that would be great. Could also be one of the other 25h vendors, usually the continuation code is just ignored. I'd bet it some china SPI flash. I don't think it is a Gigadevice because the datasheet says its ID is c86018. >> This flash supports SFDP, please provide an SFDP dump, see [1]. > > I will include this in my v2 patch. For posterity, here's the dump: > > $ xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp > 53464450060101ff00060110300000ff9d05010380000002ffffffffffff > ffffffffffffffffffffffffffffffffffffe520f9ffffffff0744eb086b > 083b80bbfeffffffffff00ffffff44eb0c200f5210d800ff234ac90082d8 > 11c7cccd68467a757a75f7a2d55c4a422cfff030c080ffffffffffffffff > ffffffffffffffff501950169cf9c0648fecffff > $ md5sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp > de4d6be54e479d60859b0ca8a0ee9216 > /sys/bus/spi/devices/spi0.0/spi-nor/sfdp > $ cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id > 257018 > $ cat /sys/bus/spi/devices/spi0.0/spi-nor/partname > gd25lq128e > $ cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer > gigadevice Thanks. > I have attached the parsed sfdp, according to > https://github.com/petris/sfdp-parser > >> Did you test locking? > > No. The datasheet mentions Status Register locking, but I will look > into how to adequately test this. Or just drop the locking flags for now if you like. >> As this flash supports SFDP, please use SNOR_ID3(0x257018) >> and drop both the INFO() and the NO_SFDP_FLAGS(). You'll >> need my SNOR_ID3() patches [2]. > > SGTM, will do. If you don't find the vendor and don't need locking, there is also a generic SFDP flash driver [1]. You could give it a try and add a Tested-by there. -michael [1] https://lore.kernel.org/linux-mtd/20220513133520.3945820-1-michael@walle.cc/