Hi shivakumar,
For which i.MX are you trying to do this? The boot mode can be take it from the reference manual of any i.MX, depending of the device you are using, for example for a i.MX8M Dual, on the Chapter 6 SNVS, Reset, Fuse, and Boot you can see how to configure it and check the 6.1.5 Boot devices (internal boot),
Hope this help you,
Regards.
Israel H.