Skip to content

Commit b78bc2a

Browse files
committed
boards: st: stm32h7s78_dk: add support for on-board XSPI PSRAM
Configure pinctrl for the xspi1 bus, and add definition for the PSRAM chip on the board. Signed-off-by: Titouan Christophe <[email protected]>
1 parent 6c78561 commit b78bc2a

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

boards/st/stm32h7s78_dk/doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ Default Zephyr Peripheral Mapping:
183183
- LD4 (blue) : PM3
184184
- ADC1 channel 6 input : PF12
185185
- USB OTG FS DM/DP : PM12/PM11
186+
- XSPI1 NCS/DQS0/DQS1/CLK/IO: PO0/PO2/PO3/PO4/PP0..15
186187

187188
System Clock
188189
------------

boards/st/stm32h7s78_dk/stm32h7s78_dk.dts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
zephyr,sram = &sram0;
2222
};
2323

24+
psram: memory@90000000 {
25+
compatible = "zephyr,memory-region";
26+
reg = <0x90000000 DT_SIZE_M(32)>;
27+
zephyr,memory-region = "PSRAM";
28+
zephyr,memory-attr = <DT_MEM_ARM_MPU_RAM>;
29+
};
30+
2431
leds {
2532
compatible = "gpio-leds";
2633
green_led: led_1 {
@@ -173,6 +180,32 @@
173180
pinctrl-names = "default";
174181
};
175182

183+
&xspi1 {
184+
pinctrl-0 = <&xspim_p1_ncs1_po0 &xspim_p1_dqs0_po2
185+
&xspim_p1_dqs1_po3 &xspim_p1_clk_po4
186+
&xspim_p1_io0_pp0 &xspim_p1_io1_pp1 &xspim_p1_io2_pp2
187+
&xspim_p1_io3_pp3 &xspim_p1_io4_pp4 &xspim_p1_io5_pp5
188+
&xspim_p1_io6_pp6 &xspim_p1_io7_pp7 &xspim_p1_io8_pp8
189+
&xspim_p1_io9_pp9 &xspim_p1_io10_pp10 &xspim_p1_io11_pp11
190+
&xspim_p1_io12_pp12 &xspim_p1_io13_pp13 &xspim_p1_io14_pp14
191+
&xspim_p1_io15_pp15>;
192+
193+
pinctrl-names = "default";
194+
status = "okay";
195+
196+
memc: aps256xxn-obr@0 {
197+
compatible = "st,stm32-xspi-psram";
198+
reg = <0>;
199+
size = <DT_SIZE_M(256)>; /* 256 Mbits */
200+
fixed-latency;
201+
io-x16-mode;
202+
read-latency = <4>;
203+
write-latency = <1>;
204+
burst-length = <0>;
205+
status = "okay";
206+
};
207+
};
208+
176209
&die_temp {
177210
status = "okay";
178211
};

boards/st/stm32h7s78_dk/stm32h7s78_dk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ supported:
1515
- adc
1616
- usb_device
1717
- usbd
18+
- memc
1819
vendor: st

0 commit comments

Comments
 (0)