From patchwork Tue Mar 28 10:15:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13190867 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 0ADC3C761A6 for ; Tue, 28 Mar 2023 10:16:31 +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=/rDbai1jv7eO2pwV0D+Nb8vurU0vllaIaiOVc9LIWLs=; b=M2WuU0FgB/cPOv LqpqjqAymwN5ZqsKFow6l8DlydFVNq4p1mBIeHIuuNvhmbXoYRCHKBmPr3Iip1F74F67J0Jp3s4Iy IldVlwRgpbcmAq6tZzmut6yZnLW1wteiqpsjBLc6VBIEY63Eq7Z66ZKhwjwkrxpuP/oqu0Rb81Gpu +BKs6rHIqUoLWiHIZKwHxhBZjM4N0hgM+gce6KThB7EFro8J4VF0UqvUKsUgiYj6E3bZcTnZgOa4g cSNEpZVXXxm+HsChETLx30lSeanOcqy9kC31jRlZ5c5rH5FxpqiWc3FmKyKNJh/z5jOtjRJeY3npk ut1w6yvnui6Ah2faVEKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph6Mi-00DtgQ-0X; Tue, 28 Mar 2023 10:15:44 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph6MY-00DtYV-2J for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 10:15:35 +0000 Received: by mail-lf1-x130.google.com with SMTP id j11so15056121lfg.13 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=qrw4Uw5crPD6KExWzPg8NQDh2XoL3DjMEZASu0VBdWD2J5yjRgMpqvdjPQVtIFLk6W SIAxaQEM4gDfMvZce8UKX0EJfjEqIk7pwOdwtLfvhS0DHkoHzMVlXdZZM4ZpTjoOlW0u zjYjpOejkpuDPM6fOWEt3tgjbt7E6kVGvDhonOntWkhR/Cm5kbV4prj9GX1utZ/ttm8i gVXD12Pdo84DfOL/u3LeN7VN+D/ecLeDWYIKaRQs8Lao3sgvQPWJDvcg6vfeLFOgI+gc bS4Jd9XpHiRnvxNqAUW+JHF0N5G+jA3oBcE5FBq5yQuOMKCsIa2yuivZpSMyzoasNqEz j3rQ== X-Gm-Message-State: AAQBX9eXpbI5r6ZSVhZG4AlxVYUb+5KjmfhWQOPWPo//01p6H5VdGCJE jrXEuJ53EJ23L3QXt4O9x7Hjsg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230328_031534_760838_96177F53 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 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 --- 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 = <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;