iMX6UL: DMA support for UARTs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6UL: DMA support for UARTs

1,230 Views
pierluigi_p
Contributor V

Hi,
we found that starting from kernel 5.4, DMA support for iMX6UL is no longer available.
In the previous kernel releases, up to 4.19.xx, it was introduced by MLK-11300.
The attached patch re-enable it again.
Is the DMA support for UARTs disabled for any specific reason ?
May the attached patch create any known side effect ?
Thanks
Best Regards
Pier

Labels (1)
0 Kudos
5 Replies

1,216 Views
ceggers1
Contributor IV

Hi Pier,

I use the SDMA with several peripherals (including UARTs) on i.MX6ULL. So of course you can use it. I had an issue when accessing UARTs on the SPBA bus over the SDMA's peripheral bus. But when accessing these (or other) UARTs via the AP bus, everything works fine.

As I don't use the NXP kernels (I work with the stable-rt series), I can only guess which kernel you are actually using. Can you please send a link?

I have made several custom SDMA scripts for getting the best possible functionality and performance out of the peripherals. If this sounds interesting for you, don't hesitate to ask questions.

regards
Christian

0 Kudos

1,207 Views
pierluigi_p
Contributor V

Hi Christian,

you can check any of the 5.x kernel in the official NXP kernels.

Please let me know if you need further details.

Thanks

Regards

Pier

0 Kudos

1,200 Views
ceggers
Contributor V

Hi Pier,

I just checked my own kernel sources and recognized that the "SDMA support" for UARTs is also missing here.

In my sources, I have added the dt properties into my board file (and not to imx6ul(l).dtsi). In my opinion, these settings are actually board specific:

  • Some applications may want NOT to use SDMA for specific peripherals
  • other application (like mine) may want to use alternative SDMA channels are specific channel priorities

Here is a snipset from my board dts file:

/* UART1 (Debug) */
&uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart1>;
    /* note: imx_startup() will not enable DMA if UART is used as a console */
    /* 4 MCU domain UART */
    /* 5 Shared UART */
    /* 2 Low priority */
    dmas = <&sdma 25 4 2>, <&sdma 26 4 2>;
    dma-names = "rx", "tx";
    status = "okay";
};

If you have further (SDMA related) questions, please let me know.

regards
Christian

 

0 Kudos

1,180 Views
pierluigi_p
Contributor V

Hi Christian,

technically speaking, I can agree with you, but this should apply also to ecspi1/2/3/4 and sai1/2/3 interfaces that do have dma enabled.

A customer that is porting his own changes to any new 5.x kernel (relying on the default settings of kernels 4.x), experiences problems trying to understand why UART DMA support is no longer working.

I'd just like to know if NXP decided to leave the DMA uncofigured/disabled:

- to leave more flexibility

- because the original MLK11300 has been missed

- because there is any kind of side effect with the DMA enabled in kernels 5.x

Thanks

Regards

Pier

963 Views
HectorPalacios
Senior Contributor I

@fabio_estevamcan you comment on why DMA was removed from the UARTs on v5.4 BSP?

Thanks

0 Kudos