From patchwork Tue Mar 28 10:07:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13190825 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 74C94C76196 for ; Tue, 28 Mar 2023 10:08:30 +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=nXmhE0VzDsuOkoSYB940z0/G2euTcj1b6eufyqgnrhs=; b=u+Ep+MBLnFxzMx YKY5/gBk1MurE5BbwT2Sy+vuQv3lSiOdihx0z5EQ9fkV7VmHyCYh9gmaGGFzegoMJwIo/3UFWhTGf xYbu8sUqyA2pNnf1bT/S53QIrn6/6JcgAYP2E0T3HkAmDfQGib17/x3/YvByy6eYXEIZsecLCW7KY a2kcOCPitC6FffII43um9KPGZWgzSubs1d+HC4na/xZ9m+50XwhZsLL0DpH2Pdj69RmBMwqaH67Jk 29iwixJidymVUWkRcspxHy/kN9kR8qbz7+R54nvR7hpQCHuxt3BtpdLZaBi/7aqZmn+AwuuiFYSKb FFYsUYmtGwR2nem+rxYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph6Ex-00DqiV-13; Tue, 28 Mar 2023 10:07:43 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph6Ek-00Dqai-2f for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 10:07:33 +0000 Received: by mail-lf1-x12f.google.com with SMTP id br6so15035205lfb.11 for ; Tue, 28 Mar 2023 03:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998048; 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=OQaFD4osD3DHxIZa/buALI2kTZuKgrQvblLMK2wYDmo=; b=Zy7aNvp+kqqyuw2iDArozGHYDREgAE5yRQVhgOogYSiEm6Zn0Ko4N4ZAHFbpiQMkV6 c3SXzZStijEFJyddV1boMdGPxF5p40F3EW+nuMcCJlVtscNJ+BHSfUQ7rpTJTw0aaN6G pWJTJIEyX31yc3WhDrGT+60nz+qL3NSkz9t7jGLa46lx+qMwuA7s8ELo2XgL19oq6zM+ TDnut5eqzKfbRmC4T1Pdk0IQAo7txXaE50z57AMV5ywBV7s6SauA0iWWHTD7nOZiWDlG E0J6lXA8h4B5/pe2Ovhguk9Ymci+DuR5fdKWR1Mcsq9JoiDah7gEfFwQ4WloajTzA8KD oxxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998048; 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=OQaFD4osD3DHxIZa/buALI2kTZuKgrQvblLMK2wYDmo=; b=B9WgEqe5s1x9kP9shLiWlP+O524IidQXgBT252PBYSWHTVDWwlw0iPQx+cbSM5jlKu Fsgy0w3CsaYxe4SUJL2vl1HJAdZ4n22ZWEA1uKLL1z2Iv7DoxiugXzJnTHZyP6eP3Pae pnV5OGcu04Lsg8WY1xj64JPE/xX3LVPHp08P1sLoDuc4mh9YGvvboB2F13zv+NzvMVEL 65qp7Ek2IOwQljRtdqPXGfNuY3SBBPSRw9y1g9hxkbezPljt89DNLkICVtootFReZANv WTkGn5iGT+lPfZytG+1Uu1dUFw5FBtUAqKlEWdDaOIuSAPLw4WyZ2mnTUTZu4geM9UCz B3zg== X-Gm-Message-State: AAQBX9dVjJmx6r5yHK/pFoRDv2AM/WiM1NehwXnYWut9jAwHFVyV6jjd hkmeESD12fB71MCo7hJAm+D7Tw== X-Google-Smtp-Source: AKy350aW1f4TTMZKwNfQpTfuRkMYUA25SWc5xDJeJyeTqHxQA7xhI0DQB4Zmzndeb1ph+N1atefO7Q== X-Received: by 2002:ac2:5519:0:b0:4de:e802:b7e3 with SMTP id j25-20020ac25519000000b004dee802b7e3mr4371321lfk.19.1679998048436; Tue, 28 Mar 2023 03:07:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 03:07:27 -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 1/4] ARM: dts: at91-sama5d27_wlsom1: Set sst26vf064b SPI NOR flash at its maximum frequency Date: Tue, 28 Mar 2023 10:07:20 +0000 Message-Id: <20230328100723.1593864-2-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_030730_864269_9311702F 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-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 --- 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/dts/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 = <1>; compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <104000000>; + spi-cs-setup-ns = <7>; spi-rx-bus-width = <4>; spi-tx-bus-width = <4>; m25p,fast-read;