File tree Expand file tree Collapse file tree 2 files changed +73
-0
lines changed
samples/drivers/memc/boards Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2024 NXP
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ # In order to safely access the PSRAM on port B of the RW FlexSPI peripheral,
5+ # the QSPI flash on port A must be configured by the application. Otherwise,
6+ # the PSRAM configuration will overwrite the LUT entries for the QSPI flash,
7+ # and the application will no longer be able to XIP from the flash.
8+ # To make sure the QSPI flash is configured, enable flash drivers.
9+ CONFIG_FLASH=y
10+
11+ # Initialization priorities are critical here. The FlexSPI MEMC driver must
12+ # initialize first. Then, the QSPI flash driver must initialize to program
13+ # the LUT table for port A. Finally, the PSRAM driver can initialize and
14+ # program the LUT table for port B
15+ CONFIG_MEMC_MCUX_FLEXSPI_INIT_PRIORITY=0
16+ CONFIG_FLASH_INIT_PRIORITY=50
17+ CONFIG_MEMC_INIT_PRIORITY=60
18+
19+ # This board has the PSRAM attached to the same FLEXSPI device as the flash
20+ # chip used for XIP, so we must explicitly enable the FLEXSPI MEMC driver
21+ # to reconfigure the flash device it is executing from
22+ CONFIG_MEMC_MCUX_FLEXSPI_INIT_XIP=y
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2024 NXP
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ aliases {
9+ sram-ext = &aps6404l;
10+ };
11+ };
12+
13+ &w25q512jvfiq {
14+ /*
15+ * Lower max FlexSPI frequency to 109MHz, as the PSRAM does not support
16+ * higher frequencies at 3.3V
17+ */
18+ spi-max-frequency = <109000000>;
19+ };
20+
21+ &aps6404l {
22+ status = "okay";
23+ };
24+
25+ &pinctrl {
26+ pinmux_flexspi_safe: pinmux-flexspi-safe {
27+ group0 {
28+ pinmux = <IO_MUX_QUAD_SPI_PSRAM_IO35
29+ IO_MUX_QUAD_SPI_PSRAM_IO36
30+ IO_MUX_QUAD_SPI_PSRAM_IO38
31+ IO_MUX_QUAD_SPI_PSRAM_IO39
32+ IO_MUX_QUAD_SPI_PSRAM_IO40
33+ IO_MUX_QUAD_SPI_PSRAM_IO41>;
34+ slew-rate = "normal";
35+ };
36+
37+ group1 {
38+ pinmux = <IO_MUX_QUAD_SPI_PSRAM_IO37>;
39+ slew-rate = "normal";
40+ bias-pull-down;
41+ };
42+ };
43+ };
44+
45+ /* Override pin control state to use one that only changes the PSRAM pin
46+ * configuration
47+ */
48+ &flexspi {
49+ pinctrl-0 = <&pinmux_flexspi_safe>;
50+ pinctrl-names = "default";
51+ };
You can’t perform that action at this time.
0 commit comments