2024-03-29 15:49:38

by Frank Li

[permalink] [raw]
Subject: [PATCH v4 0/5] dmaengine: fsl-sdma: Some improvement for fsl-sdma

To: Vinod Koul <[email protected]>
To: Shawn Guo <[email protected]>
To: Sascha Hauer <[email protected]>
To: Pengutronix Kernel Team <[email protected]>
To: Fabio Estevam <[email protected]>
To: NXP Linux Team <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Joy Zou <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Signed-off-by: Frank Li <[email protected]>

Changes in v4:
- using shenjing MULT FIFO support patches, because more clear commit
message .
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Fixed sdma firware version number (v3.6/v4.6).
- Update sdma binding doc and pass dt_binding_check
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 dt_binding_check DT_SCHEMA_FILES=fsl,imx-sdma.yaml
LINT Documentation/devicetree/bindings
DTEX Documentation/devicetree/bindings/dma/fsl,imx-sdma.example.dts
CHKDT Documentation/devicetree/bindings/processed-schema.json
SCHEMA Documentation/devicetree/bindings/processed-schema.json
DTC_CHK Documentation/devicetree/bindings/dma/fsl,imx-sdma.example.dtb

- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- remove ccb_phy from struct sdma_engine
- add i2c test platform and sdma script version informaiton at commit
message.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Frank Li (1):
dt-bindings: fsl-imx-sdma: Add I2C peripheral types ID

Nicolin Chen (1):
dmaengine: imx-sdma: Support allocate memory from internal SRAM (iram)

Robin Gong (1):
dmaengine: imx-sdma: Add i2c dma support

Shengjiu Wang (2):
dmaengine: imx-sdma: Support 24bit/3bytes for sg mode
dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV

.../devicetree/bindings/dma/fsl,imx-sdma.yaml | 1 +
drivers/dma/imx-sdma.c | 75 ++++++++++++++++++----
include/linux/dma/imx-dma.h | 1 +
3 files changed, 66 insertions(+), 11 deletions(-)
---
base-commit: af20f396b91f335f907422249285cc499fb4e0d8
change-id: 20240303-sdma_upstream-acebfa5b97f7

Best regards,
---
Frank Li <[email protected]>



2024-03-29 16:19:10

by Frank Li

[permalink] [raw]
Subject: [PATCH v4 3/5] dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV

From: Shengjiu Wang <[email protected]>

SSI and SPDIF are dual fifo interface, when support ASRC P2P
with SSI and SPDIF, the src fifo or dst fifo number can be
two.

The p2p watermark level bit 13 and 14 are designed for
these use case. This patch is to complete this function
in driver.

Signed-off-by: Shengjiu Wang <[email protected]>
Signed-off-by: Joy Zou <[email protected]>
Acked-by: Iuliana Prodan <[email protected]>
Signed-off-by: Frank Li <[email protected]>
---
drivers/dma/imx-sdma.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 6be4c1e441266..f68ab34a3c880 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -138,7 +138,11 @@
* 0: Source on AIPS
* 12 Destination Bit(DP) 1: Destination on SPBA
* 0: Destination on AIPS
- * 13-15 --------- MUST BE 0
+ * 13 Source FIFO 1: Source is dual FIFO
+ * 0: Source is single FIFO
+ * 14 Destination FIFO 1: Destination is dual FIFO
+ * 0: Destination is single FIFO
+ * 15 --------- MUST BE 0
* 16-23 Higher WML HWML
* 24-27 N Total number of samples after
* which Pad adding/Swallowing
@@ -169,6 +173,8 @@
#define SDMA_WATERMARK_LEVEL_SPDIF BIT(10)
#define SDMA_WATERMARK_LEVEL_SP BIT(11)
#define SDMA_WATERMARK_LEVEL_DP BIT(12)
+#define SDMA_WATERMARK_LEVEL_SD BIT(13)
+#define SDMA_WATERMARK_LEVEL_DD BIT(14)
#define SDMA_WATERMARK_LEVEL_HWML (0xFF << 16)
#define SDMA_WATERMARK_LEVEL_LWE BIT(28)
#define SDMA_WATERMARK_LEVEL_HWE BIT(29)
@@ -1258,6 +1264,16 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP;

sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT;
+
+ /*
+ * Limitation: The p2p script support dual fifos in maximum,
+ * So when fifo number is larger than 1, force enable dual
+ * fifos.
+ */
+ if (sdmac->n_fifos_src > 1)
+ sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_SD;
+ if (sdmac->n_fifos_dst > 1)
+ sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DD;
}

static void sdma_set_watermarklevel_for_sais(struct sdma_channel *sdmac)

--
2.34.1


2024-04-07 16:40:02

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v4 0/5] dmaengine: fsl-sdma: Some improvement for fsl-sdma


On Fri, 29 Mar 2024 10:34:40 -0400, Frank Li wrote:
> To: Vinod Koul <[email protected]>
> To: Shawn Guo <[email protected]>
> To: Sascha Hauer <[email protected]>
> To: Pengutronix Kernel Team <[email protected]>
> To: Fabio Estevam <[email protected]>
> To: NXP Linux Team <[email protected]>
> To: Rob Herring <[email protected]>
> To: Krzysztof Kozlowski <[email protected]>
> To: Conor Dooley <[email protected]>
> To: Joy Zou <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
>
> [...]

Applied, thanks!

[1/5] dmaengine: imx-sdma: Support allocate memory from internal SRAM (iram)
commit: 802ef223101fec83d92e045f89000b228904a580
[2/5] dmaengine: imx-sdma: Support 24bit/3bytes for sg mode
commit: 288109387becd8abadca5c063c70a07ae0dd7716
[3/5] dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV
commit: a20f10d6accb9f5096fa7a7296e5ae34f4562440
[4/5] dt-bindings: fsl-imx-sdma: Add I2C peripheral types ID
(no commit info)
[5/5] dmaengine: imx-sdma: Add i2c dma support
(no commit info)

Best regards,
--
~Vinod