IMX8QXP Kernel not working from LPUART1

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

IMX8QXP Kernel not working from LPUART1

1,776 Views
mdmosaddekhossa
Contributor II

Hello NXP Team,

Currently we are facing issue to boot the kernel in our iMX8QXP custom board. Via fastboot we are flashing the linux kernel and device tree from u-boot. When we try to boot the kernel no response is coming from the LPUART1. We are using LPUART1 instead of LPUART0 from reference MEK board. 

Kernel version:

4.19.35_1.1.0

Kernel Device Tree Using LPUART1:

chosen {
bootargs = "console=ttyLP1,115200 earlycon=lpuart32,0x5a070000,115200";
stdout-path = &lpuart1;
};

&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;

imx8qxp-sthu {

pinctrl_hog: hoggrp {
fsl,pins = <
>;
};

pinctrl_lpuart1: lpuart1grp {
fsl,pins = <
SC_P_UART1_RX_ADMA_UART1_RX 0x06000020
SC_P_UART1_TX_ADMA_UART1_TX 0x06000020
>;
};

};

};

&pd_dma_lpuart1 {
debug_console;
};


&lpuart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpuart1>;
status = "okay";
};

Defconfig:

Check the attachment.

Problem:

These `/dma-controller@5a1f0000, 48852` messages come from u-boot. And `u-boot` successfully transfers control to linux.

But nothing comes out from Kernel lpuart1.

kernel.png

2 Replies

1,646 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mosaddek

one can look at

https://community.nxp.com/thread/493688 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,646 Views
mdmosaddekhossa
Contributor II

Hallo Igor,

Thanks for the reply. According to your answer in the thread chaning the Debug port i.MX8QXP , my u-boot has been configured exactly in same way. My u-boot lpuart1 is working. You can also check the unimog_imx8qxp.c file.

igorpadykov‌ as mentioned by you in the thread,

Then you'll need to make similar changes in the U-Boot device tree: arch/arm/dts/fsl-imx8qxp*.dts*. MUX and clocks should be configured, though you might need to enable (status = "okay";) lpuart3. Don't forget to include CONFIG_FSL_LPUART=y in your defconfig file.

The SOC device tree file provided from NXP uses pd_dma2_chan11 which is only the tx line dma. I have changed it to "pd_dma_lpuart1"

lpuart1: serial@5a070000 {
compatible = "fsl,imx8qm-lpuart";
reg = <0x0 0x5a070000 0x0 0x1000>;
interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&wu>;
clocks = <&clk IMX8QXP_UART1_CLK>,
<&clk IMX8QXP_UART1_IPG_CLK>;
clock-names = "per", "ipg";
assigned-clocks = <&clk IMX8QXP_UART1_CLK>;
assigned-clock-rates = <80000000>;
power-domains = <&pd_dma2_chan11>;
dma-names = "tx","rx";
dmas = <&edma2 11 0 0>,
<&edma2 10 0 1>;
status = "disabled";
};

## My Device Tree ## in U-boot

pinctrl_lpuart1: lpuart1grp {
fsl,pins = <
SC_P_UART1_RX_ADMA_UART1_RX 0x06000020
SC_P_UART1_TX_ADMA_UART1_TX 0x06000020
>;
};

&lpuart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpuart1>;
status = "okay";
};

After correcting the LPUART1 dma from the device tree file. Now the Kernel is working.

0 Kudos
Reply