drivers: flash: Add support for flash driver on MCK-RA8T1
Initial commit to support flash driver on MCK-RA8T1 board Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
This commit is contained in:
parent
beba6685af
commit
79fb5a391a
9 changed files with 65 additions and 5 deletions
|
@ -100,6 +100,8 @@ The below features are currently supported on Zephyr OS for MCB-RA8T1 board:
|
||||||
+--------------+------------+----------------------+
|
+--------------+------------+----------------------+
|
||||||
| SPI | on-chip | spi |
|
| SPI | on-chip | spi |
|
||||||
+--------------+------------+----------------------+
|
+--------------+------------+----------------------+
|
||||||
|
| FLASH | on-chip | flash |
|
||||||
|
+--------------+------------+----------------------+
|
||||||
|
|
||||||
Other hardware features are currently not supported by the port.
|
Other hardware features are currently not supported by the port.
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
zephyr,console = &uart3;
|
zephyr,console = &uart3;
|
||||||
zephyr,shell-uart = &uart3;
|
zephyr,shell-uart = &uart3;
|
||||||
zephyr,entropy = &trng;
|
zephyr,entropy = &trng;
|
||||||
|
zephyr,flash-controller = &flash1;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -104,3 +105,16 @@
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
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)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -17,3 +17,5 @@ CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
CONFIG_BUILD_OUTPUT_HEX=y
|
CONFIG_BUILD_OUTPUT_HEX=y
|
||||||
CONFIG_BUILD_NO_GAP_FILL=y
|
CONFIG_BUILD_NO_GAP_FILL=y
|
||||||
|
|
||||||
|
CONFIG_FLASH=y
|
||||||
|
|
|
@ -11,7 +11,7 @@ config RA_FLASH_HP
|
||||||
select FLASH_PAGE_LAYOUT
|
select FLASH_PAGE_LAYOUT
|
||||||
select FLASH_HAS_PAGE_LAYOUT
|
select FLASH_HAS_PAGE_LAYOUT
|
||||||
select FLASH_HAS_EXPLICIT_ERASE
|
select FLASH_HAS_EXPLICIT_ERASE
|
||||||
select FLASH_HAS_EX_OP if(SOC_SERIES_RA8M1 || SOC_SERIES_RA8D1)
|
select FLASH_HAS_EX_OP if(SOC_SERIES_RA8M1 || SOC_SERIES_RA8D1 || SOC_SERIES_RA8T1)
|
||||||
select USE_RA_FSP_FLASH_HP
|
select USE_RA_FSP_FLASH_HP
|
||||||
help
|
help
|
||||||
Enable flash driver for RA series
|
Enable flash driver for RA series
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
#define FLASH_HP_CF_BLOCK_32KB_DUAL_LOW_START (8)
|
#define FLASH_HP_CF_BLOCK_32KB_DUAL_LOW_START (8)
|
||||||
#define FLASH_HP_CF_BLOCK_32KB_DUAL_HIGH_START (78)
|
#define FLASH_HP_CF_BLOCK_32KB_DUAL_HIGH_START (78)
|
||||||
|
|
||||||
#if defined(CONFIG_SOC_R7FA8M1AHECBD) || defined(CONFIG_SOC_R7FA8D1BHECBD)
|
#if defined(CONFIG_SOC_R7FA8M1AHECBD) || defined(CONFIG_SOC_R7FA8D1BHECBD) || \
|
||||||
|
defined(CONFIG_SOC_R7FA8T1AHECBD)
|
||||||
#define FLASH_RESERVED_AREA_NUM (33)
|
#define FLASH_RESERVED_AREA_NUM (33)
|
||||||
#define FLASH_HP_CF_BLOCK_32KB_LINEAR_END (68)
|
#define FLASH_HP_CF_BLOCK_32KB_LINEAR_END (68)
|
||||||
#define FLASH_HP_CF_BLOCK_32KB_DUAL_LOW_END (36)
|
#define FLASH_HP_CF_BLOCK_32KB_DUAL_LOW_END (36)
|
||||||
|
|
|
@ -8,10 +8,21 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
soc {
|
soc {
|
||||||
flash-controller@407fe000 {
|
flash-controller@40100000 {
|
||||||
flash0: flash@2000000 {
|
flash0: flash@2000000 {
|
||||||
compatible = "soc-nv-flash";
|
compatible = "renesas,ra-nv-flash";
|
||||||
reg = <0x02000000 DT_SIZE_M(2)>;
|
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
|
config PINCTRL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
# Set to the minimal size of data which can be written.
|
||||||
|
config FLASH_FILL_BUFFER_SIZE
|
||||||
|
default 128
|
||||||
|
|
||||||
endif # SOC_SERIES_RA8T1
|
endif # SOC_SERIES_RA8T1
|
||||||
|
|
|
@ -19,3 +19,9 @@ config SOC_R7FA8T1AHECBD
|
||||||
|
|
||||||
config SOC
|
config SOC
|
||||||
default "r7fa8t1ahecbd" if SOC_R7FA8T1AHECBD
|
default "r7fa8t1ahecbd" if SOC_R7FA8T1AHECBD
|
||||||
|
|
||||||
|
config DUAL_BANK_MODE
|
||||||
|
bool "Dual bank mode"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable dual bank mode
|
||||||
|
|
20
tests/drivers/flash/common/boards/mck_ra8t1.overlay
Normal file
20
tests/drivers/flash/common/boards/mck_ra8t1.overlay
Normal file
|
@ -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…
Add table
Add a link
Reference in a new issue