Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3932295rwe; Tue, 30 Aug 2022 01:06:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR4/J3CTm5Xa54Hg6gtVU3OX7PD7GuzSRng9MTl68TwcmSL+liuBfdP008oRPkGytC7lTI0N X-Received: by 2002:a17:902:9309:b0:170:c4d5:43ae with SMTP id bc9-20020a170902930900b00170c4d543aemr20268696plb.1.1661846771873; Tue, 30 Aug 2022 01:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661846771; cv=none; d=google.com; s=arc-20160816; b=MT6OsO34BtzuBc1cWq+esjOWL/DhbhmSYXqAHXKHC+3KwQRRX83RnndKxTht2ORQTa J4PUaEbU7Y+hfL2CmScYkKzNveOKJMrn+P6QwXE1znv9hJvEkU1Few+Rgo5YxyO1aOlR 49JwjbpvyBq5cJ6gXYe4w6J4f+aAFIca4iT8uXKjU8QSy59KLNKrgXRllfDlVLtm8pg0 A39gF396hvOZqs2TzDU/f3xQhEyCEEVgkDkTJQSrYsY82Iage3ejMqOyK5QlhWIDL2UA k6Yi/y4eKH6r+LCDfinx/QsIGyeIQ/qT/IPes32xO5JOH4D33SQzoNYDBl+8KyLiE+50 BSdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=hScyyeCa0BmstvGNDpCO3ZSKhM4Kp3uqyQiW++JqWEU=; b=scSnV9eBzWuOg0VzFup+iQUkHypU5vlbj90VFtfFblWRPAErsu76l3fVYO0bPjjWYl 7cINShj7z6xMb6JQ2Ci1sA5PAIKDhi1VHdg/gqcGbooceTLd7FnpS/CuslWLbimC0bpp YiKRIuzysDim6SHiR7HvJTORpL4H42Jeh3P8xoc3SShyL1vgGOUfikQN664zs6N8EhyR XdpvuCJkIB0hrJyG9oPMeae+tZpifZUmHNpErTYvY5hi2QFZaJY+uxgieaGgnmLV27Xh uNckVTbYpqRqSawVZefJx3xCzCUHHmO2CObYr2KZtF84anhq2EpptNE5J3v1uepg5eZL 23yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=w2pNUXpO; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk14-20020a17090b224e00b001fd9ab8bf2dsi8800335pjb.118.2022.08.30.01.06.01; Tue, 30 Aug 2022 01:06:11 -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=mail2022082101 header.b=w2pNUXpO; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbiH3HKT (ORCPT + 99 others); Tue, 30 Aug 2022 03:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbiH3HKF (ORCPT ); Tue, 30 Aug 2022 03:10:05 -0400 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 970BDFD02; Tue, 30 Aug 2022 00:10:00 -0700 (PDT) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id F1BD522CF; Tue, 30 Aug 2022 09:09:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1661843399; 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=hScyyeCa0BmstvGNDpCO3ZSKhM4Kp3uqyQiW++JqWEU=; b=w2pNUXpOjZEfSq1m6zK74et7XtGnFGdMWB5OFvnQLv6Wo2MmPIaXkTxGNR3oLeoS6PDT/8 pFocCw6DeaxSnXFlHsAWDBfl4Z9IdQezWxlEMY9MJjd1kJMFPEwX4+Oe8LbyQ7SMplPkl2 MfSXwBfP/kUixWlEy85X97X/sjI0urygVSqRv+P7GDKxUPBWzbOezFlof21V6V6VvzE5yW DmRlwExy3Z7NmAKImsCTCaI/64ZyBYpFITfo0OfgrHOaGDXpv36RaWz7W0tCSum8RjKIKj Bun+pnXUlb5e9D/svynlYop+EQBH+N9xScWSckQlKHM6Q2MmrVuop79FTnmR+A== MIME-Version: 1.0 Date: Tue, 30 Aug 2022 09:09:58 +0200 From: Michael Walle To: "Potthuri, Sai Krishna" Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, saikrishna12468@gmail.com, "git (AMD-Xilinx)" Subject: Re: [PATCH 2/2] mtd: spi-nor: Add support for flash reset In-Reply-To: References: <20220829090528.21613-1-sai.krishna.potthuri@amd.com> <20220829090528.21613-3-sai.krishna.potthuri@amd.com> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi, Am 2022-08-30 08:32, schrieb Potthuri, Sai Krishna: >> > + if (ret) >> > + return ret; >> > + >> > + /* >> > + * Experimental Minimum Chip select high to Reset delay value >> > + * based on the flash device spec. >> > + */ >> >> Which flash device spec? > I referred some of the qspi, ospi flash vendors datasheets like Micron, > Macronix, ISSI, gigadevice, spansion. Please mention here that you've looked at datasheets of different vendors. And maybe instead of doing three comments, just one and then the reset sequence. >> >> > + usleep_range(1, 5); >> > + gpiod_set_value(reset, 0); >> >> Mh, is your logic inverted here? If I read the code correctly, >> you should use a value of 1 to take the device into reset. The >> device tree should then have a flag "active low", which will > Reset Sequence which I implemented here is high(1)->low(0)->high(1). > By doing this sequence (active low), flash device is getting reset, > this sequence > is tested using Octal SPI flash device. How does the device tree property for your look like? Has it the GPIO_ACTIVE_LOW flag set? -michael