[PATCH v2] arm64: renesas: Add Cortex-M33 build option to R-Car Gen5
Kumar, Udit
u-kumar1 at ti.com
Sat Apr 25 18:46:47 CEST 2026
On 4/23/2026 4:19 AM, Marek Vasut wrote:
> The R-Car Gen5 SoCs contains Cortex-M33, Cortex-R52 and Cortex-A720AE
> cores. Add U-Boot build options for the Cortex-M33 core.
>
> Since the Cortex-M33 core is a 32bit core, select V8M and ARM64 for
> RCAR64 accordingly. Select TMU timer on the 32bit core, where it is
> used instead of the ARMv8 timer. Adjust TMU timer base address to match
> the address map of the Cortex-M33 core.
is there any reason, you can not use core's timer ?
Disable unused OF_BOARD_SETUP
> as well as unavailable POSITION_INDEPENDENT configuration options.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Anshul Dalal <anshuld at ti.com>
> Cc: Hai Pham <hai.pham.ud at renesas.com>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Cc: Jesse Taube <mr.bossman075 at gmail.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
> Cc: Quentin Schulz <quentin.schulz at cherry.de>
> Cc: Tien Fong Chee <tien.fong.chee at altera.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Udit Kumar <u-kumar1 at ti.com>
> Cc: u-boot at lists.denx.de
> ---
> V2: - Move Kconfig defaults from common to Kconfig.rcar5
> - Rename RCAR_64_CM to RCAR_64_RSIP
> - Select TMU_TIMER in RCAR_64_RSIP
> - Add R-Car Gen5 into RCAR_64 code comment
> ---
> arch/arm/mach-renesas/Kconfig | 13 +++++++++----
> arch/arm/mach-renesas/Kconfig.rcar5 | 11 +++++++++++
> arch/arm/mach-renesas/include/mach/rcar-gen5-base.h | 6 ++++++
> include/configs/rcar-gen5-common.h | 6 ++++++
> 4 files changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-renesas/Kconfig b/arch/arm/mach-renesas/Kconfig
> index fa4e312a4dd..c2640a58c03 100644
> --- a/arch/arm/mach-renesas/Kconfig
> +++ b/arch/arm/mach-renesas/Kconfig
> @@ -1,15 +1,20 @@
> if ARCH_RENESAS
>
> -# Renesas ARM SoCs R-Car Gen3/Gen4 (64bit)
> +config TMU_TIMER
> + bool
> +
> +# Renesas ARM SoCs R-Car Gen3/Gen4/Gen5 (64bit)
> config RCAR_64
> bool
> - select ARM64
> + select CPU_V8M if RCAR_64_RSIP
> + select ARM64 if !RCAR_64_RSIP
> + select TMU_TIMER if RCAR_64_RSIP
You can selecting TMU_TIMER, if this is M core, and later TMU_BASE is
defined for A core, as well or I am missing something.
> select CMD_CACHE
> - select OF_BOARD_SETUP
> + select OF_BOARD_SETUP if !RCAR_64_RSIP
> select PHY
> select PINCONF
> select PINCTRL
> - select POSITION_INDEPENDENT
> + select POSITION_INDEPENDENT if !RCAR_64_RSIP
> imply CMD_FS_UUID
> imply CMD_GPT
> imply CMD_MMC_SWRITE if MMC
> diff --git a/arch/arm/mach-renesas/Kconfig.rcar5 b/arch/arm/mach-renesas/Kconfig.rcar5
> index 528fc5aecc9..0e0e43c08e4 100644
> --- a/arch/arm/mach-renesas/Kconfig.rcar5
> +++ b/arch/arm/mach-renesas/Kconfig.rcar5
> @@ -1,5 +1,13 @@
> if RCAR_GEN5
>
> +config RCAR_64_RSIP
> + bool "Renesas ARM SoCs R-Car Gen5 (use Cortex-M33 RSIP)"
Sorry but what is RSIP means here
> + select SKIP_RELOCATE_CODE
> + select TMU_TIMER
TMU_TIMER is selected here, then you can consider to drop
select TMU_TIMER if RCAR_64_RSIP, in little above of this patch
> + help
> + Build U-Boot for the Cortex-M33 RSIP core present on selected SoC.
> + The default is n, meaning U-Boot is built for the Cortex-A core.
> +
> menu "Select Target SoC"
>
> config R8A78000
> @@ -23,4 +31,7 @@ endchoice
>
> source "board/renesas/ironhide/Kconfig"
>
> +config SKIP_RELOCATE_CODE_DATA_OFFSET
> + default 0xa0000000 if RCAR_64_RSIP
> +
> endif
> diff --git a/arch/arm/mach-renesas/include/mach/rcar-gen5-base.h b/arch/arm/mach-renesas/include/mach/rcar-gen5-base.h
> index f9af3ef885a..35b0d00e45c 100644
> --- a/arch/arm/mach-renesas/include/mach/rcar-gen5-base.h
> +++ b/arch/arm/mach-renesas/include/mach/rcar-gen5-base.h
> @@ -9,7 +9,13 @@
> /*
> * R-Car (R8A78000) I/O Addresses
> */
> +#if defined(CONFIG_RCAR_64_RSIP)
> +/* Cortex-M33 address */
> +#define TMU_BASE 0xC0680000
> +#else
> +/* Cortex-A720AE address */
> #define TMU_BASE 0x1C030000
> +#endif
>
> /* Arm Generic Timer */
> #define CNTCR_BASE 0x1C000FFF /* Region 0 */
> diff --git a/include/configs/rcar-gen5-common.h b/include/configs/rcar-gen5-common.h
> index dc28d07c7f9..81b5e2aa5bb 100644
> --- a/include/configs/rcar-gen5-common.h
> +++ b/include/configs/rcar-gen5-common.h
> @@ -17,6 +17,12 @@
> #define CFG_SYS_SDRAM_SIZE (0x80000000u - DRAM_RSV_SIZE)
> #define CFG_MAX_MEM_MAPPED (0x80000000u - DRAM_RSV_SIZE)
>
> +/* Timer */
> +#if defined(CONFIG_RCAR_64_RSIP)
> +#define CFG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */
> +#define CFG_SYS_TIMER_RATE (133333333 / 4)
Please check for alignment
> +#endif
> +
> /* Environment setting */
> #define CFG_EXTRA_ENV_SETTINGS \
> "bootm_size=0x10000000\0"
More information about the U-Boot
mailing list