Re: [PATCH] ARM: dts: renesas: Switch to using upstream DT

2024-03-26 Thread Sumit Garg
On Mon, 25 Mar 2024 at 13:48, Marek Vasut
 wrote:
>
> Enable OF_UPSTREAM to use upstream DT and add renesas/ prefix to the
> DEFAULT_DEVICE_TREE and OF_LIST. And thereby directly build DTB from
> dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/
> directory.
>
> The configuration update has been done using the following script:
> ```
> sed -i '/^CONFIG_DEFAULT_DEVICE_TREE/ s@="@/@' `git grep -li renesas 
> configs`
> sed -i '/^CONFIG_OF_LIST/ s@r8a@renesas/&@g' `git grep -li renesas configs`
> ```
>
> The RZN1 Snarc board does not seem to have a matching Linux kernel
> DT counterpart, this is currently not switched to OF upstream.
>
> Signed-off-by: Marek Vasut 
> ---
> Cc: Adam Ford 
> Cc: Biju Das 
> Cc: Lad Prabhakar 
> Cc: Paul Barker 
> Cc: Ralph Siemsen 
> Cc: Sumit Garg 
> Cc: Tom Rini 
> ---
>  arch/arm/Kconfig | 1 +
>  configs/alt_defconfig| 2 +-
>  configs/blanche_defconfig| 2 +-
>  configs/gose_defconfig   | 2 +-
>  configs/grpeach_defconfig| 2 +-
>  configs/koelsch_defconfig| 2 +-
>  configs/lager_defconfig  | 2 +-
>  configs/porter_defconfig | 2 +-
>  configs/rzn1_snarc_defconfig | 1 +
>  configs/silk_defconfig   | 2 +-
>  configs/stout_defconfig  | 2 +-
>  11 files changed, 11 insertions(+), 9 deletions(-)
>

Reviewed-by: Sumit Garg 

-Sumit

> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index a0842e19330..ab8f30f1142 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1068,6 +1068,7 @@ config ARCH_RENESAS
> imply BOARD_EARLY_INIT_F
> imply CMD_DM
> imply FAT_WRITE
> +   imply OF_UPSTREAM
> imply SYS_THUMB_BUILD
> imply ARCH_MISC_INIT if DISPLAY_CPUINFO
>
> diff --git a/configs/alt_defconfig b/configs/alt_defconfig
> index 06e9e11f297..c9ca22cbe8f 100644
> --- a/configs/alt_defconfig
> +++ b/configs/alt_defconfig
> @@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
>  CONFIG_ENV_OFFSET=0xC
>  CONFIG_ENV_SECT_SIZE=0x4
>  CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="r8a7794-alt"
> +CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7794-alt"
>  CONFIG_SPL_TEXT_BASE=0xe630
>  CONFIG_ARCH_RENESAS_BOARD_STRING="Alt"
>  CONFIG_R8A7794=y
> diff --git a/configs/blanche_defconfig b/configs/blanche_defconfig
> index c392055e5a7..a2823a614a5 100644
> --- a/configs/blanche_defconfig
> +++ b/configs/blanche_defconfig
> @@ -12,7 +12,7 @@ CONFIG_ENV_SIZE=0x4
>  CONFIG_ENV_OFFSET=0x4
>  CONFIG_ENV_SECT_SIZE=0x4
>  CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="r8a7792-blanche"
> +CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7792-blanche"
>  CONFIG_ARCH_RENESAS_BOARD_STRING="Blanche"
>  CONFIG_R8A7792=y
>  CONFIG_TARGET_BLANCHE=y
> diff --git a/configs/gose_defconfig b/configs/gose_defconfig
> index 35edc677c48..0f76ae147ef 100644
> --- a/configs/gose_defconfig
> +++ b/configs/gose_defconfig
> @@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
>  CONFIG_ENV_OFFSET=0xC
>  CONFIG_ENV_SECT_SIZE=0x4
>  CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="r8a7793-gose"
> +CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7793-gose"
>  CONFIG_SPL_TEXT_BASE=0xe630
>  CONFIG_ARCH_RENESAS_BOARD_STRING="Gose"
>  CONFIG_R8A7793=y
> diff --git a/configs/grpeach_defconfig b/configs/grpeach_defconfig
> index 0c581b634a2..70a80088bfb 100644
> --- a/configs/grpeach_defconfig
> +++ b/configs/grpeach_defconfig
> @@ -11,7 +11,7 @@ CONFIG_ENV_SIZE=0x1
>  CONFIG_ENV_OFFSET=0x8
>  CONFIG_ENV_SECT_SIZE=0x1
>  CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="r7s72100-gr-peach"
> +CONFIG_DEFAULT_DEVICE_TREE="renesas/r7s72100-gr-peach"
>  CONFIG_RZA1=y
>  CONFIG_OF_LIBFDT_OVERLAY=y
>  CONFIG_SYS_MONITOR_LEN=524288
> diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
> index ad411b45141..a912e58cf4d 100644
> --- a/configs/koelsch_defconfig
> +++ b/configs/koelsch_defconfig
> @@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
>  CONFIG_ENV_OFFSET=0xC
>  CONFIG_ENV_SECT_SIZE=0x4
>  CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="r8a7791-koelsch"
> +CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7791-koelsch"
>  CONFIG_SPL_TEXT_BASE=0xe630
>  CONFIG_ARCH_RENESAS_BOARD_STRING="Koelsch"
>  CONFIG_R8A7791=y
> diff --git a/configs/lager_defconfig b/configs/lager_defconfig
> index f60d4db5ec2..03f29b8849b 100644
> --- a/configs/lager_defconfig
> +++ b/configs/lager_defconfig
> @@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
>  CONFIG_ENV_OFFSET=0xC
>  CONFIG_ENV_SECT_SIZE=0x4
>  CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="r8a7790-lager"
> +CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7790-lager"
>  CONFIG_SPL_TEXT_BASE=0xe630
>  CONFIG_ARCH_RENESAS_BOARD_STRING="Lager"
>  CONFIG_R8A7790=y
> diff --git a/configs/porter_defconfig b/configs/porter_defconfig
> index f05a0baf215..170ca3a5f43 100644
> --- a/configs/porter_defconfig
> +++ b/configs/porter_defconfig
> @@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
>  CONFIG_ENV_OFFSET=0xC
>  CONFIG_ENV_SECT_SIZE=0x4
>  CONFIG_DM_GPIO=y
> 

[PATCH] ARM: dts: renesas: Switch to using upstream DT

2024-03-25 Thread Marek Vasut
Enable OF_UPSTREAM to use upstream DT and add renesas/ prefix to the
DEFAULT_DEVICE_TREE and OF_LIST. And thereby directly build DTB from
dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/
directory.

The configuration update has been done using the following script:
```
sed -i '/^CONFIG_DEFAULT_DEVICE_TREE/ s@="@/@' `git grep -li renesas 
configs`
sed -i '/^CONFIG_OF_LIST/ s@r8a@renesas/&@g' `git grep -li renesas configs`
```

The RZN1 Snarc board does not seem to have a matching Linux kernel
DT counterpart, this is currently not switched to OF upstream.

Signed-off-by: Marek Vasut 
---
Cc: Adam Ford 
Cc: Biju Das 
Cc: Lad Prabhakar 
Cc: Paul Barker 
Cc: Ralph Siemsen 
Cc: Sumit Garg 
Cc: Tom Rini 
---
 arch/arm/Kconfig | 1 +
 configs/alt_defconfig| 2 +-
 configs/blanche_defconfig| 2 +-
 configs/gose_defconfig   | 2 +-
 configs/grpeach_defconfig| 2 +-
 configs/koelsch_defconfig| 2 +-
 configs/lager_defconfig  | 2 +-
 configs/porter_defconfig | 2 +-
 configs/rzn1_snarc_defconfig | 1 +
 configs/silk_defconfig   | 2 +-
 configs/stout_defconfig  | 2 +-
 11 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a0842e19330..ab8f30f1142 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1068,6 +1068,7 @@ config ARCH_RENESAS
