S32G2 UART1 support in LinuxBSP29_HF1

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

S32G2 UART1 support in LinuxBSP29_HF1

3,744 Views
vivek_kaushik
Contributor II

Hi, 

On our custom board and on S32G2_RDB2 I am trying to communicate over UART1 but there is no data transmit and receive happening.

I am working with Linux BSP:BSP29.0_HF1

UART pins used on both hardware is same i.e.:

UART_TX: U12 (PA_13)

UART_RX: W12 (PB_00)

In file: arch/arm64/boot/dts/freescale/fsl-s32-gen1.dtsi

Below configuration looks fine:

uart1:serial@401CC000 {
compatible = "fsl,s32-linflexuart";
reg = <0x0 0x401CC000 0x0 0x3000>;
interrupts = <0 83 1>;
clocks = <&clks S32GEN1_SCMI_CLK_LINFLEX_LIN>,
<&clks S32GEN1_SCMI_CLK_LINFLEX_XBAR>;
clock-names = "lin", "ipg";
dmas = <&edma0 0 6>,
<&edma0 0 5>;
dma-names = "rx", "tx";
};

 

On both custom and RDB2 I can see node: /dev/ttyLF1 but there is no communication.

 

Can you confirm if anything is missing in software or hardware.

Kind Regards

Vivek

0 Kudos
Reply
3 Replies

3,682 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Vivek,

I have experienced this problem in RDB. The default setting of BSP29.0.0 does not configure Uart1 Multiplex pin, So you probably need to configure the right Multiplex pin of Uart1. 

For example, RDB Uart2 pin is PB_00 and PA_13. You need to set MSCR13(address:0x4009c274) value as 0x00214002. And  set MSCR16(address:0x4009c280) value as 0x00094000, set IMCR224(address:0x44010dc0) as 0x00000002.

By the way, A simple way to open Uart1 though configure u-boot. Just modify u-boot configuration file.

file path:

~/fsl-auto-yocto-bsp-29/build_s32g274ardb/tmp/work/s32g274ardb-fsl-linux/u-boot-s32/2020.04-r0/git/board/freescale/s32-gen1/ s32g274ardb.c

 
 

 Change to the following picture:

Bio_TICFSL_0-1658755959905.png

 

Both uart1 and uart2 will open.

 

Regards

0 Kudos
Reply

3,677 Views
vivek_kaushik
Contributor II

Hello Bio_TICFSL,

Thanks! for the inputs. Will enable UART1 in U-Boot and check.

 

Kind Regards

Vivek

0 Kudos
Reply

3,668 Views
vivek_kaushik
Contributor II

Hello Bio_TICFSL, 

Do you have any input:

1. How perticular ttyLFx interface is getting linked to the specific pinmux pads and enabled.

2. I see in the u-boot only ttyLF0 is getting enabled based on <CONFIG_FSL_LINFLEX_MODULE=0> in <.config>, I am sure from where it is getting initialized with 0.

Kind Regards

Vivek

0 Kudos
Reply