From mboxrd@z Thu Jan 1 00:00:00 1970 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 4ED2CC64EC7 for ; Sat, 25 Feb 2023 10:51:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 74BF28585F; Sat, 25 Feb 2023 11:51:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=solid-run.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=solid-run-com.20210112.gappssmtp.com header.i=@solid-run-com.20210112.gappssmtp.com header.b="zhXYShxI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EAA528585F; Sat, 25 Feb 2023 11:51:34 +0100 (CET) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 C90EE857E4 for ; Sat, 25 Feb 2023 11:51:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=solid-run.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=josua@solid-run.com Received: by mail-ed1-x531.google.com with SMTP id ec43so7056779edb.8 for ; Sat, 25 Feb 2023 02:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solid-run-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:from:content-language:references:cc:to:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=MEQK3duLUBJ5w7fLTkxCl7INyNzxF2Be5/wbVi1vJIw=; b=zhXYShxII9WqADX6Q6l2WMMGL4b7Wvf1bWCNC1u23Bu3Ip1inRKWubL3Mjr562zNPe mE2316nP+uTBOWkCt0sTX9+HXGqtEW2wTkEC5NTePoVnQoPFogy5RcuoB2vVJd8IOXoO RsbJvOjO8JLLOk9oIpbDyUoWcecMfIbajmqL/Tx9+GuEtKYhwHx/Fd9zIUeLK7/WmHdc peNPCfeTqe/AMmezONZQWsILp4jNit21o+Ti5+hAPz7fH1KRQ/svtkmY4b115enqfAY5 zQFnDiMDevbIvf4LJYftKWD3sm29nT6xV/jou8IhyGfUVxxbMRyCslL5RpIYO6hyXDVS eHlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:content-language:references:cc:to:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=MEQK3duLUBJ5w7fLTkxCl7INyNzxF2Be5/wbVi1vJIw=; b=engM5MXl9OnATX+HG8MOqCR8Lq1REyF5nV4xx/lQDPU+tJNMkudwFW11WnpkkSI9PM CLoa/7/AjQLfy8HYm+JA1VNiSxvllQQFNKw2MAzyQ3xxPOuwl9b+qCMwwUE4XoJ3Vd0i aJTVIOs76g6U7n+xhvYcYe2VrHw2fKL5y1xo/uj7Qf/Ob+FTLEYjRPpxrC773oHl+ZsP mgD8t1wG1F4zT507Nomz3FEspPjHIRYW1iIq6iId13rI6PPeZbcX/rcXgrZFj3GtDsrd EotjEUKN5WU8zFyowUAjOuBiuPDA8l4gkeq5I5b2HmYGgv+uubNOZZbXo6bRpYeq7Mhn aymg== X-Gm-Message-State: AO0yUKXOmy8uTTH5ZvrwxUc4e2nScNdYKKHF2VEiIQFW+t5D+urKQYP2 39D9UM6c5h01K7tAzhMs+tD47Q== X-Google-Smtp-Source: AK7set86YqIrP3FkiwfIUZFLzTeBFm0aRnz3vHKH9kmEw/gQwAgyu2hdZHMXZpsuMmzaU3QOh4sdlw== X-Received: by 2002:a17:907:d30d:b0:8b2:e93:3f59 with SMTP id vg13-20020a170907d30d00b008b20e933f59mr1986329ejc.31.1677322290258; Sat, 25 Feb 2023 02:51:30 -0800 (PST) Received: from [192.168.1.154] (p5b08af24.dip0.t-ipconnect.de. [91.8.175.36]) by smtp.gmail.com with ESMTPSA id c15-20020a170906340f00b008e7916f0bdesm706820ejb.138.2023.02.25.02.51.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Feb 2023 02:51:29 -0800 (PST) Message-ID: <1ca418af-fa98-a982-3ac3-a94bdf894588@solid-run.com> Date: Sat, 25 Feb 2023 11:51:28 +0100 MIME-Version: 1.0 Subject: Re: [PATCH 2/2] arm: mvebu: clearfog: Add defconfig for SPI booting To: Martin Rowe , =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: mibodhi@gmail.com, sr@denx.de, u-boot@lists.denx.de References: <20230221201925.9644-1-pali@kernel.org> <20230225014220.13166-1-martin.p.rowe@gmail.com> <20230225014220.13166-3-martin.p.rowe@gmail.com> <20230225074134.c33li7ys5cktcah2@pali> Content-Language: en-US From: Josua Mayer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.39 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 Hi Pali, Martin, Am 25.02.23 um 10:48 schrieb Martin Rowe: > On Sat, 25 Feb 2023 at 07:41, Pali Rohár wrote: >> On Saturday 25 February 2023 11:42:20 Martin Rowe wrote: >>> This new clearfog_spi_defconfig file is copy of existing >>> clearfog_defconfig file and changed to instruct build system to >>> generate final kwbimage for SPI booting and to store the >>> environment in SPI as well. >>> >>> Signed-off-by: Martin Rowe >>> --- >>> .../{clearfog_sata_defconfig => clearfog_spi_defconfig} | 7 ++++++- >>> 1 file changed, 6 insertions(+), 1 deletion(-) >>> copy configs/{clearfog_sata_defconfig => clearfog_spi_defconfig} (93%) >>> >>> diff --git a/configs/clearfog_sata_defconfig b/configs/clearfog_spi_defconfig >>> similarity index 93% >>> copy from configs/clearfog_sata_defconfig >>> copy to configs/clearfog_spi_defconfig >>> index 84f900bf50..31b1e9fce8 100644 >>> --- a/configs/clearfog_sata_defconfig >>> +++ b/configs/clearfog_spi_defconfig >>> @@ -3,20 +3,24 @@ CONFIG_ARCH_CPU_INIT=y >>> CONFIG_SYS_THUMB_BUILD=y >>> CONFIG_ARCH_MVEBU=y >>> CONFIG_TEXT_BASE=0x00800000 >>> +CONFIG_SPL_GPIO=y >>> CONFIG_SPL_LIBCOMMON_SUPPORT=y >>> CONFIG_SPL_LIBGENERIC_SUPPORT=y >>> CONFIG_NR_DRAM_BANKS=2 >>> CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y >>> CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000 >>> CONFIG_TARGET_CLEARFOG=y >>> -CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA=y >>> +CONFIG_ENV_SECT_SIZE=0x10000 >>> CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" >>> CONFIG_SPL_TEXT_BASE=0x40000030 >>> +CONFIG_SPL_MMC=y >>> CONFIG_SPL_SERIAL=y >>> CONFIG_SPL_STACK=0x4002c000 >>> CONFIG_SPL=y >>> CONFIG_DEBUG_UART_BASE=0xf1012000 >>> CONFIG_DEBUG_UART_CLOCK=250000000 >>> +CONFIG_SPL_LIBDISK_SUPPORT=y >>> +# CONFIG_SPL_SPI is not set >> Any reason to disable it? > It's the same as MMC and SATA defconfigs this way, it just needs to be > explicit here because of something SPI related that we've enabled. > SPL_DM_SPI is enabled in all of the configs, so I'm guessing that it > is providing driver support because everything seems to work without > SPL_SPI. > > I re-tested with and without the config and it doesn't seem to change > anything. With it enabled the file is 588K instead of 580K without it, > but that's not really an issue with 4M of flash storage available. While I haven't tested this patchset - I have tested SPI booting with v2022.01 after applying lots of patches. I found that the magic value reported by bootrom when booting from SPI will be 0x34 on clearfog. The current sources only handle 0x32, hence having or not having SPL_SPI will always lead to returning to the bootrom. Please consider pulling in this patch: https://github.com/SolidRun/u-boot/commit/f4f8a69740a8415c05359e01e51650f445cda03d I can send it separately if you like. which I have tested by adding these config options: |CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI=y # CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC is not set # CONFIG_SPL_MMC is not set CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SPL_SPI_FLASH_TINY=y CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x0 # CONFIG_ENV_IS_IN_MMC is not set CONFIG_ENV_IS_IN_SPI_FLASH=y # CONFIG_ENV_SECT_SIZE_AUTO is not set # CONFIG_USE_ENV_SPI_BUS is not set # CONFIG_USE_ENV_SPI_CS is not set # CONFIG_USE_ENV_SPI_MAX_HZ is not set # CONFIG_USE_ENV_SPI_MODE is not set # CONFIG_ENV_SPI_EARLY is not set CONFIG_ENV_ADDR=0x0| >>> CONFIG_SYS_LOAD_ADDR=0x800000 >>> CONFIG_DEBUG_UART=y >>> CONFIG_AHCI=y >>> @@ -59,6 +63,7 @@ CONFIG_SYS_I2C_MVTWSI=y >>> CONFIG_I2C_EEPROM=y >>> CONFIG_SPL_I2C_EEPROM=y >>> CONFIG_MMC_BROKEN_CD=y >>> +CONFIG_SPL_DM_MMC=y >>> CONFIG_SUPPORT_EMMC_BOOT=y >>> CONFIG_MMC_SDHCI=y >>> CONFIG_MMC_SDHCI_SDMA=y >>> -- >>> 2.39.2 >>>