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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47A97C6FA8E for ; Fri, 3 Mar 2023 03:30:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A66F885D21; Fri, 3 Mar 2023 04:27:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bPicBOPg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98FE785D01; Fri, 3 Mar 2023 04:27:54 +0100 (CET) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9A38985CD5 for ; Fri, 3 Mar 2023 04:27:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-qt1-x82a.google.com with SMTP id l18so1642365qtp.1 for ; Thu, 02 Mar 2023 19:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677814070; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ug4XQWbdhwSpRm7zzMBtPrZ3i8BbUhzHjOfQ+TqbLCI=; b=bPicBOPgHw8GaVAa9esvavoHz5J+xNXaLsd7aeRmfPAe7S00LbIw2Qh6YL4LYLvss3 lKhbH+Bu0/FxRnziqN6AGy7vkA1pmN6m5YoINL28oG8yFzSQhtyLiqphPnlv43TipY1D t9rxu8Vwqql5ff6lgtz18uOtp4NSgPyIstb17ms/sP3XSluYcTngI3uygdR6BBMbKim5 eNkFQS7ht1NtstfrwEiaPCyWHBkUmvYldgJgsqltiBWSpdHjjVqBy8vdsn6JgpUO2NVg sTZR9plecPbNU0Tykyw2ICKid1MEp2AVz1W++0LuzpchNJU1bH5nZUR+FQr+rg/6dUrh yXVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677814070; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ug4XQWbdhwSpRm7zzMBtPrZ3i8BbUhzHjOfQ+TqbLCI=; b=QfmXZ3dwFlKVyiEov1eWCUOmgBGa4i3YJFd0UrdzYfBqqWc7bm+0Rlsa3ixZyUpCRL EMSRRM6jrPGLeYfYbalic0KEaeTTziOeJFn+kyQi7lklAK2NIpCsswxNCFfEnlmlwGT1 A8GBc0ih+9lSeZ4oyLK9JJvMxjTqun6+nIPvZ+FPGkgShyJymprosOkaRUEDHn9TgLuL wSrQpnOGhOK1CL5lIcSEzsOlm6+2zhvE+ydQKo3o16KXctWZtcQdit5533//CXVBxPyP 32UgUA+ukgQiLdMp8oSoRpR4OEjhaDjR0kMEVwX4RX/S+S1Vm7xZOrX5TD/sXRZCRWuT umyA== X-Gm-Message-State: AO0yUKWd7m2mQH0LKWu/otTFH8/PAhvx2f6QLSg0BURHXQA3EedydYS6 fPI/HRBtAI3kDr82J2yyx8klfSTPoP8= X-Google-Smtp-Source: AK7set9ZnaWfaPn2+PujpVz/mhGTPIJv05vv0PFeXKWNCFHUQNepemSaH8jaGhffolpPdC0yu1WVVg== X-Received: by 2002:a05:622a:308:b0:3b8:588c:40e9 with SMTP id q8-20020a05622a030800b003b8588c40e9mr704801qtw.19.1677814070280; Thu, 02 Mar 2023 19:27:50 -0800 (PST) Received: from localhost.localdomain (76-229-100-169.lightspeed.irvnca.sbcglobal.net. [76.229.100.169]) by smtp.gmail.com with ESMTPSA id l18-20020ac84592000000b003b9b48cdbe8sm955797qtn.58.2023.03.02.19.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 19:27:50 -0800 (PST) From: Tony Dinh To: U-Boot Mailing List , Stefan Roese Cc: Tom Rini , Martin Rowe , =?UTF-8?q?Pali=20Roh=E1r?= , Josua Mayer , Tony Dinh Subject: [RESEND PATCH] arm: mvebu: Set common SPI flash default speed and mode Date: Thu, 2 Mar 2023 19:27:29 -0800 Message-Id: <20230303032730.4320-1-mibodhi@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean CONFIG_SF_DEFAULT_SPEED is used in SPL SPI to configure and probe the flash device during DM SPI uclass probing process, if the spi-max-frequency is not available in the DTB. Currently the max frequency is not available, because of the probing mechanism in SPI uclass has not been fully updated to DM. The CONFIG_SF_DEFAULT_SPEED is set to 1Mhz if a board defconfig does not specify it. This speed is too slow and result in a few seconds delay while the u-boot image is loaded from flash. Based on a survey of the device tree specifications for MVEBU boards, a sane default value should be 10Mhz. The default of 10Mhz enables an almost instantaneously loading of the u-boot image. Note that this patch depends on this patch series (has been merged to u-boot-marvell/next): https://lists.denx.de/pipermail/u-boot/2023-March/511038.html - RESEND: correct spelling of SF_DEFAULT_MODE Signed-off-by: Tony Dinh --- arch/arm/mach-mvebu/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index cdb1776a66..8f744e2177 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -424,6 +424,16 @@ config SECURED_MODE_CSK_INDEX default 0 depends on SECURED_MODE_IMAGE +config SF_DEFAULT_SPEED + int "Default speed for SPI flash in Hz" + default 10000000 + depends on MVEBU_SPL_BOOT_DEVICE_SPI + +config SF_DEFAULT_MODE + hex "Default mode for SPI flash" + default 0x0 + depends on MVEBU_SPL_BOOT_DEVICE_SPI + source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" -- 2.30.2