From patchwork Tue Mar 28 10:07:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13190828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09E8AC76195 for ; Tue, 28 Mar 2023 10:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=niaFSRyOMsdSA9niJr7DriV5Er6op0oVA2UCUTuhR3M=; b=afjOwNVEOVvpeY Re5EL6Cksy+USZKSBU00Nt1NNY95Mms46HkgFMJOcwFYedv3ojRSBQJ09AKRnsU3uWMmwwU71nHnN RyEvggTkEa/iV1zEk+6UqLrhv1L45L+PcK/4QRT7I45cZL/1fQib1uM+Q9TXPHkJPqVtyr+ShW/Lm mIhnbHrZss6r8OHq5y/905DEc1qtBTUUboLFyrL0R331Oy3Y8sbg7XUfT4mmldZvtSNZw+sTI5Se8 XGnWxSpor7Y+nZhFHdbxYBofg80uiuuNOv+Frb7noRqa7HXj/0F/hF8LoNeJg2SKSPicmANRGKSn2 Au/GxAXHSJ4JAJy9xhJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph6F0-00DqkC-0C; Tue, 28 Mar 2023 10:07:46 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph6En-00Dqbc-2x for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 10:07:35 +0000 Received: by mail-lf1-x129.google.com with SMTP id x17so15081624lfu.5 for ; Tue, 28 Mar 2023 03:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998050; 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=HWHba6Uu0Ek+kYjlRBQm3S5zfLvA96w4h84b04kVQ3w=; b=gmEA9eVDLVEuSqY30iZ244dRPsGlbiyB2DELO2i4s5GtSoDMUM9hV+PSHoPzWy5SxJ g0RX4lC/YKWIHmAdN8RM3L0vVy5D+vLeinmSa2x24NM9NJ212Ta8hkX9GMvCyYuoyM1d DMivUm02j3CSGcX+2HDicI7kbDXNi39vCbYdSvY+DiDRyRjO9xqBmDXklc5N+qmLQVyk oG6icfSSoW2HuxANWejAi+MAj77T8TZBKRaqfvRVbgUhkfhP/+rUoxVomddaez/EsA0r VAL+fGHgaGPAVA92cIcy06G5vIqXzSsTmw8fxXk533Bttky56f6uL+bRsNS3TQ3uq/3/ +/kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998050; 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=HWHba6Uu0Ek+kYjlRBQm3S5zfLvA96w4h84b04kVQ3w=; b=qVeE5kiliGAcBNI/oTqt8LF1YEBvIf7/2ARLFPo7JprKuX2mwdnOFJGDueMzWCxajj 2/pOhpPm4c3CJy1MGpbCXcxi14tiuZkG7w8NCRvNUmr77CbyzJXFUsPSRNPdh1JtJiD5 8WyZDrMVQnSwC3rrf9DFoceg38bF4GxgwGpiQSesX75JDksVFkD6r5bXe65lKhx3fU/6 kwHMkmxYYv+JBbjETkYS/8ysUm2kTv+NDi+4+Cv7c3P2H8g4WJgygQHgiCWGBdqGD9kk lYEdc72Lr+YKheT7Teaiz2C+aw0mq3ybo5MRqxq2regvRAmyd58fYQxDR84hKWIH9R0o aw8A== X-Gm-Message-State: AAQBX9f9AVfD6RL9CzhQYDKb9DV5AgTB4Xg2/9uVbHEWaODGdeUzYfxC FDMw991bTE9I/sfHd4qFmF4Wtw== X-Google-Smtp-Source: AKy350ZtrujPPVXU4pT+yrqtYxfFvHNujl2xHI00jKUIXRYA9J1Z/6lIUWJ6l23l4tHUvBkykVs6YA== X-Received: by 2002:ac2:4434:0:b0:4eb:dd2:f3d2 with SMTP id w20-20020ac24434000000b004eb0dd2f3d2mr2271129lfl.43.1679998050106; Tue, 28 Mar 2023 03:07:30 -0700 (PDT) Received: from ta1.c.googlers.com.com (61.215.228.35.bc.googleusercontent.com. [35.228.215.61]) by smtp.gmail.com with ESMTPSA id w9-20020a05651203c900b004db2ac3a522sm5039572lfp.62.2023.03.28.03.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 03:07:29 -0700 (PDT) From: Tudor Ambarus To: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com Cc: alexandre.belloni@bootlin.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tudor Ambarus Subject: [PATCH v2 3/4] ARM: dts: at91: sama5d2_icp: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:07:22 +0000 Message-Id: <20230328100723.1593864-4-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230328100723.1593864-1-tudor.ambarus@linaro.org> References: <20230328100723.1593864-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230328_030733_963851_DBB80F65 X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tudor Ambarus sama5d2_icp populates an sst26vf064b SPI NOR flash. Its maximum operating frequency for 2.7-3.6V is 104 MHz. As the flash is operated at 3.3V, increase its maximum supported frequency to 104MHz. The increasing of the spi-max-frequency value requires the setting of the "CE# Not Active Hold Time", thus set the spi-cs-setup-ns to a value of 7. The sst26vf064b datasheet specifies just a minimum value for the "CE# Not Active Hold Time" and it advertises it to 5 ns. There's no maximum time specified. I determined experimentally that 5 ns for the spi-cs-setup-ns is not enough when the flash is operated close to its maximum frequency and tests showed that 7 ns is just fine, so set the spi-cs-setup-ns dt property to 7. With the increase of frequency the reads are now faster with ~37%. Signed-off-by: Tudor Ambarus --- arch/arm/boot/dts/at91-sama5d2_icp.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d2_icp.dts b/arch/arm/boot/dts/at91-sama5d2_icp.dts index 1346b8f2b259..999adeca6f33 100644 --- a/arch/arm/boot/dts/at91-sama5d2_icp.dts +++ b/arch/arm/boot/dts/at91-sama5d2_icp.dts @@ -669,7 +669,8 @@ flash@0 { #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <104000000>; + spi-cs-setup-ns = <7>; spi-tx-bus-width = <4>; spi-rx-bus-width = <4>; m25p,fast-read;