hello,nxp
our soc is imx8mm and os is android9.0
from fsl_imx8mm_evk.dts,we can see i2c4 is not enable and the pin had resued。
so delete the mux pin。
below is my i2c4 dts
pinctrl_i2c4: i2c4grp {
fsl,pins = <
MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c3
MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c3
>;
};
&i2c4 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
goodix_ts:goodix_ts@28 {
compatible = "goodix,gt1x";
reg = <0x28>;
interrupt-parent = <&gpio1>;
interrupts = <7 0x2>;
vdd_ana-supply = <®_usdhc2_vmmc>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ts_int_pull_up>;
goodix,reset-gpio = <&gpio1 7 0x00>;
goodix,irq-gpio = <&gpio1 6 0x00>;
goodix,default-config0 = [
5c 00 12 11 10 11 5f 00 cc bb
22 00 11 00 00 00 00 00 00 00
];
goodix,charger-config2 = [
5f 00 12 11 10 11 5f 00 cc bb
23 00 11 00 00 00 00 00 00 00
];
};
};
from start log:we could know i2c1,i2c2 and i2c3 is enable,but i2c4 is not enable
Solved! Go to Solution.
Try the setting for I2C4 PAD:
MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0xc3 // change 0x400001C3 to 0xc3
MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0xc3 // change 0x400001C3 to 0xc3
weidong
Hi Zhouwei,
In fsl-imx8mm-evk.dts, you can find I2C4_SCL and I2C4_SDA pins have been used by default:
-----------------------------------------------------------------------------
pinctrl_pcie0: pcie0grp {
fsl,pins = <
MX8MM_IOMUXC_I2C4_SCL_PCIE1_CLKREQ_B 0x61 /* open drain, pull up */
MX8MM_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x41
MX8MM_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x41
>;
};
pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0xd6
>;
};
-----------------------------------------------------------------------------------
If you want to use it as I2C4, you should comment or delete above 2 lines at first.
Then add your above code for I2C4 to the dts file.
Hope the information is helpful to you.
Have a nice day!
B.R,
Weidong
thks Wigros Sun
i had been delete there pins
but the i2c4 is still fail,
the i2c_imx.c probe function is not recoginse the i2c4。
Is I2C4 in your schematic 3.3V or 1.8V?
the soc section is 1.8V,but we pull it to 3.3,
i had a doubt why i2c-imx.c is not recognise i2c4,dts is below,i can not see any wrong
Try the setting for I2C4 PAD:
MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0xc3 // change 0x400001C3 to 0xc3
MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0xc3 // change 0x400001C3 to 0xc3
weidong
i2c4 is ok now,thks Wigros Sun