Hi PRAMOD,
See below, please!
------------------
1. IOMUX on hardware
GPIO3_IO24---->SAI5_RXD3 (CPU pin)
GPIO5_IO20---->I2C4_SCL (CPU pin)
GPIO5_IO22---->UART1_RXD (CPU pin)
2. IOMUX in device tree
[Comment]
For the reason you are using I2C4 port, so you can't use GPIO5_IO20, which can only be routed to I2C4_SCL pin, which can cause I2C4 not to work normally. see linux_top/include/dt-bindings/pinctrl/pins-imx8mm.h.
in fsl-imx8mm-evk.dts
iomux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
imx8mm-evk {
pinctrl_hog: hoggrp {
fsl,pins = <
MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20 0x19
MX8MM_IOMUXC_UART1_RXD_GPIO5_IO22 0x19
>;
};
......
pinctrl_i2c4_pn544_io: pn544_iogrp {
fsl,pins = <
MX8MM_IOMUXC_SAI5_RXD3_GPIO3_IO24 0x19 /* NFC reader int */
>;
};
......
}
&i2c4{
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
pn544:pn544@28{
compatible = "nxp,pn544,","nxp,pn544-i2c","nxp,pn544_hci_i2c","fsl,imx8mm-i2c", "fsl,imx21-i2c";
reg = <0x28>;
gpio-controller;
/* clock-frequency = <400000>;
gpio_intr = <&gpio3 24 GPIO_ACTIVE_LOW>; */
pinctrl-0 = <&pinctrl_i2c4_pn544_io>;
interrupt-parent = <&gpio3>;
interrupts = <24 GPIO_ACTIVE_HIGH>;
enable-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>; /* GPIO5_IO20's mulplexing conflicts with that of I2C4_SCL. */
firmware-gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>;
};
};
Hope above information is helpful for you!
Have a nice day!
B.R,
Weidong