soc: arm: add support for Renesas RA4M1 series SoC

Add essential support for RA4M1 Series.
It only defines `r7fa4m1ab3cfm` currently.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
TOKITA Hiroshi 2023-07-07 15:27:40 +09:00 committed by Fabio Baltieri
commit 5ccc0eb319
15 changed files with 180 additions and 0 deletions

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <renesas/ra/ra4-cm4-common.dtsi>

View file

@ -0,0 +1,52 @@
/*
* Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <mem.h>
#include <freq.h>
#include <arm/armv7-m.dtsi>
/ {
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-m4";
reg = <0>;
};
};
sram0: memory0@20000000 {
compatible = "mmio-sram";
reg = <0x20000000 DT_SIZE_K(32)>;
};
soc {
fcu: flash-controller@4001c000 {
compatible = "renesas,ra-flash-controller";
reg = <0x4001c000 0x44>;
reg-names = "fcache";
#address-cells = <1>;
#size-cells = <1>;
flash0: flash0@0 {
compatible = "soc-nv-flash";
reg = <0x00000000 DT_SIZE_K(256)>;
};
flash1: flash1@40100000 {
compatible = "soc-nv-flash";
reg = <0x40100000 DT_SIZE_K(8)>;
};
};
};
};
&nvic {
arm,num-irq-priority-bits = <4>;
};

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <renesas/ra/ra-cm4-common.dtsi>

View file

@ -0,0 +1,6 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
zephyr_include_directories(common)
add_subdirectory(${SOC_SERIES})

View file

@ -0,0 +1,18 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_FAMILY_RA
bool
if SOC_FAMILY_RA
config SOC_FAMILY
string
default "renesas_ra"
config SERIES_SPECIFIC_SOC_INIT
bool "Use series specific initialize"
source "soc/arm/renesas_ra/*/Kconfig.soc"
endif # SOC_FAMILY_RA

View file

@ -0,0 +1,4 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
source "soc/arm/renesas_ra/*/Kconfig.defconfig.series"

View file

@ -0,0 +1,4 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
source "soc/arm/renesas_ra/*/Kconfig.series"

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_SOC_ARM_RENESAS_RA_COMMON_RA_COMMON_SOC_H_
#define ZEPHYR_SOC_ARM_RENESAS_RA_COMMON_RA_COMMON_SOC_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_SOC_ARM_RENESAS_RA_COMMON_RA_COMMON_SOC_H_ */

View file

@ -0,0 +1,4 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
# empty

View file

@ -0,0 +1,9 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
if SOC_R7FA4M1AB3CFM
config SOC
default "r7fa4m1ab3cfm"
endif # SOC_R7FA4M1AB3CFM

View file

@ -0,0 +1,14 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
if SOC_SERIES_RA4M1
rsource "Kconfig.defconfig.r7fa4*"
config SOC_SERIES
default "ra4m1"
config NUM_IRQS
default 32
endif # SOC_SERIES_RA4M1

View file

@ -0,0 +1,11 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_RA4M1
bool "Renesas RA4M1"
select ARM
select CPU_CORTEX_M4
select CPU_HAS_ARM_MPU
select CPU_CORTEX_M_HAS_SYSTICK
select SOC_FAMILY_RA
select XIP

View file

@ -0,0 +1,11 @@
# Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0
choice
prompt "Renesas RA4M1 SoC Selection"
depends on SOC_SERIES_RA4M1
config SOC_R7FA4M1AB3CFM
bool "R7FA4M1AB3CFM"
endchoice

View file

@ -0,0 +1,8 @@
/*
* Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <zephyr/arch/arm/cortex_m/scripts/linker.ld>

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "../common/ra_common_soc.h"