Found the node for role switching as "/sys/kernel/debug/ci_hdrc.0/role" for role switching. When the imx6 board is in gadget or device or peripheral mode the role switching is not happening with Apple Iphone. Found the problem that when the imx6 board is in gadget mode the voltage will be zero from the USB port. Is there any kernel patch for kernel 4.1 version ? or any other solution ? or the way to enable vbus ?
Refered below post :
But didnt help in fixing issue