drivers: flash: Add support for flash driver on EK-RA8D1
Initial commit to support flash driver on EK-RA8D1 Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
This commit is contained in:
parent
c217dfa1ea
commit
beba6685af
|
@ -102,6 +102,8 @@ The below features are currently supported on Zephyr OS for EK-RA8D1 board:
|
|||
+--------------+------------+------------------+
|
||||
| SPI | on-chip | spi |
|
||||
+--------------+------------+------------------+
|
||||
| FLASH | on-chip | flash |
|
||||
+--------------+------------+------------------+
|
||||
|
||||
Other hardware features are currently not supported by the port.
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
zephyr,console = &uart9;
|
||||
zephyr,shell-uart = &uart9;
|
||||
zephyr,entropy = &trng;
|
||||
zephyr,flash-controller = &flash1;
|
||||
};
|
||||
|
||||
leds {
|
||||
|
@ -110,3 +111,16 @@
|
|||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&flash1 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
storage_partition: partition@0 {
|
||||
label = "storage";
|
||||
reg = <0X0 DT_SIZE_K(12)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -16,3 +16,5 @@ CONFIG_CLOCK_CONTROL=y
|
|||
|
||||
CONFIG_BUILD_OUTPUT_HEX=y
|
||||
CONFIG_BUILD_NO_GAP_FILL=y
|
||||
|
||||
CONFIG_FLASH=y
|
||||
|
|
|
@ -11,7 +11,7 @@ config RA_FLASH_HP
|
|||
select FLASH_PAGE_LAYOUT
|
||||
select FLASH_HAS_PAGE_LAYOUT
|
||||
select FLASH_HAS_EXPLICIT_ERASE
|
||||
select FLASH_HAS_EX_OP if(SOC_SERIES_RA8M1)
|
||||
select FLASH_HAS_EX_OP if(SOC_SERIES_RA8M1 || SOC_SERIES_RA8D1)
|
||||
select USE_RA_FSP_FLASH_HP
|
||||
help
|
||||
Enable flash driver for RA series
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define FLASH_HP_CF_BLOCK_32KB_DUAL_LOW_START (8)
|
||||
#define FLASH_HP_CF_BLOCK_32KB_DUAL_HIGH_START (78)
|
||||
|
||||
#if defined(CONFIG_SOC_R7FA8M1AHECBD)
|
||||
#if defined(CONFIG_SOC_R7FA8M1AHECBD) || defined(CONFIG_SOC_R7FA8D1BHECBD)
|
||||
#define FLASH_RESERVED_AREA_NUM (33)
|
||||
#define FLASH_HP_CF_BLOCK_32KB_LINEAR_END (68)
|
||||
#define FLASH_HP_CF_BLOCK_32KB_DUAL_LOW_END (36)
|
||||
|
|
|
@ -8,10 +8,21 @@
|
|||
|
||||
/ {
|
||||
soc {
|
||||
flash-controller@407fe000 {
|
||||
flash-controller@40100000 {
|
||||
flash0: flash@2000000 {
|
||||
compatible = "soc-nv-flash";
|
||||
reg = <0x02000000 DT_SIZE_M(2)>;
|
||||
compatible = "renesas,ra-nv-flash";
|
||||
reg = <0x02000000 DT_SIZE_K(2016)>;
|
||||
write-block-size = <128>;
|
||||
erase-block-size = <8192>;
|
||||
renesas,programming-enable;
|
||||
};
|
||||
|
||||
flash1: flash@27000000 {
|
||||
compatible = "renesas,ra-nv-flash";
|
||||
reg = <0x27000000 DT_SIZE_K(12)>;
|
||||
write-block-size = <4>;
|
||||
erase-block-size = <64>;
|
||||
renesas,programming-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,4 +9,8 @@ config NUM_IRQS
|
|||
config PINCTRL
|
||||
default y
|
||||
|
||||
# Set to the minimal size of data which can be written.
|
||||
config FLASH_FILL_BUFFER_SIZE
|
||||
default 128
|
||||
|
||||
endif # SOC_SERIES_RA8D1
|
||||
|
|
|
@ -19,3 +19,9 @@ config SOC_R7FA8D1BHECBD
|
|||
|
||||
config SOC
|
||||
default "r7fa8d1bhecbd" if SOC_R7FA8D1BHECBD
|
||||
|
||||
config DUAL_BANK_MODE
|
||||
bool "Dual bank mode"
|
||||
default n
|
||||
help
|
||||
Enable dual bank mode
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Renesas Electronics Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/delete-node/ &storage_partition;
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* Set the 2 last block of storage. */
|
||||
storage_partition: partition@1E8000 {
|
||||
label = "storage";
|
||||
reg = <0x1E8000 DT_SIZE_K(64)>;
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue