imx8mm uart4 dts L4.14.98 vs L4.19.35

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

imx8mm uart4 dts L4.14.98 vs L4.19.35

918 Views
davidvescovi
Contributor V

I have a working custom iMX8mm device based on L4.14.98. This custom device uses uart4 muxed to the default ECSPI2 pins. My DTS file looks like:

...
pinctrl_uart2: uart2grp {
fsl,pins = <
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
>;
};

pinctrl_uart4: uart4grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x00000116
MX8MM_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x00001916
MX8MM_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x00000116
MX8MM_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B 0x00000116
>;
};
...
&uart2 { /* console */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
};

&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
assigned-clocks = <&clk IMX8MM_CLK_UART4>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
fsl,uart-has-rtscts;
status = "okay";
};

I am in the process of migrating to L4.19.35 and I noticed the DTS files for the evk are quite different in the way of pin mux/control. My DTS file based on L4.14.98 will not migrate directly to L4.19.35. In deed the u-boot will not even compile.

I fixed most things by basing my new DTS following the L4.19.35 iMX8mm evk pattern but I am stuck with UART4. 

#############################################

My new DTS looks like:

 

pinctrl_uart2: uart1grp {
fsl,pins = <
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x49
MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x49
>;
};

pinctrl_uart4: uart4grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x?????
MX8MM_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x?????
MX8MM_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x????
MX8MM_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B 0x?????
>;
};

...

&uart2 { /* console */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
};

&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
assigned-clocks = <&clk IMX8MM_CLK_UART4>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
fsl,uart-has-rtscts;
status = "okay";
};

My questions are:

1. why is  "pinctrl_uart2: uart1grp" which is in the evk source. Where is uart1grp and shouldn't that be uart2grp?

2. what do I need to put in the ???? for the uart4 iomux? 

0 Kudos
4 Replies

755 Views
davidvescovi
Contributor V

obviously something changed as even UART2 setting (which I have not touched) have changed from L4.14.98 to L4.19.35

0 Kudos

755 Views
igorpadykov
NXP Employee
NXP Employee

one can try to debug it, check with jtag iomux settings.

Best regards
igor

0 Kudos

755 Views
davidvescovi
Contributor V

Nope, Boundry devices map UART4 to their standard default pins so no help there.

I wish to use the alt configuration ESPI2 pins.

Which I had working L4.14.98. what changed in L4.19.35? 

0 Kudos

755 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

1. right, should be pinctrl_uart2: uart2grp

example for uart4 can be found in boundary devices nitrogen8mm board

linux-imx6/imx8mmn-nitrogen8mm.dtsi at boundary-imx_4.14.x_2.0.0_ga · boundarydevices/linux-imx6 · G... 

2.  this data is iomux pad control register like described in

sect.8.2.5.280 Pad Control Register (IOMUXC_SW_PAD_CTL_PAD_ECSPI2_MOSI)

i.MX 8M Mini Applications Processor Reference Manual

One can use those values as in other uarts.

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

0 Kudos