I have been trying to enable UART4 on our iMX8m Mini board.
I have read all the docs and reviewed other post concerning UART4 on the mini.
None help.
I would like to pin mux pad B8 and E6 which in the standard configuration are:
ECSPI2_MOSI and ECSPI2_SCLK to be used as UART4 TX and RX.
This looks like a valid configuration from all I have read.
I see the fsl-imx8mm.dtsi the following for UART4:
uart4: serial@30a60000 {
compatible = "fsl,imx8mq-uart",
"fsl,imx6q-uart", "fsl,imx21-uart";
reg = <0x0 0x30a60000 0x0 0x10000>;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MM_CLK_UART4_ROOT>,
<&clk IMX8MM_CLK_UART4_ROOT>;
clock-names = "ipg", "per";
dmas = <&sdma1 28 4 0>, <&sdma1 29 4 0>;
dma-names = "rx", "tx";
status = "disabled";
};
The compatible line seems to be in error so I changed it to:
compatible = "fsl,imx8mm-uart",
"fsl,imx6q-uart", "fsl,imx21-uart";
I then added the following to the &iomuxc in my .dts file:
pinctrl_uart4: uart4grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x00000116
MX8MM_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x00000116
>;
};
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
assigned-clocks = <&clk IMX8MM_CLK_UART4_SRC>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
status = "okay";
};
When I boot the kernel crashes with a panic.
If I go back and set status = "disabled" it boots but no UART4.
I suspect I missed some clock enable or something but I can't figure out what.
any help?