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?
Hi Weidong,
I do have problems in my settings. Could you double check again?
-Eric
Yes, see below, please!
Open IMX8MMRM.pdf, then search SAI2_RXFS, you will find it on page 1245, like above list.
Have a nice day!
BR,
Weidong
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