Skip to content

Commit eb710ae

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 5c22eb0 commit eb710ae

File tree

3 files changed

+267
-0
lines changed

3 files changed

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

0 commit comments

Comments
 (0)