How to set i2c3's clock frequency of i.MX8M Plus

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

How to set i2c3's clock frequency of i.MX8M Plus

1,148 Views
bych
Contributor II

Dear NXP support team,

 

I have been trying to control GPIOs of 40 pins expansion connectors for displaying LED Matrix, but I'm having troubles with flickering LEDs.

 

By using libgpiod, I've tried to send a certain patterns of GPIOs' high-row sequence, but the clock frequency seems to have a low rate.

 

Checking the schematic, I've found that i2c3's clock frequency is associated with the GPIO's of the expansion connectors.

 

So, I tried to change i2c3's clock frequency by making corrections on the kernel's dts which is located on yocto project's directory, "\tmp\work-shared\imx8mp-lpddr4-evk\kernel-source\arch\arm64\boot\dts\freescale\imx8mp-evk.dts"

 

However, the clock frequency did not change at all when I ran the gpio control program. 

 

Could you kindly give me a guide how I can change i2c3's clock frequency of i.MX8M Plus? It would be great if you can advise how to compile and make an image through yocto project build when I make changes on dts.

 

Also, could you kindly advise how I check the current clock frequency settings of i2C3? it would be great if it is just a simple command.

 

Thank you.

0 Kudos
Reply
3 Replies

1,122 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @bych 

 

I hope you are doing well.

 

Actually, yes, modifying the device tree, you should be able to change the frequency of I2C3 for i.MX8MP.

But, you can see on the original i.MX8mp-EVK device tree, is it configured as maximum supported frequency (400 KHz):

Alejandro_Salas_0-1737724827406.png

 

To compile device tree, please follow the steps in this post.

If possible, try to capture with a Logic Analyzer or scope the I2C bus signal and GPIO signals to ensure everything is according with the configured timing.

 

I hope this can helps to you.

 

Best regards,

Salas.

0 Kudos
Reply

1,087 Views
bych
Contributor II
Quick Question,

Where can I get the reference of that I2C of imx8mp-evk is configured as maximum supported frequency (400 KHz)?

It would be great if you give me a link.

Thank you.
0 Kudos
Reply

1,094 Views
bych
Contributor II

Dear Salas

 

I tried to compile device tree, imx8mp-evk.dts with the instructions you gave.

But, when I typed "make dtbs" on the directory of device tree is located, it replied, "No rule to make target 'dtbs'.

 

Could you please give me more specific instructions to compile device tree and get the final zst image of imx8m plus evk's image for boot and rootfs?

 

Also, I'm confused which directory I should type those commands of configuring and compiling device tree files.

 

Thank you.

0 Kudos
Reply