From patchwork Mon Apr 7 13:27:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice Chotard X-Patchwork-Id: 14040550 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AE5FC36010 for ; Mon, 7 Apr 2025 13:40:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jtcfw4T4ysNtOOYn1QxZQWlJr1R9xdWowKEdb83yll0=; b=4BD7ItpEt1kxa5 seHDm2UbPwq8YdbfBrTu1BvyPQUAFK2Y0nHfsTpFU/1TClbKHcP80FgbBTem/5OnnF8xexQIo/Cgt 1HwTddFf33fPcRxE9684SaLHfsM7U7pb2ATCK0l+HU5MHyQUjLUQj6O7xQiH9mCB0Sk4dyt8hiKU1 yAKV0Kujbd6sNXX1iCj+kMhlTX7lwnrkdmwTFYO4EsOovXK4Ya3btoN9xSlFr17rEUKerScEpXOlu tyJI/sgZ9GhtAHJKKXO+qvthLvEk7SdZy+bMcNlimAoVo9BxL4eKiooN7G8nA77ztuBga0VE8FRxa vdCLa+5I31azVf8Fo3Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1miA-00000000ZW1-2gHH; Mon, 07 Apr 2025 13:40:26 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1mXn-00000000WQ2-48JQ for linux-arm-kernel@bombadil.infradead.org; Mon, 07 Apr 2025 13:29:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=CC:To:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:Subject:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=jtcfw4T4ysNtOOYn1QxZQWlJr1R9xdWowKEdb83yll0=; b=eU907Cv6MsNLB4MYPgR8edHgks IXQvBH9CFrCaVx2BZVyUgDz86XkWvNUvy9Bg3Sj4J23Z/Q9L9DqEiDmlTnrR41bp+bmo0gUG38erq zYy5TPKGmXVlZ345UtZuc3gG3MIFj7hwohxfE0E0py8jiuf2DbtJMUTeHn9edZ9zB/m8SF774Tq7w ZwUcnYmNpX397+Iq5YAdt+OBC6rkMGp/uZqfr6gufgnGgKbfBV4gorZ4l0h4ReurHVL7z5tPGwun4 pbv4PxDBi+iucPN03SsdX6D406KQN8zQyamsFO5TlkK0qmhyePV39hwkYLZ6kgNjmHqisNhxX1Und MzPceBCw==; Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by desiato.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1mXk-00000007xKm-16uZ for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2025 13:29:42 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 537CPr7l008728; Mon, 7 Apr 2025 15:29:30 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=selector1; bh=jtcfw4T4ysNtOOYn1QxZQW lJr1R9xdWowKEdb83yll0=; b=oYCVZ4fa2UIE63iEmn/4njKdBK5Dm90yYvzuQr g4CHgv8UEXqO0AH+rCCTYPBFOVMS2wxHYbdn91YC97zz/I1Zya0vqC4V0Oao0WNg LirbxiMMA3Y19Q22IyP0wfbnOHKrKZw4TaqSrdMxy96m8LR/GTzkUIodm2c3Tddv M7C4rtD5+RfisAHqjunjhrGmDw0XXTdcpBOJYMe1j5iZCiX42zwiMRCDU+vw24cs D72myUvURWO6wJHvfhozGOUtE9YoCo2nIEMHomWKvjcDSWBTInFMDbAyLrP4eD4/ dIhdlGZ3TiSbcDEKws3GvZAOR0Az3gdbWrsTiEfdILXLqLIQ== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 45tw2gqwyq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Apr 2025 15:29:30 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 32B1640055; Mon, 7 Apr 2025 15:28:29 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8221E9400D1; Mon, 7 Apr 2025 15:27:41 +0200 (CEST) Received: from localhost (10.48.87.62) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Apr 2025 15:27:41 +0200 From: Patrice Chotard Subject: [PATCH v8 0/7] Add STM32MP25 SPI NOR support Date: Mon, 7 Apr 2025 15:27:31 +0200 Message-ID: <20250407-upstream_ospi_v6-v8-0-7b7716c1c1f6@foss.st.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAMPS82cC/23NSwqDMBCA4atI1o3kpUm76j1KkahjzUIjGRtax Ls3CqWUFmbzD8w3C0EIDpCcsoUEiA6dH1OYQ0aa3o43oK5NTQQTBZOC0fuEcwA7VB4nV8WStko Ka7gWnBUknU0BOvfYycs1de9w9uG5f4jltn1j/BdLw6jUdd3YWkklj+fOI+Y4540fyMZF/SEU+ 0foRDDohCm4hNbwb2Jd1xeLtrfZ9QAAAA== X-Change-ID: 20250320-upstream_ospi_v6-d432a8172105 To: Krzysztof Kozlowski , Rob Herring , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Krzysztof Kozlowski , Catalin Marinas , Will Deacon CC: , , , , , Patrice Chotard X-Mailer: b4 0.14.2 X-Originating-IP: [10.48.87.62] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-07_04,2025-04-03_03,2024-11-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250407_142940_853129_EA85402A X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 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 (7): MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller memory: Add STM32 Octo Memory Manager driver arm64: dts: st: Add OMM node on stm32mp251 arm64: dts: st: Add ospi port1 pinctrl entries in stm32mp25-pinctrl.dtsi arm64: dts: st: Add SPI NOR flash support on stm32mp257f-ev1 board arm64: defconfig: Enable STM32 Octo Memory Manager and OcstoSPI driver .../memory-controllers/st,stm32mp25-omm.yaml | 226 ++++++++++ MAINTAINERS | 6 + arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi | 51 +++ arch/arm64/boot/dts/st/stm32mp251.dtsi | 54 +++ arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 32 ++ arch/arm64/configs/defconfig | 2 + drivers/memory/Kconfig | 17 + drivers/memory/Makefile | 1 + drivers/memory/stm32_omm.c | 474 +++++++++++++++++++++ 9 files changed, 863 insertions(+) --- base-commit: 88424abd55ab36c3565898a656589a0a25ecd92f change-id: 20250320-upstream_ospi_v6-d432a8172105 Best regards,