LPUART2 hangs

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

LPUART2 hangs

1,157 Views
lorenzo_giraudi
Contributor III

Hello,

I am working on a custom board with i.MX8 Quad Max and kernel 5.4.24. I am using a device tree that is almost identical to the one of mek.

When i do "echo a > /dev/ttyLP0", it works and return succesfully or ttyLP0, ttyLP1, ttyLP3. When i try with ttyLP2, it hangs until i press Ctrl-C. No activity is visible with the oscilloscope.

The only change is the pinctrl:

fsl,pins = <
IMX8QM_LVDS0_I2C1_SDA_DMA_UART2_RX 0x06000021 /* INOUT, pull-up, low drive strength */
IMX8QM_LVDS0_I2C1_SCL_DMA_UART2_TX 0x06000021 /* INOUT, pull-up, low drive strength */
>;

Does ttyLP2 work out of the box or there should be some modification?

Thank you

Tags (3)
0 Kudos
5 Replies

1,143 Views
igorpadykov
NXP Employee
NXP Employee

Hi Lorenzo

 

uart2 may be used by M4 in SDK_MEK-MIMX8QM available on  https://mcuxpresso.nxp.com/en/welcome

One can try to move uart2 to A53 partition using example on below link, sect. "Modifying default configuration" :

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/System-Controller-Firmware-101-Resource-...

 

Best regards
igor

0 Kudos

1,134 Views
lorenzo_giraudi
Contributor III

Thank you Igor,

I read it and it is a possibility. I have only one doubt: it looks like the SCUFW does that partitioning only if the boot image has been built with

-flags 0x00200000 

 inside the imx mkimage.

I am building with Yocto (zeus, kernel version 5.4.24). There, imx-boot.bb does not look like it is building with that flag enabled. Can you confirm me this? Because if the flag is not present, the modification to the SCUFW is useless.

Thank you

0 Kudos

1,130 Views
lorenzo_giraudi
Contributor III

I have checked and i am compiling the "flash" target, so it executes this:

./$(MKIMG) -soc QM -rev B0 -append $(AHAB_IMG) -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a53 0x80000000 -out flash.bin

So there is no -flag option.

0 Kudos

1,129 Views
lorenzo_giraudi
Contributor III

I also saw that on newer kernel version, the DMA channels of uarts have been changed. Was it wrong?

I tried replicating the changes but it did not work.

0 Kudos

1,112 Views
igorpadykov
NXP Employee
NXP Employee

may be recommended latest Linux 5.10.9_1.0.0 kernel and rebuild all image from scratch

using all components (like SCFW Porting Kit​ 1.8.0) as described in  i.MX Linux Release Notes

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 Kudos