Skip to content

Commit 901f530

Browse files
committed
dts: bindings: mspi: Add MSPI configuration for STM32
This commit adds the main DTS configurations required to enable MSPI/OSPI/QSPI support on STM32. Signed-off-by: Sara Touqan <[email protected]> Signed-off-by: Sarah Younis <[email protected]> Signed-off-by: Mohammad Odeh <[email protected]>
1 parent ef50290 commit 901f530

File tree

3 files changed

+239
-0
lines changed

3 files changed

+239
-0
lines changed
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Copyright (c) 2024 STMicroelectronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: STM32 OSPI controller
5+
6+
compatible: "st,stm32-ospi-controller"
7+
8+
include: [base.yaml, pinctrl-device.yaml, mspi-controller.yaml]
9+
10+
11+
properties:
12+
reg:
13+
required: true
14+
15+
interrupts:
16+
required: true
17+
18+
pinctrl-0:
19+
required: true
20+
21+
pinctrl-names:
22+
required: true
23+
24+
clock-names:
25+
required: true
26+
27+
clocks:
28+
required: true
29+
30+
dmas:
31+
description: |
32+
Optional DMA channel specifier, required for DMA transactions.
33+
34+
For example dmas for TX/RX on MSPI
35+
dmas = <&dma1 5 41 0x10000>;
36+
37+
dma-names:
38+
description: DMA channel name.
39+
enum:
40+
- "tx_rx"
41+
42+
st,dlyb-bypass:
43+
type: boolean
44+
description: |
45+
Enables Delay Block (DLYB) Bypass.
46+
47+
ssht-enable:
48+
type: boolean
49+
description: |
50+
Enables Sample Shifting half-cycle.
51+
52+
It is recommended to be enabled in STR mode and disabled in DTR mode.
53+
54+
io-low-port:
55+
type: string
56+
enum:
57+
- "IOPORT_NONE"
58+
- "IOPORT_1_LOW"
59+
- "IOPORT_1_HIGH"
60+
- "IOPORT_2_LOW"
61+
- "IOPORT_2_HIGH"
62+
description: |
63+
Specifies which port of the OCTOSPI IO Manager is used for the IO[3:0] pins.
64+
65+
If absent, then `IOPORT_<n>_LOW` is used where `n` is the OSPI
66+
instance number.
67+
68+
Note: You might need to enable the OCTOSPI I/O manager clock to use the
69+
property. Please refer to Reference Manual.
70+
The clock can be enabled in the devicetree.
71+
72+
io-high-port:
73+
type: string
74+
enum:
75+
- "IOPORT_NONE"
76+
- "IOPORT_1_LOW"
77+
- "IOPORT_1_HIGH"
78+
- "IOPORT_2_LOW"
79+
- "IOPORT_2_HIGH"
80+
description: |
81+
Specifies which port of the OCTOSPI IO Manager is used for the IO[7:4] pins.
82+
83+
If absent, then `IOPORT_<n>_HIGH` is used where `n` is the OSPI
84+
instance number.
85+
86+
Can be set to `IOPORT_NONE` for Single SPI, Dual SPI and Quad SPI.
87+
88+
Note: You might need to enable the OCTOSPI I/O manager clock to use the
89+
property. Please refer to Reference Manual.
90+
The clock can be enabled in the devicetree.
91+
92+
clk-port:
93+
type: int
94+
enum:
95+
- 1
96+
- 2
97+
description: |
98+
Specifies which port of the OCTOSPI IO Manager is used for the clk pin.
99+
100+
If absent, then n is used where `n` is the OSPI
101+
instance number.
102+
103+
Note: You might need to enable the OCTOSPI I/O manager clock to use the
104+
property. Please refer to Reference Manual.
105+
The clock can be enabled in the devicetree.
106+
107+
dqs-port:
108+
type: int
109+
enum:
110+
- 1
111+
- 2
112+
description: |
113+
Specifies which port of the OCTOSPI IO Manager is used for the dqs pin.
114+
115+
If absent, then n is used where `n` is the OSPI
116+
instance number.
117+
118+
Note: You might need to enable the OCTOSPI I/O manager clock to use the
119+
property. Please refer to Reference Manual.
120+
The clock can be enabled in the devicetree.
121+
122+
ncs-port:
123+
type: int
124+
enum:
125+
- 1
126+
- 2
127+
description: |
128+
Specifies which port of the OCTOSPI IO Manager is used for the ncs pin.
129+
130+
If absent, then n is used where `n` is the OSPI
131+
instance number.
132+
133+
Note: You might need to enable the OCTOSPI I/O manager clock to use the
134+
property. Please refer to Reference Manual.
135+
The clock can be enabled in the devicetree.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (c) 2025 EXALT Technologies.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
STM32 QSPI controller
6+
Enabling a stm32 qspi node in a board description would
7+
typically require this: (pinning depends on the stm32 mcu)
8+
9+
&qspi {
10+
pinctrl-0 = <&quadspi_clk_pe10 &quadspi_ncs_pe11
11+
&quadspi_io0_pe12 &quadspi_io1_pe13
12+
&quadspi_io2_pe14 &quadspi_io3_pe15>;
13+
14+
dmas = <&dma1 5 41 0x10000>;
15+
dma-names = "tx_rx";
16+
17+
status = "okay";
18+
};
19+
20+
compatible: "st,stm32-qspi-controller"
21+
22+
include: [base.yaml, pinctrl-device.yaml, mspi-controller.yaml]
23+
24+
properties:
25+
reg:
26+
required: true
27+
28+
interrupts:
29+
required: true
30+
31+
pinctrl-0:
32+
required: true
33+
34+
pinctrl-names:
35+
required: true
36+
37+
clock-names:
38+
required: true
39+
40+
clocks:
41+
required: true
42+
43+
dmas:
44+
description: |
45+
Optional DMA channel specifier, required for DMA transactions.
46+
For example dmas for TX/RX on QSPI
47+
dmas = <&dma1 5 41 0x10000>;
48+
49+
dma-names:
50+
description: |
51+
DMA channel name. If DMA should be used, expected value is "tx_rx".
52+
53+
For example
54+
dma-names = "tx_rx";
55+
enum:
56+
- "tx_rx"
57+
58+
ssht-enable:
59+
type: boolean
60+
description: |
61+
Enables Sample Shifting half-cycle.
62+
63+
It is recommended to be enabled in STR mode and disabled in DTR mode.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright (c) 2025 EXALT Technologies.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
STM32 XSPI controller.
6+
7+
compatible: "st,stm32-xspi-controller"
8+
9+
include: [base.yaml, pinctrl-device.yaml, mspi-controller.yaml]
10+
11+
properties:
12+
reg:
13+
required: true
14+
15+
interrupts:
16+
required: true
17+
18+
pinctrl-0:
19+
required: true
20+
21+
pinctrl-names:
22+
required: true
23+
24+
clocks:
25+
required: true
26+
27+
clock-names:
28+
required: true
29+
30+
dma-names:
31+
description: DMA channel name.
32+
enum:
33+
- tx
34+
- rx
35+
36+
ssht-enable:
37+
type: boolean
38+
description: |
39+
Enables Sample Shifting half-cycle.
40+
41+
It is recommended to be enabled in STR mode and disabled in DTR mode.

0 commit comments

Comments
 (0)