From patchwork Fri May 16 13:32:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 891265 Received: from cantor.telenet-ops.be (cantor.telenet-ops.be [195.130.132.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5668C7263C for ; Fri, 16 May 2025 13:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747402368; cv=none; b=Uq6qyJks9KjJwJA47z9PA08Z+1fDsMWFfAdpIHCfuqRoGqz8OcBpcw9AwYU8iCGwYmpHDoJqJeZP9R9ke1vbKtjWWoeZgrprbnc+t0K1H+ELFdOA8nKhA+fBaR5mlPmPAXBgUv86oGH4Zrgm6ZCb4s1ip8seJNZOi5VbD7zuv4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747402368; c=relaxed/simple; bh=HtteoMpXwZumxvkhLX0UpbrbT4fRDbTpJ3wPmMXkYtc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TZrtxjReWMyspzv4diIc+zf9+WrxRjqKL5WZL9iG8kIhweTxqb7yKHf5gpszWNEQe916g2oVHY6a4IfOQi/buVsOxy1C3xYWpg6hlBJc7uWfgEZ2gdeRqgxwwucqLWDfJCjElQvRO9eegLGt55FWHNpyF5ddaUVQN49r/tsfJsY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by cantor.telenet-ops.be (Postfix) with ESMTPS id 4ZzSgP3wK8z4xBbR for ; Fri, 16 May 2025 15:32:33 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:b0d6:ccd4:58dc:70fd]) by albert.telenet-ops.be with cmsmtp id ppYX2E0083S8nz406pYXwv; Fri, 16 May 2025 15:32:33 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.97) (envelope-from ) id 1uFvAi-000000020iJ-0dAn; Fri, 16 May 2025 15:32:31 +0200 Received: from geert by rox.of.borg with local (Exim 4.97) (envelope-from ) id 1uFvAt-00000001522-23dN; Fri, 16 May 2025 15:32:31 +0200 From: Geert Uytterhoeven To: Mark Brown , Kuninori Morimoto , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Koji Matsuoka , Wolfram Sang Cc: linux-spi@vger.kernel.org, linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 00/22] spi: sh-msiof: Transfer size improvements and I2S reuse Date: Fri, 16 May 2025 15:32:03 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi all, This patch series (A) improves single transfer sizes in the MSIOF driver, using two methods: - By increasing the assumed FIFO sizes, impacting both PIO and DMA transfers, - By using two groups, impacting DMA transfers, and (B) lets the recently-introduced MSIOF I2S drive reuse the SPI driver's register definitions. All of this is covered with a thick sauce of fixes for (harmless) bugs, cleanups, and refactorings. Changes compared to v1[1]: - Make include/linux/spi/sh_msiof.h self-contained, - Add Tested-by for the sound part. Note that the driver uses the limitations as specified in the hardware documentation. For discovering the actual FIFO sizes, I wrote some crude test code that can be found at [2]. This is based on spi/for-next and sound-asoc/for-next, and has been tested on a variery of R-Car SoCs. Thanks for your comments! [1] https://lore.kernel.org/cover.1746180072.git.geert+renesas@glider.be [2] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/msiof-fifo Geert Uytterhoeven (22): spi: sh-msiof: Drop comma after OF match table sentinel spi: sh-msiof: Remove unneeded compatible values spi: sh-msiof: Fix maximum DMA transfer size spi: sh-msiof: Complete using dev in sh_msiof_spi_probe() spi: sh-msiof: Use bool for boolean flags spi: sh-msiof: Make words/bits unsigned in sh_msiof_spi_txrx_once() spi: sh-msiof: Make words/fs unsigned in FIFO helpers spi: sh-msiof: SITMDR1/SIRMDR1 bitfield conversion spi: sh-msiof: SITMDR2 and SIRMDR2 bitfield conversion spi: sh-msiof: SITSCR/SIRSCR bitfield conversion spi: sh-msiof: SICTR bitfield conversion spi: sh-msiof: SIFCTR bitfield conversion spi: sh-msiof: Correct SIMDR2_GRPMASK spi: sh-msiof: Add core support for dual-group transfers spi: sh-msiof: Correct RX FIFO size for R-Car Gen2 spi: sh-msiof: Correct RX FIFO size for R-Car Gen3 spi: sh-msiof: Increase TX FIFO size for R-Car V4H/V4M spi: sh-msiof: Simplify BRG's Division Ratio spi: sh-msiof: Double maximum DMA transfer size using two groups spi: sh-msiof: Document frame start sync pulse mode spi: sh-msiof: Move register definitions to ASoC: renesas: msiof: Convert to drivers/spi/spi-sh-msiof.c | 357 +++++++++++++-------------------- include/linux/spi/sh_msiof.h | 125 ++++++++++++ sound/soc/renesas/rcar/msiof.c | 94 +++------ 3 files changed, 287 insertions(+), 289 deletions(-)