I am using iMX6 Quad core processor and MAC signals for RGMII interface coming out from processor can be externally loopback and tested?
This is very dependent on what you are trying to achieve here.
If to test your hardware (PCB) then likely the most effective way to do this is create a loopback ethernet cable and plug this into your RJ-45 connector during test, this way you are testing from the processor all the way out to the RJ-45 connector, via the PHY.
You can google ethernet loopback for further information on this.
Another option would be to look at the PHY you plan to use for loopback modes, this would allow you to test from the processor to PHY connections, but may not cover the PHY to RJ-45 connections.
Within the ENET controller I see no RGMII loopback modes within the documentation, there appears to be RMII and MII loopback modes, but I think they will provide very little benefit if they only test the controller on the processor and provide no real hardware testing.
If you still have a reason for wanting to test the RGMII pin connectivity only, you could use the GPIO mode of these pins and write a small test for this, but again not sure this actually achieves a lot for you, depending on your exact needs.
Retrieving data ...