i.MX8M Mini UART Port

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

i.MX8M Mini UART Port

1,487 Views
eric_lee1
Contributor II

I have a i.MX8M Mini custom board with 4 serial ports. We cannot get one of them (uart1) working either on u-boot or linux kernel. The pinmux in u-boot of uart1 is as follows.

static iomux_v3_cfg_t const uart1_pads[] = {
IMX8MM_PAD_SAI2_RXFS_UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
IMX8MM_PAD_SAI2_RXC_UART1_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
};

At u-boot arch/arm/include/asm/arch-imx8m/imx8mm_pins.h file, we saw

         IMX8MM_PAD_SAI2_RXFS_UART1_RX                                 =  IOMUX_PAD(0x0418, 0x01B0, 4, 0x04F4, 2, 0),

and

         IMX8MM_PAD_SAI2_RXC_UART1_TX                                  =  IOMUX_PAD(0x041C, 0x01B4, 4, 0x0000, 0, 0),

When study RM of this processor, we cannot see information of SAI2_RXC_UART1_TX, but it is defined in pinmux tool.

At Linux kernel file include/dt-bindings/pinctrl/pins-imx8mm.h, we manually add the following lines.

#define MX8MM_IOMUXC_SAI2_RXFS_UART1_DCE_RX                                 0x1B0 0x418 0x4F4 0x4 0x2

and

#define MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_TX                                  0x1B4 0x41C 0x000 0x4 0x0

The device tree is defined as follows

pinctrl_uart1: uart1grp {
fsl,pins = <
MX8MM_IOMUXC_SAI2_RXFS_UART1_DCE_RX 0x140
MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_TX 0x140
>;
};

&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
assigned-clocks = <&clk IMX8MM_CLK_UART1_SRC>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
status = "okay";
};

Any suggestions?

0 Kudos
Reply
3 Replies

1,303 Views
eric_lee1
Contributor II

Hi Weidong,

I do have problems in my settings. Could you double check again?

-Eric

0 Kudos
Reply

1,303 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Yes, see below, please!

pastedImage_1.png

Open IMX8MMRM.pdf, then search SAI2_RXFS, you will find it on page 1245, like above list.

Have a nice day!

BR,

Weidong

0 Kudos
Reply

1,303 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Eric,

     Using the same way to add IOMUX for your application.

See the link, please!

https://community.nxp.com/message/1162311?commentID=1162311#comment-1162311 

You usage in linux is no problem.

Have a nice day!

Weidong

0 Kudos
Reply