From nobody Mon Feb 9 01:06:44 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24D7AC761A6 for ; Tue, 28 Mar 2023 10:15:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232354AbjC1KPe (ORCPT ); Tue, 28 Mar 2023 06:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbjC1KP3 (ORCPT ); Tue, 28 Mar 2023 06:15:29 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D17B619E for ; Tue, 28 Mar 2023 03:15:22 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id j11so15055989lfg.13 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=X88qJMuybuDG/DdfVsPonRD1rXJpjEmcdOesR2x9t6U=; b=AB9I7MC3E6mjUudJSg6hpMMurrZH02ci4PI4lN6vJxwsKh5y0zjuwyFOOLLGhLXWTS 84yPQ0fQX9XB/yp57zsxYhrDMwFOfubjwtwqSlm3nLDPiZ5FUx6r50LqpwQgrFEWRrQr kib7QI1r/+rdGF/m/sxCf7c0TTzUc80Sj3CWwrVr3oIyFTmz7t2qIc16ChsFY36XsQfC x4hZUkTJN8X9MHMpCs4RrlzPWwufFL7GQWSybYyyCejiYguQroPGvYHCeBVweKWgq3zW O6JQ5YIMhNP6KHro1vsALFLjFg9SV4NnCbsAS9WM7hjmkfzb+zQ9vbesGDEEbqEqCHfI BwRQ== 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=X88qJMuybuDG/DdfVsPonRD1rXJpjEmcdOesR2x9t6U=; b=bfy8wi6ucMsbZDmt3nfuqFHKXEZZm1yITzjBjRdsZsEZ9GCU1Jaw+KTwOpg45vEN8T QROmPpvwPUE8L/ncskBzThr+4wJeag9CEgIhT51T9S9+tOrgUSJOoyg2gEAT05jhXato ndpd9xrFJnU4IO7zvPNef2JfHpbsHd0ASCJSPnORzveRLVHkp0UtCqusXy1s48BG/tB0 JJTKc2SqLE3uGxCEOxqsyvLnEl+guGZ5/n1dFBC+S/I2OpI5ETCAU9E+cOXG0OjlkcPA xvFUlMLomN1wFek0Z68i6VQVpoMtjWS1W55OLhBfJOB94Cl1nKUuYV/JbH/TLhsMvDU2 W8Og== X-Gm-Message-State: AAQBX9eUtjDY0Hld1N8YQSBP33FdpMbap8ofb55SFWg5lDP8SzHYJxY/ hSZtEVSUAtMZaC6mG8HjUM5AOw== X-Google-Smtp-Source: AKy350aT0sNUpbJxDY33ty2a86va5X5lR74uqhOp1UWtl1kecGv+30GwCQ+ZPJ0mxl++EaduDVyf4w== X-Received: by 2002:ac2:4f8c:0:b0:4dd:ad4b:efd with SMTP id z12-20020ac24f8c000000b004ddad4b0efdmr4975999lfs.52.1679998521030; 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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 03:15:20 -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 1/4] ARM: dts: at91-sama5d27_wlsom1: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:15:14 +0000 Message-Id: <20230328101517.1595738-2-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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Tudor Ambarus sama5d27-wlsom1 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 Acked-by: Nicolas Ferre --- arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dt= s/at91-sama5d27_wlsom1.dtsi index 83bcf9fe0152..4617805c7748 100644 --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi @@ -220,7 +220,8 @@ qspi1_flash: flash@0 { #size-cells =3D <1>; compatible =3D "jedec,spi-nor"; reg =3D <0>; - spi-max-frequency =3D <80000000>; + spi-max-frequency =3D <104000000>; + spi-cs-setup-ns =3D <7>; spi-rx-bus-width =3D <4>; spi-tx-bus-width =3D <4>; m25p,fast-read; --=20 2.40.0.348.gf938b09366-goog From nobody Mon Feb 9 01:06:44 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F32AC76195 for ; Tue, 28 Mar 2023 10:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232625AbjC1KPi (ORCPT ); Tue, 28 Mar 2023 06:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230444AbjC1KP3 (ORCPT ); Tue, 28 Mar 2023 06:15:29 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4651E6A7D for ; Tue, 28 Mar 2023 03:15:23 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id x17so15105681lfu.5 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=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=eBbbqKiVG8+rKGCo7ETtEDEhp+quoRD+Y64OsVadnWK4f5QrNDb4qXDiQqkC6NTlbo y2cA7chfdZL2hm/fbbpFlh9BjAWlNqBjkSL0mgr1yXe1e6Pui9dGaCXqzvX8i4sUegQn cVsqlEgjkJXkUZXTl8rG5IEIMF/9BjgPV5MknWaNRrBLIx061uNLCrg1Wjx9akUYEUHL DEgVCnNsg21ihV4iUdaeSIYjkRcbO069WGeAJ2KPYUEtF9F+EIIF6uQ3yVKa4V5VVzZX boPomr6RoZ2t1pf//KXKjJLFadzHt8dly1U2/P+v7tTSYoMFzZVh3x1LuTwNV/tqDAvc mAzg== X-Gm-Message-State: AAQBX9dAV7VnAy/GpmoQKkRKoNRdsHOUNFIesNtGt51H5gDFLr3lm/oN Xs5cz7pn5aYa6nisIlAPeFakfQ== 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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Nicolas Ferre --- 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 =3D <1>; compatible =3D "jedec,spi-nor"; reg =3D <0>; - spi-max-frequency =3D <80000000>; + spi-max-frequency =3D <104000000>; + spi-cs-setup-ns =3D <7>; spi-tx-bus-width =3D <4>; spi-rx-bus-width =3D <4>; m25p,fast-read; --=20 2.40.0.348.gf938b09366-goog From nobody Mon Feb 9 01:06:44 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BD19C76195 for ; Tue, 28 Mar 2023 10:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232200AbjC1KPm (ORCPT ); Tue, 28 Mar 2023 06:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbjC1KPa (ORCPT ); Tue, 28 Mar 2023 06:15:30 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A14C6E97 for ; Tue, 28 Mar 2023 03:15:24 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id x17so15105730lfu.5 for ; Tue, 28 Mar 2023 03:15:24 -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=cO246OHXyehykEfnIdwIYhgAKKAXQm3JfJftNgdxNbkdC08xt5F43czjLyt4FbK49l MPJ/iYXR5B/HQ4/FnbLDE4RlRed72/cYGAkNp789eKhPUjp+L6e0FUgUxAaK1P5bU/HM ozqwbkyXaEZvEhAYEpPhP67W55Hs/g6mfO7JDrcjC9ZnoBzYvVCY0q/UyX4ZtX9Yr3jF u+j8lTFJqUNNhukRkAY3oRMd4yTWde3lvQ4RxmHayuyDkNVhceDpRkbKSKzMGRHyFKHJ VrLSn4y3wK15vEn+kpVTecd2mO8nVJXfUkuyS+SohVkB1Q3N6/r3RlRXO7S47SFW7fEF MFAg== X-Gm-Message-State: AAQBX9e/Xrajn+kot+Esumy5Fp1xEyUDyPRq9RLf+o9NIR57KjLNaiR+ Esa8HlAScaKwPVDxtLN2GxxQXg== 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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Nicolas Ferre Tested-by: Nicolas Ferre # on sama5d2 ICP=20 --- 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/at9= 1-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 =3D <1>; compatible =3D "jedec,spi-nor"; reg =3D <0>; - spi-max-frequency =3D <80000000>; + spi-max-frequency =3D <104000000>; + spi-cs-setup-ns =3D <7>; spi-tx-bus-width =3D <4>; spi-rx-bus-width =3D <4>; m25p,fast-read; --=20 2.40.0.348.gf938b09366-goog From nobody Mon Feb 9 01:06:44 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACC1EC761A6 for ; Tue, 28 Mar 2023 10:15:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232509AbjC1KPp (ORCPT ); Tue, 28 Mar 2023 06:15:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjC1KPb (ORCPT ); Tue, 28 Mar 2023 06:15:31 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6136A4 for ; Tue, 28 Mar 2023 03:15:24 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id c9so4666796lfb.1 for ; Tue, 28 Mar 2023 03:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998523; 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=ukK4h27NxoigC7dSjFLoWuySuRs80nENr66pmBmOuMs=; b=SIWBJdYx0NsDp3HLVTSD2orttoOvTI+JMUKiRHbVMoPvP/fkf8dD95XDm51CtZ+OOo kgnz7f/HpqYgeq1C3viPhmbollrT91JCSA8Wstwy21QduknsnlZooS/DFUiOqqxy951i fa5d3HQWjTPb2PjSZewdjExQOE3f1J5afX4jl4Ok0DIU2Oj1qIaal25zxE8BTMsfnamA i1fhGP5pRtZV0JgSgFe0KmOmY27YMoVVdY+2mJiz8sx1gRfneUrbvaIkFhLyEvX8IU2j GNYnME+73KjwIe7emky/aX8/tfXBsaxAuOzykXQsVc43ggc5+0rU9eTALBG4ucDbFMvx OC/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998523; 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=ukK4h27NxoigC7dSjFLoWuySuRs80nENr66pmBmOuMs=; b=no8joZVD34LGZGd9ps1rYbts6VNgLh+xYfttkc+cCPeqraldR8/ljt7p1nfmFIxUQo dG6nAQp5IIlSPnVIwl9bJZIPd3R/HkvgbBCx+0sjH0NILYy6/riwO2FQ0+AIyec6xjCH pNEspzwbd1RWaINupzdgd+dwW+b/lxteqeHIeBMRnUf5cUGcMbZySTJLbfUO5146DdDk DDw5UwrOOnEUtXG0HdDjqDfBJbiHU/+EMB3vKkT3XDklwMxtc5RmaHTwLunaIbI9uhvZ FxsqMWhLNnPDGAios1VSE4dguSIMdDbFcGc4Sy6jGpFq74uXDmexrerQsP04Rt1sr9LF OMFw== X-Gm-Message-State: AAQBX9f9uqfbjsRjJSLXQ/Hz3jmWa5qZcPVt/eR1NZ8ogt145ToE6XJG HIcFij6Eb/zTJQ9Eob5mPqRJCw== X-Google-Smtp-Source: AKy350aae0f2FYHIpDZhSd7ktpKXsqTfGK8Y8AMhjonOemsJggYQiRFmsDVMKoCcXA5YT6VMPczprg== X-Received: by 2002:ac2:50c3:0:b0:4e8:5854:11ce with SMTP id h3-20020ac250c3000000b004e8585411cemr4748667lfm.41.1679998522917; 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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 03:15:22 -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 4/4] ARM: dts: at91: sam9x60ek: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:15:17 +0000 Message-Id: <20230328101517.1595738-5-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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Tudor Ambarus sam9x60ek 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 ~33%. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre --- arch/arm/boot/dts/at91-sam9x60ek.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-= sam9x60ek.dts index 180e4b1aa2f6..5cd593028aff 100644 --- a/arch/arm/boot/dts/at91-sam9x60ek.dts +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts @@ -578,7 +578,8 @@ flash@0 { #size-cells =3D <1>; compatible =3D "jedec,spi-nor"; reg =3D <0>; - spi-max-frequency =3D <80000000>; + spi-max-frequency =3D <104000000>; + spi-cs-setup-ns =3D <7>; spi-tx-bus-width =3D <4>; spi-rx-bus-width =3D <4>; m25p,fast-read; --=20 2.40.0.348.gf938b09366-goog