[PATCH 4/4] dmaengine: imx-sdma: Add i2c dma support

Frank Li posted 4 patches 1 year, 11 months ago
There is a newer version of this series
[PATCH 4/4] dmaengine: imx-sdma: Add i2c dma support
Posted by Frank Li 1 year, 11 months ago
From: Robin Gong <yibin.gong@nxp.com>

New sdma script support i2c. So add I2C dma support.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/dma/imx-sdma.c      | 7 +++++++
 include/linux/dma/imx-dma.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 9b133990afa39..832be7eccb335 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -247,6 +247,8 @@ struct sdma_script_start_addrs {
 	s32 sai_2_mcu_addr;
 	s32 uart_2_mcu_rom_addr;
 	s32 uartsh_2_mcu_rom_addr;
+	s32 i2c_2_mcu_addr;
+	s32 mcu_2_i2c_addr;
 	/* End of v3 array */
 	s32 mcu_2_zqspi_addr;
 	/* End of v4 array */
@@ -1078,6 +1080,11 @@ static int sdma_get_pc(struct sdma_channel *sdmac,
 		per_2_emi = sdma->script_addrs->sai_2_mcu_addr;
 		emi_2_per = sdma->script_addrs->mcu_2_sai_addr;
 		break;
+	case IMX_DMATYPE_I2C:
+		per_2_emi = sdma->script_addrs->i2c_2_mcu_addr;
+		emi_2_per = sdma->script_addrs->mcu_2_i2c_addr;
+		sdmac->is_ram_script = true;
+		break;
 	case IMX_DMATYPE_HDMI:
 		emi_2_per = sdma->script_addrs->hdmi_dma_addr;
 		sdmac->is_ram_script = true;
diff --git a/include/linux/dma/imx-dma.h b/include/linux/dma/imx-dma.h
index cfec5f946e237..76a8de9ae1517 100644
--- a/include/linux/dma/imx-dma.h
+++ b/include/linux/dma/imx-dma.h
@@ -41,6 +41,7 @@ enum sdma_peripheral_type {
 	IMX_DMATYPE_SAI,	/* SAI */
 	IMX_DMATYPE_MULTI_SAI,	/* MULTI FIFOs For Audio */
 	IMX_DMATYPE_HDMI,       /* HDMI Audio */
+	IMX_DMATYPE_I2C,	/* I2C */
 };
 
 enum imx_dma_prio {

-- 
2.34.1
Re: [PATCH 4/4] dmaengine: imx-sdma: Add i2c dma support
Posted by Fabio Estevam 1 year, 11 months ago
On Mon, Mar 4, 2024 at 1:33 AM Frank Li <Frank.Li@nxp.com> wrote:
>
> From: Robin Gong <yibin.gong@nxp.com>
>
> New sdma script support i2c. So add I2C dma support.

What is the SDMA firmware version that corresponds to this "new SDMA script"?

In which SoC has this been tested?
Re: [PATCH 4/4] dmaengine: imx-sdma: Add i2c dma support
Posted by Frank Li 1 year, 11 months ago
On Mon, Mar 04, 2024 at 08:12:09AM -0300, Fabio Estevam wrote:
> On Mon, Mar 4, 2024 at 1:33 AM Frank Li <Frank.Li@nxp.com> wrote:
> >
> > From: Robin Gong <yibin.gong@nxp.com>
> >
> > New sdma script support i2c. So add I2C dma support.
> 
> What is the SDMA firmware version that corresponds to this "new SDMA script"?

sdma-6q: v3.5
sdma-7d: v4.5

> 
> In which SoC has this been tested?
> 

imx8mp and imx6ull.

> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 4/4] dmaengine: imx-sdma: Add i2c dma support
Posted by Daniel Baluta 1 year, 11 months ago
On Tue, Mar 5, 2024 at 5:39 PM Frank Li <Frank.li@nxp.com> wrote:
>
> On Mon, Mar 04, 2024 at 08:12:09AM -0300, Fabio Estevam wrote:
> > On Mon, Mar 4, 2024 at 1:33 AM Frank Li <Frank.Li@nxp.com> wrote:
> > >
> > > From: Robin Gong <yibin.gong@nxp.com>
> > >
> > > New sdma script support i2c. So add I2C dma support.
> >
> > What is the SDMA firmware version that corresponds to this "new SDMA script"?
>
> sdma-6q: v3.5
> sdma-7d: v4.5
>
> >
> > In which SoC has this been tested?
> >
>
> imx8mp and imx6ull.


This information should be present in the commit message.