From patchwork Tue Mar 28 10:15:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13190869 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 31250C76195 for ; Tue, 28 Mar 2023 10:16:38 +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=dy6fzHim5g/K/Mr6WsnQ4F+vcTGo3x4ZpopAm9smbeo=; b=aOm+9sRvo1cOzJ qwVCE7/7Ot1KirxwxKO/7QL9zVyPuKESsuypA/34E5QFfstKGNJxxhM15QS7eVz5STL83d9Bu+uby l99Tmahb7JW/1az0dVvwOKKpIFrho71zbiBbrtHyG41pb5DuG9AGMi7gvhMIUT5erc2YxIGNBLQmb IUAei/oRF9hE+BdhgIma5n+RFESiZQ7pS0AEAXvWPDipK4dwmmgR83FMNjGKhq1oYyTpQYwX2baxZ 5oY7+eTNLNYHMp0nKJ+fiiC4P2vQFyU4T1ZODRQ8j3mAxnre4f+3EqfkaR/EpuhAJfoJ1cyFxP2e2 qwCU3x6bUC546qGeI9hA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph6Mj-00Dth1-19; Tue, 28 Mar 2023 10:15:45 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph6Ma-00DtYB-1c for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 10:15:37 +0000 Received: by mail-lf1-x12e.google.com with SMTP id c9so4666738lfb.1 for ; Tue, 28 Mar 2023 03:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998522; 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=QqCZBLOWDafOBoOlTrMP8B0zdSc1FZSNMJAlIExG3UM=; b=t9OnNpqky/FwhydCPEZZDj9cC8WhyFJ6DX6Eqp2eRmN28088SkZ0dzeSpRiFki4J+K 3B7tktQFTrLAH6ALURVDAqxyd4qZ4UVwY+ciAxwz+qreejacdo8NLxZ4yDTQjBZPiDnP 6h7PScc545ATkD12+MndfEXweXLu0WOpQ+6DJX8GraM4CGV/E/3pQlILhjyzFJzR5XRB Ui9oj3wNlNYlLGdDIjNJh64ICbu+gR0yJzVidaXa7edVLMWlAaSg9G9AE6FAjriGR1Wy +5zCANGciWvwxpNFhijGxzMkXWRQSk3Bz7t7iG+Ra/0EeuN5oTXpr0SKOxLMcIk4qune RvsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998522; 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=QqCZBLOWDafOBoOlTrMP8B0zdSc1FZSNMJAlIExG3UM=; b=RluOk5EmwttepXnlKSumTjWWj+UODqeYKcRZNYsXU/EtyxWc50oTDAM7yUceS87KeW Cq6Yb4Yr3nmj9OtXd5Uv6U0pC2/Wc2/p9jRNyOGRz8SueFZ+8N/NJh/Sh/rCXcSVLZ6h sBTIpJmKpag6WdoW6biZt9BsoMSXEzgSF3u6/RI7z+jPRkQdbGUd4bSU9SzPvKotjh3C mEMBuWQctiJTmEpX87UBRNtdy8YgZy7JXJOaqHhoQfEej+T4AnQ9fJ+9y7Fh+GSnZjfP c69WmtNyiE/bGqgQ6NmGtdW2rrRiVXWCMk1Y6lk+yELP12mYDFmQurThFiu4BtyEF0Vh x47Q== X-Gm-Message-State: AAQBX9cf7SX+65ycwdHTzyptGuQ5HamLWqs9SHo8lCABbBnnRGo/ZayX r+xM/2mDGfES76aSVDJtor0BVA== X-Google-Smtp-Source: AKy350bgWfxXLD8Q847RJ7ey62vlxVTfAXfCJchvhg8x3HltPj3VenFzVWOk+MsTJ6NlHiarPrqBxw== X-Received: by 2002:a19:700e:0:b0:4de:3774:2d97 with SMTP id h14-20020a19700e000000b004de37742d97mr3487289lfc.13.1679998522305; Tue, 28 Mar 2023 03:15:22 -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 o25-20020ac24959000000b004e84d64ab51sm5061405lfi.58.2023.03.28.03.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 03:15:21 -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@linaro.org, Tudor Ambarus Subject: [PATCH v3 3/4] ARM: dts: at91: sama5d2_icp: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:15:16 +0000 Message-Id: <20230328101517.1595738-4-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230328101517.1595738-1-tudor.ambarus@linaro.org> References: <20230328101517.1595738-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_031536_532858_053700DC X-CRM114-Status: GOOD ( 13.41 ) 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 Tested-by: Nicolas Ferre # on sama5d2 ICP --- 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;