imply BOARD_EARLY_INIT_F
imply CMD_DM
imply FAT_WRITE
+   imply OF_UPSTREAM
imply SYS_THUMB_BUILD
imply ARCH_MISC_INIT if DISPLAY_CPUINFO
 
diff --git a/configs/alt_defconfig b/configs/alt_defconfig
index 06e9e11f297..c9ca22cbe8f 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
 CONFIG_ENV_OFFSET=0xC
 CONFIG_ENV_SECT_SIZE=0x4
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r8a7794-alt"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7794-alt"
 CONFIG_SPL_TEXT_BASE=0xe630
 CONFIG_ARCH_RENESAS_BOARD_STRING="Alt"
 CONFIG_R8A7794=y
diff --git a/configs/blanche_defconfig b/configs/blanche_defconfig
index c392055e5a7..a2823a614a5 100644
--- a/configs/blanche_defconfig
+++ b/configs/blanche_defconfig
@@ -12,7 +12,7 @@ CONFIG_ENV_SIZE=0x4
 CONFIG_ENV_OFFSET=0x4
 CONFIG_ENV_SECT_SIZE=0x4
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r8a7792-blanche"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7792-blanche"
 CONFIG_ARCH_RENESAS_BOARD_STRING="Blanche"
 CONFIG_R8A7792=y
 CONFIG_TARGET_BLANCHE=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index 35edc677c48..0f76ae147ef 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
 CONFIG_ENV_OFFSET=0xC
 CONFIG_ENV_SECT_SIZE=0x4
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r8a7793-gose"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7793-gose"
 CONFIG_SPL_TEXT_BASE=0xe630
 CONFIG_ARCH_RENESAS_BOARD_STRING="Gose"
 CONFIG_R8A7793=y
diff --git a/configs/grpeach_defconfig b/configs/grpeach_defconfig
index 0c581b634a2..70a80088bfb 100644
--- a/configs/grpeach_defconfig
+++ b/configs/grpeach_defconfig
@@ -11,7 +11,7 @@ CONFIG_ENV_SIZE=0x1
 CONFIG_ENV_OFFSET=0x8
 CONFIG_ENV_SECT_SIZE=0x1
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r7s72100-gr-peach"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r7s72100-gr-peach"
 CONFIG_RZA1=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_SYS_MONITOR_LEN=524288
diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
index ad411b45141..a912e58cf4d 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
 CONFIG_ENV_OFFSET=0xC
 CONFIG_ENV_SECT_SIZE=0x4
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r8a7791-koelsch"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7791-koelsch"
 CONFIG_SPL_TEXT_BASE=0xe630
 CONFIG_ARCH_RENESAS_BOARD_STRING="Koelsch"
 CONFIG_R8A7791=y
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index f60d4db5ec2..03f29b8849b 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
 CONFIG_ENV_OFFSET=0xC
 CONFIG_ENV_SECT_SIZE=0x4
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r8a7790-lager"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7790-lager"
 CONFIG_SPL_TEXT_BASE=0xe630
 CONFIG_ARCH_RENESAS_BOARD_STRING="Lager"
 CONFIG_R8A7790=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index f05a0baf215..170ca3a5f43 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -16,7 +16,7 @@ CONFIG_ENV_SIZE=0x4
 CONFIG_ENV_OFFSET=0xC
 CONFIG_ENV_SECT_SIZE=0x4
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="r8a7791-porter"
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a7791-porter"
 CONFIG_SPL_TEXT_BASE=0xe630
 CONFIG_ARCH_RENESAS_BOARD_STRING="Porter"
 CONFIG_R8A7791=y
diff --git a/configs/rzn1_snarc_defconfig b/configs/rzn1_snarc_defconfig
index 29a96d1aefe..1c313d2d4da 100644
--- a/configs/rzn1_snarc_defconfig
+++