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.
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.
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.
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.
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