Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021 Linaro Limited
* Copyright (c) 2024 STMicroelectronics
* Copyright (c) 2025 ZAL Zentrum für Angewandte Luftfahrtforschung GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -9,6 +10,7 @@
#include <st/u5/stm32u585aiixq-pinctrl.dtsi>
#include "arduino_r3_connector.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>

/ {
leds {
Expand Down Expand Up @@ -42,6 +44,13 @@
volt-sensor1 = &vbat4;
eeprom-0 = &eeprom0;
};

psram: memory@90000000 {
compatible = "zephyr,memory-region";
reg = <0x90000000 DT_SIZE_M(8)>;
zephyr,memory-region = "PSRAM";
zephyr,memory-attr = <(DT_MEM_ARM(ATTR_MPU_RAM))>;
};
};

&clk_hsi48 {
Expand Down Expand Up @@ -125,6 +134,27 @@ stm32_lp_tick_source: &lptim1 {
};
};

&octospi1 {
pinctrl-0 = <&octospim_p1_clk_pb10 &octospim_p1_ncs_pb11
&octospim_p1_io0_pf8 &octospim_p1_io1_pf9
&octospim_p1_io2_pf7 &octospim_p1_io3_pf6
&octospim_p1_io4_ph2 &octospim_p1_io5_pi0
&octospim_p1_io6_pc3 &octospim_p1_io7_pd7
&octospim_p1_dqs_pe3>;
pinctrl-names = "default";
status = "okay";

memc: aps6408l: memory@0 {
compatible = "st,stm32-ospi-psram";
reg = <0>;
size = <DT_SIZE_M(64)>; /* 64 Mbits */
max-frequency = <DT_FREQ_M(133)>;
fixed-latency;
burst-length = <3>;
status = "okay";
};
};

&octospi2 {
pinctrl-0 = <&octospim_p2_clk_pf4 &octospim_p2_ncs_pi5
&octospim_p2_io0_pf0 &octospim_p2_io1_pf1
Expand Down
1 change: 1 addition & 0 deletions boards/st/b_u585i_iot02a/b_u585i_iot02a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ supported:
- i2c
- rtc
- usbd
- memc
vendor: st
1 change: 1 addition & 0 deletions drivers/memc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ zephyr_library_sources_ifdef(CONFIG_MEMC_STM32_NOR_PSRAM memc_stm32_nor_
zephyr_library_sources_ifdef(CONFIG_MEMC_STM32_SDRAM memc_stm32_sdram.c)

zephyr_library_sources_ifdef(CONFIG_MEMC_STM32_XSPI_PSRAM memc_stm32_xspi_psram.c)
zephyr_library_sources_ifdef(CONFIG_MEMC_STM32_OSPI_PSRAM memc_stm32_ospi_psram.c)
14 changes: 14 additions & 0 deletions drivers/memc/Kconfig.stm32
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020 Teslabs Engineering S.L.
# Copyright (c) 2025 ZAL Zentrum für Angewandte Luftfahrtforschung GmbH
# SPDX-License-Identifier: Apache-2.0

config MEMC_STM32
Expand Down Expand Up @@ -40,3 +41,16 @@ config MEMC_STM32_XSPI_PSRAM
select PINCTRL
help
Enable STM32 XSPI Memory Controller.

config MEMC_STM32_OSPI_PSRAM
bool "STM32 OSPI PSRAM"
default y
depends on DT_HAS_ST_STM32_OSPI_PSRAM_ENABLED
depends on SOC_SERIES_STM32U5X
select USE_STM32_HAL_OSPI
select USE_STM32_LL_DLYB
select USE_STM32_HAL_DMA
select USE_STM32_HAL_DMA_EX
select PINCTRL
help
Enable STM32 OSPI PSRAM Controller driver.
Loading