Skip to content

drivers: flash: Add support Flash-LP driver for Renesas RA #89471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions boards/renesas/ek_ra2a1/ek_ra2a1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

chosen {
zephyr,sram = &sram0;
zephyr,flash-controller = &flash;
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
Expand Down Expand Up @@ -120,3 +121,16 @@
&wdt {
status = "okay";
};

&flash1 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@0 {
label = "storage";
reg = <0x0 DT_SIZE_K(8)>;
};
};
};
14 changes: 14 additions & 0 deletions boards/renesas/ek_ra2l1/ek_ra2l1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

chosen {
zephyr,sram = &sram0;
zephyr,flash-controller = &flash;
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
Expand Down Expand Up @@ -60,3 +61,16 @@
&wdt {
status = "okay";
};

&flash1 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@0 {
label = "storage";
reg = <0x0 DT_SIZE_K(8)>;
};
};
};
14 changes: 14 additions & 0 deletions boards/renesas/ek_ra4m1/ek_ra4m1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

chosen {
zephyr,sram = &sram0;
zephyr,flash-controller = &flash;
zephyr,flash = &flash0;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
Expand Down Expand Up @@ -139,3 +140,16 @@
&wdt {
status = "okay";
};

&flash1 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@0 {
label = "storage";
reg = <0x0 DT_SIZE_K(8)>;
};
};
};
14 changes: 14 additions & 0 deletions boards/renesas/ek_ra4w1/ek_ra4w1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

chosen {
zephyr,sram = &sram0;
zephyr,flash-controller = &flash;
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
Expand Down Expand Up @@ -123,3 +124,16 @@
&wdt {
status = "okay";
};

&flash1 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@0 {
label = "storage";
reg = <0x0 DT_SIZE_K(8)>;
};
};
};
1 change: 1 addition & 0 deletions drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_NRF_MRAM soc_flash_nrf_mram.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_NRF_RRAM soc_flash_nrf_rram.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_NUMAKER soc_flash_numaker.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_NUMAKER_RMC soc_flash_numaker_rmc.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_RENESAS_RA_LP soc_flash_renesas_ra_lp.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_RV32M1 soc_flash_rv32m1.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_SAM flash_sam.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_SAM0 flash_sam0.c)
Expand Down
24 changes: 23 additions & 1 deletion drivers/flash/Kconfig.renesas_ra
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@ config SOC_FLASH_RENESAS_RA_HP
select FLASH_HAS_EX_OP if(SOC_SERIES_RA8M1 || SOC_SERIES_RA8D1 || SOC_SERIES_RA8T1)
select USE_RA_FSP_FLASH_HP
help
Enable Flash HP driver for RA series
Enable Flash High-Performance driver for RA series

config SOC_FLASH_RENESAS_RA_LP
bool "RA Flash LP driver"
depends on DT_HAS_RENESAS_RA_FLASH_LP_CONTROLLER_ENABLED
default y
select FLASH_HAS_DRIVER_ENABLED
select FLASH_PAGE_LAYOUT
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select USE_RA_FSP_FLASH_LP
help
Enable Flash Low-Power driver for RA series

if SOC_FLASH_RENESAS_RA_HP

Expand All @@ -32,3 +44,13 @@ config FLASH_RENESAS_RA_HP_BGO
Enable Background operations (BGOs)

endif # SOC_FLASH_RENESAS_RA_HP

if SOC_FLASH_RENESAS_RA_LP

config FLASH_RENESAS_RA_LP_BGO
bool "Background operations feature"
default y
help
Enable Background operations (BGOs)

endif # SOC_FLASH_RENESAS_RA_LP
Loading
Loading