ls1021a custom board: using lpuart issue

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

ls1021a custom board: using lpuart issue

822 Views
evgeniyMatskevich
Contributor I

Hi,
We have a custom board with ls1021a processor.
Currently we need to communicate with the external serial device via lpuart interface.

We have settings for lpuart in dtsi file: 

lpuart2: serial@2970000 {
    compatible = "fsl,ls1021a-lpuart";
    reg = <0x0 0x2970000 0x0 0x1000>;
    interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&clockgen 4 1>;
    clock-names = "ipg";
    status = "disabled";
};

and added it to dts as follows.

&lpuart2 {
    status = "okay";
};

Here is the RCW that is shown in the U-Boot booting log:

Reset Configuration Word (RCW):
00000000: 0608000c 00000000 00000000 00000000
00000010: 20000000 08447900 e0105a00 21046000
00000020: 00000000 00000000 00000000 000b0300
00000030: 20000000 2486b340 00000000 00000000

The problem is that currently we have "ttyLP2" under /dev directory, but we can't communicate through it. 
If we try to use it with "microcom" utility we have an error:
# microcom /dev/ttyLP2
microcom: can't tcsetattr for /dev/ttyLP2: I/O error
Also:
# echo test > /dev/ttyLP2
ash: write error: I/O error

Could you advice a solution to resolve the issue?

0 Kudos
Reply
5 Replies

719 Views
yipingwang
NXP TechSupport
NXP TechSupport

Have you enabled CONFIG_SERIAL_FSL_LPUART in your Linux Kernel configuration file?

0 Kudos
Reply

686 Views
evgeniyMatskevich
Contributor I

Yes, I did it. But the result is the same.

0 Kudos
Reply

642 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please also add “CONFIG_FSL_LPUART=y” in your u-boot configuration file.

I have verified this feature on ls1021atwr, there is no problem to execute "echo test > /dev/ttyLP2" and "microcom /dev/ttyLP2" on my target board.

If your problem remains, please check the probable hardware problem on your custom board.

0 Kudos
Reply

806 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please configure RCW[SDHC_EXT] as 001

001 LPUART3_SOUT, LPUART3_SIN,
LPUART2_RTS_B, LPUART2_CTS_B,
LPUART3_RTS_B, LPUART3_CTS_B

0 Kudos
Reply

797 Views
evgeniyMatskevich
Contributor I

Hi,
Thank you for your answer.

I reconfigured RCW.
Here is the RCW that is shown in the U-Boot booting log:

Reset Configuration Word (RCW):
       00000000: 0608000c 00000000 00000000 00000000
       00000010: 20000000 08447900 e0105a00 21046000
       00000020: 00000000 00000000 00000000 00070300
       00000030: 20000000 2486b340 00000000 00000000

But I still can't communicate through "ttyLP2".

0 Kudos
Reply