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 49D30C6FA8E for ; Fri, 3 Mar 2023 01:27:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B51185B0A; Fri, 3 Mar 2023 02:27:04 +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="Wy5NqwX3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96EB985CD5; Fri, 3 Mar 2023 02:27:02 +0100 (CET) Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) (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 D150685CC4 for ; Fri, 3 Mar 2023 02:26:59 +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-oi1-x234.google.com with SMTP id c11so723470oiw.2 for ; Thu, 02 Mar 2023 17:26:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677806818; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kYp8qkX7x0lloGs3svqpXM0FFOrtZqB8LbOuTsHNp1o=; b=Wy5NqwX3mZasSDJoU03+Piv0e3IftUZ/jw6XFe+2K5NCwtv9Ld5zbrKLt43dzyfh+G ybTeJxlOUHo7a1vaw26b4I5Rbso1fRZ5A3ENAPT8GEBCp9rrwCLZWUHN8TIr2sLN0vIe O38ltal7SXUPsn4X8ue510VGOG09L/3uAqiEbu1zkmxoF0uEB7MhbwS0Ir8NqZzxDjGJ GXsPAfzGOIK8bP6sR5SNr6PgXefWTCG9gUoYswoqdcTVBQGDTc+kwXFnVV+1qgk4ezYA 6xqIhhZjDLV/lUOk1lPZbs/IbzAI+mzmFbrZkrifINmdJ7Ne7cphauPCqfkrpJI+O6IX 8Iog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677806818; 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=kYp8qkX7x0lloGs3svqpXM0FFOrtZqB8LbOuTsHNp1o=; b=xgT/ORSJVq0QeUp++lmrnFVqh8nYWMFHuNEf/1zc8jKujtOgyYv9T1FuSc0NdWRbgK lrwrFTX+RzqKJ62rEucbyZ2qGc552iPoHohkRudJKfv09aEzTpTRkM4K/loP67iX6GOW 2iZh53NmbXE+goYBSSDQ1KHsYSNHmpvenHEZfRz3fa62Oj6JuW2AzyMOIx2UX2G7ZSGA aJV327mhcpuAedeKxKDrhzKlF7VDPdbh5ER74QYKUPEyIniXQFPFzkJaOcbLHqkUCu3Y BrOwiCcFdZjSUi8L+vZQ6wPADMquH2N1d6GmYjtzuYOLCz9exa0FAKdw2MO7NbRan7q6 GjqA== X-Gm-Message-State: AO0yUKVc7JXSFJwuXeZVT95K80qTjTq0ljfIH92uKxrx7sl4OA0pr4by /wyGyUNfi8RrWaA+Co5j+3d0zY/4UAg= X-Google-Smtp-Source: AK7set+1Y+euStm//JYWnOmpjD1JrKtxlsroRF+FLVtj0Y2kzjm2krB/V1NBbiBoaVOo0zjuzD4t/g== X-Received: by 2002:aca:1c16:0:b0:378:2762:2770 with SMTP id c22-20020aca1c16000000b0037827622770mr5591888oic.15.1677806818302; Thu, 02 Mar 2023 17:26:58 -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 p13-20020a05680811cd00b0037d59e90a07sm308650oiv.55.2023.03.02.17.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 17:26:58 -0800 (PST) From: Tony Dinh To: U-Boot Mailing List , Stefan Roese Cc: Tom Rini , =?UTF-8?q?Pali=20Roh=E1r?= , Martin Rowe , Josua Mayer , Tony Dinh Subject: [PATCH] arm: mvebu: Set common SPI flash default speed and mode Date: Thu, 2 Mar 2023 17:26:38 -0800 Message-Id: <20230303012639.8139-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 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..26a2a08d8a 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 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