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 6C45BC433F5 for ; Thu, 19 May 2022 11:40:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B04EF84292; Thu, 19 May 2022 13:40:03 +0200 (CEST) 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="g6Ie/unG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 452078429D; Thu, 19 May 2022 13:39:45 +0200 (CEST) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 0C3D583D9F for ; Thu, 19 May 2022 13:39:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ej1-x631.google.com with SMTP id f9so9475532ejc.0 for ; Thu, 19 May 2022 04:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=tFa1km8CfGCezk3n6rO3YkCkBV08+F1TSbxIEp+rv+o=; b=g6Ie/unGvALiSVjVe3sBi7xJ7JAE2R1Q/gFRONJWSm/iew+dGMwJHXzQN+GN0g13LJ YIwAna4ch0TDJZ00KugmuP8H8VzIGSFCcHUQlpBmMGwqLOfvFQcwlJeCMB89mf67CoEs NGkShxGnl3dSmJyAd9rtBhow89aqCIqzeg/EHneJ1lXWjQP9d+U4rARgAvfouF5OoDpO 3fn/SYK7fNJALElPWTsh/xD+qFmALC9mowTjeuoGoswtgqyQCcWWEYhiVmzXbj4Ly1j+ ON+HXiTECpm6tX3Dze3bB1WKzzBQw5DK5J2oyB6ljVYbWguFjeENBx+yjIY/VvUTnduh mM5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=tFa1km8CfGCezk3n6rO3YkCkBV08+F1TSbxIEp+rv+o=; b=21GhXZrAJEzketqFgcwi4MMBvFqzM2H0EEtnjVYbsqmaHQwMAeHbENWjt+Cyg28Jiy iBORiIee0eM3O4vPpoHzjTL+GNbpwJKTabv+K19mSjaH1aa0v9U/D0BpWZOXS9W+zzEh 80RYOzCcQvDvBRANqJi860+wO1Pp4OaoqEdl8iomo1KG5P6eYsZBxUP96ywkFXJTQRe5 uHnPkxyp7nE4d02jd/I4SsnX0FFii4qHKtdmmgNXNXJvLucgCHVoOBpfURtl1ythPeUt n07tbN7bRmUXB3azGzvL8sVWz+dkczyj50Znp3fbglUHU0p0ONjJhTgMR1jXSFUWyc9l T/ig== X-Gm-Message-State: AOAM531fwbQ7FhXDQdNWxIJn/yyCJPSzIOQBiajVcQ0qhQcUA2I2Z7mU 1nLf0BhTP6AERnMk49l2qHQ= X-Google-Smtp-Source: ABdhPJwmdC9hwCiRSnNYzc4g5kgby1U9m270OUhT4+zjQZeZCv8UJDvntlDySeOm9z2xnrxeK3173Q== X-Received: by 2002:a17:906:5d04:b0:6db:7262:570e with SMTP id g4-20020a1709065d0400b006db7262570emr3907483ejt.8.1652960378596; Thu, 19 May 2022 04:39:38 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id yl8-20020a17090693e800b006f3ef214e30sm1983500ejb.150.2022.05.19.04.39.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 May 2022 04:39:38 -0700 (PDT) Message-ID: <58c53f2e-67a4-8ecf-24f7-94014609cec9@gmail.com> Date: Thu, 19 May 2022 14:36:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: Alper Nebi Yasak Subject: Re: [RFC PATCH v2 4/8] board: rockchip: Move SPI U-Boot offset to config To: Andrew Abbott Cc: Jagan Teki , Johan Jonker , Simon Glass , Samuel Dionne-Riel , Peter Robinson , Kever Yang , Philipp Tomsich , Klaus Goger , Levin Du , Quentin Schulz , Suniel Mahesh , U-Boot Mailing List References: <20220516110712.178958-1-andrew@mirx.dev> <20220516110712.178958-5-andrew@mirx.dev> Content-Language: en-US In-Reply-To: <20220516110712.178958-5-andrew@mirx.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.5 at phobos.denx.de X-Virus-Status: Clean On 16/05/2022 14:07, Andrew Abbott wrote: > This needs to be accessible to binman (via CONFIG_ preprocessor macros) > so it can build SPI images using the correct offset. > > The documentation at 'doc/device-tree-bindings/config.txt' says that > the 'u-boot,spl-payload-offset' device tree option simply overrides > 'CONFIG_SYS_SPI_U_BOOT_OFFS', so this change should not functionally > change the offset for any of the affected boards. > > Signed-off-by: Andrew Abbott > --- This sounds reasonable, but I don't really understand how people started using the device-tree property instead of changing the config value, so can't exactly say which one should be preferred. > > (no changes since v1) > > arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi | 1 - > arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 ---- > arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 1 - > arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 4 ---- > arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ---- I guess this can be done for rk3399-gru-u-boot.dtsi as well, because I did cargo-cult it there from a previous commit... > configs/lion-rk3368_defconfig | 1 + > configs/pinebook-pro-rk3399_defconfig | 1 + > configs/puma-rk3399_defconfig | 2 +- > configs/roc-pc-rk3399_defconfig | 1 + > configs/rockpro64-rk3399_defconfig | 1 + > 10 files changed, 5 insertions(+), 15 deletions(-) > > diff --git a/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi b/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi > index 7826d1e70b..6840182f03 100644 > --- a/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi > +++ b/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi > @@ -7,7 +7,6 @@ > > / { > config { > - u-boot,spl-payload-offset = <0x40000>; /* @ 256KB */ > u-boot,mmc-env-offset = <0x4000>; /* @ 16KB */ > }; > > diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi > index 2d87bea933..d1d0ac460d 100644 > --- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi > +++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi > @@ -10,10 +10,6 @@ > chosen { > u-boot,spl-boot-order = "same-as-spl", &sdhci, &spiflash, &sdmmc; > }; > - > - config { > - u-boot,spl-payload-offset = <0x60000>; /* @ 384KB */ > - }; > }; > > &edp { > diff --git a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi > index e0476ab25c..f3f8619716 100644 > --- a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi > +++ b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi > @@ -14,7 +14,6 @@ > > / { > config { > - u-boot,spl-payload-offset = <0x40000>; /* @ 256KB */ > u-boot,mmc-env-offset = <0x4000>; /* @ 16KB */ > u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */ > u-boot,boot-led = "module_led"; > diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi > index e3c9364e35..a54e554d8a 100644 > --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi > +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi > @@ -11,10 +11,6 @@ > u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdhci, &sdmmc; > }; > > - config { > - u-boot,spl-payload-offset = <0x60000>; /* @ 384KB */ > - }; > - > vcc_hub_en: vcc_hub_en-regulator { > compatible = "regulator-fixed"; > enable-active-high; > diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi > index 37dff04adf..bd65496df3 100644 > --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi > +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi > @@ -9,10 +9,6 @@ > chosen { > u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdmmc, &sdhci; > }; > - > - config { > - u-boot,spl-payload-offset = <0x60000>; /* @ 384KB */ > - }; > }; > > &spi1 { > diff --git a/configs/lion-rk3368_defconfig b/configs/lion-rk3368_defconfig > index 426913816b..91630c822b 100644 > --- a/configs/lion-rk3368_defconfig > +++ b/configs/lion-rk3368_defconfig > @@ -17,6 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xFF180000 > CONFIG_DEBUG_UART_CLOCK=24000000 > CONFIG_SPL_SPI_FLASH_SUPPORT=y > CONFIG_SPL_SPI=y > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 > CONFIG_SYS_LOAD_ADDR=0x800800 > CONFIG_DEBUG_UART=y > CONFIG_FIT=y > diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig > index 8ca1d0708f..c5ebf62f02 100644 > --- a/configs/pinebook-pro-rk3399_defconfig > +++ b/configs/pinebook-pro-rk3399_defconfig > @@ -24,6 +24,7 @@ CONFIG_SPL_STACK_R=y > CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 > CONFIG_SPL_MTD_SUPPORT=y > CONFIG_SPL_SPI_LOAD=y > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 > CONFIG_TPL=y > CONFIG_CMD_BOOTZ=y > CONFIG_CMD_GPIO=y > diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig > index 7ce2dc0719..6b7898be49 100644 > --- a/configs/puma-rk3399_defconfig > +++ b/configs/puma-rk3399_defconfig > @@ -27,7 +27,7 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200 > CONFIG_SPL_I2C=y > CONFIG_SPL_POWER=y > CONFIG_SPL_SPI_LOAD=y > -CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 > CONFIG_CMD_BOOTZ=y > CONFIG_CMD_GPT=y > CONFIG_CMD_I2C=y > diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig > index 4684fa6e74..2d7e2ad563 100644 > --- a/configs/roc-pc-rk3399_defconfig > +++ b/configs/roc-pc-rk3399_defconfig > @@ -25,6 +25,7 @@ CONFIG_SPL_STACK_R=y > CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x20000 > CONFIG_SPL_ENV_SUPPORT=y > CONFIG_SPL_SPI_LOAD=y > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 > CONFIG_TPL=y > CONFIG_CMD_BOOTZ=y > CONFIG_CMD_GPT=y > diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig > index e6f7a8469a..8c45a6c575 100644 > --- a/configs/rockpro64-rk3399_defconfig > +++ b/configs/rockpro64-rk3399_defconfig > @@ -23,6 +23,7 @@ CONFIG_MISC_INIT_R=y > CONFIG_SPL_STACK_R=y > CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 > CONFIG_SPL_SPI_LOAD=y > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 > CONFIG_TPL=y > CONFIG_CMD_BOOTZ=y > CONFIG_CMD_GPT=y