From patchwork Thu Oct 10 14:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amelie Delaunay X-Patchwork-Id: 13830345 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 9BF0ECF11F5 for ; Thu, 10 Oct 2024 14:37:38 +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=5Wa1hO62y0JRJXVgsIkzCNugxFg4hqAuzrDxJki9j+0=; b=v45tQ57y+KjuLQ 8vwDr6h7EuQ0+FX+2e9Xd1sEOKHhcElPwW66RO0pC8EvbQMqZK0RO6qJmtbS0U/4y65cu863CGgK5 +lA5kLMcld3fJrospE7d45p7JLYn0ZXCBsmIGnXKPzKnkYJLa/gAQ0iYYcwBvJdE7wjhwoyQzL8HK iXA1ACgNKRjRNF4QAIJYxDBuJ0mhMG6yX0rWaBTkYJ3nCJVoJcpLQgHuCSKGPgaIcj2rDCxwwtmhC Pu5yPVBcaJJ3nfgrzuJAMcoioqiPgma5SL2BbliDZk35Cx0gLXzNYccciLJeZkU7E0k5DZ094JeP1 fm1a0wZEaiuKruc7MeDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syuI9-0000000D8d9-0xNK; Thu, 10 Oct 2024 14:37:25 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syuCM-0000000D6yc-1FPT for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2024 14:31:28 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49AE3d0V028646; Thu, 10 Oct 2024 16:31:16 +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=5Wa1hO62y0JRJXVgsIkzCN ugxFg4hqAuzrDxJki9j+0=; b=169sq+2KQR2Av+gIn5Gdd0QA5BEmV9yU+Sdf+T ecVwlqDvfTFn5R8URk+SKvcOr6beiHs5vQSzcws6sQGTpUHOam3xhWx/qccAsbix VA77RN6lVJqMpN104yjjzadlq1oTnaRu8NtYSmmDgHJkXG4JKizd2uW4jCVrARTQ YGODFe0TcbeN76mOYoSGQhaSRv3+eia26KglJTTEicqyZRI62wG0Hsq1v73eDaNt ssmvrdybv+H60B28OO1xGYkQ1uO/Nj1W6dO/TWylTztrxz/cyffm/1hu+ST2U2Ry Jh7IpGM93+yjjScSgInYztjHBabRl1mJ1LxlYAnXpucZKLdw== 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 4263434121-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 16:31:16 +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 C9B0B4008A; Thu, 10 Oct 2024 16:30:17 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 514BF289A51; Thu, 10 Oct 2024 16:28:06 +0200 (CEST) Received: from localhost (10.252.31.182) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.37; Thu, 10 Oct 2024 16:28:06 +0200 From: Amelie Delaunay Subject: [PATCH 00/11] STM32 DMA3 updates for STM32MP25 Date: Thu, 10 Oct 2024 16:27:50 +0200 Message-ID: <20241010-dma3-mp25-updates-v1-0-adf0633981ea@foss.st.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAGbkB2cC/x2MywqAIBAAfyX23ILai/qV6KC51R4s0YpA+vek4 8DMJIgUmCIMRYJAN0c+9gyyLGDe9L4Sss0MSqhaCinQOl2h86rBy1t9UsS6NT11WeiFgdz5QAs //3Oc3vcDzqPYRGMAAAA= X-Change-ID: 20241010-dma3-mp25-updates-46b9e720290b To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: , , , , , Amelie Delaunay X-Mailer: b4 0.14.2 X-Originating-IP: [10.252.31.182] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_073126_858342_ED7E1912 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. 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 The HW version of STM32 DMA3 inside STM32MP25 requires some tunings to meet the needs of the interconnect. This series adds the linked list refactoring feature to have optimal performance when addressing the memory, and it adds the use of two new bits in the third cell specifying the DMA transfer requirements: - bit[16] to prevent packing/unpacking mode to avoid bytes loss in case of interrupting an ongoing transfer (e.g. UART RX)i, - bit[17] to prevent linked-list refactoring because some peripherals (e.g. FMC ECC) require a one-shot transfer, they trigger the DMA only once. It also adds a new property, st,axi-max-burst-len, to clamp the burst length when AXI port is used. Finally this series also contains STM32MP25 device tree updates, to add DMA support on SPI, I2C, UART and apply the tunings introduced. Signed-off-by: Amelie Delaunay --- Amelie Delaunay (11): dt-bindings: dma: stm32-dma3: prevent packing/unpacking mode dmaengine: stm32-dma3: prevent pack/unpack thanks to DT configuration dmaengine: stm32-dma3: refactor HW linked-list to optimize memory accesses dt-bindings: dma: stm32-dma3: prevent linked-list refactoring dmaengine: stm32-dma3: prevent LL refactoring thanks to DT configuration dt-bindings: dma: stm32-dma3: introduce st,axi-max-burst-len property dmaengine: stm32-dma3: clamp AXI burst using st,axi-max-burst-len arm64: dts: st: limit axi burst length in dma nodes of stm32mp25 arm64: dts: st: add DMA support on U(S)ART instances of stm32mp25 arm64: dts: st: add DMA support on I2C instances of stm32mp25 arm64: dts: st: add DMA support on SPI instances of stm32mp25 .../bindings/dma/stm32/st,stm32-dma3.yaml | 17 ++++ arch/arm64/boot/dts/st/stm32mp251.dtsi | 78 +++++++++++++++ arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 2 + drivers/dma/stm32/stm32-dma3.c | 107 +++++++++++++++++---- 4 files changed, 185 insertions(+), 19 deletions(-) --- base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc change-id: 20241010-dma3-mp25-updates-46b9e720290b Best regards,