1# Copyright (c) 2022 Georgij Cernysiov
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5  STM32 Flexible Memory Controller (FMC).
6
7  The FMC allows to interface with static-memory mapped external devices such as
8  SRAM, NOR Flash, NAND Flash, SDRAM...
9
10  All external memories share the addresses, data and control signals with the
11  controller. Each external device is accessed by means of a unique chip select.
12  The FMC performs only one access at a time to an external device.
13
14  The flexible memory controller includes three memory controllers:
15
16    - NOR/PSRAM memory controller
17    - NAND memory controller (some devices also support PC Card)
18    - Synchronous DRAM (SDRAM/Mobile LPSDR SDRAM) controller
19
20  Each memory controller is defined below the FMC DeviceTree node and is managed
21  by a separate Zephyr device. However, because signals are shared the FMC
22  device handles the signals and the peripheral clocks. FMC can be enabled
23  in your board DeviceTree file like this:
24
25  &fmc {
26      status = "okay";
27      pinctrl-0 = <&fmc_nbl0_pe0 &fmc_nbl1_pe1 &fmc_nbl2_pi4...>;
28  };
29
30compatible: "st,stm32h7-fmc"
31
32include: ["st,stm32-fmc.yaml"]
33
34properties:
35  st,mem-swap:
36    type: string
37    default: "disable" # reset state
38    enum:
39      - "disable"
40      - "sdram-sram"
41      - "sdramb2"
42    description: |
43      The FMC bank mapping configuration (BMAP bits of FMC_BCR1).
44
45      * disable    - Default mapping.
46      * sdram-sram - Swap the NOR/PSRAM bank with SDRAM.
47      * sdramb2    - Remaps the SDRAM bank2.
48
49      If absent, then default mapping (disable) is used (reset state).
50