Skip to content

Commit 88aee54

Browse files
GeorgeCGVcarlescufi
authored andcommitted
dts: bindings: memc: stm32: fmc: add st,mem-swap
Introduces H7 FMC bindings with support for memory remap or swap configuration. The following values are supported: * disabled - default mapping (reset state). * sdram-sram - swaps the NOR/PSRAM and SDRAM banks. * sdramb2 - remaps SDRAM bank 2. Signed-off-by: Georgij Cernysiov <[email protected]>
1 parent 6d56b82 commit 88aee54

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (c) 2022 Georgij Cernysiov
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
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+
30+
compatible: "st,stm32h7-fmc"
31+
32+
include: ["st,stm32-fmc.yaml"]
33+
34+
properties:
35+
st,mem-swap:
36+
type: string
37+
required: false
38+
default: "disable" # reset state
39+
enum:
40+
- "disable"
41+
- "sdram-sram"
42+
- "sdramb2"
43+
description: |
44+
The FMC bank mapping configuration (BMAP bits of FMC_BCR1).
45+
46+
* disable - Default mapping.
47+
* sdram-sram - Swap the NOR/PSRAM bank with SDRAM.
48+
* sdramb2 - Remaps the SDRAM bank2.
49+
50+
If absent, then default mapping (disable) is used (reset state).

0 commit comments

Comments
 (0)