.../memory-controllers/st,stm32mp25-omm.yaml | 226 ++++++++++ MAINTAINERS | 6 + drivers/memory/Kconfig | 17 + drivers/memory/Makefile | 1 + drivers/memory/stm32_omm.c | 476 +++++++++++++++++++++ 5 files changed, 726 insertions(+)
This series adds SPI NOR support for STM32MP25 SoCs from STMicroelectronics.
On STM32MP25 SoCs family, an Octo Memory Manager block manages the muxing,
the memory area split, the chip select override and the time constraint
between its 2 Octo SPI children.
Due to these depedencies, this series adds support for:
- Octo Memory Manager driver.
- Octo SPI driver.
- yaml schema for Octo Memory Manager and Octo SPI drivers.
The device tree files adds Octo Memory Manager and its 2 associated Octo
SPI chidren in stm32mp251.dtsi and adds SPI NOR support in stm32mp257f-ev1
board.
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Changes in v11:
- Add stm32_omm_toggle_child_clock(dev, false) in stm32_omm_disable_child() in case of error.
- Check MUXEN bit in stm32_omm_probe() to check if child clock must be disabled.
- Add dev_err_probe() in stm32_omm_probe().
- Link to v10: https://lore.kernel.org/r/20250422-upstream_ospi_v6-v10-0-6f4942a04e10@foss.st.com
Changes in v10:
- Add of_node_put() in stm32_omm_set_amcr().
- Link to v9: https://lore.kernel.org/r/20250410-upstream_ospi_v6-v9-0-cf119508848a@foss.st.com
Changes in v9:
- split patchset by susbsystem, current one include only OMM related
patches.
- Update SPDX Identifiers to "GPL-2.0-only".
- Add of_node_put)() instm32_omm_set_amcr().
- Rework error path in stm32_omm_toggle_child_clock().
- Make usage of reset_control_acquire/release() in stm32_omm_disable_child()
and move reset_control_get in probe().
- Rename error label in stm32_omm_configure().
- Remove child compatible check in stm32_omm_probe().
- Make usage of devm_of_platform_populate().
- Link to v8: https://lore.kernel.org/r/20250407-upstream_ospi_v6-v8-0-7b7716c1c1f6@foss.st.com
Changes in v8:
- update OMM's dt-bindings:
- Remove minItems for clocks and resets properties.
- Fix st,syscfg-amcr items declaration.
- move power-domains property before vendor specific properties.
- Update compatible check wrongly introduced during internal tests in
stm32_omm.c.
- Move ommanager's node outside bus@42080000's node in stm32mp251.dtsi.
- Link to v7: https://lore.kernel.org/r/20250401-upstream_ospi_v6-v7-0-0ef28513ed81@foss.st.com
Changes in v7:
- update OMM's dt-bindings by updating :
- clock-names and reset-names properties.
- spi unit-address node.
- example.
- update stm32mp251.dtsi to match with OMM's bindings update.
- update stm32mp257f-ev1.dts to match with OMM's bindings update.
- Link to v6: https://lore.kernel.org/r/20250321-upstream_ospi_v6-v6-0-37bbcab43439@foss.st.com
Changes in v6:
- Update MAINTAINERS file.
- Remove previous patch 1/8 and 2/8, merged by Mark Brown in spi git tree.
- Fix Signed-off-by order for patch 3.
- OMM driver:
- Add dev_err_probe() in error path.
- Rename stm32_omm_enable_child_clock() to stm32_omm_toggle_child_clock().
- Reorder initialised/non-initialized variable in stm32_omm_configure()
and stm32_omm_probe().
- Move pm_runtime_disable() calls from stm32_omm_configure() to
stm32_omm_probe().
- Update children's clocks and reset management.
- Use of_platform_populate() to probe children.
- Add missing pm_runtime_disable().
- Remove useless stm32_omm_check_access's first parameter.
- Update OMM's dt-bindings by adding OSPI's clocks and resets.
- Update stm32mp251.dtsi by adding OSPI's clock and reset in OMM's node.
Changes in v5:
- Add Reviewed-by Krzysztof Kozlowski for patch 1 and 3.
Changes in v4:
- Add default value requested by Krzysztof for st,omm-req2ack-ns,
st,omm-cssel-ovr and st,omm-mux properties in st,stm32mp25-omm.yaml
- Remove constraint in free form test for st,omm-mux property.
- Fix drivers/memory/Kconfig by replacing TEST_COMPILE_ by COMPILE_TEST.
- Fix SPDX-License-Identifier for stm32-omm.c.
- Fix Kernel test robot by fixing dev_err() format in stm32-omm.c.
- Add missing pm_runtime_disable() in the error handling path in
stm32-omm.c.
- Replace an int by an unsigned int in stm32-omm.c
- Remove uneeded "," after terminator in stm32-omm.c.
- Update cover letter description to explain dependecies between
Octo Memory Manager and its 2 Octo SPI children.
Changes in v3:
- Squash defconfig patches 8 and 9.
- Update STM32 Octo Memory Manager controller bindings.
- Rename st,stm32-omm.yaml to st,stm32mp25-omm.yaml.
- Update STM32 OSPI controller bindings.
- Reorder DT properties in .dtsi and .dts files.
- Replace devm_reset_control_get_optional() by
devm_reset_control_get_optional_exclusive() in stm32_omm.c.
- Reintroduce region-memory-names management in stm32_omm.c.
- Rename stm32_ospi_tx_poll() and stm32_ospi_tx() to respectively to
stm32_ospi_poll() and stm32_ospi_xfer() in spi-stm32-ospi.c.
- Set SPI_CONTROLLER_HALF_DUPLEX in controller flags in spi-stm32-ospi.c.
Changes in v2:
- Move STM32 Octo Memory Manager controller driver and bindings from
misc to memory-controllers.
- Update STM32 OSPI controller bindings.
- Update STM32 Octo Memory Manager controller bindings.
- Update STM32 Octo Memory Manager driver to match bindings update.
- Update DT to match bindings update.
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---
Patrice Chotard (3):
dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller
memory: Add STM32 Octo Memory Manager driver
MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver
.../memory-controllers/st,stm32mp25-omm.yaml | 226 ++++++++++
MAINTAINERS | 6 +
drivers/memory/Kconfig | 17 +
drivers/memory/Makefile | 1 +
drivers/memory/stm32_omm.c | 476 +++++++++++++++++++++
5 files changed, 726 insertions(+)
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250320-upstream_ospi_v6-d432a8172105
Best regards,
--
Patrice Chotard <patrice.chotard@foss.st.com>
On Mon, 28 Apr 2025 10:58:29 +0200, Patrice Chotard wrote:
> This series adds SPI NOR support for STM32MP25 SoCs from STMicroelectronics.
>
> On STM32MP25 SoCs family, an Octo Memory Manager block manages the muxing,
> the memory area split, the chip select override and the time constraint
> between its 2 Octo SPI children.
>
> Due to these depedencies, this series adds support for:
> - Octo Memory Manager driver.
> - Octo SPI driver.
> - yaml schema for Octo Memory Manager and Octo SPI drivers.
>
> [...]
Applied, thanks!
[1/3] dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller
https://git.kernel.org/krzk/linux-mem-ctrl/c/4a98ec836a201d34ac27636960c2c81d9b3b7e19
[2/3] memory: Add STM32 Octo Memory Manager driver
https://git.kernel.org/krzk/linux-mem-ctrl/c/8181d061dcff140fd5a40e568d8adb81f1403a28
[3/3] MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver
https://git.kernel.org/krzk/linux-mem-ctrl/c/02eaee70babd860d76dc23f9165f4496d0ffe77f
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
On Mon, 28 Apr 2025 10:58:29 +0200, Patrice Chotard wrote:
> This series adds SPI NOR support for STM32MP25 SoCs from STMicroelectronics.
>
> On STM32MP25 SoCs family, an Octo Memory Manager block manages the muxing,
> the memory area split, the chip select override and the time constraint
> between its 2 Octo SPI children.
>
> Due to these depedencies, this series adds support for:
> - Octo Memory Manager driver.
> - Octo SPI driver.
> - yaml schema for Octo Memory Manager and Octo SPI drivers.
>
> [...]
Applied, thanks!
[1/3] dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller
https://git.kernel.org/krzk/linux-mem-ctrl/c/43eb1b288072641b7de8f5d5c15bde69e6e8589a
[2/3] memory: Add STM32 Octo Memory Manager driver
https://git.kernel.org/krzk/linux-mem-ctrl/c/daee9b249992a88cb64fb6a67eeb333d359c6242
[3/3] MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver
https://git.kernel.org/krzk/linux-mem-ctrl/c/ab455b75de7351a0277be3261af180e326b74605
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
On 04/05/2025 15:50, Krzysztof Kozlowski wrote: > > On Mon, 28 Apr 2025 10:58:29 +0200, Patrice Chotard wrote: >> This series adds SPI NOR support for STM32MP25 SoCs from STMicroelectronics. >> >> On STM32MP25 SoCs family, an Octo Memory Manager block manages the muxing, >> the memory area split, the chip select override and the time constraint >> between its 2 Octo SPI children. >> >> Due to these depedencies, this series adds support for: >> - Octo Memory Manager driver. >> - Octo SPI driver. >> - yaml schema for Octo Memory Manager and Octo SPI drivers. >> >> [...] > > Applied, thanks! > > [1/3] dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller > https://git.kernel.org/krzk/linux-mem-ctrl/c/43eb1b288072641b7de8f5d5c15bde69e6e8589a And dropped everything - it is full of warnings. Best regards, Krzysztof
On 5/4/25 18:16, Krzysztof Kozlowski wrote: > On 04/05/2025 15:50, Krzysztof Kozlowski wrote: >> >> On Mon, 28 Apr 2025 10:58:29 +0200, Patrice Chotard wrote: >>> This series adds SPI NOR support for STM32MP25 SoCs from STMicroelectronics. >>> >>> On STM32MP25 SoCs family, an Octo Memory Manager block manages the muxing, >>> the memory area split, the chip select override and the time constraint >>> between its 2 Octo SPI children. >>> >>> Due to these depedencies, this series adds support for: >>> - Octo Memory Manager driver. >>> - Octo SPI driver. >>> - yaml schema for Octo Memory Manager and Octo SPI drivers. >>> >>> [...] >> >> Applied, thanks! >> >> [1/3] dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller >> https://git.kernel.org/krzk/linux-mem-ctrl/c/43eb1b288072641b7de8f5d5c15bde69e6e8589a > > And dropped everything - it is full of warnings. Hi Krzysztof, What are the warnings you encountered ? On my side, i double check and found nothing wrong neither on bindings side nor on source code side: I previously checked that everything was up to date : pip3 install dtschema --upgrade Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: dtschema in /local/home/nxp11987/.local/lib/python3.8/site-packages (2025.2) Requirement already satisfied: ruamel.yaml>0.15.69 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from dtschema) (0.17.21) Requirement already satisfied: jsonschema<4.18,>=4.1.2 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from dtschema) (4.17.3) Requirement already satisfied: rfc3987 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from dtschema) (1.3.8) Requirement already satisfied: pylibfdt in /local/home/nxp11987/.local/lib/python3.8/site-packages (from dtschema) (1.6.1) Requirement already satisfied: attrs>=17.4.0 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from jsonschema<4.18,>=4.1.2->dtschema) (19.3.0) Requirement already satisfied: importlib-resources>=1.4.0 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from jsonschema<4.18,>=4.1.2->dtschema) (5.7.1) Requirement already satisfied: pkgutil-resolve-name>=1.3.10 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from jsonschema<4.18,>=4.1.2->dtschema) (1.3.10) Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from jsonschema<4.18,>=4.1.2->dtschema) (0.18.1) Requirement already satisfied: ruamel.yaml.clib>=0.2.6 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from ruamel.yaml>0.15.69->dtschema) (0.2.6) Requirement already satisfied: zipp>=3.1.0 in /local/home/nxp11987/.local/lib/python3.8/site-packages (from importlib-resources>=1.4.0->jsonschema<4.18,>=4.1.2->dtschema) (3.20.2) export CROSS_COMPILE=aarch64-linux- ARCH=arm64 KBUILD_OUTPUT=out/ make defconfig make[1]: Entering directory '/local/home/nxp11987/projects/community/kernel.org/linux/out' GEN Makefile HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/conf *** Default configuration is based on 'defconfig' # # configuration written to .config # make[1]: Leaving directory '/local/home/nxp11987/projects/community/kernel.org/linux/out' Then i applied this series https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=957628 above the current series to check DTB against bindings: make CHECK_DTBS=y st/stm32mp257f-ev1.dtb make[1]: Entering directory '/local/home/nxp11987/projects/community/kernel.org/linux/out' HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/data.o HOSTCC scripts/dtc/livetree.o HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/util.o LEX scripts/dtc/dtc-lexer.lex.c YACC scripts/dtc/dtc-parser.tab.[ch] HOSTCC scripts/dtc/dtc-lexer.lex.o HOSTCC scripts/dtc/dtc-parser.tab.o HOSTLD scripts/dtc/dtc HOSTCC scripts/dtc/libfdt/fdt.o HOSTCC scripts/dtc/libfdt/fdt_ro.o HOSTCC scripts/dtc/libfdt/fdt_wip.o HOSTCC scripts/dtc/libfdt/fdt_sw.o HOSTCC scripts/dtc/libfdt/fdt_rw.o HOSTCC scripts/dtc/libfdt/fdt_strerror.o HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o HOSTCC scripts/dtc/libfdt/fdt_addresses.o HOSTCC scripts/dtc/libfdt/fdt_overlay.o HOSTCC scripts/dtc/fdtoverlay.o HOSTLD scripts/dtc/fdtoverlay SCHEMA Documentation/devicetree/bindings/processed-schema.json /local/home/nxp11987/projects/community/kernel.org/linux/Documentation/devicetree/bindings/net/snps,dwmac.yaml: mac-mode: missing type definition UPD include/config/kernel.release DTC [C] arch/arm64/boot/dts/st/stm32mp257f-ev1.dtb make[1]: Leaving directory '/local/home/nxp11987/projects/community/kernel.org/linux/out' and finally : make CHECK_DTBS=y DT_SCHEMA_FILES=st,stm32mp25-omm.yaml st/stm32mp257f-ev1.dtb make[1]: Entering directory '/local/home/nxp11987/projects/community/kernel.org/linux/out' DTC [C] arch/arm64/boot/dts/st/stm32mp257f-ev1.dtb make[1]: Leaving directory '/local/home/nxp11987/projects/community/kernel.org/linux/out' Thanks Patrice > > Best regards, > Krzysztof
On 05/05/2025 14:15, Patrice CHOTARD wrote: > > > On 5/4/25 18:16, Krzysztof Kozlowski wrote: >> On 04/05/2025 15:50, Krzysztof Kozlowski wrote: >>> >>> On Mon, 28 Apr 2025 10:58:29 +0200, Patrice Chotard wrote: >>>> This series adds SPI NOR support for STM32MP25 SoCs from STMicroelectronics. >>>> >>>> On STM32MP25 SoCs family, an Octo Memory Manager block manages the muxing, >>>> the memory area split, the chip select override and the time constraint >>>> between its 2 Octo SPI children. >>>> >>>> Due to these depedencies, this series adds support for: >>>> - Octo Memory Manager driver. >>>> - Octo SPI driver. >>>> - yaml schema for Octo Memory Manager and Octo SPI drivers. >>>> >>>> [...] >>> >>> Applied, thanks! >>> >>> [1/3] dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller >>> https://git.kernel.org/krzk/linux-mem-ctrl/c/43eb1b288072641b7de8f5d5c15bde69e6e8589a >> >> And dropped everything - it is full of warnings. > > Hi Krzysztof, > > What are the warnings you encountered ? > > On my side, i double check and found nothing wrong neither on bindings side nor on source code side: > > I previously checked that everything was up to date : stm32_firewall_device.h:117:5: error: no previous prototype for ‘stm32_firewall_get_firewall’ [-Werror=missing-prototypes] 117 | int stm32_firewall_get_firewall(struct device_node *np, struct stm32_firewall *firewall, and several other like that. See: https://krzk.eu/#/builders/38/builds/915 https://krzk.eu/#/builders/40/builds/900 Best regards, Krzysztof
© 2016 - 2025 Red Hat, Inc.