Skip to content
Merged
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
19 changes: 19 additions & 0 deletions boards/nxp/frdm_rw612/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,25 @@ For example, below is part of an overlay to change the whole SRAM to be used for
};


NAND Flash (Board Rework)
*************************

The FlexSPI PortB1 on FRDM-RW612 is pin-compatible with SPI NAND flash.
A Winbond W25N01GV (1 Gbit) can be fitted at U12 by board rework, providing
128 MB of NAND storage accessible via the FlexSPI controller.

The ``w25n01gv`` device tree node is present in the board DTS but disabled
by default. Enable it with a devicetree overlay:

.. code-block:: devicetree

&w25n01gv {
status = "okay";
};

The :zephyr:code-sample:`littlefs` sample provides ready-made board files
(``boards/frdm_rw612_nand.*``) that run LittleFS over Dhara FTL on this NAND.

Wireless Connectivity Support
*****************************

Expand Down
7 changes: 7 additions & 0 deletions boards/nxp/frdm_rw612/frdm_rw612-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,11 @@
slew-rate = "normal";
};
};

pinmux_flexspi_psram: pinmux_flexspi_psram {
group0 {
pinmux = <IO_MUX_QUAD_SPI_PSRAM>;
slew-rate = "normal";
};
};
};
38 changes: 38 additions & 0 deletions boards/nxp/frdm_rw612/frdm_rw612_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,44 @@ mikrobus_serial: &flexcomm0 {};
ahb-write-wait-unit = <2>;
ahb-write-wait-interval = <0>;
};

/*
* Winbond W25N01GV NAND - FlexSPI PortB1 (CS2).
* Pin-compatible alternative to aps6404l@2.
* Mutually exclusive with aps6404l@2: enable at most one via overlay.
*/
w25n01gv: w25n01gv@2 {
compatible = "nxp,imx-flexspi-nand";
reg = <2>; /* PortB1 */
status = "disabled";

/* W25N01GVZEIG: 1 Gbit = 128 MiB; DT size is in bits */
size = <DT_SIZE_M(128 * 8)>;

spi-max-frequency = <DT_FREQ_M(104)>;
write-block-size = <2048>;
erase-block-size = <DT_SIZE_K(128)>;

cs-interval-unit = <1>;
cs-interval = <2>;
cs-hold-time = <3>;
cs-setup-time = <3>;
data-valid-time = <6>;
column-space = <11>;
ahb-write-wait-unit = <2>;
ahb-write-wait-interval = <0>;

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

nand_storage: partition@0 {
label = "nand-storage";
reg = <0x0 DT_SIZE_M(128)>;
};
};
};
};

&hci {
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ zephyr_library_sources_ifdef(CONFIG_FLASH_INFINEON_PSOC4 flash_infineon_pdl.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MCHP_NVMCTRL_G1 flash_mchp_nvmctrl_g1.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_HYPERFLASH flash_mcux_flexspi_hyperflash.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_MX25UM51345G flash_mcux_flexspi_mx25um51345g.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_NAND flash_mcux_flexspi_nand.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_NOR flash_mcux_flexspi_nor.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_XSPI flash_mcux_xspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_ATXP032 flash_mspi_atxp032.c)
Expand Down
28 changes: 28 additions & 0 deletions drivers/flash/Kconfig.mcux
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,34 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH
select MEMC
select MEMC_MCUX_FLEXSPI

config FLASH_MCUX_FLEXSPI_NAND
bool "MCUX FlexSPI NAND (ONFI probe)"
default y
depends on DT_HAS_NXP_IMX_FLEXSPI_NAND_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select FLASH_HAS_EX_OP
select MEMC
select MEMC_MCUX_FLEXSPI
select CRC
help
NAND flash driver over NXP FlexSPI with ONFI parameter probe
and quad I/O for data read/write.

config FLASH_MCUX_FLEXSPI_NAND_INIT_PRIORITY
int "MCUX FlexSPI NAND flash init priority"
default FLASH_INIT_PRIORITY
help
Initialization priority for FlexSPI NAND flash driver.

config FLASH_MCUX_FLEXSPI_NAND_TIMEOUT_US
int "Timeout for FlexSPI NAND busy-wait polling"
default 0
help
Maximum time in microseconds to wait for the NAND flash to
become ready after an operation. Set to 0 to poll indefinitely.

endmenu

if FLASH_MCUX_FLEXSPI_MX25UM51345G
Expand Down
Loading
Loading