From patchwork Tue Mar 28 10:15:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13190865 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 9FFD0C76195 for ; Tue, 28 Mar 2023 10:16:19 +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=qbpoAbB6pauVHb6NUcYyMWcV7/FYN9uBoCzbqzQQYBo=; b=R3oAUhJQfvYl8U q8J3AUs4I+pgFnBh3PPPSD5ZUsovypcCkGwArQRcTaDyLNy91EdK27xrGP/1ltMSF7+FleJfBE5S/ iBMcCo5ObO7/m2+rzaggEHe7etPtO6hB0d6QgtDN0sx8N3dUVTJbD6RXBqM70xCcQjPqHplfjqGmv GcGLYzLClNZtsPum2lw9d5nM/Sl1aYi9uMw6DHzIVIfo18GiSeNWOcVfLDmLCeQO/Ad30CwYLt/3f Q7NQCu/Fc2rmhzEhV8NZPMUxbzg4Cg0nKlrBvAHIHYMJh/UCpfV8GPiroG4VMk8W7ZedbXnohYLyi 8RtivP09F5Gzlmi2ak6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph6MR-00DtZw-2m; Tue, 28 Mar 2023 10:15:27 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph6MN-00DtXr-18 for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 10:15:24 +0000 Received: by mail-lf1-x131.google.com with SMTP id c29so15110841lfv.3 for ; Tue, 28 Mar 2023 03:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998521; 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=Mg5frztIjRO8xPyyjAsQX1BZNMpBQv5h5VL7qvtYjg4=; b=lm5A7AK2Y+pysxDKtabuoncNSLYvl5ECwtcbuz4TIkydtDNPASeam7ZKONUi/scwvc ytKM3N4EGv4pO5HSK/htEkU12yk1qH9lcTVKcENTTw/671ZYjTtYbHgswP6Rud0Ku2qC xNi2SfCnV+jJP+TNfO/P4lOByJvQwKZ0E7CD7mnbv+MKnEuqKZzitDFQ8eDph7cNrbrB 9LuQ//3mX1ehdknmbHaI3IFjnUYPjnlNJ4gqiOC6MftsGq6ykA2MYFhGHopNpewR1E3o xy4qI7USNQO3C7gn2ZkE2fIr4qtvc7HAJmc0zzRwadpw0ZnHtKCYOJh2lV75qSIudsBE va4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998521; 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=Mg5frztIjRO8xPyyjAsQX1BZNMpBQv5h5VL7qvtYjg4=; b=JfPqDVM+VuqfgbEWhLIi7C5iXyu19LWBn/REIfVgprvHiKgu4Dp5PQA+Zx0TQJ549C EJnBzIKL0Dkug9tzlN0mxyYQtklEv3e0JLHfOIbqzw/vQmVEDXL8q/kh9YQkeJmXG73I Pz/07jboQjeofhK3kcwKoq1oE8yENmj5EpeLj/CVmOzF48qUj6fRns5SCgy1zfL+68dI 44ZPnS0zdASYoCmXPjzBQn2jv7QTPr5tRZ57xkBrvxjhbc27HE3HvmOiG2shq/4Gj/rG n3dUdt9iZGHPaVYROBxwXRkur++ESk6o9qjV4FO3Y6VGzm9D4P3k1NnHHge5MLY1M+/L gYGQ== X-Gm-Message-State: AAQBX9fOfPppqyFndVG17RcH5C986VXzQ2iI83fHcMVxdayh7ttPVUZ4 Qu+8dvDMVsaJlQ6I/RFRnBQVyg== X-Google-Smtp-Source: AKy350b/KQGsVvcnnL1FGPlSVECFF8UzHQ2+2AMIm95qvEQVJmIBQxAVUk4oaRBvI+XrGAXwADS/hA== X-Received: by 2002:a05:6512:4dc:b0:4ea:fa87:7a8a with SMTP id w28-20020a05651204dc00b004eafa877a8amr4397954lfq.37.1679998521674; Tue, 28 Mar 2023 03:15:21 -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 2/4] ARM: dts: at91-sama5d27_som1: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:15:15 +0000 Message-Id: <20230328101517.1595738-3-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_031523_407512_CE2A7FF7 X-CRM114-Status: GOOD ( 13.30 ) 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;