i.MX8M Mini pin muxing at run time

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

i.MX8M Mini pin muxing at run time

568 Views
ranjithkumar_kv
Contributor I

Hi,

We are using i.MX8M Mini processor in our project. We need to know whether we can be able to do the pin muxing at run time i.e. after the Kernel boots up.If it possible an example idea and code will be helpful for us in implementing that.

In our project we will be using a pin as SPI for some time and after some time we will be using it for I2C or GPIO.

Thanks.

Labels (1)
Tags (1)
0 Kudos
4 Replies

450 Views
jimmychan
NXP TechSupport
NXP TechSupport

For your case, I would suggest you configure the pins as GPIO pins. Then you can use the GPIO as SPI (GPIO-to-SPI) or I2C (GPIO-to-I2C) when needed.

0 Kudos

450 Views
ranjithkumar_kv
Contributor I

Hi Jimmy,

Thanks for your information.

Can I know how to configure the GPIO as SPI or I2C in run time?

Can you also please send any example snippet for this type of GPIO configuration?

Thanks in advance.

0 Kudos

450 Views
jimmychan
NXP TechSupport
NXP TechSupport

My suggestion is use GPIO signals to simulate the SPI and I2C.

So, in the dts file, you can configure the pins as GPIO pins.

Sorry, I don't have the example code for you about GPIO-SPI and GPIO-I2C. I think you can search the code from internet.

0 Kudos

450 Views
ranjithkumar_kv
Contributor I

Hi Jimmy,

Thanks for your information.

We will search in internet regarding the GPIO-SPI and GPIO-I2C and update if we found anything.

Thanks

0 Kudos