i.MX 8QuadMax MEK I2C Pin

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

i.MX 8QuadMax MEK I2C Pin

1,421 Views
Tamako
Contributor I

Hi,All

I have been using imx8qm MEK this development board recently.

I want to  add a i2c radio device on the base board ,but the schematics are incomplete.Is there an expanded i2c pin on the base board?

Tamako_0-1687954760950.png

Thans

0 Kudos
Reply
11 Replies

1,400 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

That part of the schematic is on base board design files:

Jorge7u7_0-1687972763442.png

Best regards.

0 Kudos
Reply

1,392 Views
Tamako
Contributor I
thanks for your reply.
Can this interface be used to connect other i2c devices? For example, radio module, EEPROM
0 Kudos
Reply

1,372 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Yes, that is correct.

Best regards.

0 Kudos
Reply

1,349 Views
Tamako
Contributor I
HI,Joreg.
Are there no other i2c extension ports on this base board?
I added a radio module on the AUX I2C interface,and this device address is 0x60.But i did not scan this device using the i2c-tools .
I noticed that 9 i2c buses were scanned,But only i2c0、i2c1、i2c4 are described in the schematic.

Can you help me with that?
Thanks
0 Kudos
Reply

1,334 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

No, all the I2C extension ports are described on both schematics.

Those I2C devices corresponds to:

Jorge7u7_0-1688077661106.png

In the case of AUX I2C (in i.MX8QM) is connected to an I2C buffer on I2C4:

Jorge7u7_1-1688077763650.png

So, you need to add it on device tree.

Best regards.

0 Kudos
Reply

1,255 Views
Tamako
Contributor I
HI,Joreg.
Only one i2c Interface on this base board?and how exactly should I add device tree to enable the AUX I2C interface.
Thanks
0 Kudos
Reply

1,048 Views
JunNono
Contributor I

We have the same problem.
Does anyone know of a good way to get rid of it?

0 Kudos
Reply

914 Views
Tamako
Contributor I

Hi

Do you want to connect an external I2C device?

I am not using the I2C interface on the AUX I2C base.

I selected a set of I2C pins on the backplane.

This is the location of the baseboard schematic:

选区_006.png

This is the actual location:

_cgi-bin_mmwebwx-bin_webwxgetmsgimg__&MsgID=8627520543091048437&skey=@crypt_1f646978_125c547daf25ccde3852752c4e0792f6&mmweb_appid=wx_webfilehelper.jpeg

Last modified device tree:

&i2c0 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0>;
status = "okay";
 
xxxx@60{
compatible = "xxx,xxxx";
reg = <0x60>;
};
};
 
BR
Tamako
0 Kudos
Reply

872 Views
Tamako
Contributor I

Hi

Do you want to connect an external I2C device?

I'm not using the AUX I2C pins on this base,I selected a set of I2C pins based on the schematic of the baseboard.
The picture below is its location in the base plate schematic diagram:

选区_006.png

The picture below shows its actual location on the back of the chassis:

_cgi-bin_mmwebwx-bin_webwxgetmsgimg__&MsgID=8627520543091048437&skey=@crypt_1f646978_125c547daf25ccde3852752c4e0792f6&mmweb_appid=wx_webfilehelper.jpeg

At the locations of resistors R110 and R111,but I forgot whether there was a resistor at this location, it's been too long.After you are connected and can use I2C-tools to scan your I2C device address, you still need to modify the device tree.


Modify imx8qm-mek.dts:

&i2c0 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0>;
status = "okay";
 
isl29023@44 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_isl29023>;
compatible = "isil,isl29023";
reg = <0x44>;
rext = <499>;
interrupt-parent = <&lsio_gpio4>;
interrupts = <11 2>;
};
 
...........
 
#add your i2c device
 
xxxx@60{
compatible = "xxxx,xxxxx";
reg = <0x60>;
};
};
 
Please be careful that your I2C device address does not conflict with other devices on the I2C0 bus.
It's been a long time, so I can't remember the specific details clearly, but the process is roughly like this.

Best Regards.
Tamako
0 Kudos
Reply

858 Views
JunNono
Contributor I

JunNono_0-1695841807469.png

The pins you suggested were not connected, so I decided to use pins 9 and 10 of J26.
The I2C worked successfully.
It seems that no special DTS changes were necessary.
However, when I2C communication was performed after the connection was made, the following Kernel Panic occurred.
Did the same phenomenon occur?

[ 474.354231] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: i2cback_handle_int+0x570/0x5c8
[ 474.365844] CPU: 0 PID: 459 Comm: irq/394-xen-i2c Not tainted 5.4.70-2.3.0+g4f2631b022d8 #1
[ 474.375027] Hardware name: Freescale i.MX8QM MEK (DT)
[ 474.380628] Call trace:
[ 474.383384] dump_backtrace+0x0/0x140
[ 474.387456] show_stack+0x14/0x20
[ 474.391160] dump_stack+0xb4/0x114
[ 474.394956] panic+0x158/0x324
[ 474.398366] print_tainted+0x0/0xa8
[ 474.402257] i2cback_handle_int+0x570/0x5c8
[ 474.406905] i2cback_be_int+0x20/0x40
[ 474.410990] irq_thread_fn+0x28/0x98
[ 474.414969] irq_thread+0x148/0x240
[ 474.418860] kthread+0x138/0x158
[ 474.422467] ret_from_fork+0x10/0x1c
[ 474.426456] SMP: stopping secondary CPUs
[ 474.430832] Kernel Offset: disabled
[ 474.434704] CPU features: 0x0002,2000200c
[ 474.439162] Memory Limit: none
[ 474.442586] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: i2cback_handle_int+0x570/0x5c8 ]---
(XEN) Watchdog timer fired for domain 0
(XEN) Hardware Dom0 shutdown: watchdog rebooting machine

0 Kudos
Reply

843 Views
Tamako
Contributor I

Hi

Sorry, I have never encountered this situation.

I modified the device tree to transplant my driver. After my testing, my driver and I2C device are normal.
Can you provide some more detailed information?

BR
Tamako

0 Kudos
Reply