SDMA Event remapping for ESAI create issues with UART6

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

SDMA Event remapping for ESAI create issues with UART6

1,085 Views
kmagi
Contributor III

Hello All,

 

I am working on i.MX6ULL and there is an issue I am facing with SDMA remapping.

When I am configuring the sdma remapping event as below, I am able to run the audio on ESAI channel,

&sdma {
gpr = <&gpr>;
/* SDMA event remap for ESAI */
fsl,sdma-event-remap = <0 14 1>, <0 15 1>;
};

But, I am experiencing an hang on UART6 bus.

Can anyone point me how the settings are causing issue on UART6? 

I can see the datasheet shows below register IOMUXC_GPR_GPR0 field descriptions,

kmagi_1-1616641987358.png

 

Does that mean that when ESAI is run on SDMA mode, UART6 cannot be used?

 

Thanks,

Kiran

Labels (1)
0 Kudos
7 Replies

1,050 Views
kmagi
Contributor III

Hi @igorpadykov ,

The ESAI configuration for using SDMA looks to be fine.

When I referred the documentation for sdma @ Documentation/devicetree/bindings/sdma/fsl-imx-sdma.txt, it is stated,

---------------------------------------------------------------------------------------------------------------------

If we want to use SDMA on the SAI1 port on a MX6SX:
 
&sdma {
gpr = <&gpr>;
/* SDMA events remap for SAI1_RX and SAI1_TX */
fsl,sdma-event-remap = <0 15 1>, <0 16 1>;
};
 
The fsl,sdma-event-remap property in this case has two values:
- <0 15 1> means that the offset is 0, so GPR0 is the register of the
SDMA remap. Bit 15 of GPR0 selects between UART4_RX and SAI1_RX.
Setting bit 15 to 1 selects SAI1_RX.
- <0 16 1> means that the offset is 0, so GPR0 is the register of the
SDMA remap. Bit 16 of GPR0 selects between UART4_TX and SAI1_TX.
Setting bit 16 to 1 selects SAI1_TX.
---------------------------------------------------------------------------------------------------------------------
 
Does that mean that if SDMA is used on SAI1 channel then we cannot use the UART4 for the system?
Similarly with iMX6ULL, usage of SDMA on ESAI channel means that we cannot use UART6 in the system? 
 
Regards,
Kiran
0 Kudos

1,047 Views
igorpadykov
NXP Employee
NXP Employee

>Similarly with iMX6ULL, usage of SDMA on ESAI channel means that we

>cannot use UART6 in the system? 

 

it can be used without sdma.

 

Best regards
igor

0 Kudos

1,031 Views
kmagi
Contributor III

Hello @igorpadykov ,

 

I am using SDMA on ESAI channel as I have the SDMA remapping configured for that and haven't really configured any SDMA remapping for UART6 but still the UART6 freezes when I am trying to send/receive data on UART6.

Please clarify why UART6 should be having an issue? Is there any default mapping already in place with the imx6ul.dtsi which may need to remove or something? Kindly advise.

 

Regards,

Kiran

0 Kudos

1,024 Views
igorpadykov
NXP Employee
NXP Employee

could you please confirm, if you are using uart6 without sdma.

If yes, one can try to debug it checking if uart6 clocks are enabled in CCM_CCGR3

register, UART6_UCR1 bit UARTEN.  Also please note that UART6 also can be used

in M4 FreeRTOS SDK.

 

Best regards
igor

0 Kudos

1,075 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kiran

 

>Does that mean that when ESAI is run on SDMA mode, UART6 cannot be used?

 

yes. In such case one can try to use uart without sdma (remove UART6 sdma entries in dts).

 

Best regards
igor

0 Kudos

1,072 Views
kmagi
Contributor III

Hi @igorpadykov ,

If I am removing the dts entries then ESAI is not working and hence audio doesn't work.

I am expecting both to work.

 

Regards,

Kiran

0 Kudos

1,069 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kiran

 

you can use memtool and check if gpr was correctly configured

https://source.codeaurora.org/external/imx/imx-test/tree/test/memtool?h=imx_5.4.70_2.3.0

 

Best regards
igor

0 Kudos