public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
To: Andrew Abbott <andrew@mirx.dev>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
	Johan Jonker <jbx6244@gmail.com>, Simon Glass <sjg@chromium.org>,
	Samuel Dionne-Riel <samuel@dionne-riel.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Klaus Goger <klaus.goger@theobroma-systems.com>,
	Levin Du <djw@t-chip.com.cn>,
	Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	Suniel Mahesh <sunil@amarulasolutions.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [RFC PATCH v2 4/8] board: rockchip: Move SPI U-Boot offset to config
Date: Thu, 19 May 2022 14:36:59 +0300	[thread overview]
Message-ID: <58c53f2e-67a4-8ecf-24f7-94014609cec9@gmail.com> (raw)
In-Reply-To: <20220516110712.178958-5-andrew@mirx.dev>

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 <andrew@mirx.dev>
> ---

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

  reply	other threads:[~2022-05-19 11:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 11:07 [RFC PATCH v2 0/8] Build Rockchip final images using binman Andrew Abbott
2022-05-16 11:07 ` [RFC PATCH v2 1/8] binman: mkimage: Support ':'-separated inputs Andrew Abbott
2022-05-19 11:36   ` Alper Nebi Yasak
2022-05-22  0:03     ` Andrew Abbott
2022-05-16 11:07 ` [RFC PATCH v2 2/8] rockchip: Add binman definitions for final images Andrew Abbott
2022-05-19 11:36   ` Alper Nebi Yasak
2022-05-22  0:55     ` Andrew Abbott
2022-05-29 16:31       ` Alper Nebi Yasak
2022-05-16 11:07 ` [RFC PATCH v2 3/8] soc: rockchip: Include common U-Boot dtsi file Andrew Abbott
2022-05-19 11:36   ` Alper Nebi Yasak
2022-05-16 11:07 ` [RFC PATCH v2 4/8] board: rockchip: Move SPI U-Boot offset to config Andrew Abbott
2022-05-19 11:36   ` Alper Nebi Yasak [this message]
2022-05-16 11:07 ` [RFC PATCH v2 5/8] rockchip: Remove obsolete Makefile targets Andrew Abbott
2022-05-16 11:07 ` [RFC PATCH v2 6/8] rockchip: Enable binman for ARM64 Andrew Abbott
2022-05-19 11:37   ` Alper Nebi Yasak
2022-05-22  1:27     ` Andrew Abbott
2022-05-16 11:07 ` [RFC PATCH v2 7/8] doc: rockchip: Update for new binman image generation Andrew Abbott
2022-05-16 11:07 ` [RFC PATCH v2 8/8] board: rockpro64: Enable building SPI image Andrew Abbott
2022-05-16 15:13 ` [RFC PATCH v2 0/8] Build Rockchip final images using binman Jerome Forissier
2022-05-19  9:59   ` Andrew Abbott
2022-05-19 11:35 ` Alper Nebi Yasak
2022-05-21 23:47   ` Andrew Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58c53f2e-67a4-8ecf-24f7-94014609cec9@gmail.com \
    --to=alpernebiyasak@gmail.com \
    --cc=andrew@mirx.dev \
    --cc=djw@t-chip.com.cn \
    --cc=jagan@amarulasolutions.com \
    --cc=jbx6244@gmail.com \
    --cc=kever.yang@rock-chips.com \
    --cc=klaus.goger@theobroma-systems.com \
    --cc=pbrobinson@gmail.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=samuel@dionne-riel.com \
    --cc=sjg@chromium.org \
    --cc=sunil@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox