Skip to content
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
5 changes: 5 additions & 0 deletions boards/renesas/rza3ul_smarc/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config FLASH_LOAD_OFFSET
default $(dt_nodelabel_reg_addr_hex,header)
59 changes: 36 additions & 23 deletions boards/renesas/rza3ul_smarc/rza3ul_smarc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

chosen {
zephyr,sram = &ddr;
zephyr,flash = &spi_flash;
zephyr,flash = &at25ql128a;
zephyr,console = &scif0;
zephyr,shell-uart = &scif0;
zephyr,code-partition = &slot0_partition;
Expand All @@ -36,28 +36,6 @@
zephyr,memory-region = "SRAM";
};

spi_flash: memory@20020000 {
compatible = "mmio-sram";
reg = <0x20020000 (DT_SIZE_M(16) - 0x20000)>;

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

header: partition@0 {
label = "header";
reg = <0x00000000 0x200>;
read-only;
};

slot0_partition: partition@200 {
label = "image-0";
reg = <0x00000200 (DT_SIZE_M(16) - 0x20200)>;
read-only;
};
};
};
};

&scif0 {
Expand All @@ -76,3 +54,38 @@
pinctrl-names = "default";
status = "okay";
};

&spibsc {
status = "okay";

at25ql128a: qspi-nor-flash@20000000 {
compatible = "renesas,rz-qspi-spibsc";
reg = <0x20000000 DT_SIZE_M(16)>; /* 128 Mbits */
write-block-size = <1>;
erase-block-size = <4096>;
status = "okay";

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

reserved: partition@0 {
reg = <0x00000000 0x20000>;
read-only;
};

header: partition@20000 {
label = "header";
reg = <0x00020000 0x200>;
read-only;
};

slot0_partition: partition@20200 {
label = "image-0";
reg = <0x00020200 (DT_SIZE_M(16) - 0x20200)>;
read-only;
};
};
};
};
14 changes: 14 additions & 0 deletions boards/renesas/rzn2l_rsk/rzn2l_rsk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,18 @@
<RZN_PINMUX(PORT_05, 3, 9)>; /* SDA */
};
};

/omit-if-no-ref/ xspi0_default: xspi0_default {
xspi0-pinmux {
pinmux = <RZN_PINMUX(PORT_14, 6, 0)>, /* XSPI0_CKP */
<RZN_PINMUX(PORT_14, 5, 0)>, /* XSPI0_CKN */
<RZN_PINMUX(PORT_15, 7, 0)>, /* XSPI0_CS0 */
<RZN_PINMUX(PORT_14, 7, 0)>, /* XSPI0_IO0 */
<RZN_PINMUX(PORT_15, 0, 0)>, /* XSPI0_IO1 */
<RZN_PINMUX(PORT_15, 1, 0)>, /* XSPI0_IO2 */
<RZN_PINMUX(PORT_15, 2, 0)>, /* XSPI0_IO3 */
<RZN_PINMUX(PORT_16, 1, 0)>, /* XSPI0_RESET0 */
<RZN_PINMUX(PORT_16, 3, 1)>; /* XSPI0_RSTO0 */
};
};
};
16 changes: 15 additions & 1 deletion boards/renesas/rzn2l_rsk/rzn2l_rsk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

chosen {
zephyr,sram = &atcm;
zephyr,flash = &xspi0_cs0;
zephyr,flash = &mx25u51245g;
zephyr,code-partition = &slot0_partition;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
Expand Down Expand Up @@ -123,3 +123,17 @@
pinctrl-names = "default";
status = "okay";
};

&xspi0 {
pinctrl-0 = <&xspi0_default>;
pinctrl-names = "default";
status = "okay";

mx25u51245g: qspi-nor-flash@60000000 {
compatible = "renesas,rz-qspi-xspi";
reg = <0x60000000 DT_SIZE_M(64)>; /* 512 Mbits */
write-block-size = <1>;
erase-block-size = <4096>;
status = "okay";
};
};
15 changes: 15 additions & 0 deletions boards/renesas/rzt2m_rsk/rzt2m_rsk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,19 @@
<RZT_PINMUX(PORT_22, 7, 2)>; /* SDA */
};
};

/omit-if-no-ref/ xspi0_default: xspi0_default {
xspi0-pinmux {
pinmux = <RZT_PINMUX(PORT_14, 6, 0)>, /* XSPI0_CKP */
<RZT_PINMUX(PORT_14, 5, 0)>, /* XSPI0_CKN */
<RZT_PINMUX(PORT_15, 7, 0)>, /* XSPI0_CS0 */
<RZT_PINMUX(PORT_14, 7, 0)>, /* XSPI0_IO0 */
<RZT_PINMUX(PORT_15, 0, 0)>, /* XSPI0_IO1 */
<RZT_PINMUX(PORT_15, 1, 0)>, /* XSPI0_IO2 */
<RZT_PINMUX(PORT_15, 2, 0)>, /* XSPI0_IO3 */
<RZT_PINMUX(PORT_16, 1, 0)>, /* XSPI0_RESET0 */
<RZT_PINMUX(PORT_16, 3, 1)>; /* XSPI0_RSTO0 */
};
};

};
16 changes: 15 additions & 1 deletion boards/renesas/rzt2m_rsk/rzt2m_rsk_r9a07g075m24gbg_cr520.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

chosen {
zephyr,sram = &cpu0_atcm;
zephyr,flash = &xspi0_cs0;
zephyr,flash = &mx25u51245g;
zephyr,code-partition = &slot0_partition;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
Expand Down Expand Up @@ -120,3 +120,17 @@
&adc1 {
status = "okay";
};

&xspi0 {
pinctrl-0 = <&xspi0_default>;
pinctrl-names = "default";
status = "okay";

mx25u51245g: qspi-nor-flash@60000000 {
compatible = "renesas,rz-qspi-xspi";
reg = <0x60000000 DT_SIZE_M(64)>; /* 512 Mbits */
write-block-size = <1>;
erase-block-size = <4096>;
status = "okay";
};
};
2 changes: 2 additions & 0 deletions drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_NOR flash_npcx_fiu_nor.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_QSPI flash_npcx_fiu_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RENESAS_RA_OSPI_B flash_renesas_ra_ospi_b.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RENESAS_RA_QSPI flash_renesas_ra_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RENESAS_RZ_QSPI_SPIBSC flash_renesas_rz_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RENESAS_RZ_QSPI_XSPI flash_renesas_rz_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RPI_PICO flash_rpi_pico.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_STM32_OSPI flash_stm32_ospi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_STM32_QSPI flash_stm32_qspi.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ source "drivers/flash/Kconfig.renesas_ra"
source "drivers/flash/Kconfig.renesas_ra_ospi"
source "drivers/flash/Kconfig.renesas_ra_qspi"
source "drivers/flash/Kconfig.renesas_rx"
source "drivers/flash/Kconfig.renesas_rz_qspi"
source "drivers/flash/Kconfig.rpi_pico"
source "drivers/flash/Kconfig.rts5912"
source "drivers/flash/Kconfig.rv32m1"
Expand Down
37 changes: 37 additions & 0 deletions drivers/flash/Kconfig.renesas_rz_qspi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Renesas RZ Family

# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config FLASH_RENESAS_RZ_QSPI_XSPI
bool "Renesas RZ Quad-SPI driver"
default y
depends on DT_HAS_RENESAS_RZ_QSPI_XSPI_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select USE_RZ_FSP_QSPI
select FLASH_JESD216
select PINCTRL
help
Enable Quad-SPI XSPI Nor flash driver for RZ series

config FLASH_RENESAS_RZ_QSPI_SPIBSC
bool "Renesas RZ Quad-SPI driver"
default y
depends on DT_HAS_RENESAS_RZ_QSPI_SPIBSC_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select USE_RZ_FSP_QSPI
select FLASH_JESD216
select PINCTRL
help
Enable Quad-SPI SPIBSC Nor flash driver for RZ series

config FLASH_RENESAS_RZ_MIRROR_OFFSET
hex
default 0x0 if SOC_SERIES_RZA3UL
default 0x20000000 if SOC_SERIES_RZT2M || SOC_SERIES_RZN2L
help
Offset of mirror area in flash memory
Loading
Loading