I want to interface MPU-9250 to Apalis iMX6Q/Ixora board as an I2C slave…
Please help me to configure new I2C slave;
1.Is there ready-made driver code available?
While our BSP does not contain any such driver code you may find some ready-made Linux driver in some Android sources e.g. here which could probably easily be ported.
2.What changes needs to be done in kernel and dts file for device detection and communication?
Have a look at the following Stack Overflow discussion about this topic.
If all the required changes are correctly made, the device should be accessible through /sys/bus/iio as is applicable for all devices covered by Industrial IO subsystem. There seems to be no device tree binding documentation for the MPU6050 either here or here.