From patchwork Tue Mar 28 10:07:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13190826 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 42F89C761A6 for ; Tue, 28 Mar 2023 10:08:35 +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=Qki1R0+WV4DxhD5hzLQ8PUc8tOCm4y2CetSBEcYARHs=; b=q3wSe7mxg1nNed Xtog9g+IGIdkSbSzfT2d135ytcrj/d2473NjgYXroELFgplOQrfILzJFKy2kCmY/3razpEtyCGrKS ZmUNUs++Ao77MTtblDZrKZ9GtXmPV01cxdEU8/lAP6uM03MpKC3WKpaXbgnpsfJcKpuHh48tNTxXk Bp/ZEBNoZrlj1F+nX9RUGPXFidNqoUdCi1w+X8ZovcNCwuY7qBTI6TLoyLNq3fLueo1J1eMac73FL Zoy5RaoVxXSTyc03JWj2QnecRBZ39ErlEyRq42+6V6pbVcvis/n7AXA8V7yOgYmX3saDT2IgnDYM3 yDsW64wN83B0+KfKgKyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph6Ey-00DqjE-2I; Tue, 28 Mar 2023 10:07:44 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph6En-00Dqb5-0J for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 10:07:34 +0000 Received: by mail-lf1-x12a.google.com with SMTP id g17so15075314lfv.4 for ; Tue, 28 Mar 2023 03:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998049; 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=QrY1OuDR/+qlCoUvp7xD7ZWzVOeNYJFtAbaI7JDwTWM=; b=hAAal796U+HxnwWZF/jbseBG2s/J6J6okTwD6RMngnFNxbPF0DsSb8oeNgsAerlpW3 JtINISEkpC+k003xcvTYpBjP1OMQ3+P+RQI90SUJBJmDOfd6dGCMZIEbRIHh4QoKa8rL p7/1MZ0o5jRVz0unDAXst3BPondXBd7VIRLVHXz4UYdIZLkCey1xsZtZjVH39vb0AS7N vfPrd5FhdOKv8Ig4Dy3lfBEOYVQUYvhQOEomu4GiX3WVT+cugSf7ZEuPK9+16xwLUZOw IZdrRSIxpkNCnMd72yU4lgZanRw+9oubgeA+Gaw68eTPDNtxD9STdWKh1tQ6sEuYKawV SA6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998049; 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=QrY1OuDR/+qlCoUvp7xD7ZWzVOeNYJFtAbaI7JDwTWM=; b=UxffJiy8QtvMlQP67EFYp7ZEd/npymBJxXXCpIxPRDCuzB9BRCr4DzQ4J443hZmTwy fSMPmrtoWMq/rzaB8UDo/yQR6qVliWewNHAymEMV2ymcrj22qArpdRvIZ0FV48UCnxvQ YLDsZz+hGwwKm5BKAVBHHDrzGUZ0OVm2cIHDfOUHVDYFIrpFCokV9IeoHbJXRBTA/CVK wjE30y8ovCHKzzhzHaJ7iXC3wehkIQQ7tAVZZI5MaUDjb6hLFC4NlASHHROoxKLvnNHs 6NceEIc1nb+4OKVxtn546i9iSgkI9AE6Qw2skkCmtxOLhfsaZku0hsTE4KT0gKVKmd5v U/pg== X-Gm-Message-State: AAQBX9eLebqYLzrJOgfvQnT36AUDlw3WxXIn5P+0HFOiE2y5/Wfa1oIT x61jkmKB1yRqZyRElUNoT9D2OA== X-Google-Smtp-Source: AKy350ZsZw5YeU9rZZh2ZArIM673HB9SUzeWWISkt7rVHV+uwIedYI2WgTUkMLtoUghFlPgLUBKaeQ== X-Received: by 2002:ac2:52af:0:b0:4dd:b766:37ae with SMTP id r15-20020ac252af000000b004ddb76637aemr4088978lfm.13.1679998049213; Tue, 28 Mar 2023 03:07:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 03:07:28 -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 2/4] ARM: dts: at91-sama5d27_som1: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:07:21 +0000 Message-Id: <20230328100723.1593864-3-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_146965_28C03E4C 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 sama5d27-som1 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-sama5d27_som1.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi index 8aa9e8dea337..95ecb7d040a8 100644 --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi @@ -43,7 +43,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;